drm/i915/gt: Use gt locals for accessing rc6
diff mbox series

Message ID 20191115114800.725061-1-chris@chris-wilson.co.uk
State New
Headers show
Series
  • drm/i915/gt: Use gt locals for accessing rc6
Related show

Commit Message

Chris Wilson Nov. 15, 2019, 11:48 a.m. UTC
RC6 is tracked underneath the intel_gt, so use our local pointers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_pm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tvrtko Ursulin Nov. 15, 2019, 12:04 p.m. UTC | #1
On 15/11/2019 11:48, Chris Wilson wrote:
> RC6 is tracked underneath the intel_gt, so use our local pointers.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/intel_gt_pm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> index 6187cdd06646..e61f752a3cd5 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> @@ -62,7 +62,7 @@ static int __gt_unpark(struct intel_wakeref *wf)
>   	GEM_BUG_ON(!gt->awake);
>   
>   	if (NEEDS_RC6_CTX_CORRUPTION_WA(i915))
> -		intel_uncore_forcewake_get(&i915->uncore, FORCEWAKE_ALL);
> +		intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
>   
>   	intel_rps_unpark(&gt->rps);
>   	i915_pmu_gt_unparked(i915);
> @@ -90,8 +90,8 @@ static int __gt_park(struct intel_wakeref *wf)
>   	intel_synchronize_irq(i915);
>   
>   	if (NEEDS_RC6_CTX_CORRUPTION_WA(i915)) {
> -		intel_rc6_ctx_wa_check(&i915->gt.rc6);
> -		intel_uncore_forcewake_put(&i915->uncore, FORCEWAKE_ALL);
> +		intel_rc6_ctx_wa_check(&gt->rc6);
> +		intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
>   	}
>   
>   	GEM_BUG_ON(!wakeref);
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
Andi Shyti Nov. 15, 2019, 1:19 p.m. UTC | #2
Hi Chris,

On Fri, Nov 15, 2019 at 11:48:00AM +0000, Chris Wilson wrote:
> RC6 is tracked underneath the intel_gt, so use our local pointers.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>

Acked-by: Andi Shyti <andi.shyti@intel.com>

Thanks,
Andi

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
index 6187cdd06646..e61f752a3cd5 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@ -62,7 +62,7 @@  static int __gt_unpark(struct intel_wakeref *wf)
 	GEM_BUG_ON(!gt->awake);
 
 	if (NEEDS_RC6_CTX_CORRUPTION_WA(i915))
-		intel_uncore_forcewake_get(&i915->uncore, FORCEWAKE_ALL);
+		intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL);
 
 	intel_rps_unpark(&gt->rps);
 	i915_pmu_gt_unparked(i915);
@@ -90,8 +90,8 @@  static int __gt_park(struct intel_wakeref *wf)
 	intel_synchronize_irq(i915);
 
 	if (NEEDS_RC6_CTX_CORRUPTION_WA(i915)) {
-		intel_rc6_ctx_wa_check(&i915->gt.rc6);
-		intel_uncore_forcewake_put(&i915->uncore, FORCEWAKE_ALL);
+		intel_rc6_ctx_wa_check(&gt->rc6);
+		intel_uncore_forcewake_put(gt->uncore, FORCEWAKE_ALL);
 	}
 
 	GEM_BUG_ON(!wakeref);