]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix unfenced alignment on pre-G33 hardware
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 18 Jul 2011 20:11:49 +0000 (13:11 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 18 Jul 2011 21:02:06 +0000 (14:02 -0700)
commitf6dd3283f932e65ed0bfe78e7ab3ce0086901815
tree9fb1ef4243707e686a3c1a512931942562267e64
parent877cc7bfc0976c4265f780dabdf7ebed79ceee66
drm/i915: Fix unfenced alignment on pre-G33 hardware

Align unfenced buffers on older hardware to the power-of-two object
size.  The docs suggest that it should be possible to align only to a
power-of-two tile height, but using the already computed fence size is
easier and always correct. We also have to make sure that we unbind
misaligned buffers upon tiling changes.

In order to prevent a repetition of this bug, we change the interface
to the alignment computation routines to force the caller to provide
the requested alignment and size of the GTT binding rather than assume
the current values on the object.

Reported-and-tested-by: Sitosfe Wheeler <sitsofe@yahoo.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36326
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_tiling.c