diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index a538163b068e69e5bb115652699bdd2070f4151a..df23da5a36fd70f3f873bb3d2a02362f9380dfdb 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -199,7 +199,6 @@ struct xe_device *xe_device_create(struct pci_dev *pdev, xe->info.devid = pdev->device; xe->info.revid = pdev->revision; xe->info.enable_guc = enable_guc; - xe->info.enable_display = enable_display; spin_lock_init(&xe->irq.lock); diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c index e7f38a22afe626d6fb4909eb687edbe08ad799e8..f0c9fd41e42dde494f48b4010dad84efb0e564ba 100644 --- a/drivers/gpu/drm/xe/xe_display.c +++ b/drivers/gpu/drm/xe/xe_display.c @@ -481,8 +481,10 @@ __diag_ignore_all("-Woverride-init", "Allow field overrides in table"); void xe_display_info_init(struct xe_device *xe) { - if (!xe->info.enable_display) + if (!xe->info.enable_display) { + unset_driver_hooks(xe); return; + } switch (xe->info.platform) { case XE_TIGERLAKE: @@ -530,7 +532,7 @@ void xe_display_info_init(struct xe_device *xe) xe->info.display = (struct xe_device_display_info) { XE_LPDP }; break; default: - drm_dbg(&xe->drm, "No display IP, skipping\n"); + drm_warn(&xe->drm, "Unknown display IP\n"); xe->info.enable_display = false; unset_driver_hooks(xe); return; diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index ab91b64784caffb4943bc87e150869dfb879d009..30a75a9cad65939cdf773eab283a0a5cb007f950 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -553,6 +553,9 @@ static int xe_info_init(struct xe_device *xe, xe->info.has_range_tlb_invalidation = graphics_desc->has_range_tlb_invalidation; xe->info.has_link_copy_engine = graphics_desc->has_link_copy_engine; + xe->info.enable_display = IS_ENABLED(CONFIG_DRM_XE_DISPLAY) && \ + enable_display && \ + desc->has_display; /* * All platforms have at least one primary GT. Any platform with media * version 13 or higher has an additional dedicated media GT. And @@ -647,7 +650,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xe_display_info_init(xe); - drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) dma_m_s:%d tc:%d", + 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", desc->platform_name, subplatform_desc ? subplatform_desc->name : "", xe->info.devid, xe->info.revid, @@ -658,6 +661,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) xe->info.media_name, xe->info.media_verx100 / 100, xe->info.media_verx100 % 100, + str_yes_no(xe->info.enable_display), xe->info.dma_mask_size, xe->info.tile_count); drm_dbg(&xe->drm, "Stepping = (G:%s, M:%s, D:%s, B:%s)\n",