* [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup"
@ 2011-04-22 21:22 Chris Wilson
2011-04-22 21:27 ` Jesse Barnes
2011-04-22 23:08 ` Keith Packard
0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2011-04-22 21:22 UTC (permalink / raw)
To: intel-gfx; +Cc: stable
Despite the fixes in 548f245ba6a31 (drm/i915: fix per-pipe reads after
"cleanup"), we missed one neighbouring read that was mistakenly replaced
with the reg value in 9db4a9c (drm/i915: cleanup per-pipe reg usage).
This was preventing us from correctly determining the mode the BIOS left
the panel in for machines that neither have an OpRegion nor access to
the VBT, (e.g. the EeePC 700).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
---
drivers/gpu/drm/i915/intel_display.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e7822a6..073ebd3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5802,6 +5802,7 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc)
fp = FP0(pipe);
else
fp = FP1(pipe);
+ fp = I915_READ(fp);
clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT;
if (IS_PINEVIEW(dev)) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup"
2011-04-22 21:22 [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup" Chris Wilson
@ 2011-04-22 21:27 ` Jesse Barnes
2011-04-22 21:34 ` Chris Wilson
2011-04-22 23:08 ` Keith Packard
1 sibling, 1 reply; 5+ messages in thread
From: Jesse Barnes @ 2011-04-22 21:27 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, stable
On Fri, 22 Apr 2011 22:22:28 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Despite the fixes in 548f245ba6a31 (drm/i915: fix per-pipe reads after
> "cleanup"), we missed one neighbouring read that was mistakenly replaced
> with the reg value in 9db4a9c (drm/i915: cleanup per-pipe reg usage).
> This was preventing us from correctly determining the mode the BIOS left
> the panel in for machines that neither have an OpRegion nor access to
> the VBT, (e.g. the EeePC 700).
Hooray for reg offset vs value confusion. It be clearer to separate
the two some more in this case...
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup"
2011-04-22 21:27 ` Jesse Barnes
@ 2011-04-22 21:34 ` Chris Wilson
2011-04-22 21:35 ` Jesse Barnes
0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2011-04-22 21:34 UTC (permalink / raw)
To: intel-gfx; +Cc: stable, Jesse Barnes, Chris Wilson
Despite the fixes in 548f245ba6a31 (drm/i915: fix per-pipe reads after
"cleanup"), we missed one neighbouring read that was mistakenly replaced
with the reg value in 9db4a9c (drm/i915: cleanup per-pipe reg usage).
This was preventing us from correctly determining the mode the BIOS left
the panel in for machines that neither have an OpRegion nor access to
the VBT, (e.g. the EeePC 700).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
---
drivers/gpu/drm/i915/intel_display.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e7822a6..aef6c6b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5799,9 +5799,9 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc)
intel_clock_t clock;
if ((dpll & DISPLAY_RATE_SELECT_FPA1) == 0)
- fp = FP0(pipe);
+ fp = I915_READ(FP0(pipe));
else
- fp = FP1(pipe);
+ fp = I915_READ(FP1(pipe));
clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT;
if (IS_PINEVIEW(dev)) {
--
1.7.4.1
_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup"
2011-04-22 21:34 ` Chris Wilson
@ 2011-04-22 21:35 ` Jesse Barnes
0 siblings, 0 replies; 5+ messages in thread
From: Jesse Barnes @ 2011-04-22 21:35 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, stable
On Fri, 22 Apr 2011 22:34:46 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Despite the fixes in 548f245ba6a31 (drm/i915: fix per-pipe reads after
> "cleanup"), we missed one neighbouring read that was mistakenly replaced
> with the reg value in 9db4a9c (drm/i915: cleanup per-pipe reg usage).
> This was preventing us from correctly determining the mode the BIOS left
> the panel in for machines that neither have an OpRegion nor access to
> the VBT, (e.g. the EeePC 700).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: stable@kernel.org
> ---
> drivers/gpu/drm/i915/intel_display.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e7822a6..aef6c6b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5799,9 +5799,9 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc)
> intel_clock_t clock;
>
> if ((dpll & DISPLAY_RATE_SELECT_FPA1) == 0)
> - fp = FP0(pipe);
> + fp = I915_READ(FP0(pipe));
> else
> - fp = FP1(pipe);
> + fp = I915_READ(FP1(pipe));
>
> clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT;
> if (IS_PINEVIEW(dev)) {
Better, thanks.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup"
2011-04-22 21:22 [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup" Chris Wilson
2011-04-22 21:27 ` Jesse Barnes
@ 2011-04-22 23:08 ` Keith Packard
1 sibling, 0 replies; 5+ messages in thread
From: Keith Packard @ 2011-04-22 23:08 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: stable
[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --]
On Fri, 22 Apr 2011 22:22:28 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> fp = FP0(pipe);
> else
> fp = FP1(pipe);
> + fp = I915_READ(fp);
Please use different variables for the offset vs the value...
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-22 23:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-22 21:22 [PATCH] drm/i915: fix intel_crtc_get_clock pipe reads after "cleanup" Chris Wilson
2011-04-22 21:27 ` Jesse Barnes
2011-04-22 21:34 ` Chris Wilson
2011-04-22 21:35 ` Jesse Barnes
2011-04-22 23:08 ` Keith Packard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.