dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/gpu/drm/ttm
Daniel Vetter ff7c60c580 drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try
This fixes up

commit e8e89622ed
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 18 22:25:11 2012 +0100

    drm/ttm: fix fence locking in ttm_buffer_object_transfer

which leaves behind a might_sleep in atomic context, since the
fence_lock spinlock is held over a kmalloc(GFP_KERNEL) call. The fix
is to revert the above commit and only take the lock where we need it,
around the call to ->sync_obj_ref.

v2: Fixup things noticed by Maarten Lankhorst:
- Brown paper bag locking bug.
- No need for kzalloc if we clear the entire thing on the next line.
- check for bo->sync_obj (totally unlikely race, but still someone
  else could have snuck in) and clear fbo->sync_obj if it's cleared
  already.

Reported-by: Dave Airlie <airlied@gmail.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-02-08 10:44:31 +10:00
..
Makefile drm/ttm: provide dma aware ttm page pool code V9 2011-12-06 10:39:33 +00:00
ttm_agp_backend.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
ttm_bo.c ttm: on move memory failure don't leave a node dangling 2013-01-21 13:45:23 +10:00
ttm_bo_manager.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
ttm_bo_util.c drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try 2013-02-08 10:44:31 +10:00
ttm_bo_vm.c drm/ttm: Optimize vm locking using kref_get_unless_zero v3 2012-11-28 18:37:59 +10:00
ttm_execbuf_util.c drm/ttm: change fence_lock to inner lock 2012-12-10 20:09:58 +10:00
ttm_lock.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
ttm_memory.c drm/ttm: remove ttm_mem_global->queue 2012-11-20 16:06:22 +10:00
ttm_module.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00
ttm_object.c drm/ttm: Use the hashtab _rcu interface for ttm_objects 2012-11-28 18:36:15 +10:00
ttm_page_alloc.c ttm: Clear the ttm page allocated from high memory zone correctly 2012-11-16 09:56:35 +10:00
ttm_page_alloc_dma.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
ttm_tt.c drm/ttm: remove unneeded preempt_disable/enable 2012-11-16 09:59:51 +10:00