drm/i915/lmem: fixup fake lmem teardown
We should not be unconditionally calling release_fake_lmem_bar. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20191106123135.12441-1-matthew.auld@intel.com
This commit is contained in:
parent
1e460bf9ea
commit
cddb85dc1e
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue