]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Compare only lower 32 bits of framebuffer map offsets
authorTormod Volden <debian.tormod@gmail.com>
Mon, 30 May 2011 19:45:43 +0000 (19:45 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 14 Jun 2011 01:09:54 +0000 (11:09 +1000)
commit9f26ae1c2dc138ff71420b9e10ff0808186d9024
tree7b9920427103a3889e1c7d85d032a26841e29cb1
parente52bc2d0e2fa1719b69078c661ef596d85894d01
drm: Compare only lower 32 bits of framebuffer map offsets

Drivers using multiple framebuffers got broken by commit
69ce253239efa2359a19ccd807c512cd6a7ec62d which ignored the framebuffer
(or register) map offset when looking for existing maps. The rationale
was that the kernel-userspace ABI is fixed at a 32-bit offset, so the
real offsets could not always be handed over for comparison.

Instead of ignoring the offset we will compare the lower 32 bit. Drivers
using multiple framebuffers should just make sure that the lower 32 bit
are different. The existing drivers in question are practically limited
to 32-bit systems so that should be fine for them.

It is assumed that current drivers always specify a correct framebuffer
map offset, even if this offset was ignored since above commit. So this
patch should not change anything for drivers using only one framebuffer.

Drivers needing multiple framebuffers with 64-bit map offsets will need
to cook up something, for instance keeping an ID in the lower bit which
is to be aligned away when it comes to using the offset.

All of above applies to _DRM_REGISTERS as well.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_bufs.c