From: Damon Ding Date: Mon, 10 Mar 2025 10:41:06 +0000 (+0800) Subject: drm/bridge: analogix_dp: Support to get &analogix_dp_device.plat_data and &analogix_d... X-Git-Tag: v6.16-rc1~144^2~16^2~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd073dffef041d6a2d11f00cd6cbd8ff46083396;p=thirdparty%2Fkernel%2Fstable.git drm/bridge: analogix_dp: Support to get &analogix_dp_device.plat_data and &analogix_dp_device.aux Add two new functions: one to find &analogix_dp_device.plat_data via &drm_dp_aux, and the other to get &analogix_dp_device.aux. Both of them serve for the function of getting panel from DP AUX bus, which is why they are included in a single commit. Reviewed-by: Dmitry Baryshkov Signed-off-by: Damon Ding Link: https://lore.kernel.org/r/20250310104114.2608063-6-damon.ding@rock-chips.com Signed-off-by: Dmitry Baryshkov --- diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index e1bb50acf3e23..8fdd036569340 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1764,6 +1764,20 @@ int analogix_dp_stop_crc(struct drm_connector *connector) } EXPORT_SYMBOL_GPL(analogix_dp_stop_crc); +struct analogix_dp_plat_data *analogix_dp_aux_to_plat_data(struct drm_dp_aux *aux) +{ + struct analogix_dp_device *dp = to_dp(aux); + + return dp->plat_data; +} +EXPORT_SYMBOL_GPL(analogix_dp_aux_to_plat_data); + +struct drm_dp_aux *analogix_dp_get_aux(struct analogix_dp_device *dp) +{ + return &dp->aux; +} +EXPORT_SYMBOL_GPL(analogix_dp_get_aux); + MODULE_AUTHOR("Jingoo Han "); MODULE_DESCRIPTION("Analogix DP Core Driver"); MODULE_LICENSE("GPL v2"); diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index 6002c5666031f..e19b0bbc57d62 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -10,6 +10,7 @@ #include struct analogix_dp_device; +struct drm_dp_aux; enum analogix_dp_devtype { EXYNOS_DP, @@ -48,4 +49,7 @@ void analogix_dp_unbind(struct analogix_dp_device *dp); int analogix_dp_start_crc(struct drm_connector *connector); int analogix_dp_stop_crc(struct drm_connector *connector); +struct analogix_dp_plat_data *analogix_dp_aux_to_plat_data(struct drm_dp_aux *aux); +struct drm_dp_aux *analogix_dp_get_aux(struct analogix_dp_device *dp); + #endif /* _ANALOGIX_DP_H_ */