From: Thomas Richter <thor@math.tu-berlin.de>
To: intel-gfx@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch
Subject: [PATCH] drm/i915: Avoid flicker with horizontal panning on 830GM
Date: Sun, 01 Sep 2013 19:01:49 +0200 [thread overview]
Message-ID: <522372FD.5080001@math.tu-berlin.de> (raw)
Dear intel-gfx developers,
When panning is enabled on the 830GM, horizontal panning creates a lot
of flickering on specific pixel positions.
After testing, I found that the reason for this is that panning works by
altering the frame origin pointer, which,
however, has certain alignment restrictions. If the pointer is not
aligned correctly, the screen starts to flicker
as, probably, DMA fails.
The following patch against drm/i915/intel_display.c fixes the issue by
ensuring correct alignment. As result,
horizontal panning works correctly, but is a bit "jumpy". Unclear
whether the problem affects any other
chipset revisions, thus the patch is currently only enabled for rev.2.
Greetings,
Thomas
diff --git a/drivers/gpu/drm/i915/intel_display.c
b/drivers/gpu/drm/i915/intel_display.c
index bcb62fe..8304e30 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1987,8 +1987,13 @@ static int i9xx_update_plane(struct drm_crtc
*crtc, struct drm_framebuffer *fb,
I915_WRITE(reg, dspcntr);
- linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8);
-
+ if (INTEL_INFO(dev)->gen > 2) {
+ linear_offset = y * fb->pitches[0] + x * (fb->bits_per_pixel / 8);
+ } else {
+ /* align the linear offset to 64 pixel boundaries */
+ linear_offset = y * fb->pitches[0] + (x & -32) *
(fb->bits_per_pixel / 8);
+ }
+
if (INTEL_INFO(dev)->gen >= 4) {
intel_crtc->dspaddr_offset =
intel_gen4_compute_page_offset(&x, &y,
obj->tiling_mode,
next reply other threads:[~2013-09-01 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-01 17:01 Thomas Richter [this message]
2013-09-02 7:10 ` [PATCH] drm/i915: Avoid flicker with horizontal panning on 830GM Daniel Vetter
2013-09-02 14:12 ` Ville Syrjälä
[not found] ` <2593_1378105810_522439D2_2593_1811_1_20130902071022.GP9374@phenom.ffwll.local>
2013-09-02 13:58 ` Thomas Richter
2013-09-02 14:18 ` Daniel Vetter
2013-09-02 14:21 ` Ville Syrjälä
[not found] ` <2593_1378131525_52249E45_2593_4993_1_20130902141857.GW9374@phenom.ffwll.local>
2013-09-02 15:21 ` Thomas Richter
2013-09-05 14:51 ` Thomas Richter
2013-09-05 14:56 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=522372FD.5080001@math.tu-berlin.de \
--to=thor@math.tu-berlin.de \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox