linux/drivers/gpu/drm/omapdrm
Laurent Pinchart 12c683e12c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid()
When validating a mode, bridges may need to do so in the context of a
display, as specified by drm_display_info. An example is the meson
dw-hdmi bridge that needs to consider the YUV 4:2:0 output format to
perform clock calculations.

Bridges that need the display info currently retrieve it from the
drm_connector created by the bridge. This gets in the way of moving
connector creation out of bridge drivers. To make this possible, pass
the drm_display_info to drm_bridge_funcs .mode_valid().

Changes to the bridge drivers have been performed with the following
coccinelle semantic patch and have been compile-tested.

@ rule1 @
identifier funcs;
identifier fn;
@@
 struct drm_bridge_funcs funcs = {
 	...,
 	.mode_valid = fn
 };

@ depends on rule1 @
identifier rule1.fn;
identifier bridge;
identifier mode;
@@
 enum drm_mode_status fn(
 	struct drm_bridge *bridge,
+	const struct drm_display_info *info,
 	const struct drm_display_mode *mode
 )
 {
 	...
 }

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Guido Günther <agx@sigxcpu.org> # for the nwl-dsi part:
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-11-laurent.pinchart+renesas@ideasonboard.com
2020-06-23 19:53:27 +02:00
..
displays drm/omap: display: use devm_of_find_backlight 2020-05-17 14:54:39 +02:00
dss drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
Kconfig
Makefile
omap_connector.c
omap_connector.h
omap_crtc.c
omap_crtc.h
omap_debugfs.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
omap_dmm_priv.h
omap_dmm_tiler.c
omap_dmm_tiler.h
omap_drv.c drm/omapdrm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
omap_drv.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
omap_encoder.c
omap_encoder.h
omap_fb.c drm/omapdrm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
omap_fb.h
omap_fbdev.c drm/omapdrm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
omap_fbdev.h
omap_gem_dmabuf.c
omap_gem.c drm/omapdrm: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:34 +01:00
omap_gem.h
omap_irq.c
omap_irq.h
omap_plane.c
omap_plane.h
tcm-sita.c
tcm.h
TODO