diff options
author | Dave Airlie <airlied@redhat.com> | 2023-02-03 04:28:21 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2023-02-03 04:28:26 +0100 |
commit | 1c0db6d84f8e0ac8f14178f13250e36ebcf457ee (patch) | |
tree | 2837aa2007278a0dcc6a66259f87bde677c2ade6 /drivers | |
parent | Merge tag 'drm-intel-gt-next-2023-02-01' of git://anongit.freedesktop.org/drm... (diff) | |
parent | drm/client: fix kernel-doc warning in drm_client.h (diff) | |
download | linux-1c0db6d84f8e0ac8f14178f13250e36ebcf457ee.tar.xz linux-1c0db6d84f8e0ac8f14178f13250e36ebcf457ee.zip |
Merge tag 'drm-misc-next-fixes-2023-02-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
Short summary of fixes pull:
A number of simple fixes throughout the DRM codebase.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/Y9twz2rqOP2+LjaT@linux-uq9g
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/accel/Kconfig | 5 | ||||
-rw-r--r-- | drivers/accel/ivpu/ivpu_drv.c | 1 | ||||
-rw-r--r-- | drivers/dma-buf/dma-fence.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/drm_gem_shmem_helper.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/tiny/simpledrm.c | 4 |
5 files changed, 11 insertions, 14 deletions
diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig index 834863902e16..c437206aa3f1 100644 --- a/drivers/accel/Kconfig +++ b/drivers/accel/Kconfig @@ -6,9 +6,10 @@ # as, but not limited to, Machine-Learning and Deep-Learning acceleration # devices # +if DRM + menuconfig DRM_ACCEL bool "Compute Acceleration Framework" - depends on DRM help Framework for device drivers of compute acceleration devices, such as, but not limited to, Machine-Learning and Deep-Learning @@ -25,3 +26,5 @@ menuconfig DRM_ACCEL source "drivers/accel/habanalabs/Kconfig" source "drivers/accel/ivpu/Kconfig" + +endif diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c index 2bc2f1b90671..a29e8ee0dce6 100644 --- a/drivers/accel/ivpu/ivpu_drv.c +++ b/drivers/accel/ivpu/ivpu_drv.c @@ -356,7 +356,6 @@ int ivpu_shutdown(struct ivpu_device *vdev) static const struct file_operations ivpu_fops = { .owner = THIS_MODULE, - .mmap = drm_gem_mmap, DRM_ACCEL_FOPS, }; diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 406b4e26f538..0de0482cd36e 100644 --- a/drivers/dma-buf/dma-fence.c +++ b/drivers/dma-buf/dma-fence.c @@ -167,7 +167,7 @@ struct dma_fence *dma_fence_allocate_private_stub(void) 0, 0); set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, - &dma_fence_stub.flags); + &fence->flags); dma_fence_signal(fence); diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 235832ad7a79..4b828ea7119c 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -415,7 +415,7 @@ void drm_gem_shmem_vunmap(struct drm_gem_shmem_object *shmem, } EXPORT_SYMBOL(drm_gem_shmem_vunmap); -static struct drm_gem_shmem_object * +static int drm_gem_shmem_create_with_handle(struct drm_file *file_priv, struct drm_device *dev, size_t size, uint32_t *handle) @@ -425,7 +425,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, shmem = drm_gem_shmem_create(dev, size); if (IS_ERR(shmem)) - return shmem; + return PTR_ERR(shmem); /* * Allocate an id of idr table where the obj is registered @@ -434,10 +434,8 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, ret = drm_gem_handle_create(file_priv, &shmem->base, handle); /* drop reference from allocate - handle holds it now. */ drm_gem_object_put(&shmem->base); - if (ret) - return ERR_PTR(ret); - return shmem; + return ret; } /* Update madvise status, returns true if not purged, else @@ -520,7 +518,6 @@ int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args) { u32 min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); - struct drm_gem_shmem_object *shmem; if (!args->pitch || !args->size) { args->pitch = min_pitch; @@ -533,9 +530,7 @@ int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev, args->size = PAGE_ALIGN(args->pitch * args->height); } - shmem = drm_gem_shmem_create_with_handle(file, dev, args->size, &args->handle); - - return PTR_ERR_OR_ZERO(shmem); + return drm_gem_shmem_create_with_handle(file, dev, args->size, &args->handle); } EXPORT_SYMBOL_GPL(drm_gem_shmem_dumb_create); diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c index 2acc0eb32489..63881a3754f8 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -719,8 +719,8 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv, drm_dbg(dev, "using system memory framebuffer at %pr\n", mem); screen_base = devm_memremap(dev->dev, mem->start, resource_size(mem), MEMREMAP_WC); - if (!screen_base) - return ERR_PTR(-ENOMEM); + if (IS_ERR(screen_base)) + return screen_base; iosys_map_set_vaddr(&sdev->screen_base, screen_base); } else { |