1. 07 11月, 2019 1 次提交
  2. 03 10月, 2019 1 次提交
  3. 27 8月, 2019 2 次提交
  4. 24 8月, 2019 1 次提交
  5. 23 8月, 2019 1 次提交
  6. 22 8月, 2019 1 次提交
  7. 13 8月, 2019 2 次提交
  8. 31 7月, 2019 3 次提交
  9. 23 7月, 2019 3 次提交
  10. 19 7月, 2019 2 次提交
  11. 18 7月, 2019 3 次提交
  12. 17 7月, 2019 1 次提交
    • N
      drm/amd/powerplay: Use proper enums in vega20_print_clk_levels · d72e04d9
      Nathan Chancellor 提交于
      clang warns:
      
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:995:39: warning:
      implicit conversion from enumeration type 'PPCLK_e' to different
      enumeration type 'enum smu_clk_type' [-Wenum-conversion]
                      ret = smu_get_current_clk_freq(smu, PPCLK_SOCCLK, &now);
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1016:39: warning:
      implicit conversion from enumeration type 'PPCLK_e' to different
      enumeration type 'enum smu_clk_type' [-Wenum-conversion]
                      ret = smu_get_current_clk_freq(smu, PPCLK_FCLK, &now);
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:1031:39: warning:
      implicit conversion from enumeration type 'PPCLK_e' to different
      enumeration type 'enum smu_clk_type' [-Wenum-conversion]
                      ret = smu_get_current_clk_freq(smu, PPCLK_DCEFCLK, &now);
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      
      The values are mapped one to one in vega20_get_smu_clk_index so just use
      the proper enums here.
      
      Fixes: 09676101 ("drm/amd/powerplay: support sysfs to get socclk, fclk, dcefclk")
      Link: https://github.com/ClangBuiltLinux/linux/issues/587Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      d72e04d9
  13. 09 7月, 2019 2 次提交
    • A
      drm/amd/powerplay: vega20: fix uninitialized variable use · de48ebdd
      Arnd Bergmann 提交于
      If smu_get_current_rpm() fails, we can't use the output,
      as that may be uninitialized:
      
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: error: variable 'current_rpm' is used uninitialized whenever '?:' condition is false [-Werror,-Wsometimes-uninitialized]
              ret = smu_get_current_rpm(smu, &current_rpm);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amdgpu_smu.h:735:3: note: expanded from macro 'smu_get_current_rpm'
              ((smu)->funcs->get_current_rpm ? (smu)->funcs->get_current_rpm((smu), (speed)) : 0)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3024:12: note: uninitialized use occurs here
              percent = current_rpm * 100 / pptable->FanMaximumRpm;
                        ^~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: note: remove the '?:' if its condition is always true
              ret = smu_get_current_rpm(smu, &current_rpm);
                    ^
      drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amdgpu_smu.h:735:3: note: expanded from macro 'smu_get_current_rpm'
              ((smu)->funcs->get_current_rpm ? (smu)->funcs->get_current_rpm((smu), (speed)) : 0)
               ^
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3020:22: note: initialize the variable 'current_rpm' to silence this warning
              uint32_t current_rpm;
      
      Propagate the error code in that case.
      
      Fixes: ee0db820 ("drm/amd/powerplay: move PPTable_t uses into asic level")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      de48ebdd
    • N
      drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent · 985863d0
      Nathan Chancellor 提交于
      clang warns (trimmed for brevity):
      
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:3023:8: warning:
      variable 'current_rpm' is used uninitialized whenever '?:' condition is
      false [-Wsometimes-uninitialized]
              ret = smu_get_current_rpm(smu, &current_rpm);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      smu_get_current_rpm expands to a ternary operator conditional on
      smu->funcs->get_current_rpm being not NULL. When this is false,
      current_rpm will be uninitialized. Zero initialize current_rpm to
      avoid using random stack values if that ever happens.
      
      Fixes: ee0db820 ("drm/amd/powerplay: move PPTable_t uses into asic level")
      Link: https://github.com/ClangBuiltLinux/linux/issues/588Signed-off-by: NNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      985863d0
  14. 26 6月, 2019 1 次提交
  15. 22 6月, 2019 16 次提交