* [PATCH 1/2] drm/amdgpu: add vcn_doorbell_range callback for nbio 7.11
@ 2023-09-11 21:46 Alex Deucher
2023-09-11 21:46 ` [PATCH 2/2] drm/amdgpu: add remap_hdp_registers " Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2023-09-11 21:46 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Implement support for setting up the VCN doorbell range for
NBIO 7.11.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
index a32d9b8ec51b..bcf5fb420fda 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
@@ -100,6 +100,27 @@ static void nbio_v7_11_vpe_doorbell_range(struct amdgpu_device *adev, int instan
WREG32_PCIE_PORT(reg, doorbell_range);
}
+static void nbio_v7_11_vcn_doorbell_range(struct amdgpu_device *adev,
+ bool use_doorbell,
+ int doorbell_index, int instance)
+{
+ u32 reg = SOC15_REG_OFFSET(NBIO, 0, regGDC0_BIF_VCN0_DOORBELL_RANGE);
+ u32 doorbell_range = RREG32_PCIE_PORT(reg);
+
+ if (use_doorbell) {
+ doorbell_range = REG_SET_FIELD(doorbell_range,
+ GDC0_BIF_VCN0_DOORBELL_RANGE, OFFSET,
+ doorbell_index);
+ doorbell_range = REG_SET_FIELD(doorbell_range,
+ GDC0_BIF_VCN0_DOORBELL_RANGE, SIZE, 8);
+ } else {
+ doorbell_range = REG_SET_FIELD(doorbell_range,
+ GDC0_BIF_VCN0_DOORBELL_RANGE, SIZE, 0);
+ }
+
+ WREG32_PCIE_PORT(reg, doorbell_range);
+}
+
static void nbio_v7_11_enable_doorbell_aperture(struct amdgpu_device *adev,
bool enable)
{
@@ -256,6 +277,7 @@ const struct amdgpu_nbio_funcs nbio_v7_11_funcs = {
.mc_access_enable = nbio_v7_11_mc_access_enable,
.get_memsize = nbio_v7_11_get_memsize,
.sdma_doorbell_range = nbio_v7_11_sdma_doorbell_range,
+ .vcn_doorbell_range = nbio_v7_11_vcn_doorbell_range,
.vpe_doorbell_range = nbio_v7_11_vpe_doorbell_range,
.enable_doorbell_aperture = nbio_v7_11_enable_doorbell_aperture,
.enable_doorbell_selfring_aperture = nbio_v7_11_enable_doorbell_selfring_aperture,
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm/amdgpu: add remap_hdp_registers callback for nbio 7.11
2023-09-11 21:46 [PATCH 1/2] drm/amdgpu: add vcn_doorbell_range callback for nbio 7.11 Alex Deucher
@ 2023-09-11 21:46 ` Alex Deucher
2023-09-12 11:04 ` Lang Yu
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2023-09-11 21:46 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Implement support for remapping the HDP aperture registers for
NBIO 7.11.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
index bcf5fb420fda..6873eead1e19 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
@@ -28,6 +28,14 @@
#include "nbio/nbio_7_11_0_sh_mask.h"
#include <uapi/linux/kfd_ioctl.h>
+static void nbio_v7_11_remap_hdp_registers(struct amdgpu_device *adev)
+{
+ WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_MEM_FLUSH_CNTL,
+ adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL);
+ WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_REG_FLUSH_CNTL,
+ adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL);
+}
+
static u32 nbio_v7_11_get_rev_id(struct amdgpu_device *adev)
{
u32 tmp;
@@ -284,4 +292,5 @@ const struct amdgpu_nbio_funcs nbio_v7_11_funcs = {
.ih_doorbell_range = nbio_v7_11_ih_doorbell_range,
.ih_control = nbio_v7_11_ih_control,
.init_registers = nbio_v7_11_init_registers,
+ .remap_hdp_registers = nbio_v7_11_remap_hdp_registers,
};
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu: add remap_hdp_registers callback for nbio 7.11
2023-09-11 21:46 ` [PATCH 2/2] drm/amdgpu: add remap_hdp_registers " Alex Deucher
@ 2023-09-12 11:04 ` Lang Yu
0 siblings, 0 replies; 3+ messages in thread
From: Lang Yu @ 2023-09-12 11:04 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx
On 09/11/ , Alex Deucher wrote:
> Implement support for remapping the HDP aperture registers for
> NBIO 7.11.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
The series is.
Reviewed-by: Lang Yu <lang.yu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
> index bcf5fb420fda..6873eead1e19 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c
> @@ -28,6 +28,14 @@
> #include "nbio/nbio_7_11_0_sh_mask.h"
> #include <uapi/linux/kfd_ioctl.h>
>
> +static void nbio_v7_11_remap_hdp_registers(struct amdgpu_device *adev)
> +{
> + WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_MEM_FLUSH_CNTL,
> + adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL);
> + WREG32_SOC15(NBIO, 0, regBIF_BX0_REMAP_HDP_REG_FLUSH_CNTL,
> + adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_REG_FLUSH_CNTL);
> +}
> +
> static u32 nbio_v7_11_get_rev_id(struct amdgpu_device *adev)
> {
> u32 tmp;
> @@ -284,4 +292,5 @@ const struct amdgpu_nbio_funcs nbio_v7_11_funcs = {
> .ih_doorbell_range = nbio_v7_11_ih_doorbell_range,
> .ih_control = nbio_v7_11_ih_control,
> .init_registers = nbio_v7_11_init_registers,
> + .remap_hdp_registers = nbio_v7_11_remap_hdp_registers,
> };
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-12 11:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 21:46 [PATCH 1/2] drm/amdgpu: add vcn_doorbell_range callback for nbio 7.11 Alex Deucher
2023-09-11 21:46 ` [PATCH 2/2] drm/amdgpu: add remap_hdp_registers " Alex Deucher
2023-09-12 11:04 ` Lang Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.