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 > Subject: [PATCH] drm/amdgpu: Fail when setting negative DPM level

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

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:39 PM > To: amd-...@freedesktop.org > Cc: Russell, Kent > Subject: [PATCH] drm/amdgpu: Fail when setting negative DPM le

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, return an error instead of sile

[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 Signed-off-b

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

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. Signed-off-by: Kent Russell --- drivers/gpu/drm/amd/amdg