Skip to content

Commit a87fef0

Browse files
committed
Merge tag 'drm-misc-next-2026-01-08' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for 6.20: UAPI Changes: Cross-subsystem Changes: Core Changes: - draw: Add API to check if a format conversion can be done - panic: Rename draw_panic_static_* to draw_panic_screen_*, Add kunit tests - shmem: Improve tests Driver Changes: - ast: Big endian fixes - etnaviv: Add PPU flop reset support - panfrost: Add GPU_PM_RT support for RZ/G3E SoC - panthor: multiple fixes around VM termination, huge page support - pl111: Fix build regression - v3d: Fix DMA segment size - bridge: - Add connector argument to .hpd_notify - Plenty of patches to convert existing drivers to refcounting - Convert Rockchip's inno hdmi support to a proper bridge - lontium-lt9611uxc: Switch to HDMI audio helpers - panel: - New panel: BOE NV140WUM-T08 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patch.msgid.link/20260108-literate-nyala-of-courtesy-de501a@houat
2 parents 59260fe + 6a0b99e commit a87fef0

61 files changed

Lines changed: 1588 additions & 714 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/gpu/todo.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,22 @@ Contact: Maxime Ripard <mripard@kernel.org>,
506506

507507
Level: Intermediate
508508

509+
Convert users of of_drm_find_bridge() to of_drm_find_and_get_bridge()
510+
---------------------------------------------------------------------
511+
512+
Taking a struct drm_bridge pointer requires getting a reference and putting
513+
it after disposing of the pointer. Most functions returning a struct
514+
drm_bridge pointer already call drm_bridge_get() to increment the refcount
515+
and their users have been updated to call drm_bridge_put() when
516+
appropriate. of_drm_find_bridge() does not get a reference and it has been
517+
deprecated in favor of of_drm_find_and_get_bridge() which does, but some
518+
users still need to be converted.
519+
520+
Contact: Maxime Ripard <mripard@kernel.org>,
521+
Luca Ceresoli <luca.ceresoli@bootlin.com>
522+
523+
Level: Intermediate
524+
509525
Core refactorings
510526
=================
511527

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8749,6 +8749,7 @@ T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
87498749
F: drivers/gpu/drm/drm_draw.c
87508750
F: drivers/gpu/drm/drm_draw_internal.h
87518751
F: drivers/gpu/drm/drm_panic*.c
8752+
F: drivers/gpu/drm/tests/drm_panic_test.c
87528753
F: include/drm/drm_panic*
87538754

87548755
DRM PANIC QR CODE
@@ -12457,6 +12458,14 @@ M: Samuel Holland <samuel@sholland.org>
1245712458
S: Maintained
1245812459
F: drivers/power/supply/ip5xxx_power.c
1245912460

12461+
INNOSILICON HDMI BRIDGE DRIVER
12462+
M: Andy Yan <andy.yan@rock-chips.com>
12463+
L: dri-devel@lists.freedesktop.org
12464+
S: Maintained
12465+
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
12466+
F: drivers/gpu/drm/bridge/inno-hdmi.c
12467+
F: include/drm/bridge/inno_hdmi.h
12468+
1246012469
INOTIFY
1246112470
M: Jan Kara <jack@suse.cz>
1246212471
R: Amir Goldstein <amir73il@gmail.com>

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
* Authors: AMD
2424
*
2525
*/
26+
27+
#include <drm/drm_colorop.h>
28+
2629
#include "amdgpu.h"
2730
#include "amdgpu_mode.h"
2831
#include "amdgpu_dm.h"

drivers/gpu/drm/ast/ast_cursor.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,17 @@ static void ast_set_cursor_image(struct ast_device *ast, const u8 *src,
9393
unsigned int width, unsigned int height)
9494
{
9595
u8 __iomem *dst = ast_plane_vaddr(&ast->cursor_plane.base);
96-
u32 csum;
97-
98-
csum = ast_cursor_calculate_checksum(src, width, height);
96+
u32 csum = ast_cursor_calculate_checksum(src, width, height);
9997

10098
/* write pixel data */
99+
#if defined(__BIG_ENDIAN)
100+
unsigned int i;
101+
102+
for (i = 0; i < AST_HWC_SIZE; i += 2)
103+
writew(swab16(*(const __u16 *)&src[i]), &dst[i]);
104+
#else
101105
memcpy_toio(dst, src, AST_HWC_SIZE);
106+
#endif
102107

103108
/* write checksum + signature */
104109
dst += AST_HWC_SIZE;

drivers/gpu/drm/ast/ast_mode.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,12 +526,18 @@ static int ast_primary_plane_helper_atomic_check(struct drm_plane *plane,
526526

527527
static void ast_handle_damage(struct ast_plane *ast_plane, struct iosys_map *src,
528528
struct drm_framebuffer *fb,
529-
const struct drm_rect *clip)
529+
const struct drm_rect *clip,
530+
struct drm_format_conv_state *fmtcnv_state)
530531
{
531532
struct iosys_map dst = IOSYS_MAP_INIT_VADDR_IOMEM(ast_plane_vaddr(ast_plane));
532533

533534
iosys_map_incr(&dst, drm_fb_clip_offset(fb->pitches[0], fb->format, clip));
535+
536+
#if defined(__BIG_ENDIAN)
537+
drm_fb_swab(&dst, fb->pitches, src, fb, clip, !src[0].is_iomem, fmtcnv_state);
538+
#else
534539
drm_fb_memcpy(&dst, fb->pitches, src, fb, clip);
540+
#endif
535541
}
536542

537543
static void ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
@@ -561,7 +567,8 @@ static void ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
561567
if (drm_gem_fb_begin_cpu_access(fb, DMA_FROM_DEVICE) == 0) {
562568
drm_atomic_helper_damage_iter_init(&iter, old_plane_state, plane_state);
563569
drm_atomic_for_each_plane_damage(&iter, &damage) {
564-
ast_handle_damage(ast_plane, shadow_plane_state->data, fb, &damage);
570+
ast_handle_damage(ast_plane, shadow_plane_state->data, fb, &damage,
571+
&shadow_plane_state->fmtcnv_state);
565572
}
566573

567574
drm_gem_fb_end_cpu_access(fb, DMA_FROM_DEVICE);

drivers/gpu/drm/bridge/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ config DRM_I2C_NXP_TDA998X
100100
help
101101
Support for NXP Semiconductors TDA998X HDMI encoders.
102102

103+
config DRM_INNO_HDMI
104+
tristate
105+
select DRM_BRIDGE_CONNECTOR
106+
select DRM_DISPLAY_HDMI_HELPER
107+
select DRM_DISPLAY_HELPER
108+
select DRM_KMS_HELPER
109+
103110
config DRM_ITE_IT6263
104111
tristate "ITE IT6263 LVDS/HDMI bridge"
105112
depends on OF

drivers/gpu/drm/bridge/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ obj-$(CONFIG_DRM_FSL_LDB) += fsl-ldb.o
1010
tda998x-y := tda998x_drv.o
1111
obj-$(CONFIG_DRM_I2C_NXP_TDA998X) += tda998x.o
1212

13+
obj-$(CONFIG_DRM_INNO_HDMI) += inno-hdmi.o
1314
obj-$(CONFIG_DRM_ITE_IT6263) += ite-it6263.o
1415
obj-$(CONFIG_DRM_ITE_IT6505) += ite-it6505.o
1516
obj-$(CONFIG_DRM_LONTIUM_LT8912B) += lontium-lt8912b.o

drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ enum imx8qxp_pc_pix_data_format {
6060

6161
struct imx8qxp_pc_channel {
6262
struct drm_bridge bridge;
63-
struct drm_bridge *next_bridge;
6463
struct imx8qxp_pc *pc;
6564
unsigned int stream_id;
6665
};
@@ -120,7 +119,7 @@ static int imx8qxp_pc_bridge_attach(struct drm_bridge *bridge,
120119
}
121120

122121
return drm_bridge_attach(encoder,
123-
ch->next_bridge, bridge,
122+
ch->bridge.next_bridge, bridge,
124123
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
125124
}
126125

@@ -326,8 +325,8 @@ static int imx8qxp_pc_bridge_probe(struct platform_device *pdev)
326325
goto free_child;
327326
}
328327

329-
ch->next_bridge = of_drm_find_bridge(remote);
330-
if (!ch->next_bridge) {
328+
ch->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
329+
if (!ch->bridge.next_bridge) {
331330
of_node_put(remote);
332331
ret = -EPROBE_DEFER;
333332
DRM_DEV_DEBUG_DRIVER(dev,
@@ -349,7 +348,7 @@ static int imx8qxp_pc_bridge_probe(struct platform_device *pdev)
349348
free_child:
350349
of_node_put(child);
351350

352-
if (i == 1 && pc->ch[0]->next_bridge)
351+
if (i == 1 && pc->ch[0]->bridge.next_bridge)
353352
drm_bridge_remove(&pc->ch[0]->bridge);
354353

355354
pm_runtime_disable(dev);

drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,8 @@ static int imx8qxp_pixel_link_bridge_probe(struct platform_device *pdev)
374374
return ret;
375375

376376
pl->next_bridge = imx8qxp_pixel_link_find_next_bridge(pl);
377-
if (IS_ERR(pl->next_bridge)) {
378-
ret = PTR_ERR(pl->next_bridge);
379-
if (ret != -EPROBE_DEFER)
380-
DRM_DEV_ERROR(dev, "failed to find next bridge: %d\n",
381-
ret);
382-
return ret;
383-
}
377+
if (IS_ERR(pl->next_bridge))
378+
return PTR_ERR(pl->next_bridge);
384379

385380
platform_set_drvdata(pdev, pl);
386381

drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
struct imx8qxp_pxl2dpi {
3636
struct regmap *regmap;
3737
struct drm_bridge bridge;
38-
struct drm_bridge *next_bridge;
3938
struct drm_bridge *companion;
4039
struct device *dev;
4140
struct imx_sc_ipc *ipc_handle;
@@ -60,10 +59,17 @@ static int imx8qxp_pxl2dpi_bridge_attach(struct drm_bridge *bridge,
6059
}
6160

6261
return drm_bridge_attach(encoder,
63-
p2d->next_bridge, bridge,
62+
p2d->bridge.next_bridge, bridge,
6463
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
6564
}
6665

66+
static void imx8qxp_pxl2dpi_bridge_destroy(struct drm_bridge *bridge)
67+
{
68+
struct imx8qxp_pxl2dpi *p2d = bridge->driver_private;
69+
70+
drm_bridge_put(p2d->companion);
71+
}
72+
6773
static int
6874
imx8qxp_pxl2dpi_bridge_atomic_check(struct drm_bridge *bridge,
6975
struct drm_bridge_state *bridge_state,
@@ -206,6 +212,7 @@ static const struct drm_bridge_funcs imx8qxp_pxl2dpi_bridge_funcs = {
206212
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
207213
.atomic_reset = drm_atomic_helper_bridge_reset,
208214
.attach = imx8qxp_pxl2dpi_bridge_attach,
215+
.destroy = imx8qxp_pxl2dpi_bridge_destroy,
209216
.atomic_check = imx8qxp_pxl2dpi_bridge_atomic_check,
210217
.mode_set = imx8qxp_pxl2dpi_bridge_mode_set,
211218
.atomic_disable = imx8qxp_pxl2dpi_bridge_atomic_disable,
@@ -255,40 +262,27 @@ imx8qxp_pxl2dpi_get_available_ep_from_port(struct imx8qxp_pxl2dpi *p2d,
255262
return ep;
256263
}
257264

258-
static struct drm_bridge *
259-
imx8qxp_pxl2dpi_find_next_bridge(struct imx8qxp_pxl2dpi *p2d)
265+
static int imx8qxp_pxl2dpi_find_next_bridge(struct imx8qxp_pxl2dpi *p2d)
260266
{
261-
struct device_node *ep, *remote;
262-
struct drm_bridge *next_bridge;
263-
int ret;
264-
265-
ep = imx8qxp_pxl2dpi_get_available_ep_from_port(p2d, 1);
266-
if (IS_ERR(ep)) {
267-
ret = PTR_ERR(ep);
268-
return ERR_PTR(ret);
269-
}
267+
struct device_node *ep __free(device_node) =
268+
imx8qxp_pxl2dpi_get_available_ep_from_port(p2d, 1);
269+
if (IS_ERR(ep))
270+
return PTR_ERR(ep);
270271

271-
remote = of_graph_get_remote_port_parent(ep);
272+
struct device_node *remote __free(device_node) = of_graph_get_remote_port_parent(ep);
272273
if (!remote || !of_device_is_available(remote)) {
273274
DRM_DEV_ERROR(p2d->dev, "no available remote\n");
274-
next_bridge = ERR_PTR(-ENODEV);
275-
goto out;
275+
return -ENODEV;
276276
} else if (!of_device_is_available(remote->parent)) {
277277
DRM_DEV_ERROR(p2d->dev, "remote parent is not available\n");
278-
next_bridge = ERR_PTR(-ENODEV);
279-
goto out;
278+
return -ENODEV;
280279
}
281280

282-
next_bridge = of_drm_find_bridge(remote);
283-
if (!next_bridge) {
284-
next_bridge = ERR_PTR(-EPROBE_DEFER);
285-
goto out;
286-
}
287-
out:
288-
of_node_put(remote);
289-
of_node_put(ep);
281+
p2d->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
282+
if (!p2d->bridge.next_bridge)
283+
return -EPROBE_DEFER;
290284

291-
return next_bridge;
285+
return 0;
292286
}
293287

294288
static int imx8qxp_pxl2dpi_set_pixel_link_sel(struct imx8qxp_pxl2dpi *p2d)
@@ -347,7 +341,7 @@ static int imx8qxp_pxl2dpi_parse_dt_companion(struct imx8qxp_pxl2dpi *p2d)
347341
goto out;
348342
}
349343

350-
p2d->companion = of_drm_find_bridge(companion);
344+
p2d->companion = of_drm_find_and_get_bridge(companion);
351345
if (!p2d->companion) {
352346
ret = -EPROBE_DEFER;
353347
DRM_DEV_DEBUG_DRIVER(p2d->dev,
@@ -364,8 +358,8 @@ static int imx8qxp_pxl2dpi_parse_dt_companion(struct imx8qxp_pxl2dpi *p2d)
364358
* the next bridges are connected to. If they are marked as expecting
365359
* even pixels and odd pixels than we need to use the companion PXL2DPI.
366360
*/
367-
port1 = of_graph_get_port_by_id(p2d->next_bridge->of_node, 1);
368-
port2 = of_graph_get_port_by_id(companion_p2d->next_bridge->of_node, 1);
361+
port1 = of_graph_get_port_by_id(p2d->bridge.next_bridge->of_node, 1);
362+
port2 = of_graph_get_port_by_id(companion_p2d->bridge.next_bridge->of_node, 1);
369363
dual_link = drm_of_lvds_get_dual_link_pixel_order(port1, port2);
370364
of_node_put(port1);
371365
of_node_put(port2);
@@ -421,14 +415,9 @@ static int imx8qxp_pxl2dpi_bridge_probe(struct platform_device *pdev)
421415
return ret;
422416
}
423417

424-
p2d->next_bridge = imx8qxp_pxl2dpi_find_next_bridge(p2d);
425-
if (IS_ERR(p2d->next_bridge)) {
426-
ret = PTR_ERR(p2d->next_bridge);
427-
if (ret != -EPROBE_DEFER)
428-
DRM_DEV_ERROR(dev, "failed to find next bridge: %d\n",
429-
ret);
418+
ret = imx8qxp_pxl2dpi_find_next_bridge(p2d);
419+
if (ret)
430420
return ret;
431-
}
432421

433422
ret = imx8qxp_pxl2dpi_set_pixel_link_sel(p2d);
434423
if (ret)

0 commit comments

Comments
 (0)