diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-23 13:42:55 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-24 18:49:44 +0100 |
commit | 67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch) | |
tree | 0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0525-drm-v3d-Fix-BO-stats-accounting-for-dma-buf-imported.patch | |
parent | 47a93a810f78adce5a130d287f82b28e9b54313c (diff) | |
download | upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2 upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip |
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0525-drm-v3d-Fix-BO-stats-accounting-for-dma-buf-imported.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0525-drm-v3d-Fix-BO-stats-accounting-for-dma-buf-imported.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0525-drm-v3d-Fix-BO-stats-accounting-for-dma-buf-imported.patch b/target/linux/brcm2708/patches-4.19/950-0525-drm-v3d-Fix-BO-stats-accounting-for-dma-buf-imported.patch new file mode 100644 index 0000000000..fc2b566357 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0525-drm-v3d-Fix-BO-stats-accounting-for-dma-buf-imported.patch @@ -0,0 +1,40 @@ +From f91d0382b735a3d7711f6b160d80627cd4be54af Mon Sep 17 00:00:00 2001 +From: Eric Anholt <eric@anholt.net> +Date: Thu, 7 Feb 2019 15:26:13 -0800 +Subject: [PATCH] drm/v3d: Fix BO stats accounting for dma-buf-imported + buffers. + +We always decrement at GEM free, so make sure we increment at GEM +creation for dma-bufs. + +Signed-off-by: Eric Anholt <eric@anholt.net> +Link: https://patchwork.freedesktop.org/patch/msgid/20190207232613.24981-1-eric@anholt.net +Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> +Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> +(cherry picked from commit cc3f60cfd4f2752f1bad7eaa3839855c15347abc) +--- + drivers/gpu/drm/v3d/v3d_bo.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/gpu/drm/v3d/v3d_bo.c ++++ b/drivers/gpu/drm/v3d/v3d_bo.c +@@ -282,6 +282,7 @@ v3d_prime_import_sg_table(struct drm_dev + struct dma_buf_attachment *attach, + struct sg_table *sgt) + { ++ struct v3d_dev *v3d = to_v3d_dev(dev); + struct drm_gem_object *obj; + struct v3d_bo *bo; + +@@ -296,6 +297,11 @@ v3d_prime_import_sg_table(struct drm_dev + obj->import_attach = attach; + v3d_bo_get_pages(bo); + ++ mutex_lock(&v3d->bo_lock); ++ v3d->bo_stats.num_allocated++; ++ v3d->bo_stats.pages_allocated += obj->size >> PAGE_SHIFT; ++ mutex_unlock(&v3d->bo_lock); ++ + v3d_mmu_insert_ptes(bo); + + return obj; |