diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3961-drm-amdgpu-Get-pci-resource-directly-through-adev.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3961-drm-amdgpu-Get-pci-resource-directly-through-adev.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3961-drm-amdgpu-Get-pci-resource-directly-through-adev.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3961-drm-amdgpu-Get-pci-resource-directly-through-adev.patch new file mode 100644 index 00000000..6913648d --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3961-drm-amdgpu-Get-pci-resource-directly-through-adev.patch @@ -0,0 +1,44 @@ +From c40646016f965cd9e51c99e820a5b69f60152a0d Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Fri, 23 Mar 2018 18:36:51 +0800 +Subject: [PATCH 3961/4131] drm/amdgpu: Get pci resource directly through adev +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In order to remove the cgs wrapper function +cgs_get_pci_resource + +Change-Id: I2687cf4c7cc4ca62c41ac0a8a0ce09fd07fbae83 +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Acked-by: Christian König <christian.koenig@amd.com> +Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +index 6bbac3f..663634c 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +@@ -294,12 +294,11 @@ static int acp_hw_init(void *handle) + else if (r) + return r; + +- r = cgs_get_pci_resource(adev->acp.cgs_device, CGS_RESOURCE_TYPE_MMIO, +- 0x5289, 0, &acp_base); +- if (r == -ENODEV) +- return 0; +- else if (r) +- return r; ++ if (adev->rmmio_size == 0 || adev->rmmio_size < 0x5289) ++ return -EINVAL; ++ ++ acp_base = adev->rmmio_base; ++ + if (adev->asic_type != CHIP_STONEY) { + adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), GFP_KERNEL); + if (adev->acp.acp_genpd == NULL) +-- +2.7.4 + |