]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: return -EIO on lmem setup failure
authorNirmoy Das <nirmoy.das@intel.com>
Wed, 11 May 2022 15:37:44 +0000 (17:37 +0200)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 17 May 2022 08:34:30 +0000 (09:34 +0100)
Caller of setup_lmem() ignores -ENODEV but failing
to setup lmem on dGPU isn't ignorable error.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220511153746.14142-1-nirmoy.das@intel.com
drivers/gpu/drm/i915/gt/intel_region_lmem.c

index f5111c0a006058c2c67dec1c8ee95fa74adb9e51..5a7c403d718afc14def084efaec956e3779cdca5 100644 (file)
@@ -108,7 +108,7 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)
                flat_ccs_base = (flat_ccs_base >> XEHPSDV_CCS_BASE_SHIFT) * SZ_64K;
 
                if (GEM_WARN_ON(lmem_size < flat_ccs_base))
-                       return ERR_PTR(-ENODEV);
+                       return ERR_PTR(-EIO);
 
                tile_stolen = lmem_size - flat_ccs_base;
 
@@ -131,7 +131,7 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)
        io_start = pci_resource_start(pdev, 2);
        io_size = min(pci_resource_len(pdev, 2), lmem_size);
        if (!io_size)
-               return ERR_PTR(-ENODEV);
+               return ERR_PTR(-EIO);
 
        min_page_size = HAS_64K_PAGES(i915) ? I915_GTT_PAGE_SIZE_64K :
                                                I915_GTT_PAGE_SIZE_4K;