From: Thomas Richter <thor@math.tu-berlin.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Patches for i830 flicker on panning
Date: Tue, 05 Nov 2013 00:20:58 +0100 [thread overview]
Message-ID: <52782BDA.5030100@math.tu-berlin.de> (raw)
In-Reply-To: <19544_1383578084_5277B9E4_19544_9350_1_20131104151509.GF4167@phenom.ffwll.local>
Hi Daniel, dear intel experts,
the following is a "solution" for the flicker on i830 panning. To remind
you, when panning is enabled on an i830,
the display shows an annoying 30Hz flicker on some "forbidden"
positions. On such positions, half of the frames
is black, and the other half shows a screen that is "ripped in half",
with one half scrolled to the wrong
position, and the other half displayed correctly, with a discontinuity
in the middle.
That is, every other frame is black, and the ones that are not black are
"wrong".
The patch is, arguably, ugly as hell, and creates a certain "yerkiness",
though it does its job. One of the side
effects this flicker causes is complete crashes and lockups with video
overlays which are avoided by the patch.
That is, if you play a video with xine, and then pan over a forbidden
position, the machine crashes and comes
to a complete stop.
Sorry if the patch format isn't quite right, and the patch is not quite
in a final state (not yet fully tested on all possible
combinations of panning dimensions and display depths), but it's a start
and "works good enough for me".
For that, patch: i9xx_update_plane(...) in intel_display.c,
if (INTEL_INFO(dev)->gen >= 4) {
I915_MODIFY_DISPBASE(DSPSURF(plane),
i915_gem_obj_ggtt_offset(obj) +
intel_crtc->dspaddr_offset);
I915_WRITE(DSPTILEOFF(plane), (y << 16) | x);
I915_WRITE(DSPLINOFF(plane), linear_offset);
+ } else if (INTEL_INFO(dev)->gen == 2) {
+ int xflick = (x >> 4) & 0x03;
+ if (xflick == 3) { /* in forbidden column, probably a i830
bug */
+ int xfix = 16 + (x & ~(0x3f));
+ int fix_offset = y * fb->pitches[0] + xfix *
(fb->bits_per_pixel / 8);
+ I915_WRITE(DSPADDR(plane), i915_gem_obj_ggtt_offset(obj) +
fix_offset);
+ POSTING_READ(reg);
+ intel_wait_for_vblank(dev, intel_crtc->pipe);
+ }
+ I915_WRITE(DSPADDR(plane), i915_gem_obj_ggtt_offset(obj) +
linear_offset);
} else
I915_WRITE(DSPADDR(plane), i915_gem_obj_ggtt_offset(obj) +
linear_offset);
POSTING_READ(reg);
The trick is, as you see, first to display the one frame the display
scrolled off *before* the forbidden column, and
then scroll to the right position, going to the right. )-:
*Why* that works is unclear to me. Don't ask, just observation.
An improvement would be to check whether the x position did change, and
if it did not, just avoid all the hack to
allow smooth vertical scrolling. Still to be done. Maybe later the week
if the above also works on the R31
(affected by the same problem).
Greetings,
Thomas
next prev parent reply other threads:[~2013-11-04 23:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-03 16:55 More questions and patches for 835GM/ns2501 DVO Thomas Richter
2013-11-03 17:12 ` Daniel Vetter
2013-11-03 17:13 ` Daniel Vetter
[not found] ` <19544_1383498802_52768431_19544_2610_1_20131103171348.GB4167@phenom.ffwll.local>
2013-11-03 19:00 ` Thomas Richter
2013-11-03 21:18 ` Daniel Vetter
2013-11-06 10:34 ` Daniel Vetter
2013-11-15 17:33 ` Daniel Vetter
[not found] ` <10422_1384536748_52865AAC_10422_4782_1_20131115173300.GZ22741@phenom.ffwll.local>
2013-11-15 18:59 ` Thomas Richter
[not found] ` <8785_1383734019_527A1B02_8785_7652_1_20131106103405.GH14082@phenom.ffwll.local>
2013-11-06 19:27 ` Thomas Richter
[not found] ` <19544_1383513468_5276BD7B_19544_3653_1_20131103211814.GC4167@phenom.ffwll.local>
2013-11-03 23:09 ` Thomas Richter
2013-11-04 7:15 ` Daniel Vetter
[not found] ` <19544_1383549334_52774996_19544_5502_1_CAKMK7uEPjjCsqYTpyO+Bes1eg5b8fVfGFkzQFtwDPxYNe4KwRw@mail.gmail.com>
2013-11-04 11:57 ` Thomas Richter
2013-11-04 15:15 ` Daniel Vetter
2013-11-04 15:48 ` Ville Syrjälä
2013-11-04 16:05 ` Ville Syrjälä
[not found] ` <19544_1383578084_5277B9E4_19544_9350_1_20131104151509.GF4167@phenom.ffwll.local>
2013-11-04 23:20 ` Thomas Richter [this message]
2013-11-05 7:07 ` Patches for i830 flicker on panning Daniel Vetter
2013-11-03 23:56 ` 16bpp and 8bpp uxa output broken Thomas Richter
2013-11-04 7:20 ` Daniel Vetter
2013-11-03 19:39 ` More questions and patches for 835GM/ns2501 DVO Thomas Richter
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=52782BDA.5030100@math.tu-berlin.de \
--to=thor@math.tu-berlin.de \
--cc=daniel@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