Skip to content
Commit 715a11fa authored by Gabriel Krisman Bertazi's avatar Gabriel Krisman Bertazi Committed by Gerd Hoffmann
Browse files

drm: qxl: Consolidate bo reservation when pinning



Every attempt to pin/unpin objects in memory requires
qxl_bo_reserve/unreserve calls around the pinning operation to protect
the object from concurrent access, which causes that call sequence to be
reproduced every place where pinning is needed.  In some cases, that
sequence was not executed correctly, resulting in potential unprotected
pinning operations.

This commit encapsulates the reservation inside a new wrapper to make
sure it is always handled properly.  In cases where reservation must be
done beforehand, for some reason, one can use the unprotected version
__qxl_bo_pin/unpin.

Signed-off-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170227204328.18761-3-krisman@collabora.co.uk
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent aa5b62ba
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment