RE: [PATCH] drm/amdgpu: Fail when setting negative DPM levels v2

2018-03-02 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Kent Russell > Sent: Friday, March 2, 2018 12:53 PM > To: amd-...@freedesktop.org > Cc: Russell, Kent <kent.russ...@amd.com> > Subject: [PATCH] drm/amdgpu: Fai

Re: [PATCH] drm/amdgpu: Fail when setting negative DPM levels v2

2018-03-02 Thread Eric Huang
Reviewed-by: Eric Huang On 2018-03-02 12:53 PM, Kent Russell wrote: kstrtol can handle negative values, which is unchecked here. While setting a negative value will result in the mask being 1<<0x , which the SMU will ignore because it's out of long bits,

[PATCH] drm/amdgpu: Fail when setting negative DPM levels v2

2018-03-02 Thread Kent Russell
kstrtol can handle negative values, which is unchecked here. While setting a negative value will result in the mask being 1<<0x , which the SMU will ignore because it's out of long bits, return an error instead of silently failing. v2 Add similar check for sclk_od and mclk_od