summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_rtp_types.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-05-26 19:43:39 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:34:01 +0300
commit72906d340b60f3dae545deef77376a0f598bece7 (patch)
tree9c138c8196ad81402804fcbf5ecbccc102a2f212 /drivers/gpu/drm/xe/xe_rtp_types.h
parenta9bd807eb16be11e11f6c6d3921119381cc43135 (diff)
downloadlinux-72906d340b60f3dae545deef77376a0f598bece7.tar.xz
drm/xe/rtp: Split rtp process initialization
The selection between hwe and gt is exposed to the outside of rtp, by the xe_rtp_process() function. However it doesn't make seense from the caller point of view to pass a hwe and a gt as argument since the gt should always be the one containing the hwe. This clarifies the interface by separating the context creation into an initializer. The initializer then passes the correct value and there should never be a case with hwe and gt set: when hwe is passed, the gt is the one containing it. Internally the functions continue receiving the argument separately. v2: Leave the device-only context to a separate patch if they are indeed needed later Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230526164358.86393-3-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_rtp_types.h')
-rw-r--r--drivers/gpu/drm/xe/xe_rtp_types.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_rtp_types.h b/drivers/gpu/drm/xe/xe_rtp_types.h
index 12df8a9e9c45..5afacbd9083d 100644
--- a/drivers/gpu/drm/xe/xe_rtp_types.h
+++ b/drivers/gpu/drm/xe/xe_rtp_types.h
@@ -95,4 +95,17 @@ struct xe_rtp_entry {
u8 flags;
};
+enum xe_rtp_process_type {
+ XE_RTP_PROCESS_TYPE_GT,
+ XE_RTP_PROCESS_TYPE_ENGINE,
+};
+
+struct xe_rtp_process_ctx {
+ union {
+ struct xe_gt *gt;
+ struct xe_hw_engine *hwe;
+ };
+ enum xe_rtp_process_type type;
+};
+
#endif