]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon/kms: fix bo's fence association
authorJerome Glisse <jglisse@redhat.com>
Mon, 15 Feb 2010 20:36:33 +0000 (21:36 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 18 Feb 2010 05:07:04 +0000 (15:07 +1000)
commite47f3bf6cdbc4d9b1bea86ad5f992dab8c426351
tree6c401e2c50724236da26468963fd99eda1cf3917
parent3b45f8b869f517a2b8f14f851da40c74e0d0f8d1
drm/radeon/kms: fix bo's fence association

Previous code did associate fence to bo before the fence was emited
and it also didn't lock protected access to ttm sync_obj member.
Both of this flaw leads to possible race between different code
path. This patch fix this by associating fence only once the fence
is emitted and properly lock protect access to sync_obj member of
ttm.

Fix:
https://bugs.freedesktop.org/show_bug.cgi?id=26438
and likely similar others bugs
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_cs.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_object.h