drm/i915: fix Haswell pfit power well check
Subsystems (2)
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
@@ -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
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
@@ -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
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)Signed-off-by Jesse Barnes <[email protected]>
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@@ -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
Re: [PATCH] drm/i915: fix Haswell pfit power well check v2
In reply to Jesse BarnesQuoted 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)Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +0
-0
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
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)Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +0
-0drivers/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_privto remove compiler warning and then add
Quoted 1 line
Reviewed-by Mika Kuoppala <[email protected]>
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
Daniel Vetter
AppliedRe: [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)Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +0
-0drivers/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_privto remove compiler warning and then add
Quoted 8 lines
Quoted 1 line
Reviewed-by Mika Kuoppala <[email protected]>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:
Reviewed-by Paulo Zanoni <[email protected]>Tested-by Paulo Zanoni <[email protected]>
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