drm/i915/ttm: Add I915_BO_PREALLOC
authorNirmoy Das <nirmoy.das@intel.com>
Tue, 4 Apr 2023 14:30:56 +0000 (16:30 +0200)
committerNirmoy Das <nirmoy.das@intel.com>
Thu, 6 Apr 2023 16:19:44 +0000 (18:19 +0200)
commitddb24fc525ddaf35130d96478f3f18682a9d5926
tree6c9d3278e74ecab3500714309d6f7b47a8d2725e
parent4b51210f98c2b89ce37aede5b8dc5105be0572c6
drm/i915/ttm: Add I915_BO_PREALLOC

Add a mechanism to preserve existing data when creating
a TTM object with the I915_BO_ALLOC_USER flag. This will
be used in the subsequent patch where the I915_BO_ALLOC_USER
flag will be applied to the framebuffer object. For a pre-allocated
framebuffer without the I915_BO_PREALLOC flag.

TTM would clear the content, which is not desirable.
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230404143100.10452-1-nirmoy.das@intel.com
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c