1. 11 Nov, 2016 1 commit
  2. 10 Nov, 2016 7 commits
  3. 09 Nov, 2016 6 commits
  4. 08 Nov, 2016 2 commits
    • Andrew Shadura's avatar
      drm/amd/powerplay: return false instead of -EINVAL · f20024d8
      Andrew Shadura authored
      Returning -EINVAL from a bool-returning function
      phm_check_smc_update_required_for_display_configuration has an unexpected
      effect of returning true, which is probably not what was intended.
      Replace -EINVAL by false.
      
      The only place this function is called from is
      psm_adjust_power_state_dynamic in
      drivers/gpu/drm/amd/powerplay/eventmgr/psm.c:106:
      
      	if (!equal || phm_check_smc_update_required_for_display_configuration(hwmgr)) {
      		phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
      		phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
      		hwmgr->current_ps = requested;
      	}
      
      It seems to expect a boolean value here.
      
      This issue has been found using the following Coccinelle semantic patch
      written by Peter Senna Tschudin:
      <smpl>
      @@
      identifier f;
      constant C;
      typedef bool;
      @@
      bool f (...){
      <+...
      * return -C;
      ...+>
      }
      </smpl>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAndrew Shadura <andrew.shadura@collabora.co.uk>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f20024d8
    • Arnd Bergmann's avatar
      drm/amdgpu/powerplay/smu7: fix unintialized data usage · a29d1260
      Arnd Bergmann authored
      A recent bugfix replaced an out-of-bounds access with direct
      use of unintialized data:
      
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_patch_limits_vddc':
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:11: note: 'vddc' was declared here
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddci' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:17: note: 'vddci' was declared here
        uint32_t vddc, vddci;
      
      This initializes the data as before using the correct type.
      
      Fixes: 77f7f71f ("drm/amdgpu/powerplay/smu7: fix static checker warning")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a29d1260
  5. 07 Nov, 2016 7 commits
  6. 06 Nov, 2016 2 commits
  7. 05 Nov, 2016 15 commits