Patch "drm/amdgpu: fix lru size grouping v2" has been added to the 4.7-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/amdgpu: fix lru size grouping v2
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-amdgpu-fix-lru-size-grouping-v2.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
5661538749511d4c2f7d33e1e179f10c545b24d5Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <[email protected]>
Date: Wed, 17 Aug 2016 13:44:20 +0200
Subject: drm/amdgpu: fix lru size grouping v2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Christian König <[email protected]>
commit 5661538749511d4c2f7d33e1e179f10c545b24d5 upstream.
Adding a BO can make it the insertion point for larger sizes as well.
v2: add a comment about the guard structure.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 ++++++++ 2 files changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -0
@@ -415,6 +415,8 @@ struct amdgpu_mman {/* custom LRU management */ struct amdgpu_mman_lru log2_size[AMDGPU_TTM_LRU_SIZE ]; +/* guard for log2_size array, don't add anything in between */ +struct amdgpu_mman_lru guard; }; int amdgpu_copy_buffer(struct amdgpu_ring *ring,
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +8 -0
@@ -943,6 +943,8 @@ static struct list_head *amdgpu_ttm_lru_struct list_head *res = lru->lru[tbo->mem.mem_type]; lru->lru[tbo->mem.mem_type] = &tbo->lru; +while ((++lru)->lru[tbo->mem.mem_type] == res) + lru->lru[tbo->mem.mem_type] = &tbo->lru;return res; }
@@ -953,6 +955,8 @@ static struct list_head *amdgpu_ttm_swapstruct list_head *res = lru->swap_lru; lru->swap_lru = &tbo->swap; +while ((++lru)->swap_lru == res) + lru->swap_lru = &tbo->swap;return res; }
@@ -1004,6 +1008,10 @@ int amdgpu_ttm_init(struct amdgpu_device lru->swap_lru = &adev->mman.bdev.glob->swap_lru; } +for (j =0 ; j <TTM_NUM_MEM_TYPES ; ++j) + adev->mman.guard.lru[j] =NULL ; + adev->mman.guard.swap_lru =NULL ; + adev->mman.initialized = true; r =ttm_bo_init_mm (&adev->mman.bdev,TTM_PL_VRAM , adev->mc.real_vram_size >>PAGE_SHIFT );
Patches currently in stable-queue which might be from [email protected] are
queue-4.7/drm-amdgpu-change-gart-offset-to-64-bit.patch queue-4.7/drm-amdgpu-avoid-a-possible-array-overflow.patch queue-4.7/drm-amdgpu-record-error-code-when-ring-test-failed.patch queue-4.7/drm-amdgpu-fix-lru-size-grouping-v2.patch queue-4.7/drm-amdgpu-skip-tv-cv-in-display-parsing.patch queue-4.7/drm-amdgpu-fix-amdgpu_move_blit-on-32bit-systems.patch