<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Sure. That makes more sense. We should switch raven to use it as well.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Quan, Evan<br>
<b>Sent:</b> Friday, July 19, 2019 5:47 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org; Deucher, Alexander<br>
<b>Subject:</b> RE: [PATCH] drm/amd/powerplay: correct the bit mask for checking VCN power status</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Considering this is actually different from traditional UVD, maybe it's better to add a new flag like AMDGPU_PP_SENSOR_VCN_POWER.<br>
@Deucher, Alexander any comment?<br>
<br>
Regards,<br>
Evan<br>
> -----Original Message-----<br>
> From: Huang, Ray <Ray.Huang@amd.com><br>
> Sent: Friday, July 19, 2019 5:21 PM<br>
> To: Quan, Evan <Evan.Quan@amd.com>; amd-gfx@lists.freedesktop.org<br>
> Cc: Quan, Evan <Evan.Quan@amd.com><br>
> Subject: RE: [PATCH] drm/amd/powerplay: correct the bit mask for checking<br>
> VCN power status<br>
> <br>
> > -----Original Message-----<br>
> > From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of<br>
> > Evan Quan<br>
> > Sent: Friday, July 19, 2019 4:52 PM<br>
> > To: amd-gfx@lists.freedesktop.org<br>
> > Cc: Quan, Evan <Evan.Quan@amd.com><br>
> > Subject: [PATCH] drm/amd/powerplay: correct the bit mask for checking<br>
> > VCN power status<br>
> ><br>
> > For Navi10 or later ASICs, a different bit mask is used for checking<br>
> > VCN power status.<br>
> ><br>
> > Change-Id: Iaa49e5a339c38f46e3e7124d21aeb65f6633325e<br>
> > Signed-off-by: Evan Quan <evan.quan@amd.com><br>
> > ---<br>
> > drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 +++++++-<br>
> > 1 file changed, 7 insertions(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
> > b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
> > index 6e2f7df826f0..887577c47568 100644<br>
> > --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
> > +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c<br>
> > @@ -271,6 +271,8 @@ int smu_get_power_num_states(struct<br>
> smu_context<br>
> > *smu, int smu_common_read_sensor(struct smu_context *smu, enum<br>
> > amd_pp_sensors sensor,<br>
> > void *data, uint32_t *size)<br>
> > {<br>
> > + struct amdgpu_device *adev = smu->adev;<br>
> > + uint32_t uvd_bit_mask = 0xFFFFFFFF;<br>
> > int ret = 0;<br>
> ><br>
> > switch (sensor) {<br>
> > @@ -287,7 +289,11 @@ int smu_common_read_sensor(struct<br>
> smu_context<br>
> > *smu, enum amd_pp_sensors sensor,<br>
> > *size = 8;<br>
> > break;<br>
> > case AMDGPU_PP_SENSOR_UVD_POWER:<br>
> > - *(uint32_t *)data = smu_feature_is_enabled(smu,<br>
> > SMU_FEATURE_DPM_UVD_BIT) ? 1 : 0;<br>
> > + if (adev->asic_type == CHIP_VEGA20)<br>
> > + uvd_bit_mask = SMU_FEATURE_DPM_UVD_BIT;<br>
> > + else<br>
> > + uvd_bit_mask = SMU_FEATURE_VCN_PG_BIT;<br>
> <br>
> After vega20, we actually will use VCN instead of UVD. Below indicates the<br>
> design for this.<br>
> <br>
> uvd_bit_mask = (adev->asic_type > CHIP_VEGA20) ?<br>
> SMU_FEATURE_VCN_PG_BIT : SMU_FEATURE_DPM_UVD_BIT<br>
> <br>
> Anyway, patch looks good for me.<br>
> Reviewed-by: Huang Rui <ray.huang@amd.com><br>
> <br>
> <br>
> Thanks,<br>
> Ray<br>
> <br>
> > + *(uint32_t *)data = smu_feature_is_enabled(smu,<br>
> > uvd_bit_mask) ? 1 :<br>
> > +0;<br>
> > *size = 4;<br>
> > break;<br>
> > case AMDGPU_PP_SENSOR_VCE_POWER:<br>
> > --<br>
> > 2.22.0<br>
> ><br>
> > _______________________________________________<br>
> > amd-gfx mailing list<br>
> > amd-gfx@lists.freedesktop.org<br>
> > <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>