linux/drivers/gpu/drm/omapdrm/dss
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
..
base.c drm/omap: dss: Remove unused omap_dss_device operations 2020-02-26 13:32:12 +02:00
dispc_coefs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
dispc.c drm/omap: change default signal polarities and drives 2020-05-05 09:58:37 +03:00
dispc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
display.c drm/omap: dss: Inline the omapdss_display_get() function 2020-02-26 13:32:10 +02:00
dpi.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
dsi.c drm/omap: Add infrastructure to support drm_bridge local to DSS outputs 2020-02-26 13:31:50 +02:00
dss.c ARM: driver updates 2020-04-03 15:05:35 -07:00
dss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
hdmi4_cec.c drm/omap: hdmi4_cec: Fix CEC clock handling for PM 2019-03-27 11:10:51 +02:00
hdmi4_cec.h
hdmi4_core.c drm/omap: hdmi4: Rework EDID read to isolate data read 2020-02-26 13:31:53 +02:00
hdmi4_core.h drm/omap: hdmi4: Rework EDID read to isolate data read 2020-02-26 13:31:53 +02:00
hdmi4.c drm/omap: hdmi4: Simplify EDID read 2020-02-26 13:32:04 +02:00
hdmi5_core.c drm/omap: hdmi5: Rework EDID read to isolate data read 2020-02-26 13:31:54 +02:00
hdmi5_core.h drm/omap: hdmi5: Rework EDID read to isolate data read 2020-02-26 13:31:54 +02:00
hdmi5.c drm/omap: hdmi5: Simplify EDID read 2020-02-26 13:32:05 +02:00
hdmi_common.c
hdmi_phy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hdmi_pll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hdmi_wp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hdmi.h drm/omap: hdmi: Remove omap_dss_device operations 2020-02-26 13:32:03 +02:00
Kconfig drm/omap: Fix Kconfig indentation 2019-11-20 17:40:32 +01:00
Makefile drm/omap: dss: Remove unused omapdss_of_find_connected_device() function 2020-02-26 13:32:11 +02:00
omapdss-boot-init.c ARM: driver updates 2020-04-03 15:05:35 -07:00
omapdss.h drm/omap: dss: Remove unused omap_dss_device operations 2020-02-26 13:32:12 +02:00
output.c drm/omap: Switch the HDMI and VENC outputs to drm_bridge 2020-02-26 13:32:00 +02:00
pll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
sdi.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
venc.c drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() 2020-06-23 19:53:27 +02:00
video-pll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00