]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe/display: fix ttm_bo_access() usage
authorMatthew Auld <matthew.auld@intel.com>
Mon, 2 Dec 2024 17:01:03 +0000 (17:01 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 4 Dec 2024 10:28:33 +0000 (10:28 +0000)
commit125a66a572bc46ef6cacf9f0ba90a5244b21fd16
tree95a80f43d6d95b8f9072b07bb72f78438b050825
parent20124c3e22db52c6507529dbf2315260a5769a75
drm/xe/display: fix ttm_bo_access() usage

ttm_bo_access() returns the size on success, account for that otherwise
the caller incorrectly thinks this is an error in
intel_atomic_prepare_plane_clear_colors().

v2 (Thomas)
 - Make sure we check for the partial copy case. Also since this api is
   easy to get wrong, wrap the whole thing in a new helper to hide the
   details and then convert the existing users over.

Fixes: b6308aaa24a7 ("drm/xe/display: Update intel_bo_read_from_page to use ttm_bo_access")
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3661
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241202170102.88893-2-matthew.auld@intel.com
drivers/gpu/drm/xe/display/intel_bo.c
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo.h
drivers/gpu/drm/xe/xe_vm.c