aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2012-03-16 05:47:04 -0400
committerDave Airlie <airlied@redhat.com>2012-03-20 05:40:21 -0400
commit1de425b0bdbc457dbd4a012760da4a3f204d0ab3 (patch)
treea86771193cec405ac212de6f0c6f3892a7a5530d /drivers/gpu/drm/exynos/exynos_drm_hdmi.c
parent3ecd70b18cad5a5e04981f2a1d71e183f5d6ebc0 (diff)
drm/exynos: added mode_fixup feature and code clean.
this patch adds mode_fixup feature for hdmi module that specific driver changes current mode to driver desired mode properly. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_hdmi.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_hdmi.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
index ed8a319ed84b..ed86bddf81da 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
@@ -155,6 +155,20 @@ static void drm_hdmi_disable_vblank(struct device *subdrv_dev)
155 return hdmi_overlay_ops->disable_vblank(ctx->mixer_ctx->ctx); 155 return hdmi_overlay_ops->disable_vblank(ctx->mixer_ctx->ctx);
156} 156}
157 157
158static void drm_hdmi_mode_fixup(struct device *subdrv_dev,
159 struct drm_connector *connector,
160 struct drm_display_mode *mode,
161 struct drm_display_mode *adjusted_mode)
162{
163 struct drm_hdmi_context *ctx = to_context(subdrv_dev);
164
165 DRM_DEBUG_KMS("%s\n", __FILE__);
166
167 if (hdmi_manager_ops && hdmi_manager_ops->mode_fixup)
168 hdmi_manager_ops->mode_fixup(ctx->hdmi_ctx->ctx, connector,
169 mode, adjusted_mode);
170}
171
158static void drm_hdmi_mode_set(struct device *subdrv_dev, void *mode) 172static void drm_hdmi_mode_set(struct device *subdrv_dev, void *mode)
159{ 173{
160 struct drm_hdmi_context *ctx = to_context(subdrv_dev); 174 struct drm_hdmi_context *ctx = to_context(subdrv_dev);
@@ -165,6 +179,18 @@ static void drm_hdmi_mode_set(struct device *subdrv_dev, void *mode)
165 hdmi_manager_ops->mode_set(ctx->hdmi_ctx->ctx, mode); 179 hdmi_manager_ops->mode_set(ctx->hdmi_ctx->ctx, mode);
166} 180}
167 181
182static void drm_hdmi_get_max_resol(struct device *subdrv_dev,
183 unsigned int *width, unsigned int *height)
184{
185 struct drm_hdmi_context *ctx = to_context(subdrv_dev);
186
187 DRM_DEBUG_KMS("%s\n", __FILE__);
188
189 if (hdmi_manager_ops && hdmi_manager_ops->get_max_resol)
190 hdmi_manager_ops->get_max_resol(ctx->hdmi_ctx->ctx, width,
191 height);
192}
193
168static void drm_hdmi_commit(struct device *subdrv_dev) 194static void drm_hdmi_commit(struct device *subdrv_dev)
169{ 195{
170 struct drm_hdmi_context *ctx = to_context(subdrv_dev); 196 struct drm_hdmi_context *ctx = to_context(subdrv_dev);
@@ -200,7 +226,9 @@ static struct exynos_drm_manager_ops drm_hdmi_manager_ops = {
200 .dpms = drm_hdmi_dpms, 226 .dpms = drm_hdmi_dpms,
201 .enable_vblank = drm_hdmi_enable_vblank, 227 .enable_vblank = drm_hdmi_enable_vblank,
202 .disable_vblank = drm_hdmi_disable_vblank, 228 .disable_vblank = drm_hdmi_disable_vblank,
229 .mode_fixup = drm_hdmi_mode_fixup,
203 .mode_set = drm_hdmi_mode_set, 230 .mode_set = drm_hdmi_mode_set,
231 .get_max_resol = drm_hdmi_get_max_resol,
204 .commit = drm_hdmi_commit, 232 .commit = drm_hdmi_commit,
205}; 233};
206 234