1. 02 Feb, 2021 24 commits
  2. 01 Feb, 2021 7 commits
  3. 28 Jan, 2021 2 commits
  4. 25 Jan, 2021 7 commits
    • Mario Kleiner's avatar
      drm/amd/display: Fix HDMI deep color output for DCE 6-11. · efa18405
      Mario Kleiner authored
      This fixes corrupted display output in HDMI deep color
      10/12 bpc mode at least as observed on AMD Mullins, DCE-8.3.
      
      It will hopefully also provide fixes for other DCE's up to
      DCE-11, assuming those will need similar fixes, but i could
      not test that for HDMI due to lack of suitable hw, so viewer
      discretion is advised.
      
      dce110_stream_encoder_hdmi_set_stream_attribute() is used for
      HDMI setup on all DCE's and is missing color_depth assignment.
      
      dce110_program_pix_clk() is used for pixel clock setup on HDMI
      for DCE 6-11, and is missing color_depth assignment.
      
      Additionally some of the underlying Atombios specific encoder
      and pixelclock setup functions are missing code which is in
      the classic amdgpu kms modesetting path and the in the radeon
      kms driver for DCE6/DCE8.
      
      encoder_control_digx_v3() - Was missing setup code wrt. amdgpu
      and radeon kms classic drivers. Added here, but untested due to
      lack of suitable test hw.
      
      encoder_control_digx_v4() - Added missing setup code.
      Successfully tested on AMD mullins / DCE-8.3 with HDMI deep color
      output at 10 bpc and 12 bpc.
      
      Note that encoder_control_digx_v5() has proper setup code in place
      and is used, e.g., by DCE-11.2, but this code wasn't used for deep
      color setup due to the missing cntl.color_depth setup in the calling
      function for HDMI.
      
      set_pixel_clock_v5() - Missing setup code wrt. classic amdgpu/radeon
      kms. Added here, but untested due to lack of hw.
      
      set_pixel_clock_v6() - Missing setup code added. Successfully tested
      on AMD mullins DCE-8.3. This fixes corrupted display output at HDMI
      deep color output with 10 bpc or 12 bpc.
      
      Fixes: 4562236b ("drm/amd/dc: Add dc display driver (v2)")
      Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      efa18405
    • Mario Kleiner's avatar
      drm/amd/display: Fix 10/12 bpc setup in DCE output bit depth reduction. · 1916866d
      Mario Kleiner authored
      In set_clamp(), the comments and definitions for the COLOR_DEPTH_101010
      and COLOR_DEPTH_121212 cases directly contradict the code comment which
      explains how this should work, whereas the COLOR_DEPTH_888 case
      is consistent with the code comments. Comment says the bitmask should
      be chosen to align to the top-most 10 or 12 MSB's on a 14 bit bus, but
      the implementation contradicts that: 10 bit case sets a mask for 12 bpc
      clamping, whereas 12 bit case sets a mask for 14 bpc clamping.
      
      Note that during my limited testing on DCE-8.3 (HDMI deep color)
      and DCE-11.2 (DP deep color), this didn't have any obvious ill
      effects, neither did fixing it change anything obvious for the
      better, so this fix may be inconsequential on DCE, and just
      reduce the confusion of innocent bystanders when reading the code
      and trying to investigate problems with 10 bpc+ output.
      
      Fixes: 4562236b ("drm/amd/dc: Add dc display driver (v2)")
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      1916866d
    • Arnd Bergmann's avatar
      amdgpu: fix clang build warning · 4a517faa
      Arnd Bergmann authored
      clang warns about the -mhard-float command line arguments
      on architectures that do not support this:
      
      clang: error: argument unused during compilation: '-mhard-float' [-Werror,-Wunused-command-line-argument]
      
      Move this into the gcc-specific arguments.
      
      Fixes: e77165bf ("drm/amd/display: Add DCN3 blocks to Makefile")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      4a517faa
    • Dan Carpenter's avatar
      drm/amd/display: Fix a potential NULL dereference · d3abc78f
      Dan Carpenter authored
      The debug printk dereferences "link->link_enc" before we have ensured
      that it is non-NULL.  Fix this potential NULL derefence by moving the
      printk after the check.
      
      Fixes: 64ff0882 ("drm/amd/display: Log link/connector info provided in BIOS object table")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d3abc78f
    • Jonathan Gray's avatar
      drm/amd/display: change license of color_table.c · 23a63e91
      Jonathan Gray authored
      Change the license of color_table.c to match color_table.h granting
      permission to modify and distribute.
      Signed-off-by: default avatarJonathan Gray <jsg@jsg.id.au>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      23a63e91
    • Colin Ian King's avatar
      drm/amdgpu: Fix masking binary not operator on two mask operations · 5993e793
      Colin Ian King authored
      Currently the ! operator is incorrectly being used to flip bits on
      mask values. Fix this by using the bit-wise ~ operator instead.
      
      Addresses-Coverity: ("Logical vs. bitwise operator")
      Fixes: 3c9a7b7d ("drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3")
      Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      5993e793
    • Arunpravin's avatar
      drm/amd/pm: store and reinstate swsmu user power configurations · eb3b4251
      Arunpravin authored
      store swsmu user power configurations which include
      power limit, clock frequencies, fan speed and fan mode
      on suspend and reinstate on resume.
      
      V2: Addressed Lijo's review comments
           added a function to set clock interdependencies
           add check on fan control mode to reapply fan speed
      
      V3: Addressed review comments from Alex
           moved store logic and reinstate function call into swSMU
      
      V4: added a logic to keep off storing configurations in suspend
      
      V5: Addressed review comments from Lijo
           add a restore flag
           give restore priority to mclk comparing fclk and socclk
      Signed-off-by: default avatarArunpravin <Arunpravin.PaneerSelvam@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      eb3b4251