diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2219-drm-amdgpu-remove-VRAM-size-reduction-v2.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2219-drm-amdgpu-remove-VRAM-size-reduction-v2.patch | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2219-drm-amdgpu-remove-VRAM-size-reduction-v2.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2219-drm-amdgpu-remove-VRAM-size-reduction-v2.patch new file mode 100644 index 00000000..aba2ee64 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2219-drm-amdgpu-remove-VRAM-size-reduction-v2.patch @@ -0,0 +1,124 @@ +From 585bda591e02186178d63d0d9c659232c568eae3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Thu, 16 Nov 2017 19:36:10 +0100 +Subject: [PATCH 2219/4131] drm/amdgpu: remove VRAM size reduction v2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Remove some outdated comments and all code which tries to reduce the VRAM size +mapped into the MC. + +This is superfluous and misleading since we never actually program the size. + +v2: handle gmc_v6_0.c as well + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 30 +----------------------------- + drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 5 ----- + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 6 ------ + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 6 ------ + 4 files changed, 1 insertion(+), 46 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index 57926d7..3b653ed 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -575,41 +575,13 @@ void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb) + * @base: base address at which to put VRAM + * + * Function will try to place VRAM at base address provided +- * as parameter (which is so far either PCI aperture address or +- * for IGP TOM base address). +- * +- * If there is not enough space to fit the unvisible VRAM in the 32bits +- * address space then we limit the VRAM size to the aperture. +- * +- * Note: We don't explicitly enforce VRAM start to be aligned on VRAM size, +- * this shouldn't be a problem as we are using the PCI aperture as a reference. +- * Otherwise this would be needed for rv280, all r3xx, and all r4xx, but +- * not IGP. +- * +- * Note: we use mc_vram_size as on some board we need to program the mc to +- * cover the whole aperture even if VRAM size is inferior to aperture size +- * Novell bug 204882 + along with lots of ubuntu ones +- * +- * Note: when limiting vram it's safe to overwritte real_vram_size because +- * we are not in case where real_vram_size is inferior to mc_vram_size (ie +- * note afected by bogus hw of Novell bug 204882 + along with lots of ubuntu +- * ones) +- * +- * Note: IGP TOM addr should be the same as the aperture addr, we don't +- * explicitly check for that though. +- * +- * FIXME: when reducing VRAM size align new size on power of 2. ++ * as parameter. + */ + void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 base) + { + uint64_t limit = (uint64_t)amdgpu_vram_limit << 20; + + mc->vram_start = base; +- if (mc->mc_vram_size > (adev->mc.mc_mask - base + 1)) { +- dev_warn(adev->dev, "limiting VRAM to PCI aperture size\n"); +- mc->real_vram_size = mc->aper_size; +- mc->mc_vram_size = mc->aper_size; +- } + mc->vram_end = mc->vram_start + mc->mc_vram_size - 1; + if (limit && limit < mc->real_vram_size) + mc->real_vram_size = limit; +diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +index 34ba39b..b87b30d 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +@@ -222,11 +222,6 @@ static void gmc_v6_0_vram_gtt_location(struct amdgpu_device *adev, + u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; + base <<= 24; + +- if (mc->mc_vram_size > 0xFFC0000000ULL) { +- dev_warn(adev->dev, "limiting VRAM\n"); +- mc->real_vram_size = 0xFFC0000000ULL; +- mc->mc_vram_size = 0xFFC0000000ULL; +- } + amdgpu_vram_location(adev, &adev->mc, base); + amdgpu_gart_location(adev, mc); + } +diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +index 57d4fdc..23d7c12 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +@@ -241,12 +241,6 @@ static void gmc_v7_0_vram_gtt_location(struct amdgpu_device *adev, + u64 base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; + base <<= 24; + +- if (mc->mc_vram_size > 0xFFC0000000ULL) { +- /* leave room for at least 1024M GTT */ +- dev_warn(adev->dev, "limiting VRAM\n"); +- mc->real_vram_size = 0xFFC0000000ULL; +- mc->mc_vram_size = 0xFFC0000000ULL; +- } + amdgpu_vram_location(adev, &adev->mc, base); + amdgpu_gart_location(adev, mc); + } +diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +index b5ed774..b77778f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +@@ -406,12 +406,6 @@ static void gmc_v8_0_vram_gtt_location(struct amdgpu_device *adev, + base = RREG32(mmMC_VM_FB_LOCATION) & 0xFFFF; + base <<= 24; + +- if (mc->mc_vram_size > 0xFFC0000000ULL) { +- /* leave room for at least 1024M GTT */ +- dev_warn(adev->dev, "limiting VRAM\n"); +- mc->real_vram_size = 0xFFC0000000ULL; +- mc->mc_vram_size = 0xFFC0000000ULL; +- } + amdgpu_vram_location(adev, &adev->mc, base); + amdgpu_gart_location(adev, mc); + } +-- +2.7.4 + |