[PATCH] drm/xe: skip register UC debugfs if UC disabled

Ohad Sharabi osharabi at habana.ai
Wed Feb 21 07:28:24 UTC 2024


On 21/02/2024 7:57, Lucas De Marchi wrote:
> On Thu, Jan 04, 2024 at 12:05:57PM +0200, Ohad Sharabi wrote:
>> When working with execlist we should not register the UC debugfs 
>> entries.
>>
>> Accessing those entries when UC is disabled can lead to a kernel crush
>> (NULL pointer dereference).
>>
>> Signed-off-by: Ohad Sharabi <osharabi at habana.ai>
>
> it seems this never got applied. I don't think this is the only problem
> with trying to use execlist, is it? Do you have a more complete patch
> series with all the changes required to make execlist useful?
>
> Lucas De Marchi

Lucas, as we are working (in some of our flavors) with execlist we saw 
this issue.

The proposed solution is an ad-hoc to bypass the "order 0" issues we faced.
So, to your question, I don't have a "more complete" patch set,

Ohad

>
>> ---
>> drivers/gpu/drm/xe/xe_gt_debugfs.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c 
>> b/drivers/gpu/drm/xe/xe_gt_debugfs.c
>> index c4b67cf09f8f..bafd55a7fb16 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
>> @@ -245,5 +245,6 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
>>                  ARRAY_SIZE(debugfs_list),
>>                  root, minor);
>>
>> -    xe_uc_debugfs_register(&gt->uc, root);
>> +    if (xe_device_uc_enabled(xe))
>> +        xe_uc_debugfs_register(&gt->uc, root);
>> }
>> -- 
>> 2.34.1
>>



More information about the Intel-xe mailing list