blob: e5751069bbe5fe22616987f7c7fe65742ef70cec [file] [log] [blame]
From c69a77ab92db8eaaadc8b6e414d39834bc848ea8 Mon Sep 17 00:00:00 2001
From: Damien Lespiau <damien.lespiau@intel.com>
Date: Wed, 25 Sep 2013 16:45:34 +0100
Subject: drm: Introduce a crtc_clock for struct drm_display_mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Just like the various timings, make it possible to have a clock field
what we can tweak before giving it to hardware.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit bde2dcf701db9fa6d010afa8e9254c3d7b0331fb)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/drm_modes.c | 1 +
include/drm/drm_crtc.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 1d29b473fe6a..3c708b4aa742 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -738,6 +738,7 @@ void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags)
if ((p == NULL) || ((p->type & DRM_MODE_TYPE_CRTC_C) == DRM_MODE_TYPE_BUILTIN))
return;
+ p->crtc_clock = p->clock;
p->crtc_hdisplay = p->hdisplay;
p->crtc_hsync_start = p->hsync_start;
p->crtc_hsync_end = p->hsync_end;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index bfb98d1956ea..0a47e15ccef3 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -154,6 +154,7 @@ struct drm_display_mode {
int height_mm;
/* Actual mode we give to hw */
+ int crtc_clock; /* in KHz */
int crtc_hdisplay;
int crtc_hblank_start;
int crtc_hblank_end;
--
1.8.5.rc3