linux/drivers/gpu/drm/bridge/synopsys
Laurent Pinchart 89958b7cd9 drm/bridge: panel: Infer connector type from panel by default
The drm panel bridge creates a connector using a connector type
explicitly passed by the display controller or bridge driver that
instantiates the panel bridge. Now that drm_panel reports its connector
type, we can use it to avoid passing an explicit (and often incorrect)
connector type to drm_panel_bridge_add() and
devm_drm_panel_bridge_add().

Several drivers report incorrect or unknown connector types to
userspace. Reporting a different type may result in a breakage. For that
reason, rename (devm_)drm_panel_bridge_add() to
(devm_)drm_panel_bridge_add_typed(), and add new
(devm_)drm_panel_bridge_add() functions that use the panel connector
type. Update all callers of (devm_)drm_panel_bridge_add() to the _typed
function, they will be converted one by one after testing.

The panel drivers have been updated with the following Coccinelle
semantic patch, with manual inspection and fixes to indentation.

@@
expression bridge;
expression dev;
expression panel;
identifier type;
@@
(
-bridge = drm_panel_bridge_add(panel, type);
+bridge = drm_panel_bridge_add_typed(panel, type);
|
-bridge = devm_drm_panel_bridge_add(dev, panel, type);
+bridge = devm_drm_panel_bridge_add_typed(dev, panel, type);
)

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190904132804.29680-3-laurent.pinchart@ideasonboard.com
2019-09-08 19:04:23 +02:00
..
dw-hdmi-ahb-audio.c drm/bridge: dw-hdmi: move audio channel setup out of ahb 2019-08-14 15:03:11 +02:00
dw-hdmi-audio.h drm/bridge: dw-hdmi-i2s: add .get_eld support 2019-08-14 15:03:36 +02:00
dw-hdmi-cec.c dw-hdmi-cec: use cec_notifier_cec_adap_(un)register 2019-08-20 09:47:06 +02:00
dw-hdmi-cec.h drm/bridge: dw-hdmi: add cec driver 2017-08-07 16:18:53 +05:30
dw-hdmi-i2s-audio.c drm: dw-hdmi-i2s: enable audio clock in audio_startup 2019-09-02 11:42:29 +02:00
dw-hdmi.c drm: Stop including drm_bridge.h from drm_crtc.h 2019-08-28 22:11:03 +02:00
dw-hdmi.h drm/bridge: dw-hdmi-i2s: enable only the required i2s lanes 2019-08-14 15:03:33 +02:00
dw-mipi-dsi.c drm/bridge: panel: Infer connector type from panel by default 2019-09-08 19:04:23 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00