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

Lucas De Marchi lucas.demarchi at intel.com
Wed Feb 21 05:57:01 UTC 2024


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

>---
> 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