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:52 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-03-27 19:50:05 -0400
commit7ae892337e3357e40c8252f4226083d2e6211847 (patch)
treeadea6fcbec34bb68716ee99844562b54003603f9 /drivers/gpu/drm/i915/intel_drv.h
parent460da91617d870972a7ae300fad3e13731b67757 (diff)
drm/i915: add pipe_config->timings_set
Only used by the lvds encoder. Note that we shouldn't do the same simple conversion with the FORCE_6BPC flag, since that's much better handled by moving all the pipe_bpc computation around. This requires that we pass the pipe config around to encoders, so that they can set special attributes and set constraints. To do so introduce a new ->compute_config encoder callback, which is called in stead of the drm crtc helper's ->mode_fixup. To avoid massive churn all over the codebase we don't want to convert all existing ->mode_fixup functions. Instead I've opted to convert them on an as-needed basis (mostly to cut down on rebase conflicts and to have more freedom to experiment around while developing the patches). 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.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 4cc66251fd34..054032ae2856 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -105,10 +105,6 @@
105#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT (0x0) 105#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT (0x0)
106#define INTEL_MODE_PIXEL_MULTIPLIER_MASK (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT) 106#define INTEL_MODE_PIXEL_MULTIPLIER_MASK (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT)
107#define INTEL_MODE_DP_FORCE_6BPC (0x10) 107#define INTEL_MODE_DP_FORCE_6BPC (0x10)
108/* This flag must be set by the encoder's mode_fixup if it changes the crtc
109 * timings in the mode to prevent the crtc fixup from overwriting them.
110 * Currently only lvds needs that. */
111#define INTEL_MODE_CRTC_TIMINGS_SET (0x20)
112/* 108/*
113 * Set when limited 16-235 (as opposed to full 0-255) RGB color range is 109 * Set when limited 16-235 (as opposed to full 0-255) RGB color range is
114 * to be used. 110 * to be used.
@@ -158,6 +154,8 @@ struct intel_encoder {
158 bool cloneable; 154 bool cloneable;
159 bool connectors_active; 155 bool connectors_active;
160 void (*hot_plug)(struct intel_encoder *); 156 void (*hot_plug)(struct intel_encoder *);
157 bool (*compute_config)(struct intel_encoder *,
158 struct intel_crtc_config *);
161 void (*pre_pll_enable)(struct intel_encoder *); 159 void (*pre_pll_enable)(struct intel_encoder *);
162 void (*pre_enable)(struct intel_encoder *); 160 void (*pre_enable)(struct intel_encoder *);
163 void (*enable)(struct intel_encoder *); 161 void (*enable)(struct intel_encoder *);
@@ -203,6 +201,10 @@ struct intel_connector {
203struct intel_crtc_config { 201struct intel_crtc_config {
204 struct drm_display_mode requested_mode; 202 struct drm_display_mode requested_mode;
205 struct drm_display_mode adjusted_mode; 203 struct drm_display_mode adjusted_mode;
204 /* This flag must be set by the encoder's compute_config callback if it
205 * changes the crtc timings in the mode to prevent the crtc fixup from
206 * overwriting them. Currently only lvds needs that. */
207 bool timings_set;
206}; 208};
207 209
208struct intel_crtc { 210struct intel_crtc {