From: Lang Yu <Lang.Yu@amd.com>
To: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: "Zhang, Yifan" <Yifan1.Zhang@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"Gopalakrishnan,
Veerabadhran \(Veera\)" <Veerabadhran.Gopalakrishnan@amd.com>
Subject: Re: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO
Date: Tue, 10 Oct 2023 08:44:08 +0800 [thread overview]
Message-ID: <ZSSeWF+QzRG8/CNa@lang-desktop> (raw)
In-Reply-To: <BL1PR12MB5144A7CE930A1DEB9778671BF7CEA@BL1PR12MB5144.namprd12.prod.outlook.com>
On 10/10/ , Deucher, Alexander wrote:
> [Public]
>
> > -----Original Message-----
> > From: Yu, Lang <Lang.Yu@amd.com>
> > Sent: Saturday, October 7, 2023 4:54 AM
> > To: amd-gfx@lists.freedesktop.org
> > Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan
> > <Yifan1.Zhang@amd.com>; Gopalakrishnan, Veerabadhran (Veera)
> > <Veerabadhran.Gopalakrishnan@amd.com>; Yu, Lang <Lang.Yu@amd.com>
> > Subject: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO
> >
> > VCN 4.0.5 uses DLDO.
> >
> > Signed-off-by: Lang Yu <Lang.Yu@amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c | 26
> > ++++++++++++++++++++++
> > 1 file changed, 26 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
> > b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
> > index a60178156c77..7e79954c833b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/umsch_mm_v4_0.c
> > @@ -34,6 +34,16 @@
> > #include "umsch_mm_4_0_api_def.h"
> > #include "umsch_mm_v4_0.h"
> >
> > +#define regUVD_IPX_DLDO_CONFIG 0x0064
> > +#define regUVD_IPX_DLDO_CONFIG_BASE_IDX 1
> > +#define regUVD_IPX_DLDO_STATUS 0x0065
> > +#define regUVD_IPX_DLDO_STATUS_BASE_IDX 1
> > +
> > +#define UVD_IPX_DLDO_CONFIG__ONO0_PWR_CONFIG__SHIFT
> > 0x00000002
> > +#define UVD_IPX_DLDO_CONFIG__ONO0_PWR_CONFIG_MASK
> > 0x0000000cUL
> > +#define UVD_IPX_DLDO_STATUS__ONO0_PWR_STATUS__SHIFT
> > 0x00000001
> > +#define UVD_IPX_DLDO_STATUS__ONO0_PWR_STATUS_MASK
> > 0x00000002UL
> > +
> > static int umsch_mm_v4_0_load_microcode(struct amdgpu_umsch_mm
> > *umsch) {
> > struct amdgpu_device *adev = umsch->ring.adev; @@ -50,6 +60,14
> > @@ static int umsch_mm_v4_0_load_microcode(struct amdgpu_umsch_mm
> > *umsch)
> >
> > umsch->cmd_buf_curr_ptr = umsch->cmd_buf_ptr;
> >
> > + if (adev->ip_versions[VCN_HWIP][0] == IP_VERSION(4, 0, 5)) {
> > + WREG32_SOC15(VCN, 0, regUVD_IPX_DLDO_CONFIG,
> > + 1 <<
> > UVD_IPX_DLDO_CONFIG__ONO0_PWR_CONFIG__SHIFT);
> > + SOC15_WAIT_ON_RREG(VCN, 0, regUVD_IPX_DLDO_STATUS,
> > + 0 <<
> > UVD_IPX_DLDO_STATUS__ONO0_PWR_STATUS__SHIFT,
> > +
> > UVD_IPX_DLDO_STATUS__ONO0_PWR_STATUS_MASK);
> > + }
> > +
>
> Is this the right place for this? umsch_mm_hw_init() only calls this for FW_LOAD_DIRECT. Maybe that check needs to be dropped?
That check is dropped in [PATCH 1/3] drm/amdgpu/umsch: fix psp frontdoor loading.
PMFW removed DLDO programing in PPSMC_MSG_PowerUpUmsch function.
So driver needs to program it explicitly.
Regards,
Lang
> Alex
>
> > data = RREG32_SOC15(VCN, 0, regUMSCH_MES_RESET_CTRL);
> > data = REG_SET_FIELD(data, UMSCH_MES_RESET_CTRL,
> > MES_CORE_SOFT_RESET, 0);
> > WREG32_SOC15_UMSCH(regUMSCH_MES_RESET_CTRL, data); @@ -
> > 229,6 +247,14 @@ static int umsch_mm_v4_0_ring_stop(struct
> > amdgpu_umsch_mm *umsch)
> > data = REG_SET_FIELD(data, VCN_UMSCH_RB_DB_CTRL, EN, 0);
> > WREG32_SOC15(VCN, 0, regVCN_UMSCH_RB_DB_CTRL, data);
> >
> > + if (adev->ip_versions[VCN_HWIP][0] == IP_VERSION(4, 0, 5)) {
> > + WREG32_SOC15(VCN, 0, regUVD_IPX_DLDO_CONFIG,
> > + 2 <<
> > UVD_IPX_DLDO_CONFIG__ONO0_PWR_CONFIG__SHIFT);
> > + SOC15_WAIT_ON_RREG(VCN, 0, regUVD_IPX_DLDO_STATUS,
> > + 1 <<
> > UVD_IPX_DLDO_STATUS__ONO0_PWR_STATUS__SHIFT,
> > +
> > UVD_IPX_DLDO_STATUS__ONO0_PWR_STATUS_MASK);
> > + }
> > +
> > return 0;
> > }
> >
> > --
> > 2.25.1
>
next prev parent reply other threads:[~2023-10-10 0:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 8:54 [PATCH 1/3] drm/amdgpu/umsch: fix psp frontdoor loading Lang Yu
2023-10-07 8:54 ` [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO Lang Yu
2023-10-09 15:05 ` Gopalakrishnan, Veerabadhran (Veera)
2023-10-09 19:36 ` Deucher, Alexander
2023-10-10 0:45 ` Lang Yu
2023-10-09 19:44 ` Deucher, Alexander
2023-10-10 0:44 ` Lang Yu [this message]
2023-10-10 14:01 ` Alex Deucher
2023-10-11 2:16 ` Lang Yu
2023-10-07 8:54 ` [PATCH 3/3] drm/amdgpu/umsch: enable doorbell for umsch Lang Yu
2023-10-09 15:08 ` Gopalakrishnan, Veerabadhran (Veera)
2023-10-09 15:04 ` [PATCH 1/3] drm/amdgpu/umsch: fix psp frontdoor loading Gopalakrishnan, Veerabadhran (Veera)
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=ZSSeWF+QzRG8/CNa@lang-desktop \
--to=lang.yu@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Veerabadhran.Gopalakrishnan@amd.com \
--cc=Yifan1.Zhang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/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 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.