drm/bridge: analogix_dp: passing the connector as an argument in .get_modes()
It's better to pass the connector to platform driver in .get_modes() callback, just like what the .get_modes() helper function designed. Signed-off-by: Yakir Yang <ykk@rock-chips.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Tomasz Figa <tomasz.figa@chromium.com>
This commit is contained in:
Родитель
eb87c91c73
Коммит
fcc150c515
|
@ -938,7 +938,7 @@ int analogix_dp_get_modes(struct drm_connector *connector)
|
|||
num_modes += drm_panel_get_modes(dp->plat_data->panel);
|
||||
|
||||
if (dp->plat_data->get_modes)
|
||||
num_modes += dp->plat_data->get_modes(dp->plat_data);
|
||||
num_modes += dp->plat_data->get_modes(dp->plat_data, connector);
|
||||
|
||||
return num_modes;
|
||||
}
|
||||
|
|
|
@ -67,10 +67,10 @@ static int exynos_dp_poweroff(struct analogix_dp_plat_data *plat_data)
|
|||
return exynos_dp_crtc_clock_enable(plat_data, false);
|
||||
}
|
||||
|
||||
static int exynos_dp_get_modes(struct analogix_dp_plat_data *plat_data)
|
||||
static int exynos_dp_get_modes(struct analogix_dp_plat_data *plat_data,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct exynos_dp_device *dp = to_dp(plat_data);
|
||||
struct drm_connector *connector = dp->connector;
|
||||
struct drm_display_mode *mode;
|
||||
int num_modes = 0;
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ struct analogix_dp_plat_data {
|
|||
int (*power_off)(struct analogix_dp_plat_data *);
|
||||
int (*attach)(struct analogix_dp_plat_data *, struct drm_bridge *,
|
||||
struct drm_connector *);
|
||||
int (*get_modes)(struct analogix_dp_plat_data *);
|
||||
int (*get_modes)(struct analogix_dp_plat_data *,
|
||||
struct drm_connector *);
|
||||
};
|
||||
|
||||
int analogix_dp_resume(struct device *dev);
|
||||
|
|
Загрузка…
Ссылка в новой задаче