Bug 12900 - [intel 855GM] problems with tiled output in various circumstances
[intel 855GM] problems with tiled output in various circumstances
Status: RESOLVED INVALID
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel)
All Linux
: P1 normal
Assigned To: drivers_video-dri
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-20 07:59 UTC by Daniel Vetter
Modified: 2009-03-26 19:22 UTC (History)
3 users (show)

See Also:
Kernel Version: 2.6.29-rc8
Tree: Mainline
Regression: Yes


Attachments

Description Daniel Vetter 2009-03-20 07:59:39 UTC
Latest working kernel version: 2.6.29-rc3
Distribution: debian unstable
Hardware Environment: IBM X40 Latop

Problem Description:

In short: When using kms, glxgears is strangely tiled. When _not_ using kms, all the output (save the X cursor) of the 2d ddx is strangely tiled (if the ddx is new enough to support tiling). For the details, see my original bug report on the 2d intel ddx at

https://bugs.freedesktop.org/show_bug.cgi?id=20289

After some testing it looks like the kernel is the culprit. For tracking down the exact commit with bisecting my userspace env was:

xf86-video-intel: xf86-video-intel-2.4.97.0-369-gd9dbdb3 (using git describe)
xorg: 1.6 rc from debian experimental
libdrm: libdrm-2.4.5-41-g82eac80

According to my bisect-run, the breakage was introduced in the following commit:

commit 0f973f27888e4664b253ab2cf69c67c2eb80ab1b
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Mon Jan 26 17:10:45 2009 -0800

    drm/i915: add fence register management to execbuf

I've tried to revert this on top of 2.6.29-rc8, but this failed due to merge conflicts.
Comment 1 Daniel Vetter 2009-03-25 12:00:15 UTC
Hi Jesse,

I started at the patch for a while, reverted various chunks and finally found the problem. When I reverted the following lines (on top of recent -linus), everything (glxgears in kms and non-kms ddx) works again:

--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -186,12 +186,12 @@
#define FENCE_REG_830_0                        0x2000
#define   I830_FENCE_START_MASK                0x07f80000
#define   I830_FENCE_TILING_Y_SHIFT    12
-#define   I830_FENCE_SIZE_BITS(size)   ((get_order(size >> 19) - 1) << 8)
+#define   I830_FENCE_SIZE_BITS(size)   ((ffs((size) >> 19) - 1) << 8)
#define   I830_FENCE_PITCH_SHIFT       4
#define   I830_FENCE_REG_VALID         (1<<0)

#define   I915_FENCE_START_MASK                0x0ff00000
-#define   I915_FENCE_SIZE_BITS(size)   ((get_order(size >> 20) - 1) << 8)
+#define   I915_FENCE_SIZE_BITS(size)   ((ffs((size) >> 20) - 1) << 8)

#define FENCE_REG_965_0                        0x03000
#define   I965_FENCE_PITCH_SHIFT       2

I'm using this now with kms to write this comment, so it seems to not have any bad effects. Does that help in tracking down the root cause of these tiling problems?

-Daniel
Comment 2 Jesse Barnes 2009-03-26 19:17:08 UTC
Can you please close this out?  I try to keep even drm/i915 bugs at freedesktop.org just to save me some web surfing.

Note You need to log in before you can comment on or make changes to this bug.