From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/gpu/drm/virtio/virtgpu_object.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/drivers/gpu/drm/virtio/virtgpu_object.c b/kernel/drivers/gpu/drm/virtio/virtgpu_object.c
index 0c98978..49fa59e 100644
--- a/kernel/drivers/gpu/drm/virtio/virtgpu_object.c
+++ b/kernel/drivers/gpu/drm/virtio/virtgpu_object.c
@@ -157,9 +157,11 @@
* since virtio_gpu doesn't support dma-buf import from other devices.
*/
shmem->pages = drm_gem_shmem_get_sg_table(&bo->base.base);
- if (!shmem->pages) {
+ if (IS_ERR(shmem->pages)) {
drm_gem_shmem_unpin(&bo->base.base);
- return -EINVAL;
+ ret = PTR_ERR(shmem->pages);
+ shmem->pages = NULL;
+ return ret;
}
if (use_dma_api) {
--
Gitblit v1.6.2