Files
linux/drivers/gpu/drm
Thomas Hellström 3439cc4661 drm/xe/bo: Avoid creating a system resource when allocating a fresh VRAM bo
When creating a new bo, on the first move the bo->resource is typically
NULL. Our move callback rejected that instructing TTM to create a system
resource. In addition a struct ttm_tt with a page-vector was created,
although not populated with pages. Similarly when the clearing of VRAM
was complete, the system resource was put on a ghost object and freed
using the TTM delayed destroy mechanism.

This is a lot of pointless work. So avoid creating the system resource and
instead change the code to cope with a NULL bo->resource.

v2:
- Add some code comments (Matthew Brost)
v3:
- Fix a dereference of old_mem which might be NULL.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-3-thomas.hellstrom@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2023-12-21 11:35:04 -05:00
..
2023-11-27 13:56:32 -06:00
2023-11-27 13:56:32 -06:00
2023-11-27 13:56:32 -06:00
2023-11-15 10:56:44 +01:00
2023-11-28 15:32:24 +01:00
2023-11-27 13:56:32 -06:00
2023-12-04 09:42:32 +01:00
2023-11-28 11:55:56 +01:00