[Intel-xe] [PATCH 2/3] drm/xe: Register drm device prior to gt init
Tejas Upadhyay
tejas.upadhyay at intel.com
Thu May 4 11:20:19 UTC 2023
GT init creates few sysfs entries under /sys/class/drm
and makes use of drm_class device thus it needs drm
device to be registered prior to gt init.
Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 45d6e5ff47fd..c5380914da18 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -301,6 +301,10 @@ int xe_device_probe(struct xe_device *xe)
if (err)
goto err_irq_shutdown;
+ err = drm_dev_register(&xe->drm, 0);
+ if (err)
+ goto err_irq_shutdown;
+
for_each_gt(gt, xe, id) {
err = xe_gt_init(gt);
if (err)
@@ -311,10 +315,6 @@ int xe_device_probe(struct xe_device *xe)
if (err)
goto err_fini_display;
- err = drm_dev_register(&xe->drm, 0);
- if (err)
- goto err_irq_shutdown;
-
xe_display_register(xe);
xe_debugfs_register(xe);
--
2.25.1
More information about the Intel-xe
mailing list