aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-03 09:51:58 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-04 05:31:24 -0400
commitf7bacf195e100a028eaa26c4b5f5e07665d51cee (patch)
tree5f2dba69d0a247d9f1230cac149e5a8812865ef6
parent9104183dad6314c55344d65738cd719b909a3e0a (diff)
drm/i915: rip out unnecessary calls to drm_mode_set_crtcinfo
Our handling of the crtc timing computation has been nicely cargo-culted with calls to drm_mode_set_crtcinfo sprinkled all over the place. But with commit f9bef081c3c3f77bec54454872e98d3ec635756f Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sun Apr 15 19:53:19 2012 +0200 drm/i915: don't clobber the special upscaling lvds timings and commit ca9bfa7eed20ea34e862804e62aae10eb159edbb Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sat Jan 28 14:49:20 2012 +0100 drm/i915: fixup interlaced vertical timings confusion, part 1 we now only set the crtc timing fields in the encoder->mode_fixup (lvds only) and in crtc->mode_fixup (for everyone else). And since commit 75c13993db592343bda1fd62f2555fea037d56bd Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sat Jan 28 23:48:46 2012 +0100 drm/i915: fixup overlay checks for interlaced modes the only places we actually need the crtc timings is in the mode_set function. I guess the idea of the drm core is that every time it creates a drm mode, it also sets the timings. But afaics it never uses them, safe for the precise vblank timestamp code (but that can only run on active modes, i.e. after our mode_fixup functions have been called). The problem is that drm core always sets CRTC_INTERLACE_HALVE_V, so the timings are pretty much bogus for us anyway (at least with interlaced support). So I guess it's the drivers job that every active modes needs to have crtc timings that suits it, and with these patches we should have that. drm core doesn't seem to care about modes that just get passed around. Hence we can now safely rip out all the remaining calls to set_crtcinfo left in the driver and clean up this confusion. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c1
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c2
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c3
-rw-r--r--drivers/gpu/drm/i915/intel_tv.c1
4 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ba04447926ee..e20f8042fddd 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5357,7 +5357,6 @@ struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
5357 mode->vsync_end = ((vsync & 0xffff0000) >> 16) + 1; 5357 mode->vsync_end = ((vsync & 0xffff0000) >> 16) + 1;
5358 5358
5359 drm_mode_set_name(mode); 5359 drm_mode_set_name(mode);
5360 drm_mode_set_crtcinfo(mode, 0);
5361 5360
5362 return mode; 5361 return mode;
5363} 5362}
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index 0bfab0bf60f4..458743da3774 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -263,7 +263,7 @@ i830_activate_pipe_a(struct drm_device *dev)
263 DRM_DEBUG_DRIVER("Enabling pipe A in order to enable overlay\n"); 263 DRM_DEBUG_DRIVER("Enabling pipe A in order to enable overlay\n");
264 264
265 mode = drm_mode_duplicate(dev, &vesa_640x480); 265 mode = drm_mode_duplicate(dev, &vesa_640x480);
266 drm_mode_set_crtcinfo(mode, 0); 266
267 if (!drm_crtc_helper_set_mode(&crtc->base, mode, 267 if (!drm_crtc_helper_set_mode(&crtc->base, mode,
268 crtc->base.x, crtc->base.y, 268 crtc->base.x, crtc->base.y,
269 crtc->base.fb)) 269 crtc->base.fb))
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c330efd59a0e..a3ccdccef0f9 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1576,9 +1576,6 @@ end:
1576 intel_sdvo->sdvo_lvds_fixed_mode = 1576 intel_sdvo->sdvo_lvds_fixed_mode =
1577 drm_mode_duplicate(connector->dev, newmode); 1577 drm_mode_duplicate(connector->dev, newmode);
1578 1578
1579 drm_mode_set_crtcinfo(intel_sdvo->sdvo_lvds_fixed_mode,
1580 0);
1581
1582 intel_sdvo->is_lvds = true; 1579 intel_sdvo->is_lvds = true;
1583 break; 1580 break;
1584 } 1581 }
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 2e626b861cd8..3346612d2953 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1249,7 +1249,6 @@ intel_tv_detect(struct drm_connector *connector, bool force)
1249 int type; 1249 int type;
1250 1250
1251 mode = reported_modes[0]; 1251 mode = reported_modes[0];
1252 drm_mode_set_crtcinfo(&mode, 0);
1253 1252
1254 if (force) { 1253 if (force) {
1255 struct intel_load_detect_pipe tmp; 1254 struct intel_load_detect_pipe tmp;