Skip to content

Commit c37ea39

Browse files
committed
Merge tag 'drm-misc-next-2023-01-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v6.3: UAPI Changes: * fourcc: Document Open Source user waiver Cross-subsystem Changes: * firmware: fix color-format selection for system framebuffers Core Changes: * format-helper: Add conversion from XRGB8888 to various sysfb formats; Make XRGB8888 the only driver-emulated legacy format * fb-helper: Avoid blank consoles from selecting an incorrect color format * probe-helper: Enable/disable HPD on connectors plus driver updates * Use drm_dbg_ helpers in several places * docs: Document defaults for CRTC backgrounds; Document use of drm_minor Driver Changes: * arm/hdlcd: Use new debugfs helpers * gud: Use new debugfs helpers * panel: Support Visionox VTDR6130 AMOLED DSI; Support Himax HX8394; Convert many drivers to common generic DSI write-sequence helper * v3d: Do not opencode drm_gem_object_lookup() * vc4: Various HVS an CRTC fixes * vkms: Fix SEGFAULT from incorrect GEM-buffer mapping * Convert various drivers to i2c probe_new() Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/Y8ADeSzZDj+tpibF@linux-uq9g
2 parents 1f1c24d + 6e41acd commit c37ea39

81 files changed

Lines changed: 3119 additions & 1350 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/panel/himax,hx8394.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Himax HX8394 MIPI-DSI LCD panel controller
8+
9+
maintainers:
10+
- Ondrej Jirman <megi@xff.cz>
11+
- Javier Martinez Canillas <javierm@redhat.com>
12+
13+
description:
14+
Device tree bindings for panels based on the Himax HX8394 controller,
15+
such as the HannStar HSD060BHW4 720x1440 TFT LCD panel connected with
16+
a MIPI-DSI video interface.
17+
18+
allOf:
19+
- $ref: panel-common.yaml#
20+
21+
properties:
22+
compatible:
23+
items:
24+
- enum:
25+
- hannstar,hsd060bhw4
26+
- const: himax,hx8394
27+
28+
reg: true
29+
30+
reset-gpios: true
31+
32+
backlight: true
33+
34+
port: true
35+
36+
vcc-supply:
37+
description: Panel power supply
38+
39+
iovcc-supply:
40+
description: I/O voltage supply
41+
42+
required:
43+
- compatible
44+
- reg
45+
- reset-gpios
46+
- backlight
47+
- port
48+
- vcc-supply
49+
- iovcc-supply
50+
51+
additionalProperties: false
52+
53+
examples:
54+
- |
55+
#include <dt-bindings/gpio/gpio.h>
56+
57+
dsi {
58+
#address-cells = <1>;
59+
#size-cells = <0>;
60+
panel@0 {
61+
compatible = "hannstar,hsd060bhw4", "himax,hx8394";
62+
reg = <0>;
63+
vcc-supply = <&reg_2v8_p>;
64+
iovcc-supply = <&reg_1v8_p>;
65+
reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
66+
backlight = <&backlight>;
67+
68+
port {
69+
mipi_in_panel: endpoint {
70+
remote-endpoint = <&mipi_out_panel>;
71+
};
72+
};
73+
};
74+
};
75+
76+
...
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/panel/visionox,vtdr6130.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Visionox VTDR6130 AMOLED DSI Panel
8+
9+
maintainers:
10+
- Neil Armstrong <neil.armstrong@linaro.org>
11+
12+
allOf:
13+
- $ref: panel-common.yaml#
14+
15+
properties:
16+
compatible:
17+
const: visionox,vtdr6130
18+
19+
vddio-supply: true
20+
vci-supply: true
21+
vdd-supply: true
22+
port: true
23+
reset-gpios: true
24+
25+
additionalProperties: false
26+
27+
required:
28+
- compatible
29+
- vddio-supply
30+
- vci-supply
31+
- vdd-supply
32+
- reset-gpios
33+
- port
34+
35+
examples:
36+
- |
37+
#include <dt-bindings/gpio/gpio.h>
38+
panel {
39+
compatible = "visionox,vtdr6130";
40+
41+
vddio-supply = <&vreg_l12b_1p8>;
42+
vci-supply = <&vreg_l13b_3p0>;
43+
vdd-supply = <&vreg_l11b_1p2>;
44+
45+
reset-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
46+
47+
port {
48+
panel0_in: endpoint {
49+
remote-endpoint = <&dsi0_out>;
50+
};
51+
};
52+
};
53+
...

Documentation/userspace-api/ioctl/ioctl-number.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ Code Seq# Include File Comments
222222
'a' 00-0F drivers/crypto/qat/qat_common/adf_cfg_common.h conflict! qat driver
223223
'b' 00-FF conflict! bit3 vme host bridge
224224
<mailto:natalia@nikhefk.nikhef.nl>
225+
'b' 00-0F linux/dma-buf.h conflict!
225226
'c' all linux/cm4000_cs.h conflict!
226227
'c' 00-7F linux/comstats.h conflict!
227228
'c' 00-7F linux/coda.h conflict!

MAINTAINERS

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6550,6 +6550,14 @@ S: Maintained
65506550
T: git git://anongit.freedesktop.org/drm/drm-misc
65516551
F: drivers/gpu/drm/tiny/gm12u320.c
65526552

6553+
DRM DRIVER FOR HIMAX HX8394 MIPI-DSI LCD panels
6554+
M: Ondrej Jirman <megi@xff.cz>
6555+
M: Javier Martinez Canillas <javierm@redhat.com>
6556+
S: Maintained
6557+
T: git git://anongit.freedesktop.org/drm/drm-misc
6558+
F: Documentation/devicetree/bindings/display/panel/himax,hx8394.yaml
6559+
F: drivers/gpu/drm/panel/panel-himax-hx8394.c
6560+
65536561
DRM DRIVER FOR HX8357D PANELS
65546562
M: Emma Anholt <emma@anholt.net>
65556563
S: Maintained
@@ -7009,7 +7017,6 @@ M: Xinliang Liu <xinliang.liu@linaro.org>
70097017
M: Tian Tao <tiantao6@hisilicon.com>
70107018
R: John Stultz <jstultz@google.com>
70117019
R: Xinwei Kong <kong.kongxinwei@hisilicon.com>
7012-
R: Chen Feng <puck.chen@hisilicon.com>
70137020
L: dri-devel@lists.freedesktop.org
70147021
S: Maintained
70157022
T: git git://anongit.freedesktop.org/drm/drm-misc

drivers/firmware/sysfb_simplefb.c

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,56 @@ static const struct simplefb_format formats[] = SIMPLEFB_FORMATS;
2727
__init bool sysfb_parse_mode(const struct screen_info *si,
2828
struct simplefb_platform_data *mode)
2929
{
30-
const struct simplefb_format *f;
3130
__u8 type;
31+
u32 bits_per_pixel;
3232
unsigned int i;
3333

3434
type = si->orig_video_isVGA;
3535
if (type != VIDEO_TYPE_VLFB && type != VIDEO_TYPE_EFI)
3636
return false;
3737

38+
/*
39+
* The meaning of depth and bpp for direct-color formats is
40+
* inconsistent:
41+
*
42+
* - DRM format info specifies depth as the number of color
43+
* bits; including alpha, but not including filler bits.
44+
* - Linux' EFI platform code computes lfb_depth from the
45+
* individual color channels, including the reserved bits.
46+
* - VBE 1.1 defines lfb_depth for XRGB1555 as 16, but later
47+
* versions use 15.
48+
* - On the kernel command line, 'bpp' of 32 is usually
49+
* XRGB8888 including the filler bits, but 15 is XRGB1555
50+
* not including the filler bit.
51+
*
52+
* It's not easily possible to fix this in struct screen_info,
53+
* as this could break UAPI. The best solution is to compute
54+
* bits_per_pixel here and ignore lfb_depth. In the loop below,
55+
* ignore simplefb formats with alpha bits, as EFI and VESA
56+
* don't specify alpha channels.
57+
*/
58+
if (si->lfb_depth > 8) {
59+
bits_per_pixel = max(max3(si->red_size + si->red_pos,
60+
si->green_size + si->green_pos,
61+
si->blue_size + si->blue_pos),
62+
si->rsvd_size + si->rsvd_pos);
63+
} else {
64+
bits_per_pixel = si->lfb_depth;
65+
}
66+
3867
for (i = 0; i < ARRAY_SIZE(formats); ++i) {
39-
f = &formats[i];
40-
if (si->lfb_depth == f->bits_per_pixel &&
68+
const struct simplefb_format *f = &formats[i];
69+
70+
if (f->transp.length)
71+
continue; /* transparent formats are unsupported by VESA/EFI */
72+
73+
if (bits_per_pixel == f->bits_per_pixel &&
4174
si->red_size == f->red.length &&
4275
si->red_pos == f->red.offset &&
4376
si->green_size == f->green.length &&
4477
si->green_pos == f->green.offset &&
4578
si->blue_size == f->blue.length &&
46-
si->blue_pos == f->blue.offset &&
47-
si->rsvd_size == f->transp.length &&
48-
si->rsvd_pos == f->transp.offset) {
79+
si->blue_pos == f->blue.offset) {
4980
mode->format = f->name;
5081
mode->width = si->lfb_width;
5182
mode->height = si->lfb_height;

drivers/gpu/drm/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ menuconfig DRM
1212
select HDMI
1313
select FB_CMDLINE
1414
select I2C
15-
select I2C_ALGOBIT
1615
select DMA_SHARED_BUFFER
1716
select SYNC_FILE
1817
# gallium uses SYS_kcmp for os_same_file_description() to de-duplicate

drivers/gpu/drm/amd/amdgpu/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ config DRM_AMDGPU
1313
select DRM_TTM_HELPER
1414
select POWER_SUPPLY
1515
select HWMON
16+
select I2C
17+
select I2C_ALGOBIT
1618
select BACKLIGHT_CLASS_DEVICE
1719
select INTERVAL_TREE
1820
select DRM_BUDDY

drivers/gpu/drm/arm/hdlcd_drv.c

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ static int hdlcd_setup_mode_config(struct drm_device *drm)
195195
#ifdef CONFIG_DEBUG_FS
196196
static int hdlcd_show_underrun_count(struct seq_file *m, void *arg)
197197
{
198-
struct drm_info_node *node = (struct drm_info_node *)m->private;
199-
struct drm_device *drm = node->minor->dev;
198+
struct drm_debugfs_entry *entry = m->private;
199+
struct drm_device *drm = entry->dev;
200200
struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm);
201201

202202
seq_printf(m, "underrun : %d\n", atomic_read(&hdlcd->buffer_underrun_count));
@@ -208,8 +208,8 @@ static int hdlcd_show_underrun_count(struct seq_file *m, void *arg)
208208

209209
static int hdlcd_show_pxlclock(struct seq_file *m, void *arg)
210210
{
211-
struct drm_info_node *node = (struct drm_info_node *)m->private;
212-
struct drm_device *drm = node->minor->dev;
211+
struct drm_debugfs_entry *entry = m->private;
212+
struct drm_device *drm = entry->dev;
213213
struct hdlcd_drm_private *hdlcd = drm_to_hdlcd_priv(drm);
214214
unsigned long clkrate = clk_get_rate(hdlcd->clk);
215215
unsigned long mode_clock = hdlcd->crtc.mode.crtc_clock * 1000;
@@ -219,27 +219,17 @@ static int hdlcd_show_pxlclock(struct seq_file *m, void *arg)
219219
return 0;
220220
}
221221

222-
static struct drm_info_list hdlcd_debugfs_list[] = {
222+
static struct drm_debugfs_info hdlcd_debugfs_list[] = {
223223
{ "interrupt_count", hdlcd_show_underrun_count, 0 },
224224
{ "clocks", hdlcd_show_pxlclock, 0 },
225225
};
226-
227-
static void hdlcd_debugfs_init(struct drm_minor *minor)
228-
{
229-
drm_debugfs_create_files(hdlcd_debugfs_list,
230-
ARRAY_SIZE(hdlcd_debugfs_list),
231-
minor->debugfs_root, minor);
232-
}
233226
#endif
234227

235228
DEFINE_DRM_GEM_DMA_FOPS(fops);
236229

237230
static const struct drm_driver hdlcd_driver = {
238231
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
239232
DRM_GEM_DMA_DRIVER_OPS,
240-
#ifdef CONFIG_DEBUG_FS
241-
.debugfs_init = hdlcd_debugfs_init,
242-
#endif
243233
.fops = &fops,
244234
.name = "hdlcd",
245235
.desc = "ARM HDLCD Controller DRM",
@@ -303,6 +293,10 @@ static int hdlcd_drm_bind(struct device *dev)
303293
drm_mode_config_reset(drm);
304294
drm_kms_helper_poll_init(drm);
305295

296+
#ifdef CONFIG_DEBUG_FS
297+
drm_debugfs_add_files(drm, hdlcd_debugfs_list, ARRAY_SIZE(hdlcd_debugfs_list));
298+
#endif
299+
306300
ret = drm_dev_register(drm, 0);
307301
if (ret)
308302
goto err_register;

drivers/gpu/drm/ast/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ config DRM_AST
44
depends on DRM && PCI && MMU
55
select DRM_GEM_SHMEM_HELPER
66
select DRM_KMS_HELPER
7+
select I2C
8+
select I2C_ALGOBIT
79
help
810
Say yes for experimental AST GPU driver. Do not enable
911
this driver without having a working -modesetting,

drivers/gpu/drm/bridge/panel.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,16 @@ struct drm_bridge *devm_drm_panel_bridge_add_typed(struct device *dev,
357357
return ERR_PTR(-ENOMEM);
358358

359359
bridge = drm_panel_bridge_add_typed(panel, connector_type);
360-
if (!IS_ERR(bridge)) {
361-
*ptr = bridge;
362-
devres_add(dev, ptr);
363-
} else {
360+
if (IS_ERR(bridge)) {
364361
devres_free(ptr);
362+
return bridge;
365363
}
366364

367365
bridge->pre_enable_prev_first = panel->prepare_prev_first;
368366

367+
*ptr = bridge;
368+
devres_add(dev, ptr);
369+
369370
return bridge;
370371
}
371372
EXPORT_SYMBOL(devm_drm_panel_bridge_add_typed);

0 commit comments

Comments
 (0)