1. 09 Mar, 2020 20 commits
  2. 06 Mar, 2020 18 commits
  3. 05 Mar, 2020 2 commits
    • Nathan Chancellor's avatar
      drm/amd/display: Remove pointless NULL checks in dmub_psr_copy_settings · 67a4addd
      Nathan Chancellor authored
      Clang warns:
      
      drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:147:31: warning:
      address of 'pipe_ctx->plane_res' will always evaluate to 'true'
      [-Wpointer-bool-conversion]
              if (!pipe_ctx || !&pipe_ctx->plane_res || !&pipe_ctx->stream_res)
                               ~ ~~~~~~~~~~^~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:147:56: warning:
      address of 'pipe_ctx->stream_res' will always evaluate to 'true'
      [-Wpointer-bool-conversion]
              if (!pipe_ctx || !&pipe_ctx->plane_res || !&pipe_ctx->stream_res)
                                                        ~ ~~~~~~~~~~^~~~~~~~~~
      2 warnings generated.
      
      As long as pipe_ctx is not NULL, the address of members in this struct
      cannot be NULL, which means these checks will always evaluate to false.
      
      Fixes: 4c1a1335 ("drm/amd/display: Driverside changes to support PSR in DMCUB")
      Link: https://github.com/ClangBuiltLinux/linux/issues/915Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      67a4addd
    • Hersen Wu's avatar
      drm/amdgpu/display: navi1x copy dcn watermark clock settings to smu resume from s3 (v2) · 9340dfd3
      Hersen Wu authored
       This interface is for dGPU Navi1x. Linux dc-pplib interface depends
       on window driver dc implementation.
      
       For Navi1x, clock settings of dcn watermarks are fixed. the settings
       should be passed to smu during boot up and resume from s3.
       boot up: dc calculate dcn watermark clock settings within dc_create,
       dcn20_resource_construct, then call pplib functions below to pass
       the settings to smu:
       smu_set_watermarks_for_clock_ranges
       smu_set_watermarks_table
       navi10_set_watermarks_table
       smu_write_watermarks_table
      
       For Renoir, clock settings of dcn watermark are also fixed values.
       dc has implemented different flow for window driver:
       dc_hardware_init / dc_set_power_state
       dcn10_init_hw
       notify_wm_ranges
       set_wm_ranges
      
       For Linux
       smu_set_watermarks_for_clock_ranges
       renoir_set_watermarks_table
       smu_write_watermarks_table
      
       dc_hardware_init -> amdgpu_dm_init
       dc_set_power_state --> dm_resume
      
       therefore, linux dc-pplib interface of navi10/12/14 is different
       from that of Renoir.
      
      v2: add missing unlock in error case
      Signed-off-by: default avatarHersen Wu <hersenxs.wu@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      9340dfd3