* [PATCH] drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer
@ 2012-10-22 11:32 Chris Wilson
2012-10-22 12:18 ` Paul Menzel
2012-11-10 13:39 ` Daniel Vetter
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2012-10-22 11:32 UTC (permalink / raw)
To: intel-gfx
The specs for gen2 say that the watermark values "should always be set
assuming a 32bpp display mode, even though the display mode may be 15 or
16 bpp."
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 4df221c..b5fc60a 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -1470,9 +1470,12 @@ static void i9xx_update_wm(struct drm_device *dev)
fifo_size = dev_priv->display.get_fifo_size(dev, 0);
crtc = intel_get_crtc_for_plane(dev, 0);
if (crtc->enabled && crtc->fb) {
+ int cpp = crtc->fb->bits_per_pixel / 8;
+ if (IS_GEN2(dev))
+ cpp = 4;
+
planea_wm = intel_calculate_wm(crtc->mode.clock,
- wm_info, fifo_size,
- crtc->fb->bits_per_pixel / 8,
+ wm_info, fifo_size, cpp,
latency_ns);
enabled = crtc;
} else
@@ -1481,9 +1484,12 @@ static void i9xx_update_wm(struct drm_device *dev)
fifo_size = dev_priv->display.get_fifo_size(dev, 1);
crtc = intel_get_crtc_for_plane(dev, 1);
if (crtc->enabled && crtc->fb) {
+ int cpp = crtc->fb->bits_per_pixel / 8;
+ if (IS_GEN2(dev))
+ cpp = 4;
+
planeb_wm = intel_calculate_wm(crtc->mode.clock,
- wm_info, fifo_size,
- crtc->fb->bits_per_pixel / 8,
+ wm_info, fifo_size, cpp,
latency_ns);
if (enabled == NULL)
enabled = crtc;
@@ -1573,8 +1579,7 @@ static void i830_update_wm(struct drm_device *dev)
planea_wm = intel_calculate_wm(crtc->mode.clock, &i830_wm_info,
dev_priv->display.get_fifo_size(dev, 0),
- crtc->fb->bits_per_pixel / 8,
- latency_ns);
+ 4, latency_ns);
fwater_lo = I915_READ(FW_BLC) & ~0xfff;
fwater_lo |= (3<<8) | planea_wm;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer
2012-10-22 11:32 [PATCH] drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer Chris Wilson
@ 2012-10-22 12:18 ` Paul Menzel
2012-11-10 13:39 ` Daniel Vetter
1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2012-10-22 12:18 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 509 bytes --]
Am Montag, den 22.10.2012, 12:32 +0100 schrieb Chris Wilson:
> The specs for gen2 say that the watermark values "should always be set
> assuming a 32bpp display mode, even though the display mode may be 15 or
> 16 bpp."
Does this patch fix an actual bug or is it just preemptively doing so?
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
[…]
Thanks,
Paul
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 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] 3+ messages in thread
* Re: [PATCH] drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer
2012-10-22 11:32 [PATCH] drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer Chris Wilson
2012-10-22 12:18 ` Paul Menzel
@ 2012-11-10 13:39 ` Daniel Vetter
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-11-10 13:39 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Mon, Oct 22, 2012 at 12:32:15PM +0100, Chris Wilson wrote:
> The specs for gen2 say that the watermark values "should always be set
> assuming a 32bpp display mode, even though the display mode may be 15 or
> 16 bpp."
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-10 13:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 11:32 [PATCH] drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer Chris Wilson
2012-10-22 12:18 ` Paul Menzel
2012-11-10 13:39 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox