OpenCloudOS-Kernel/drivers/gpu/drm/qxl
Matthew Auld b129ff30ac drm/qxl: handle NULL bo->resource in move callback
The ttm bo now initially has NULL bo->resource, and leaves the driver
the handle that. However it looks like we forgot to handle that for qxl.
It looks like this will just null-ptr-deref in qxl_bo_move(), if
bo->resource is NULL.

Fix this by calling move_null() if the new resource is TTM_PL_SYSTEM,
otherwise do the multi-hop sequence to ensure can safely call into
ttm_bo_move_memcpy(), since it might also need to clear the memory.
This should give the same behaviour as before.

Fixes: 1802537820 ("drm/ttm: stop allocating dummy resources during BO creation")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230208145319.397235-2-matthew.auld@intel.com
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
2023-02-23 10:29:14 +01:00
..
Kconfig
Makefile
qxl_cmd.c drm/qxl: stop using ttm_bo_wait 2022-12-19 09:50:06 +01:00
qxl_debugfs.c dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3 2022-04-07 12:53:54 +02:00
qxl_dev.h drm/qxl: use flexible-array member instead of zero-length array 2020-12-22 13:43:29 +01:00
qxl_display.c drm: Remove drm_mode_config::fb_base 2022-10-19 21:46:16 -04:00
qxl_draw.c drm: Drop drm_framebuffer.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
qxl_drv.c drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
qxl_drv.h drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
qxl_dumb.c drm: qxl: ensure surf.data is ininitialized 2021-06-09 08:52:07 +02:00
qxl_gem.c drm/qxl: use ttm bo priorities 2021-02-19 09:13:25 +01:00
qxl_image.c drm/qxl: rename qxl_bo_kmap -> qxl_bo_vmap_locked 2021-02-19 09:13:25 +01:00
qxl_ioctl.c drm/qxl: Move ioctl array next to its only user 2022-01-27 19:15:24 +01:00
qxl_irq.c drm/qxl: Convert to Linux IRQ interfaces 2021-07-15 11:16:06 +02:00
qxl_kms.c drm/qxl: drop set_prod_notify parameter from qxl_ring_create 2022-09-23 13:16:37 +02:00
qxl_object.c drm/gem: Take reservation lock for vmap/vunmap operations 2022-10-18 01:21:38 +03:00
qxl_object.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
qxl_prime.c drm/gem: Take reservation lock for vmap/vunmap operations 2022-10-18 01:21:38 +03:00
qxl_release.c dma-buf: specify usage while adding fences to dma_resv obj v7 2022-04-07 12:53:53 +02:00
qxl_ttm.c drm/qxl: handle NULL bo->resource in move callback 2023-02-23 10:29:14 +01:00