diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2013-09-30 09:21:49 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-04 04:30:55 -0400 |
commit | bb2043de02ef15901c2a1e6f9349c989dce42615 (patch) | |
tree | 221f2eb14641efa437be3c0ec31a03291085e812 | |
parent | 02f4c9e02a021c5608dde7ae0607946ab16ae00c (diff) |
drm/i915: Add a more detailed comment about the set_base() fastboot hack
Instead of it just being on the mailing list, let's put Jesse's
explanation next to the code in question.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 214984c814e8..fe863255dedc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2320,7 +2320,19 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
2320 | return ret; | 2320 | return ret; |
2321 | } | 2321 | } |
2322 | 2322 | ||
2323 | /* Update pipe size and adjust fitter if needed */ | 2323 | /* |
2324 | * Update pipe size and adjust fitter if needed: the reason for this is | ||
2325 | * that in compute_mode_changes we check the native mode (not the pfit | ||
2326 | * mode) to see if we can flip rather than do a full mode set. In the | ||
2327 | * fastboot case, we'll flip, but if we don't update the pipesrc and | ||
2328 | * pfit state, we'll end up with a big fb scanned out into the wrong | ||
2329 | * sized surface. | ||
2330 | * | ||
2331 | * To fix this properly, we need to hoist the checks up into | ||
2332 | * compute_mode_changes (or above), check the actual pfit state and | ||
2333 | * whether the platform allows pfit disable with pipe active, and only | ||
2334 | * then update the pipesrc and pfit state, even on the flip path. | ||
2335 | */ | ||
2324 | if (i915_fastboot) { | 2336 | if (i915_fastboot) { |
2325 | I915_WRITE(PIPESRC(intel_crtc->pipe), | 2337 | I915_WRITE(PIPESRC(intel_crtc->pipe), |
2326 | ((crtc->mode.hdisplay - 1) << 16) | | 2338 | ((crtc->mode.hdisplay - 1) << 16) | |