[Intel-xe] [PATCH v2 1/1] fixup! drm/xe/display: Implement display support
Gustavo Sousa
gustavo.sousa at intel.com
Wed Sep 6 21:23:33 UTC 2023
The function xe_display_driver_probe_defer() was supposed to return
-EPROBE_DEFER when not yet ready to continue the probing, but the
current implementation is actually returning 1 instead of the proper
value, which would probably keep the probe operation to be attempted
again.
Fix that by making xe_display_driver_probe_defer() return a boolean just
like intel_display_driver_probe_defer() and return -EPROBE_DEFER on the
caller if necessary.
v2:
- Make xe_display_driver_probe_defer() return a boolean and return
-EPROBE_DEFER on the caller. (Lucas)
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Gustavo Sousa <gustavo.sousa at intel.com>
---
drivers/gpu/drm/xe/xe_display.c | 4 ++--
drivers/gpu/drm/xe/xe_display.h | 2 +-
drivers/gpu/drm/xe/xe_pci.c | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index a453946ad108..35a4b4cd179a 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -38,9 +38,9 @@
* early on
* @pdev: PCI device
*
- * Returns: 0 if probe can continue, -EPROBE_DEFER otherwise
+ * Returns: true if probe needs to be deferred, false otherwise
*/
-int xe_display_driver_probe_defer(struct pci_dev *pdev)
+bool xe_display_driver_probe_defer(struct pci_dev *pdev)
{
if (!enable_display)
return 0;
diff --git a/drivers/gpu/drm/xe/xe_display.h b/drivers/gpu/drm/xe/xe_display.h
index 9e29de012df7..2fa5b239d076 100644
--- a/drivers/gpu/drm/xe/xe_display.h
+++ b/drivers/gpu/drm/xe/xe_display.h
@@ -12,7 +12,7 @@ struct drm_driver;
#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
-int xe_display_driver_probe_defer(struct pci_dev *pdev);
+bool xe_display_driver_probe_defer(struct pci_dev *pdev);
void xe_display_driver_set_hooks(struct drm_driver *driver);
int xe_display_create(struct xe_device *xe);
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 24b16863bf3d..dc233a1226bd 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -677,9 +677,8 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV;
}
- err = xe_display_driver_probe_defer(pdev);
- if (err)
- return err;
+ if (xe_display_driver_probe_defer(pdev))
+ return -EPROBE_DEFER;
xe = xe_device_create(pdev, ent);
if (IS_ERR(xe))
--
2.41.0
More information about the Intel-xe
mailing list