Re: [PATCH v4] drm: do not sleep on vblank while holding a mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 31, 2011 at 05:46:18PM -0400, Ilija Hadzic wrote:
> drm_wait_vblank must be DRM_UNLOCKED because otherwise it
> will grab the drm_global_mutex and then go to sleep until the vblank
> event it is waiting for. That can wreck havoc in the windowing system
> because if one process issues this ioctl, it will block all other
> processes for the duration of all vblanks between the current and the
> one it is waiting for. In some cases it can block the entire windowing
> system.
> 
> v2: incorporate comments received from Daniel Vetter and
>     Michel Daenzer.
> 
> v3/v4: after a lengty discussion with Daniel Vetter, it was concluded
>        that the only thing not yet protected with locks and atomic
>        ops is the write to dev->last_vblank_wait. It's only used in a
>        debug file in proc, and the current code already employs no
>        correct locking: the proc file only takes dev->struct_mutex,
>        whereas drm_wait_vblank implicitly took the drm_global_mutex.
>        Given all this, it's not worth bothering to try to fix
>        the locks at this time.
> 
> Signed-off-by: Ilija Hadzic <ihadzic@xxxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
-- 
Daniel Vetter
Mail: daniel@xxxxxxxx
Mobile: +41 (0)79 365 57 48
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux