diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3387-drm-amdgpu-enable-Doorbell-support-for-Renoir-v2.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3387-drm-amdgpu-enable-Doorbell-support-for-Renoir-v2.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3387-drm-amdgpu-enable-Doorbell-support-for-Renoir-v2.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3387-drm-amdgpu-enable-Doorbell-support-for-Renoir-v2.patch new file mode 100644 index 00000000..df12ed0c --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3387-drm-amdgpu-enable-Doorbell-support-for-Renoir-v2.patch @@ -0,0 +1,75 @@ +From 736bbbac9ebbfd08548410a913b00357ccbf21a0 Mon Sep 17 00:00:00 2001 +From: Leo Liu <leo.liu@amd.com> +Date: Mon, 15 Jul 2019 10:14:17 -0400 +Subject: [PATCH 3387/4256] drm/amdgpu: enable Doorbell support for Renoir (v2) + +Add VCN range aperture to NBIO 7.0 + +v2: rebase (Alex) + +Acked-by: Huang Rui <ray.huang@amd.com> +Signed-off-by: Leo Liu <leo.liu@amd.com> +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 21 ++++++++++++++++++++ + drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 4 ++++ + 2 files changed, 25 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +index f73fb25ba242..6f3b55d0aa3c 100644 +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +@@ -104,6 +104,26 @@ static void nbio_v7_0_sdma_doorbell_range(struct amdgpu_device *adev, int instan + WREG32(reg, doorbell_range); + } + ++static void nbio_v7_0_vcn_doorbell_range(struct amdgpu_device *adev, bool use_doorbell, ++ int doorbell_index, int instance) ++{ ++ u32 reg = SOC15_REG_OFFSET(NBIO, 0, mmBIF_MMSCH0_DOORBELL_RANGE); ++ ++ u32 doorbell_range = RREG32(reg); ++ ++ if (use_doorbell) { ++ doorbell_range = REG_SET_FIELD(doorbell_range, ++ BIF_MMSCH0_DOORBELL_RANGE, OFFSET, ++ doorbell_index); ++ doorbell_range = REG_SET_FIELD(doorbell_range, ++ BIF_MMSCH0_DOORBELL_RANGE, SIZE, 8); ++ } else ++ doorbell_range = REG_SET_FIELD(doorbell_range, ++ BIF_MMSCH0_DOORBELL_RANGE, SIZE, 0); ++ ++ WREG32(reg, doorbell_range); ++} ++ + static void nbio_v7_0_enable_doorbell_aperture(struct amdgpu_device *adev, + bool enable) + { +@@ -298,6 +318,7 @@ const struct amdgpu_nbio_funcs nbio_v7_0_funcs = { + .hdp_flush = nbio_v7_0_hdp_flush, + .get_memsize = nbio_v7_0_get_memsize, + .sdma_doorbell_range = nbio_v7_0_sdma_doorbell_range, ++ .vcn_doorbell_range = nbio_v7_0_vcn_doorbell_range, + .enable_doorbell_aperture = nbio_v7_0_enable_doorbell_aperture, + .enable_doorbell_selfring_aperture = nbio_v7_0_enable_doorbell_selfring_aperture, + .ih_doorbell_range = nbio_v7_0_ih_doorbell_range, +diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c b/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c +index a8e92638a2e8..bd0580334f83 100644 +--- a/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c ++++ b/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c +@@ -81,6 +81,10 @@ void vega10_doorbell_index_init(struct amdgpu_device *adev) + adev->doorbell_index.uvd_vce.vce_ring2_3 = AMDGPU_DOORBELL64_VCE_RING2_3; + adev->doorbell_index.uvd_vce.vce_ring4_5 = AMDGPU_DOORBELL64_VCE_RING4_5; + adev->doorbell_index.uvd_vce.vce_ring6_7 = AMDGPU_DOORBELL64_VCE_RING6_7; ++ adev->doorbell_index.vcn.vcn_ring0_1 = AMDGPU_DOORBELL64_VCN0_1; ++ adev->doorbell_index.vcn.vcn_ring2_3 = AMDGPU_DOORBELL64_VCN2_3; ++ adev->doorbell_index.vcn.vcn_ring4_5 = AMDGPU_DOORBELL64_VCN4_5; ++ adev->doorbell_index.vcn.vcn_ring6_7 = AMDGPU_DOORBELL64_VCN6_7; + + adev->doorbell_index.first_non_cp = AMDGPU_DOORBELL64_FIRST_NON_CP; + adev->doorbell_index.last_non_cp = AMDGPU_DOORBELL64_LAST_NON_CP; +-- +2.17.1 + |