aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-26 19:44:53 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-27 19:50:06 -0400
commit6cc5f341b5830541a1b6945435ca90c69b1b8b21 (patch)
tree74e1cfaa03efaa293c3ef11acd37567361923f6d /drivers/gpu/drm/i915/intel_drv.h
parent7ae892337e3357e40c8252f4226083d2e6211847 (diff)
drm/i915: add pipe_config->pixel_multiplier
Used by SDVO (and hopefully, eventually HDMI, if we ever get around to fixing up the low dotclock CEA modes ...). This required adding a new encoder->mode_set callback to be able to pass around the intel_crtc_config. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 054032ae2856..f0e5462c665b 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -102,8 +102,6 @@
102#define INTEL_DVO_CHIP_TVOUT 4 102#define INTEL_DVO_CHIP_TVOUT 4
103 103
104/* drm_display_mode->private_flags */ 104/* drm_display_mode->private_flags */
105#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT (0x0)
106#define INTEL_MODE_PIXEL_MULTIPLIER_MASK (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT)
107#define INTEL_MODE_DP_FORCE_6BPC (0x10) 105#define INTEL_MODE_DP_FORCE_6BPC (0x10)
108/* 106/*
109 * Set when limited 16-235 (as opposed to full 0-255) RGB color range is 107 * Set when limited 16-235 (as opposed to full 0-255) RGB color range is
@@ -111,20 +109,6 @@
111 */ 109 */
112#define INTEL_MODE_LIMITED_COLOR_RANGE (0x40) 110#define INTEL_MODE_LIMITED_COLOR_RANGE (0x40)
113 111
114static inline void
115intel_mode_set_pixel_multiplier(struct drm_display_mode *mode,
116 int multiplier)
117{
118 mode->clock *= multiplier;
119 mode->private_flags |= multiplier;
120}
121
122static inline int
123intel_mode_get_pixel_multiplier(const struct drm_display_mode *mode)
124{
125 return (mode->private_flags & INTEL_MODE_PIXEL_MULTIPLIER_MASK) >> INTEL_MODE_PIXEL_MULTIPLIER_SHIFT;
126}
127
128struct intel_framebuffer { 112struct intel_framebuffer {
129 struct drm_framebuffer base; 113 struct drm_framebuffer base;
130 struct drm_i915_gem_object *obj; 114 struct drm_i915_gem_object *obj;
@@ -159,6 +143,7 @@ struct intel_encoder {
159 void (*pre_pll_enable)(struct intel_encoder *); 143 void (*pre_pll_enable)(struct intel_encoder *);
160 void (*pre_enable)(struct intel_encoder *); 144 void (*pre_enable)(struct intel_encoder *);
161 void (*enable)(struct intel_encoder *); 145 void (*enable)(struct intel_encoder *);
146 void (*mode_set)(struct intel_encoder *intel_encoder);
162 void (*disable)(struct intel_encoder *); 147 void (*disable)(struct intel_encoder *);
163 void (*post_disable)(struct intel_encoder *); 148 void (*post_disable)(struct intel_encoder *);
164 /* Read out the current hw state of this connector, returning true if 149 /* Read out the current hw state of this connector, returning true if
@@ -205,6 +190,8 @@ struct intel_crtc_config {
205 * changes the crtc timings in the mode to prevent the crtc fixup from 190 * changes the crtc timings in the mode to prevent the crtc fixup from
206 * overwriting them. Currently only lvds needs that. */ 191 * overwriting them. Currently only lvds needs that. */
207 bool timings_set; 192 bool timings_set;
193 /* Used by SDVO (and if we ever fix it, HDMI). */
194 unsigned pixel_multiplier;
208}; 195};
209 196
210struct intel_crtc { 197struct intel_crtc {