mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/i915/gt: Create the gt_to_guc() wrapper
We already have guc_to_gt() and getting to guc from the GT it requires some mental effort. Add the gt_to_guc(). Given the reference to the "gt", the gt_to_guc() will return the pinter to the "guc". Update all the files under the gt/ directory. Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231229102734.674362-2-andi.shyti@linux.intel.com
This commit is contained in:
@@ -589,7 +589,7 @@ u64 intel_clamp_preempt_timeout_ms(struct intel_engine_cs *engine, u64 value)
|
||||
* NB: The GuC API only supports 32bit values. However, the limit is further
|
||||
* reduced due to internal calculations which would otherwise overflow.
|
||||
*/
|
||||
if (intel_guc_submission_is_wanted(&engine->gt->uc.guc))
|
||||
if (intel_guc_submission_is_wanted(gt_to_guc(engine->gt)))
|
||||
value = min_t(u64, value, guc_policy_max_preempt_timeout_ms());
|
||||
|
||||
value = min_t(u64, value, jiffies_to_msecs(MAX_SCHEDULE_TIMEOUT));
|
||||
@@ -610,7 +610,7 @@ u64 intel_clamp_timeslice_duration_ms(struct intel_engine_cs *engine, u64 value)
|
||||
* NB: The GuC API only supports 32bit values. However, the limit is further
|
||||
* reduced due to internal calculations which would otherwise overflow.
|
||||
*/
|
||||
if (intel_guc_submission_is_wanted(&engine->gt->uc.guc))
|
||||
if (intel_guc_submission_is_wanted(gt_to_guc(engine->gt)))
|
||||
value = min_t(u64, value, guc_policy_max_exec_quantum_ms());
|
||||
|
||||
value = min_t(u64, value, jiffies_to_msecs(MAX_SCHEDULE_TIMEOUT));
|
||||
|
||||
Reference in New Issue
Block a user