[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1467191735-17351-1-git-send-email-ykk@rock-chips.com>
Date: Wed, 29 Jun 2016 17:15:35 +0800
From: Yakir Yang <ykk@...k-chips.com>
To: Mark Yao <yzq@...k-chips.com>, Inki Dae <inki.dae@...sung.com>,
Jingoo Han <jingoohan1@...il.com>,
Heiko Stuebner <heiko@...ech.de>
Cc: Javier Martinez Canillas <javier@....samsung.com>,
Stéphane Marchesin <marcheu@...omium.org>,
Sean Paul <seanpaul@...omium.org>,
Tomasz Figa <tfiga@...omium.org>,
David Airlie <airlied@...ux.ie>, daniel.vetter@...ll.ch,
Thierry Reding <treding@...dia.com>, dianders@...omium.org,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
emil.l.velikov@...il.com, Dan Carpenter <dan.carpenter@...cle.com>,
Yakir Yang <ykk@...k-chips.com>, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-samsung-soc@...r.kernel.org,
linux-rockchip@...ts.infradead.org
Subject: [PATCH v4 06/11] 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@...k-chips.com>
Reviewed-by: Sean Paul <seanpaul@...omium.org>
Reviewed-by: Tomasz Figa <tomasz.figa@...omium.com>
---
Changes in v4:
- Add reviewed flag from Sean.
- Add reviewed flag from Tomasz.
Changes in v3:
- Avoid to change any internal driver state in .mode_valid interface. (Tomasz, reviewed at Google Gerrit)
[https://chromium-review.googlesource.com/#/c/346318/10/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c@113]
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 +-
drivers/gpu/drm/exynos/exynos_dp.c | 4 ++--
include/drm/bridge/analogix_dp.h | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 7699597..a5e5ae4 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -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;
}
diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c
index 468498e..8a555ed 100644
--- a/drivers/gpu/drm/exynos/exynos_dp.c
+++ b/drivers/gpu/drm/exynos/exynos_dp.c
@@ -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;
diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h
index fc4aea3..261b86d 100644
--- a/include/drm/bridge/analogix_dp.h
+++ b/include/drm/bridge/analogix_dp.h
@@ -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);
--
1.9.1
Powered by blists - more mailing lists