]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/ttm: Remove the struct ttm_backup abstraction
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 2 May 2025 13:00:14 +0000 (15:00 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 6 May 2025 08:57:27 +0000 (10:57 +0200)
commitd4ad53adfe21df1464bae5ed916085a69d6ffb3d
treee2f78c229eeae89f65e23e8d89395c47fb21434d
parent2bb04ea9e5b7a2ef583c042ed5f8111804606e9d
drm/ttm: Remove the struct ttm_backup abstraction

The abstraction was previously added to support separate
ttm_backup implementations.

However with the current implementation casting from a
struct file to a struct ttm_backup, we run into trouble since
struct file may have randomized the layout and gcc complains.

Remove the struct ttm_backup abstraction

Cc: dri-devel@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Kees Cook <kees@kernel.org>
Closes: https://lore.kernel.org/dri-devel/9c8dbbafdaf9f3f089da2cde5a772d69579b3795.camel@linux.intel.com/T/#mb153ab9216cb813b92bdeb36f391ad4808c2ba29
Suggested-by: Christian König <christian.koenig@amd.com>
Fixes: 70d645deac98 ("drm/ttm: Add helpers for shrinking")
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250502130014.3156-1-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/ttm/ttm_backup.c
drivers/gpu/drm/ttm/ttm_pool.c
drivers/gpu/drm/ttm/ttm_tt.c
include/drm/ttm/ttm_backup.h
include/drm/ttm/ttm_tt.h