aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-01-07 09:15:37 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-10 02:49:19 -0500
commit38af6096781e2ed3d83b970218dedfe98e2f8f9c (patch)
treedf5b9c8c2498a45824c48dfa91755fc1161ba563
parent89eff4bea721700d1f4d5ffd3fdc99bb0de9e962 (diff)
drm/i915: Don't swap planes on 830M
Looks like 830M doesn't quite like it when you try to move a plane from one pipe to another. It seems that the plane's old pipe has to be active even if the plane is already disabled, otherwise the relevant register just won't accept new values. The following commit: commit 1f1c2e2468f937cefd6bcb645c959c7b5d9821df Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu Nov 28 17:30:01 2013 +0200 drm/i915: Swap primary planes on gen2 for FBC caused a regression on 830M. It will attempt to swap the planes when the driver is loaded, but at that time only pipe A might be active, so plane A gets disabled, but plane B won't get enabled since pipe B is not active when we try to move the plane over to pipe A. There's no reason to swap planes on 830M since it doesn't support FBC. Change the logic a bit to limit the plane swapping to platforms which actually support FBC. This should avoid getting a black screen on 830M. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c4
-rw-r--r--drivers/gpu/drm/i915/intel_display.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 1d44c793bdf4..158cb3077ed6 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -3220,7 +3220,7 @@ static irqreturn_t i8xx_irq_handler(int irq, void *arg)
3220 3220
3221 for_each_pipe(pipe) { 3221 for_each_pipe(pipe) {
3222 int plane = pipe; 3222 int plane = pipe;
3223 if (IS_MOBILE(dev)) 3223 if (I915_HAS_FBC(dev))
3224 plane = !plane; 3224 plane = !plane;
3225 3225
3226 if (pipe_stats[pipe] & PIPE_VBLANK_INTERRUPT_STATUS && 3226 if (pipe_stats[pipe] & PIPE_VBLANK_INTERRUPT_STATUS &&
@@ -3421,7 +3421,7 @@ static irqreturn_t i915_irq_handler(int irq, void *arg)
3421 3421
3422 for_each_pipe(pipe) { 3422 for_each_pipe(pipe) {
3423 int plane = pipe; 3423 int plane = pipe;
3424 if (IS_MOBILE(dev)) 3424 if (I915_HAS_FBC(dev))
3425 plane = !plane; 3425 plane = !plane;
3426 3426
3427 if (pipe_stats[pipe] & PIPE_VBLANK_INTERRUPT_STATUS && 3427 if (pipe_stats[pipe] & PIPE_VBLANK_INTERRUPT_STATUS &&
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bc520eb698a1..dd064faccb27 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10169,7 +10169,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
10169 */ 10169 */
10170 intel_crtc->pipe = pipe; 10170 intel_crtc->pipe = pipe;
10171 intel_crtc->plane = pipe; 10171 intel_crtc->plane = pipe;
10172 if (IS_MOBILE(dev) && INTEL_INFO(dev)->gen < 4) { 10172 if (I915_HAS_FBC(dev) && INTEL_INFO(dev)->gen < 4) {
10173 DRM_DEBUG_KMS("swapping pipes & planes for FBC\n"); 10173 DRM_DEBUG_KMS("swapping pipes & planes for FBC\n");
10174 intel_crtc->plane = !pipe; 10174 intel_crtc->plane = !pipe;
10175 } 10175 }