diff options
| author | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-09-16 15:45:25 +0200 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-09-28 09:04:48 +0200 |
| commit | bf30039e4b87d64fe3ef24db0ffff8d72bc11f3c (patch) | |
| tree | 6999073706021e71bb9132473faa7bafef801f41 /include | |
| parent | 139e3d9cb4fa92dd2e356bc15759f53f54e81a21 (diff) | |
| download | linux-next-bf30039e4b87d64fe3ef24db0ffff8d72bc11f3c.tar.gz linux-next-bf30039e4b87d64fe3ef24db0ffff8d72bc11f3c.zip | |
drm: of: move drm_of_find_panel_or_bridge() from drm_of.c to drm_panel.c
We want to move drm_panel.o from the main drm module to a new drm_panel
module, but there is one function in the drm module that calls into
drm_panel.c code:
drm_of_find_panel_or_bridge() (drm_of.c, drm module)
-> calls of_drm_find_panel (drm_panel.c, future drm_panel module)
Avoid this issue by moving drm_of_find_panel_or_bridge() to drm_panel.c.
Update Kconfig symbols of drivers calling drm_of_find_panel_or_bridge() to
select DRM_PANEL when this is not done already.
No functional changes, just moving code around.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260916-drm-bridge-every-panel-v3-1-83afb4f1a707@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/drm_of.h | 12 | ||||
| -rw-r--r-- | include/drm/drm_panel.h | 13 |
2 files changed, 13 insertions, 12 deletions
diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index ebebed14c611..402f5db11e47 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -51,10 +51,6 @@ int drm_of_encoder_active_endpoint(struct device_node *node, struct of_endpoint *endpoint); int drm_of_get_panel_orientation(const struct device_node *np, enum drm_panel_orientation *orientation); -int drm_of_find_panel_or_bridge(const struct device_node *np, - int port, int endpoint, - struct drm_panel **panel, - struct drm_bridge **bridge); int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, const struct device_node *port2); int drm_of_lvds_get_dual_link_pixel_order_sink(struct device_node *port1, @@ -112,14 +108,6 @@ static inline int drm_of_get_panel_orientation(const struct device_node *np, return -EINVAL; } -static inline int drm_of_find_panel_or_bridge(const struct device_node *np, - int port, int endpoint, - struct drm_panel **panel, - struct drm_bridge **bridge) -{ - return -EINVAL; -} - static inline int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, const struct device_node *port2) diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index b87323443f49..bf15e40fd796 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -33,6 +33,7 @@ struct backlight_device; struct dentry; struct device_node; +struct drm_bridge; struct drm_connector; struct drm_panel_follower; struct drm_panel; @@ -337,11 +338,23 @@ int drm_panel_get_modes(struct drm_panel *panel, struct drm_connector *connector #if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL) struct drm_panel *of_drm_find_panel(const struct device_node *np); +int drm_of_find_panel_or_bridge(const struct device_node *np, + int port, int endpoint, + struct drm_panel **panel, + struct drm_bridge **bridge); #else static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) { return ERR_PTR(-ENODEV); } + +static inline int drm_of_find_panel_or_bridge(const struct device_node *np, + int port, int endpoint, + struct drm_panel **panel, + struct drm_bridge **bridge) +{ + return -EINVAL; +} #endif #if defined(CONFIG_DRM_PANEL) |
