Skip to contentSkip to conversation

drm/i915: fix Haswell pfit power well check

PATCH New Jesse Barnes 4 participants 6 messages May 2, 2013 – May 3, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: fix Haswell pfit power well check

We can't read the pfit regs if the power well is off, so use the cached value.

However, I think this check is incorrect (it was taken from an earlier check against dev_priv). We should probably just drop it altogether, since the panel fitter isn't useful without a pipe to fetch from and an encoder to feed.

---
 drivers/gpu/drm/i915/intel_display.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
index 6504337..c451940 100644
@@ -5917,8 +5917,7 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
 		/* XXX: Should check for edp transcoder here, but thanks to init
 		 * sequence that's not yet available. Just in case desktop eDP
 		 * on PORT D is possible on haswell, too. */
-		/* Even the eDP panel fitter is outside the always-on well. */
-		if (I915_READ(PF_WIN_SZ(crtc->pipe)))
+		if (crtc->config.pch_pfit.size)
 			enable = true;
 	}
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 drm/i915: fix Haswell pfit power well check v2

We can't read the pfit regs if the power well is off, so use the cached value.

v2: re-add lost comment (Jesse)
make sure the crtc using the fitter is actually enabled (Jesse)

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
index 6504337..6be34f2 100644
@@ -5918,7 +5918,7 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
 		 * sequence that's not yet available. Just in case desktop eDP
 		 * on PORT D is possible on haswell, too. */
 		/* Even the eDP panel fitter is outside the always-on well. */
-		if (I915_READ(PF_WIN_SZ(crtc->pipe)))
+		if (crtc->config.pch_pfit.size && crtc->base.enabled)
 			enable = true;
 	}
 
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH] drm/i915: fix Haswell pfit power well check v2

Quoted 7 lines · Jesse Barnes

We can't read the pfit regs if the power well is off, so use the cached value.

v2: re-add lost comment (Jesse)
make sure the crtc using the fitter is actually enabled (Jesse)

Just a quick maintainer bikeshed: For fixups I highly prefer a quick git commit citation of the regressing commit plus all the cc+reviewers of the original patch in the cc section of this one. Just so that reviewers don't miss a good chance to learn something. -Daniel

Quoted 20 lines
---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
index 6504337..6be34f2 100644
@@ -5918,7 +5918,7 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
                 * sequence that's not yet available. Just in case desktop eDP
                 * on PORT D is possible on haswell, too. */
                /* Even the eDP panel fitter is outside the always-on well. */
-               if (I915_READ(PF_WIN_SZ(crtc->pipe)))
+               if (crtc->config.pch_pfit.size && crtc->base.enabled)
                        enable = true;
        }
 
--

1.7.10.4

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

Reviewed-by on v1 1/1
#3 lore raw

Re: [PATCH] drm/i915: fix Haswell pfit power well check v2

In reply to Jesse Barnes
Quoted 16 lines · Jesse Barnes

We can't read the pfit regs if the power well is off, so use the cached value.

v2: re-add lost comment (Jesse)
make sure the crtc using the fitter is actually enabled (Jesse)

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 6504337..6be34f2 100644

drivers/gpu/drm/i915/intel_display.c static void haswell_modeset_global_resources(struct drm_device *dev) · line 5924

Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -5918,7 +5918,7 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
 		 * sequence that's not yet available. Just in case desktop eDP
 		 * on PORT D is possible on haswell, too. */
 		/* Even the eDP panel fitter is outside the always-on well. */
-		if (I915_READ(PF_WIN_SZ(crtc->pipe)))
+		if (crtc->config.pch_pfit.size && crtc->base.enabled)
 			enable = true;
 	}
 

Remove the now useless *dev_priv to remove compiler warning and then add

Reviewed-by Tested-by
#4 lore raw

Re: [PATCH] drm/i915: fix Haswell pfit power well check v2

2013/5/3 Mika Kuoppala <[email protected]>:

Quoted 29 lines
Quoted 16 lines · Jesse Barnes

We can't read the pfit regs if the power well is off, so use the cached value.

v2: re-add lost comment (Jesse)
make sure the crtc using the fitter is actually enabled (Jesse)

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 6504337..6be34f2 100644

drivers/gpu/drm/i915/intel_display.c static void haswell_modeset_global_resources(struct drm_device *dev) · line 5924

Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -5918,7 +5918,7 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
               * sequence that's not yet available. Just in case desktop eDP
               * on PORT D is possible on haswell, too. */
              /* Even the eDP panel fitter is outside the always-on well. */
-             if (I915_READ(PF_WIN_SZ(crtc->pipe)))
+             if (crtc->config.pch_pfit.size && crtc->base.enabled)
                      enable = true;
      }
 

Remove the now useless *dev_priv to remove compiler warning and then add

Quoted 1 line

Yay, dmesg is clean again with this patch + Daniel's patch 06 + my local patches which I'll resend today.

With the warn pointed by Mika removed:

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
#5 lore raw

Re: [PATCH] drm/i915: fix Haswell pfit power well check v2

Quoted 30 lines · Paulo Zanoni

2013/5/3 Mika Kuoppala <[email protected]>:

Quoted 29 lines
Quoted 16 lines · Jesse Barnes

We can't read the pfit regs if the power well is off, so use the cached value.

v2: re-add lost comment (Jesse)
make sure the crtc using the fitter is actually enabled (Jesse)

---
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -0
index 6504337..6be34f2 100644

drivers/gpu/drm/i915/intel_display.c static void haswell_modeset_global_resources(struct drm_device *dev) · line 5924

Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -5918,7 +5918,7 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
               * sequence that's not yet available. Just in case desktop eDP
               * on PORT D is possible on haswell, too. */
              /* Even the eDP panel fitter is outside the always-on well. */
-             if (I915_READ(PF_WIN_SZ(crtc->pipe)))
+             if (crtc->config.pch_pfit.size && crtc->base.enabled)
                      enable = true;
      }
 

Remove the now useless *dev_priv to remove compiler warning and then add

Quoted 8 lines
Quoted 1 line

Yay, dmesg is clean again with this patch + Daniel's patch 06 + my local patches which I'll resend today.

With the warn pointed by Mika removed:

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch