]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Actually respect DSPSURF alignment restrictions
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 11 Jun 2015 13:31:14 +0000 (16:31 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 15 Jun 2015 16:05:45 +0000 (18:05 +0200)
commit550e6e3e4c5efc0edb82fca99620e7d2dd3239cd
tree0dbf1eab4031c9505d9de48818effc637cdc875c
parent72b313f86a850ef991a9a7c7aa6f7160e922bc39
drm/i915: Actually respect DSPSURF alignment restrictions

Currently intel_gen4_compute_page_offset() simply picks the closest
page boundary below the linear offset. That however may not be suitably
aligned to satisfy any hardware specific restrictions. So let's make
sure the page boundary we choose is properly aligned.

Also to play it a bit safer lets split the remaining linear offset into
x and y values instead of just x. This should make no difference for
most platforms since we convert the x and y offsets back into a linear
offset before feeding them to the hardware. HSW+ are different however
and use x and y offsets even with linear buffers, so they might have
trouble if either the x or y get too big.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c