]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Add support for drm master_[set|drop] callbacks.
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 2 Dec 2009 18:15:25 +0000 (18:15 +0000)
committerDave Airlie <airlied@redhat.com>
Thu, 3 Dec 2009 22:55:46 +0000 (08:55 +1000)
commit871815b4d6d55031050ff0292608223e0ba36716
tree13557874eb479023e5a64f12990416045ea60818
parent63b4fdaf6bc0f10fd307cf20d765a60462c23517
drm: Add support for drm master_[set|drop] callbacks.

The vmwgfx driver has a per master rw lock around TTM, to guarantee
mutual exclusion when needed.

This is typically when all evictable buffers are evicted due to

1) vt switch
2) master switch
3) suspend / resume.

In the multi-master case, on master switch the new master takes the
previously active master lock in write mode, and then evicts all
buffers. Any clients to previous masters will then block on that lock
when trying to validate a buffer. fbdev also acts as a virtual master
wrt this.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_fops.c
drivers/gpu/drm/drm_stub.c
include/drm/drmP.h