[PATCH 01/12] drm/xe: Fix MOCS debugfs LNCF readout

Tvrtko Ursulin tvrtko.ursulin at igalia.com
Fri Feb 28 08:10:11 UTC 2025


On 27/02/2025 23:24, Matt Roper wrote:
> On Fri, Feb 21, 2025 at 10:17:20AM +0000, Tvrtko Ursulin wrote:
>> With only XE_FW_GT taken LNCF registers read back as all zeroes, leading
>> to a wild goose chase trying to figure out why is register programming
>> incorrect.
>>
>> Fix it by grabbing XE_FORCEWAKE_ALL for affected platforms.
> 
> LNCF MOCS registers were only in the render power domain on the old
> Xe_LP platforms.  From Xe_HP onward they moved into the GT power domain
> (and then in Xe2 they were removed completely).

Should I add a platform check on top of HAS_LNCF_MOCS? Or just the 
platform check? Or use XE_FORCEWAKE_ALL always as Rodrigo commented?

Regards,

Tvrtko

>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
>> ---
>>   drivers/gpu/drm/xe/xe_mocs.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
>> index 54d199b5cfb2..31dade91a089 100644
>> --- a/drivers/gpu/drm/xe/xe_mocs.c
>> +++ b/drivers/gpu/drm/xe/xe_mocs.c
>> @@ -781,7 +781,9 @@ void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p)
>>   	flags = get_mocs_settings(xe, &table);
>>   
>>   	xe_pm_runtime_get_noresume(xe);
>> -	fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
>> +	fw_ref = xe_force_wake_get(gt_to_fw(gt),
>> +				   flags & HAS_LNCF_MOCS ?
>> +				   XE_FORCEWAKE_ALL : XE_FW_GT);
>>   	if (!fw_ref)
>>   		goto err_fw;
>>   
>> -- 
>> 2.48.0
>>
> 



More information about the Intel-xe mailing list