From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Sonny Jiang <sonny.jiang@amd.com>, Leo Liu <leo.liu@amd.com>,
Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 3/4] drm/amdgpu/jpeg5: Enable doorbell
Date: Thu, 8 Feb 2024 15:02:52 -0500 [thread overview]
Message-ID: <20240208200253.409130-4-alexander.deucher@amd.com> (raw)
In-Reply-To: <20240208200253.409130-1-alexander.deucher@amd.com>
From: Sonny Jiang <sonny.jiang@amd.com>
Add doorbell for JPEG5
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
index 71c28cc06605..e70200f97555 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c
@@ -85,7 +85,7 @@ static int jpeg_v5_0_0_sw_init(void *handle)
return r;
ring = adev->jpeg.inst->ring_dec;
- ring->use_doorbell = false;
+ ring->use_doorbell = true;
ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 1;
ring->vm_hub = AMDGPU_MMHUB0(0);
@@ -134,6 +134,13 @@ static int jpeg_v5_0_0_hw_init(void *handle)
struct amdgpu_ring *ring = adev->jpeg.inst->ring_dec;
int r;
+ adev->nbio.funcs->vcn_doorbell_range(adev, ring->use_doorbell,
+ (adev->doorbell_index.vcn.vcn_ring0_1 << 1), 0);
+
+ WREG32_SOC15(VCN, 0, regVCN_JPEG_DB_CTRL,
+ ring->doorbell_index << VCN_JPEG_DB_CTRL__OFFSET__SHIFT |
+ VCN_JPEG_DB_CTRL__EN_MASK);
+
r = amdgpu_ring_test_helper(ring);
if (r)
return r;
--
2.42.0
next prev parent reply other threads:[~2024-02-08 20:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 20:02 [PATCH 0/4] JPEG 5.0 Support Alex Deucher
2024-02-08 20:02 ` [PATCH 1/4] drm/amdgpu: Add JPEG5 support Alex Deucher
2024-02-08 20:02 ` [PATCH 2/4] drm/amdgpu/jpeg5: add power gating support Alex Deucher
2024-02-08 20:02 ` Alex Deucher [this message]
2024-02-08 20:02 ` [PATCH 4/4] drm/amdgpu: Add jpeg_v5_0_0 ip block support Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240208200253.409130-4-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=leo.liu@amd.com \
--cc=sonny.jiang@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox