Thomas Hellström 5bd24e7882 drm/xe/vm: Subclass userptr vmas
The construct allocating only parts of the vma structure when
the userptr part is not needed is very fragile. A developer could
add additional fields below the userptr part, and the code could
easily attempt to access the userptr part even if its not persent.

So introduce xe_userptr_vma which subclasses struct xe_vma the
proper way, and accordingly modify a couple of interfaces.
This should also help if adding userptr helpers to drm_gpuvm.

v2:
- Fix documentation of to_userptr_vma() (Matthew Brost)
- Fix allocation and freeing of vmas to clearer distinguish
  between the types.

Closes: https://lore.kernel.org/intel-xe/0c4cc1a7-f409-4597-b110-81f9e45d1ffe@embeddedor.com/T/#u
Fixes: a4cc60a55fd9 ("drm/xe: Only alloc userptr part of xe_vma for userptrs")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240131091628.12318-1-thomas.hellstrom@linux.intel.com
2024-02-01 09:49:26 +01:00
..
2024-01-12 11:32:19 -08:00
2024-01-18 16:22:43 -08:00
2024-01-11 13:49:00 -08:00
2024-01-12 11:32:19 -08:00
2024-01-18 17:25:39 -08:00
2024-01-18 18:22:40 -08:00
2024-01-18 11:37:24 -08:00
2024-01-10 08:45:22 -08:00
2024-01-20 15:03:25 -08:00
2024-01-18 09:48:40 -08:00
2024-01-18 11:37:24 -08:00
2024-01-18 17:03:51 -08:00
2024-02-01 09:49:26 +01:00
2024-01-18 11:37:24 -08:00
2024-01-12 14:45:13 -08:00
2024-01-09 16:32:11 -08:00
2024-01-18 11:37:24 -08:00
2024-01-12 13:52:21 -08:00
2024-01-18 17:21:35 -08:00
2024-01-18 15:28:15 -08:00
2024-01-18 11:37:24 -08:00
2024-01-10 16:43:55 -08:00
2024-01-17 15:25:27 -08:00
2024-01-18 18:22:40 -08:00
2024-01-18 15:16:57 -08:00
2024-01-18 11:37:24 -08:00
2024-01-18 11:37:24 -08:00
2024-01-19 08:08:53 -06:00
2024-01-18 16:44:03 -08:00
2024-01-18 18:22:40 -08:00
2024-01-18 15:16:57 -08:00
2024-01-05 15:55:41 +05:30
2024-01-18 16:22:43 -08:00
2024-01-09 16:12:44 -08:00
2024-01-18 17:11:43 -08:00
2024-01-18 09:48:40 -08:00
2024-01-17 14:37:40 -08:00
2024-01-12 14:59:50 -08:00
2024-01-11 11:31:46 -08:00
2024-01-20 09:42:32 -08:00
2024-01-18 17:08:31 -08:00
2024-01-19 12:50:09 -08:00
2024-01-20 09:42:32 -08:00
2024-01-20 09:42:32 -08:00
2024-01-04 17:03:47 +01:00
2024-01-18 11:43:55 -08:00
2024-01-18 16:44:03 -08:00
2024-01-18 15:57:25 -08:00
2024-01-18 16:44:03 -08:00
2024-01-18 16:44:03 -08:00
2024-01-12 13:32:30 -08:00
2024-01-17 13:41:38 -08:00
2024-01-12 12:38:37 +01:00