From: Alex Deucher <alexdeucher@xxxxxxxxx>
Sent: Monday, August 19, 2019 11:33 PM To: Wang, Kevin(Yang) <Kevin1.Wang@xxxxxxx> Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Feng, Kenneth <Kenneth.Feng@xxxxxxx>; Quan, Evan <Evan.Quan@xxxxxxx>; Huang, Ray <Ray.Huang@xxxxxxx> Subject: Re: [PATCH] drm/amd/powerplay: add smu_smc_read_sensor support for arcturus On Fri, Aug 16, 2019 at 3:22 AM Wang, Kevin(Yang) <Kevin1.Wang@xxxxxxx> wrote:
> > the bellow patch refine the sensor read sequence, > but missed to add arcuturs support. (arcuturs_ppt.c) > > drm/amd/powerplay: change smu_read_sensor sequence in smu > > Signed-off-by: Kevin Wang <kevin1.wang@xxxxxxx> > --- > drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > index fcf623cf5d2c..850b2a1ef329 100644 > --- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > +++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > @@ -1012,6 +1012,9 @@ static int arcturus_read_sensor(struct smu_context *smu, > PPTable_t *pptable = table_context->driver_pptable; > int ret = 0; > > + if(!data || !size) Please add a space between if the if and the (. E.g., if (!data || !size) Alex [kevin]:
thanks, i will correct it.
> + return -EINVAL; > + > switch (sensor) { > case AMDGPU_PP_SENSOR_MAX_FAN_RPM: > *(uint32_t *)data = ""> > @@ -1036,7 +1039,7 @@ static int arcturus_read_sensor(struct smu_context *smu, > *size = 4; > break; > default: > - return -EINVAL; > + ret = smu_smc_read_sensor(smu, sensor, data, size); > } > > return ret; > -- > 2.22.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/amd-gfx |
_______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx