Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Back-port attempt [2/2] ...
details: https://anonhg.NetBSD.org/src/rev/23cf51895059
branches: trunk
changeset: 336308:23cf51895059
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Feb 25 13:35:25 2015 +0000
description:
Back-port attempt [2/2] to fix i915drmkms on G4X, from Linux.
commit 95468892fdfeef6d1004b524e35957629efdbe00
Author: Chris Wilson <chris%chris-wilson.co.uk@localhost>
Date: Thu Aug 7 15:39:54 2014 +0100
drm/i915: Reset the HEAD pointer for the ring after writing START
Ville found an old w/a documented for g4x that suggested that we need to
reset the HEAD after writing START. This is a useful fixup for some of
the g4x ring initialisation woes, but as usual, not all.
v2: Do the rewrite unconditionally anyway
diffstat:
sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diffs (18 lines):
diff -r 4345f289eefb -r 23cf51895059 sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c Wed Feb 25 13:30:02 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_ringbuffer.c Wed Feb 25 13:35:25 2015 +0000
@@ -507,6 +507,14 @@
* also enforces ordering), otherwise the hw might lose the new ring
* register values. */
I915_WRITE_START(ring, i915_gem_obj_ggtt_offset(obj));
+
+ /* WaClearRingBufHeadRegAtInit:ctg,elk */
+ if (I915_READ_HEAD(ring))
+ DRM_DEBUG("%s initialization failed [head=%08x], fudging\n",
+ ring->name, I915_READ_HEAD(ring));
+ I915_WRITE_HEAD(ring, 0);
+ (void)I915_READ_HEAD(ring);
+
I915_WRITE_CTL(ring,
((ring->size - PAGE_SIZE) & RING_NR_PAGES)
| RING_VALID);
Home |
Main Index |
Thread Index |
Old Index