1. 16 12月, 2022 1 次提交
  2. 14 12月, 2022 1 次提交
  3. 02 12月, 2022 2 次提交
  4. 30 11月, 2022 1 次提交
    • S
      drm/amd/display: Fix race condition in DPIA AUX transfer · ead08b95
      Stylon Wang 提交于
      [Why]
      This fix was intended for improving on coding style but in the process
      uncovers a race condition, which explains why we are getting incorrect
      length in DPIA AUX replies. Due to the call path of DPIA AUX going from
      DC back to DM layer then again into DC and the added complexities on top
      of current DC AUX implementation, a proper fix to rely on current dc_lock
      to address the race condition is difficult without a major overhual
      on how DPIA AUX is implemented.
      
      [How]
      - Add a mutex dpia_aux_lock to protect DPIA AUX transfers
      - Remove DMUB_ASYNC_TO_SYNC_ACCESS_* codes and rely solely on
        aux_return_code_type for error reporting and handling
      - Separate SET_CONFIG from DPIA AUX transfer because they have quiet
        different processing logic
      - Remove unnecessary type casting to and from void * type
      Reviewed-by: NNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Acked-by: NJasdeep Dhillon <jdhillon@amd.com>
      Signed-off-by: NStylon Wang <stylon.wang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      ead08b95
  5. 23 11月, 2022 1 次提交
  6. 17 11月, 2022 1 次提交
    • L
      drm/amdgpu/mst: Stop ignoring error codes and deadlocking · 7cce4cd6
      Lyude Paul 提交于
      It appears that amdgpu makes the mistake of completely ignoring the return
      values from the DP MST helpers, and instead just returns a simple
      true/false. In this case, it seems to have come back to bite us because as
      a result of simply returning false from
      compute_mst_dsc_configs_for_state(), amdgpu had no way of telling when a
      deadlock happened from these helpers. This could definitely result in some
      kernel splats.
      
      V2:
      * Address Wayne's comments (fix another bunch of spots where we weren't
        passing down return codes)
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Fixes: 8c20a1ed ("drm/amd/display: MST DSC compute fair share")
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: <stable@vger.kernel.org> # v5.6+
      Reviewed-by: NWayne Lin <Wayne.Lin@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7cce4cd6
  7. 16 11月, 2022 6 次提交
  8. 11 11月, 2022 1 次提交
    • V
      drm/amdgpu: Use drm_mode_init() for on-stack modes · 0a204ce0
      Ville Syrjälä 提交于
      Initialize on-stack modes with drm_mode_init() to guarantee
      no stack garbage in the list head, or that we aren't copying
      over another mode's list head.
      
      Based on the following cocci script, with manual fixups:
      @decl@
      identifier M;
      expression E;
      @@
      - struct drm_display_mode M = E;
      + struct drm_display_mode M;
      
      @@
      identifier decl.M;
      expression decl.E;
      statement S, S1;
      @@
      struct drm_display_mode M;
      ... when != S
      + drm_mode_init(&M, &E);
      +
      S1
      
      @@
      expression decl.E;
      @@
      - &*E
      + E
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0a204ce0
  9. 10 11月, 2022 2 次提交
  10. 06 11月, 2022 1 次提交
  11. 03 11月, 2022 1 次提交
  12. 01 11月, 2022 1 次提交
  13. 28 10月, 2022 5 次提交
  14. 26 10月, 2022 1 次提交
  15. 20 10月, 2022 1 次提交
  16. 15 10月, 2022 1 次提交
    • N
      drm/amd/display: Fix build breakage with CONFIG_DEBUG_FS=n · 2130b87b
      Nathan Chancellor 提交于
      After commit 8799c0be ("drm/amd/display: Fix vblank refcount in vrr
      transition"), a build with CONFIG_DEBUG_FS=n is broken due to a
      misplaced brace, along the lines of:
      
        In file included from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_trace.h:39,
                         from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:41:
        drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: At top level:
        ./include/drm/drm_atomic.h:864:9: error: expected identifier or ‘(’ before ‘for’
          864 |         for ((__i) = 0;                                                 \
              |         ^~~
        drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8317:9: note: in expansion of macro ‘for_each_new_crtc_in_state’
         8317 |         for_each_new_crtc_in_state(state, crtc, new_crtc_state, j)
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Move the brace within the #ifdef so that the file can be built with or
      without CONFIG_DEBUG_FS.
      
      Fixes: 8799c0be ("drm/amd/display: Fix vblank refcount in vrr transition")
      Signed-off-by: NNathan Chancellor <nathan@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2130b87b
  17. 11 10月, 2022 1 次提交
    • F
      drm/amd/display: Validate DSC After Enable All New CRTCs · 876fcc42
      Fangzhi Zuo 提交于
      Before enabling new crtc, stream_count in dc_state does not sync with
      that in drm_atomic_state. Validating dsc in such case would leave newly
      added stream not jointly participating in dsc optimization with existing
      streams, but simply using default initialized vcpi all the time which
      gives wrong dsc determination decision.
      
      Consider the scenaio where one 4k60 connected to the dock under dp-alt mode.
      Since dp-alt mode is 2-lane setup, stream 1 consumes 63 slots with dsc needed.
      Then hook up a second 4k60 to the dock.
      stream 2 connected with 65 slot initialized by default without dsc.  dsc
      pre validate will not jointly optimize stream 2 with stream 1 before
      crtc 2 added into the dc_state. That leads to stream 2 not getting dsc
      optimization, and trigger atomic_check failure all the time, as 65 > 63
      limit.
      
      After getting all new crtcs added into the state, stream_count in
      dc_state correctly reflect that in drm_atomic_state which comes up with
      correct dsc decision.
      
      Fixes: 71be4b16 ("drm/amd/display: dsc validate fail not pass to atomic check")
      Tested-by: NDaniel Wheeler <daniel.wheeler@amd.com>
      Reviewed-by: NRoman Li <Roman.Li@amd.com>
      Acked-by: NQingqing Zhuo <qingqing.zhuo@amd.com>
      Signed-off-by: NFangzhi Zuo <Jerry.Zuo@amd.com>
      Tested-by: NMark Broadworth <mark.broadworth@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      876fcc42
  18. 07 10月, 2022 2 次提交
  19. 22 9月, 2022 1 次提交
  20. 20 9月, 2022 1 次提交
  21. 14 9月, 2022 3 次提交
  22. 03 9月, 2022 1 次提交
    • H
      drm/amdgpu: Register ACPI video backlight when skipping amdgpu backlight registration · c0f50c5d
      Hans de Goede 提交于
      Typically the acpi_video driver will initialize before amdgpu, which
      used to cause /sys/class/backlight/acpi_video0 to get registered and then
      amdgpu would register its own amdgpu_bl# device later. After which
      the drivers/acpi/video_detect.c code unregistered the acpi_video0 device
      to avoid there being 2 backlight devices.
      
      This means that userspace used to briefly see 2 devices and the
      disappearing of acpi_video0 after a brief time confuses the systemd
      backlight level save/restore code, see e.g.:
      https://bbs.archlinux.org/viewtopic.php?id=269920
      
      To fix this the ACPI video code has been modified to make backlight class
      device registration a separate step, relying on the drm/kms driver to
      ask for the acpi_video backlight registration after it is done setting up
      its native backlight device.
      
      Add a call to the new acpi_video_register_backlight() when amdgpu skips
      registering its own backlight device because of either the firmware_flags
      or the acpi_video_get_backlight_type() return value. This ensures that
      if the acpi_video backlight device should be used, it will be available
      before the amdgpu drm_device gets registered with userspace.
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      c0f50c5d
  23. 02 9月, 2022 1 次提交
  24. 30 8月, 2022 1 次提交
  25. 26 8月, 2022 1 次提交
  26. 25 8月, 2022 1 次提交
    • H
      drm/amdgpu: Don't register backlight when another backlight should be used (v3) · da11ef83
      Hans de Goede 提交于
      Before this commit when we want userspace to use the acpi_video backlight
      device we register both the GPU's native backlight device and acpi_video's
      firmware acpi_video# backlight device. This relies on userspace preferring
      firmware type backlight devices over native ones.
      
      Registering 2 backlight devices for a single display really is
      undesirable, don't register the GPU's native backlight device when
      another backlight device should be used.
      
      Changes in v2:
      - To avoid linker errors when amdgpu is builtin and video_detect.c is in
        a module, select ACPI_VIDEO and its deps if ACPI is enabled.
        When ACPI is disabled, ACPI_VIDEO is also always disabled, ensuring
        the stubs from acpi/video.h will be used.
      
      Changes in v3:
      - Use drm_info(drm_dev, "...") to log messages
      - ACPI_VIDEO can now be enabled on non X86 too,
        adjust the Kconfig changes to match this.
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      da11ef83