diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-09-27 22:38:56 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:41:20 +0300 |
commit | b445be5710200501bba693fe6f9c614895412b94 (patch) | |
tree | d25e77f20201e49856adefc30c062e8f229cc104 /drivers/gpu/drm/xe/xe_device_types.h | |
parent | 23c8495efeed0d83657de89b44a569ac406bdfad (diff) | |
download | linux-b445be5710200501bba693fe6f9c614895412b94.tar.xz |
drm/xe: Use vfunc to initialize PAT
Split the PAT initialization between SW-only and HW. The _early() only
sets up the ops and data structure that are used later to program the
tables. This allows the PAT to be easily extended to other platforms.
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230927193902.2849159-6-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_device_types.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_device_types.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h index aa9935ff6d84..c4920631677b 100644 --- a/drivers/gpu/drm/xe/xe_device_types.h +++ b/drivers/gpu/drm/xe/xe_device_types.h @@ -19,6 +19,7 @@ #include "xe_step_types.h" struct xe_ggtt; +struct xe_pat_ops; #define XE_BO_INVALID_OFFSET LONG_MAX @@ -310,6 +311,18 @@ struct xe_device { atomic_t ref; } mem_access; + /** + * @pat: Encapsulate PAT related stuff + */ + struct { + /** Internal operations to abstract platforms */ + const struct xe_pat_ops *ops; + /** PAT table to program in the HW */ + const u32 *table; + /** Number of PAT entries */ + int n_entries; + } pat; + /** @d3cold: Encapsulate d3cold related stuff */ struct { /** capable: Indicates if root port is d3cold capable */ |