]> Git Repo - linux.git/commit
drm/i915: preparation for using PAT index
authorFei Yang <[email protected]>
Tue, 9 May 2023 16:51:59 +0000 (09:51 -0700)
committerAndi Shyti <[email protected]>
Thu, 11 May 2023 15:38:36 +0000 (17:38 +0200)
commit5e352e32aec23570ea948f039e25faf9b9ba362b
tree39aede5e12b7991a80c12897eed60c291b704b8e
parent5b8ff071b57e0a50a0e6eb8db55d159a68853f6b
drm/i915: preparation for using PAT index

This patch is a preparation for replacing enum i915_cache_level with PAT
index. Caching policy for buffer objects is set through the PAT index in
PTE, the old i915_cache_level is not sufficient to represent all caching
modes supported by the hardware.

Preparing the transition by adding some platform dependent data structures
and helper functions to translate the cache_level to pat_index.

cachelevel_to_pat: a platform dependent array mapping cache_level to
                   pat_index.

max_pat_index: the maximum PAT index recommended in hardware specification
               Needed for validating the PAT index passed in from user
               space.

i915_gem_get_pat_index: function to convert cache_level to PAT index.

obj_to_i915(obj): macro moved to header file for wider usage.

I915_MAX_CACHE_LEVEL: upper bound of i915_cache_level for the
                      convenience of coding.

Cc: Chris Wilson <[email protected]>
Cc: Matt Roper <[email protected]>
Signed-off-by: Fei Yang <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: Andi Shyti <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/i915_gem_object.h
drivers/gpu/drm/i915/gem/i915_gem_object_types.h
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
drivers/gpu/drm/i915/gt/gen8_ppgtt.c
drivers/gpu/drm/i915/gt/intel_ggtt.c
drivers/gpu/drm/i915/i915_pci.c
drivers/gpu/drm/i915/intel_device_info.h
drivers/gpu/drm/i915/selftests/mock_gem_device.c
This page took 0.062751 seconds and 4 git commands to generate.