[Intel-gfx] [PATCH] drm/i915/lmem: fixup fake lmem teardown

Lucas De Marchi lucas.demarchi at intel.com
Wed Nov 6 21:26:28 UTC 2019


On Wed, Nov 06, 2019 at 12:31:35PM +0000, Matthew Auld wrote:
>We should not be unconditionally calling release_fake_lmem_bar.
>
>Signed-off-by: Matthew Auld <matthew.auld at intel.com>
>Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>Cc: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Unbinding the module is now working again, thanks.

Lucas De Marchi

>---
> drivers/gpu/drm/i915/intel_region_lmem.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/intel_region_lmem.c b/drivers/gpu/drm/i915/intel_region_lmem.c
>index 583118095635..eddb392917aa 100644
>--- a/drivers/gpu/drm/i915/intel_region_lmem.c
>+++ b/drivers/gpu/drm/i915/intel_region_lmem.c
>@@ -51,8 +51,10 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem)
>
> static void release_fake_lmem_bar(struct intel_memory_region *mem)
> {
>-	if (drm_mm_node_allocated(&mem->fake_mappable))
>-		drm_mm_remove_node(&mem->fake_mappable);
>+	if (!drm_mm_node_allocated(&mem->fake_mappable))
>+		return;
>+
>+	drm_mm_remove_node(&mem->fake_mappable);
>
> 	dma_unmap_resource(&mem->i915->drm.pdev->dev,
> 			   mem->remap_addr,
>-- 
>2.20.1
>


More information about the Intel-gfx mailing list