An error occurred fetching the project authors.
  1. 21 Jun, 2019 19 commits
  2. 17 Jun, 2019 1 commit
  3. 24 May, 2019 2 commits
  4. 21 Mar, 2019 2 commits
    • Dan Carpenter's avatar
      drm/amd/powerplay: Off by one in vega20_get_smu_msg_index() · 8513027a
      Dan Carpenter authored
      The > should be >= so that we don't read one element beyond the end of
      the vega20_message_map[] array.
      
      Fixes: 78031c2c ("drm/amd/powerplay: implement smu vega20_message_map for vega20")
      Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      8513027a
    • Nathan Chancellor's avatar
      drm/amd/powerplay: Zero initialize num_of_levels in vega20_set_single_dpm_table · 5ea8b472
      Nathan Chancellor authored
      When building with -Wsometimes-uninitialized, Clang warns:
      
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:456:2: warning:
      variable 'num_of_levels' is used uninitialized whenever '?:' condition
      is false [-Wsometimes-uninitialized]
              smu_read_smc_arg(smu, &num_of_levels);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amdgpu_smu.h:608:3: note:
      expanded from macro 'smu_read_smc_arg'
              ((smu)->funcs->read_smc_arg? (smu)->funcs->read_smc_arg((smu), (arg)) : 0)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:457:7: note:
      uninitialized use occurs here
              if (!num_of_levels) {
                   ^~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:456:2: note: remove
      the '?:' if its condition is always true
              smu_read_smc_arg(smu, &num_of_levels);
              ^
      drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amdgpu_smu.h:608:3: note:
      expanded from macro 'smu_read_smc_arg'
              ((smu)->funcs->read_smc_arg? (smu)->funcs->read_smc_arg((smu), (arg)) : 0)
               ^
      drivers/gpu/drm/amd/amdgpu/../powerplay/vega20_ppt.c:446:27: note:
      initialize the variable 'num_of_levels' to silence this warning
              uint32_t i, num_of_levels, clk;
                                       ^
                                        = 0
      1 warning generated.
      
      The if statement it mentions as potentially problematic is currently
      always true because the read_smc_arg callback is assigned at the
      bottom of this file but Clang can't tell that. If the callback were
      ever to disappear, num_of_levels would never be initialized. Just
      zero initialize it to ensure that the intent behind this code
      remains the same.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/425Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      5ea8b472
  5. 19 Mar, 2019 16 commits