diff mbox series

[2/2] drm/i915/mtl: Disable MC6 for MTL A step

Message ID 20230308102109.2386712-3-badal.nilawar@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/mtl: Disable MC6 for MTL A step | expand

Commit Message

Nilawar, Badal March 8, 2023, 10:21 a.m. UTC
The Wa_14017073508 require to send Media Busy/Idle mailbox while
accessing Media tile. As of now it is getting handled while __gt_unpark,
__gt_park. But there are various corner cases where forcewakes are taken
without __gt_unpark i.e. without sending Busy Mailbox especially during
register reads. Forcewakes are taken without busy mailbox leads to
GPU HANG. So bringing mailbox calls under forcewake calls are no feasible
option as forcewake calls are atomic and mailbox calls are blocking.
The issue already fixed in B step so disabling MC6 on A step and
reverting previous commits which handles Wa_14017073508

Fixes: 8f70f1ec587d ("drm/i915/mtl: Add Wa_14017073508 for SAMedia")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_rc6.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Rodrigo Vivi March 8, 2023, 1:29 p.m. UTC | #1
On Wed, Mar 08, 2023 at 03:51:09PM +0530, Badal Nilawar wrote:
> The Wa_14017073508 require to send Media Busy/Idle mailbox while
> accessing Media tile. As of now it is getting handled while __gt_unpark,
> __gt_park. But there are various corner cases where forcewakes are taken
> without __gt_unpark i.e. without sending Busy Mailbox especially during
> register reads. Forcewakes are taken without busy mailbox leads to
> GPU HANG. So bringing mailbox calls under forcewake calls are no feasible
> option as forcewake calls are atomic and mailbox calls are blocking.
> The issue already fixed in B step so disabling MC6 on A step and
> reverting previous commits which handles Wa_14017073508
> 
> Fixes: 8f70f1ec587d ("drm/i915/mtl: Add Wa_14017073508 for SAMedia")
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>

This patch should probably come before the revert itself.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_rc6.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
> index 5c91622dfca4..f4150f61f39c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_rc6.c
> +++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
> @@ -486,6 +486,7 @@ static bool bxt_check_bios_rc6_setup(struct intel_rc6 *rc6)
>  static bool rc6_supported(struct intel_rc6 *rc6)
>  {
>  	struct drm_i915_private *i915 = rc6_to_i915(rc6);
> +	struct intel_gt *gt = rc6_to_gt(rc6);
>  
>  	if (!HAS_RC6(i915))
>  		return false;
> @@ -502,6 +503,13 @@ static bool rc6_supported(struct intel_rc6 *rc6)
>  		return false;
>  	}
>  
> +	if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0) &&
> +	    gt->type == GT_MEDIA) {
> +		drm_notice(&i915->drm,
> +			   "Media RC6 disabled on A step\n");
> +		return false;
> +	}
> +
>  	return true;
>  }
>  
> -- 
> 2.25.1
>
Nilawar, Badal March 8, 2023, 3:24 p.m. UTC | #2
Hi Rodrigo,

On 08-03-2023 18:59, Rodrigo Vivi wrote:
> On Wed, Mar 08, 2023 at 03:51:09PM +0530, Badal Nilawar wrote:
>> The Wa_14017073508 require to send Media Busy/Idle mailbox while
>> accessing Media tile. As of now it is getting handled while __gt_unpark,
>> __gt_park. But there are various corner cases where forcewakes are taken
>> without __gt_unpark i.e. without sending Busy Mailbox especially during
>> register reads. Forcewakes are taken without busy mailbox leads to
>> GPU HANG. So bringing mailbox calls under forcewake calls are no feasible
>> option as forcewake calls are atomic and mailbox calls are blocking.
>> The issue already fixed in B step so disabling MC6 on A step and
>> reverting previous commits which handles Wa_14017073508
>>
>> Fixes: 8f70f1ec587d ("drm/i915/mtl: Add Wa_14017073508 for SAMedia")
>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
> 
> This patch should probably come before the revert itself.
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Thanks for RB. I will put this patch before revert.

Regards,
Badal Nilawar
> 
>> ---
>>   drivers/gpu/drm/i915/gt/intel_rc6.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
>> index 5c91622dfca4..f4150f61f39c 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_rc6.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
>> @@ -486,6 +486,7 @@ static bool bxt_check_bios_rc6_setup(struct intel_rc6 *rc6)
>>   static bool rc6_supported(struct intel_rc6 *rc6)
>>   {
>>   	struct drm_i915_private *i915 = rc6_to_i915(rc6);
>> +	struct intel_gt *gt = rc6_to_gt(rc6);
>>   
>>   	if (!HAS_RC6(i915))
>>   		return false;
>> @@ -502,6 +503,13 @@ static bool rc6_supported(struct intel_rc6 *rc6)
>>   		return false;
>>   	}
>>   
>> +	if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0) &&
>> +	    gt->type == GT_MEDIA) {
>> +		drm_notice(&i915->drm,
>> +			   "Media RC6 disabled on A step\n");
>> +		return false;
>> +	}
>> +
>>   	return true;
>>   }
>>   
>> -- 
>> 2.25.1
>>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
index 5c91622dfca4..f4150f61f39c 100644
--- a/drivers/gpu/drm/i915/gt/intel_rc6.c
+++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
@@ -486,6 +486,7 @@  static bool bxt_check_bios_rc6_setup(struct intel_rc6 *rc6)
 static bool rc6_supported(struct intel_rc6 *rc6)
 {
 	struct drm_i915_private *i915 = rc6_to_i915(rc6);
+	struct intel_gt *gt = rc6_to_gt(rc6);
 
 	if (!HAS_RC6(i915))
 		return false;
@@ -502,6 +503,13 @@  static bool rc6_supported(struct intel_rc6 *rc6)
 		return false;
 	}
 
+	if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0) &&
+	    gt->type == GT_MEDIA) {
+		drm_notice(&i915->drm,
+			   "Media RC6 disabled on A step\n");
+		return false;
+	}
+
 	return true;
 }