]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
crypto: tegra - Don't touch bo refcount in host1x bo pin/unpin
authorMikko Perttunen <mperttunen@nvidia.com>
Fri, 15 May 2026 02:34:52 +0000 (11:34 +0900)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 May 2026 12:25:29 +0000 (20:25 +0800)
Since commit "gpu: host1x: Allow entries in BO caches to be freed",
host1x_bo_pin() and host1x_bo_unpin() handle the bo's refcount
themselves. .pin/.unpin callbacks should not adjust it.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/tegra/tegra-se-main.c

index eb71113ed1469e256b7f8ce16e4a1d6bf07aefb9..d7541a9c0a92341921c862a8bbc6276d62e8b23b 100644 (file)
@@ -52,7 +52,7 @@ tegra_se_cmdbuf_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_dire
                return ERR_PTR(-ENOMEM);
 
        kref_init(&map->ref);
-       map->bo = host1x_bo_get(bo);
+       map->bo = bo;
        map->direction = direction;
        map->dev = dev;
 
@@ -93,7 +93,6 @@ static void tegra_se_cmdbuf_unpin(struct host1x_bo_mapping *map)
        dma_unmap_sgtable(map->dev, map->sgt, map->direction, 0);
        sg_free_table(map->sgt);
        kfree(map->sgt);
-       host1x_bo_put(map->bo);
 
        kfree(map);
 }