return;
intel_display_driver_remove(xe);
-
- intel_display_device_remove(xe);
}
/* IRQ-related functions */
intel_power_domains_enable(xe);
}
-void xe_display_probe(struct xe_device *xe)
+static void display_device_remove(struct drm_device *dev, void *arg)
+{
+ struct xe_device *xe = arg;
+
+ intel_display_device_remove(xe);
+}
+
+int xe_display_probe(struct xe_device *xe)
{
+ int err;
+
if (!xe->info.enable_display)
goto no_display;
intel_display_device_probe(xe);
+ err = drmm_add_action_or_reset(&xe->drm, display_device_remove, xe);
+ if (err)
+ return err;
+
if (has_display(xe))
- return;
+ return 0;
no_display:
xe->info.enable_display = false;
unset_display_features(xe);
+ return 0;
}
int xe_display_create(struct xe_device *xe);
-void xe_display_probe(struct xe_device *xe);
+int xe_display_probe(struct xe_device *xe);
int xe_display_init_nommio(struct xe_device *xe);
int xe_display_init_noirq(struct xe_device *xe);
static inline int xe_display_create(struct xe_device *xe) { return 0; }
-static inline void xe_display_probe(struct xe_device *xe) { }
+static inline int xe_display_probe(struct xe_device *xe) { return 0; }
static inline int xe_display_init_nommio(struct xe_device *xe) { return 0; }
static inline int xe_display_init_noirq(struct xe_device *xe) { return 0; }
if (err)
return err;
- xe_display_probe(xe);
+ err = xe_display_probe(xe);
+ if (err)
+ return err;
drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) display:%s dma_m_s:%d tc:%d gscfi:%d",
desc->platform_name,