Skip to content
Commit e7fef092 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Gerd Hoffmann
Browse files

drm/virtio: Simplify error handling of virtio_gpu_object_create()



Change the order of SHMEM initialization and reservation locking
to make code cleaner and to prepare for transitioning of the common
GEM SHMEM code to use the GEM's reservation lock instead of the
shmem.page_lock.

There is no need to lock reservation during allocation of the SHMEM pages
because the lock is needed only to avoid racing with the async host-side
allocation. Hence we can safely move the SHMEM initialization out of the
reservation lock.

Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220630200726.1884320-7-dmitry.osipenko@collabora.com


Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 4656b3a2
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