OSDN Git Service

drm/radeon: Restrict offset for legacy hardware cursor.
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 14 Mar 2012 16:12:41 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:27:12 +0000 (09:27 -0700)
commite60622654396c213acf6cbd2d520d94ae330e4f6
tree618c6ad741624513bc5a9ce072053f3bfd213bf4
parent4db1aef6a2b79aba4f862285c2658348e083f2b7
drm/radeon: Restrict offset for legacy hardware cursor.

commit c4353016dac10133fa5d8535af83f0c4845a2915 upstream.

The hardware only takes 27 bits for the offset, so larger offsets are
truncated, and the hardware cursor shows random bits other than the intended
ones.

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

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_cursor.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_object.h