1. 26 3月, 2022 32 次提交
  2. 22 3月, 2022 1 次提交
  3. 21 3月, 2022 1 次提交
  4. 18 3月, 2022 1 次提交
  5. 16 3月, 2022 5 次提交
    • J
      drm/i915/display: Do not re-enable PSR after it was marked as not reliable · 278da06c
      José Roberto de Souza 提交于
      If a error happens and sink_not_reliable is set, PSR should be disabled
      for good but that is not happening.
      It would be disabled by the function handling the PSR error but then
      on the next fastset it would be enabled again in
      _intel_psr_post_plane_update().
      It would only be disabled for good in the next modeset where has_psr
      will be set false.
      
      v2:
      - release psr lock before continue
      
      Fixes: 9ce5884e ("drm/i915/display: Only keep PSR enabled if there is active planes")
      Reported-by: NKhaled Almahallawy <khaled.almahallawy@intel.com>
      Reported-by: NCharlton Lin <charlton.lin@intel.com>
      Cc: Jouni Högander <jouni.hogander@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: NJouni Högander <jouni.hogander@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220311185149.110527-2-jose.souza@intel.com
      (cherry picked from commit 15f26bdc)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      278da06c
    • J
      drm/i915/display: Fix HPD short pulse handling for eDP · 3a84fd1e
      José Roberto de Souza 提交于
      Commit 13ea6db2 ("drm/i915/edp: Ignore short pulse when panel
      powered off") completely broke short pulse handling for eDP as it is
      usually generated by sink when it is displaying image and there is
      some error or status that source needs to handle.
      
      When power panel is enabled, this state is enough to power aux
      transactions and VDD override is disabled, so intel_pps_have_power()
      is always returning false causing short pulses to be ignored.
      
      So here better naming this function that intends to check if aux
      lines are powered to avoid the endless cycle mentioned in the commit
      being fixed and fixing the check for what it is intended.
      
      v2:
      - renamed to intel_pps_have_panel_power_or_vdd()
      - fixed indentation
      
      Fixes: 13ea6db2 ("drm/i915/edp: Ignore short pulse when panel powered off")
      Cc: Anshuman Gupta <anshuman.gupta@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Uma Shankar <uma.shankar@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220311185149.110527-1-jose.souza@intel.com
      (cherry picked from commit 8f0c1c09)
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      3a84fd1e
    • V
      drm/amdgpu: Use drm_mode_copy() · 426c89aa
      Ville Syrjälä 提交于
      struct drm_display_mode embeds a list head, so overwriting
      the full struct with another one will corrupt the list
      (if the destination mode is on a list). Use drm_mode_copy()
      instead which explicitly preserves the list head of
      the destination mode.
      
      Even if we know the destination mode is not on any list
      using drm_mode_copy() seems decent as it sets a good
      example. Bad examples of not using it might eventually
      get copied into code where preserving the list head
      actually matters.
      
      Obviously one case not covered here is when the mode
      itself is embedded in a larger structure and the whole
      structure is copied. But if we are careful when copying
      into modes embedded in structures I think we can be a
      little more reassured that bogus list heads haven't been
      propagated in.
      
      @is_mode_copy@
      @@
      drm_mode_copy(...)
      {
      ...
      }
      
      @depends on !is_mode_copy@
      struct drm_display_mode *mode;
      expression E, S;
      @@
      (
      - *mode = E
      + drm_mode_copy(mode, &E)
      |
      - memcpy(mode, E, S)
      + drm_mode_copy(mode, E)
      )
      
      @depends on !is_mode_copy@
      struct drm_display_mode mode;
      expression E;
      @@
      (
      - mode = E
      + drm_mode_copy(&mode, &E)
      |
      - memcpy(&mode, E, S)
      + drm_mode_copy(&mode, E)
      )
      
      @@
      struct drm_display_mode *mode;
      @@
      - &*mode
      + mode
      
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: Rodrigo Siqueira <Rodrigo.Siqueira@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>
      426c89aa
    • V
      drm/radeon: Use drm_mode_copy() · 606d5877
      Ville Syrjälä 提交于
      struct drm_display_mode embeds a list head, so overwriting
      the full struct with another one will corrupt the list
      (if the destination mode is on a list). Use drm_mode_copy()
      instead which explicitly preserves the list head of
      the destination mode.
      
      Even if we know the destination mode is not on any list
      using drm_mode_copy() seems decent as it sets a good
      example. Bad examples of not using it might eventually
      get copied into code where preserving the list head
      actually matters.
      
      Obviously one case not covered here is when the mode
      itself is embedded in a larger structure and the whole
      structure is copied. But if we are careful when copying
      into modes embedded in structures I think we can be a
      little more reassured that bogus list heads haven't been
      propagated in.
      
      @is_mode_copy@
      @@
      drm_mode_copy(...)
      {
      ...
      }
      
      @depends on !is_mode_copy@
      struct drm_display_mode *mode;
      expression E, S;
      @@
      (
      - *mode = E
      + drm_mode_copy(mode, &E)
      |
      - memcpy(mode, E, S)
      + drm_mode_copy(mode, E)
      )
      
      @depends on !is_mode_copy@
      struct drm_display_mode mode;
      expression E;
      @@
      (
      - mode = E
      + drm_mode_copy(&mode, &E)
      |
      - memcpy(&mode, E, S)
      + drm_mode_copy(&mode, E)
      )
      
      @@
      struct drm_display_mode *mode;
      @@
      - &*mode
      + mode
      
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      606d5877
    • P
      drm/amdgpu: Use ternary operator in `vcn_v1_0_start()` · 07d01469
      Paul Menzel 提交于
      Remove the boilerplate of declaring a variable and using an if else
      statement by using the ternary operator.
      Reviewed-by: NJames Zhu <James.Zhu@amd.com>
      Signed-off-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      07d01469