]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: Simplify error handling of virtio_gpu_object_create()
authorDmitry Osipenko <dmitry.osipenko@collabora.com>
Thu, 30 Jun 2022 20:07:23 +0000 (23:07 +0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 19 Jul 2022 12:40:58 +0000 (14:40 +0200)
commitcfb7fdf7b6f5f034b1661eff9759a39995dcea41
treeea6d98a32063c2fc32b7683e0dd338bcc0240b8a
parenta36b485024b350d2515c7df574bb880d746835fe
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: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220630200726.1884320-7-dmitry.osipenko@collabora.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_object.c