1. 04 Feb, 2022 3 commits
  2. 03 Feb, 2022 1 commit
  3. 02 Feb, 2022 12 commits
    • Christian König's avatar
      drm/amdgpu: fix logic inversion in check · e8ae3872
      Christian König authored
      We probably never trigger this, but the logic inside the check is
      inverted.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e8ae3872
    • Mario Limonciello's avatar
      drm/amd: avoid suspend on dGPUs w/ s2idle support when runtime PM enabled · e55a3aea
      Mario Limonciello authored
      dGPUs connected to Intel systems configured for suspend to idle
      will not have the power rails cut at suspend and resetting the GPU
      may lead to problematic behaviors.
      
      Fixes: e25443d2 ("drm/amdgpu: add a dev_pm_ops prepare callback (v2)")
      Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1879Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e55a3aea
    • Aun-Ali Zaidi's avatar
      drm/amd/display: Force link_rate as LINK_RATE_RBR2 for 2018 15" Apple Retina panels · 30fbce37
      Aun-Ali Zaidi authored
      The eDP link rate reported by the DP_MAX_LINK_RATE dpcd register (0xa) is
      contradictory to the highest rate supported reported by
      EDID (0xc = LINK_RATE_RBR2). The effects of this compounded with commit
      '4a8ca46b ("drm/amd/display: Default max bpc to 16 for eDP")' results
      in no display modes being found and a dark panel.
      
      For now, simply force the maximum supported link rate for the eDP attached
      2018 15" Apple Retina panels.
      
      Additionally, we must also check the firmware revision since the device ID
      reported by the DPCD is identical to that of the more capable 16,1,
      incorrectly quirking it. We also use said firmware check to quirk the
      refreshed 15,1 models with Vega graphics as they use a slightly newer
      firmware version.
      Tested-by: default avatarAun-Ali Zaidi <admin@kodeit.net>
      Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: default avatarAun-Ali Zaidi <admin@kodeit.net>
      Signed-off-by: default avatarAditya Garg <gargaditya08@live.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      30fbce37
    • Zhan Liu's avatar
      drm/amd/display: revert "Reset fifo after enable otg" · 49a6ebb9
      Zhan Liu authored
      [Why]
      This change causes regression, that prevents some systems
      from lighting up internal displays.
      
      [How]
      Revert this patch until a new solution is ready.
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
      Acked-by: default avatarStylon Wang <stylon.wang@amd.com>
      Signed-off-by: default avatarZhan Liu <Zhan.Liu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      49a6ebb9
    • Paul Hsieh's avatar
      drm/amd/display: watermark latencies is not enough on DCN31 · f5fa54f4
      Paul Hsieh authored
      [Why]
      The original latencies were causing underflow in some modes.
      Resolution: 2880x1620@60p when HDR enable
      
      [How]
      1. Replace with the up-to-date watermark values based on new measurments
      2. Correct the ddr_wm_table name to DDR5 on DCN31
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
      Acked-by: default avatarStylon Wang <stylon.wang@amd.com>
      Signed-off-by: default avatarPaul Hsieh <paul.hsieh@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      f5fa54f4
    • Agustin Gutierrez's avatar
      drm/amd/display: Update watermark values for DCN301 · 2d8ae25d
      Agustin Gutierrez authored
      [Why]
      There is underflow / visual corruption DCN301, for high
      bandwidth MST DSC configurations such as 2x1440p144 or 2x4k60.
      
      [How]
      Use up-to-date watermark values for DCN301.
      Reviewed-by: default avatarZhan Liu <zhan.liu@amd.com>
      Signed-off-by: default avatarAgustin Gutierrez <agustin.gutierrez@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      2d8ae25d
    • Lang Yu's avatar
      drm/amdgpu: fix a potential GPU hang on cyan skillfish · bca52455
      Lang Yu authored
      We observed a GPU hang when querying GMC CG state(i.e.,
      cat amdgpu_pm_info) on cyan skillfish. Acctually, cyan
      skillfish doesn't support any CG features.
      
      Just prevent it from accessing GMC CG registers.
      Signed-off-by: default avatarLang Yu <Lang.Yu@amd.com>
      Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      bca52455
    • Mario Limonciello's avatar
      drm/amd: Only run s3 or s0ix if system is configured properly · 04ef8604
      Mario Limonciello authored
      This will cause misconfigured systems to not run the GPU suspend
      routines.
      
      * In APUs that are properly configured system will go into s2idle.
      * In APUs that are intended to be S3 but user selects
        s2idle the GPU will stay fully powered for the suspend.
      * In APUs that are intended to be s2idle and system misconfigured
        the GPU will stay fully powered for the suspend.
      * In systems that are intended to be s2idle, but AMD dGPU is also
        present, the dGPU will go through S3
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      04ef8604
    • Mario Limonciello's avatar
      drm/amd: add support to check whether the system is set to s3 · f52a2b8b
      Mario Limonciello authored
      This will be used to help make decisions on what to do in
      misconfigured systems.
      
      v2: squash in semicolon fix from Stephen Rothwell
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f52a2b8b
    • Helge Deller's avatar
      fbcon: Add option to enable legacy hardware acceleration · a3f781a9
      Helge Deller authored
      Add a config option CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION to
      enable bitblt and fillrect hardware acceleration in the framebuffer
      console. If disabled, such acceleration will not be used, even if it is
      supported by the graphics hardware driver.
      
      If you plan to use DRM as your main graphics output system, you should
      disable this option since it will prevent compiling in code which isn't
      used later on when DRM takes over.
      
      For all other configurations, e.g. if none of your graphic cards support
      DRM (yet), DRM isn't available for your architecture, or you can't be
      sure that the graphic card in the target system will support DRM, you
      most likely want to enable this option.
      
      In the non-accelerated case (e.g. when DRM is used), the inlined
      fb_scrollmode() function is hardcoded to return SCROLL_REDRAW and as such the
      compiler is able to optimize much unneccesary code away.
      
      In this v3 patch version I additionally changed the GETVYRES() and GETVXRES()
      macros to take a pointer to the fbcon_display struct. This fixes the build when
      console rotation is enabled and helps the compiler again to optimize out code.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org # v5.10+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-4-deller@gmx.de
      a3f781a9
    • Helge Deller's avatar
      Revert "fbcon: Disable accelerated scrolling" · 87ab9f6b
      Helge Deller authored
      This reverts commit 39aead83.
      
      Revert the first (of 2) commits which disabled scrolling acceleration in
      fbcon/fbdev.  It introduced a regression for fbdev-supported graphic cards
      because of the performance penalty by doing screen scrolling by software
      instead of using the existing graphic card 2D hardware acceleration.
      
      Console scrolling acceleration was disabled by dropping code which
      checked at runtime the driver hardware capabilities for the
      BINFO_HWACCEL_COPYAREA or FBINFO_HWACCEL_FILLRECT flags and if set, it
      enabled scrollmode SCROLL_MOVE which uses hardware acceleration to move
      screen contents.  After dropping those checks scrollmode was hard-wired
      to SCROLL_REDRAW instead, which forces all graphic cards to redraw every
      character at the new screen position when scrolling.
      
      This change effectively disabled all hardware-based scrolling acceleration for
      ALL drivers, because now all kind of 2D hardware acceleration (bitblt,
      fillrect) in the drivers isn't used any longer.
      
      The original commit message mentions that only 3 DRM drivers (nouveau, omapdrm
      and gma500) used hardware acceleration in the past and thus code for checking
      and using scrolling acceleration is obsolete.
      
      This statement is NOT TRUE, because beside the DRM drivers there are around 35
      other fbdev drivers which depend on fbdev/fbcon and still provide hardware
      acceleration for fbdev/fbcon.
      
      The original commit message also states that syzbot found lots of bugs in fbcon
      and thus it's "often the solution to just delete code and remove features".
      This is true, and the bugs - which actually affected all users of fbcon,
      including DRM - were fixed, or code was dropped like e.g. the support for
      software scrollback in vgacon (commit 973c096f).
      
      So to further analyze which bugs were found by syzbot, I've looked through all
      patches in drivers/video which were tagged with syzbot or syzkaller back to
      year 2005. The vast majority fixed the reported issues on a higher level, e.g.
      when screen is to be resized, or when font size is to be changed. The few ones
      which touched driver code fixed a real driver bug, e.g. by adding a check.
      
      But NONE of those patches touched code of either the SCROLL_MOVE or the
      SCROLL_REDRAW case.
      
      That means, there was no real reason why SCROLL_MOVE had to be ripped-out and
      just SCROLL_REDRAW had to be used instead. The only reason I can imagine so far
      was that SCROLL_MOVE wasn't used by DRM and as such it was assumed that it
      could go away. That argument completely missed the fact that SCROLL_MOVE is
      still heavily used by fbdev (non-DRM) drivers.
      
      Some people mention that using memcpy() instead of the hardware acceleration is
      pretty much the same speed. But that's not true, at least not for older graphic
      cards and machines where we see speed decreases by factor 10 and more and thus
      this change leads to console responsiveness way worse than before.
      
      That's why the original commit is to be reverted. By reverting we
      reintroduce hardware-based scrolling acceleration and fix the
      performance regression for fbdev drivers.
      
      There isn't any impact on DRM when reverting those patches.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarSven Schnelle <svens@stackframe.org>
      Cc: stable@vger.kernel.org # v5.10+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-3-deller@gmx.de
      87ab9f6b
    • Helge Deller's avatar
      Revert "fbdev: Garbage collect fbdev scrolling acceleration, part 1 (from TODO list)" · 1148836f
      Helge Deller authored
      This reverts commit b3ec8cdf.
      
      Revert the second (of 2) commits which disabled scrolling acceleration
      in fbcon/fbdev.  It introduced a regression for fbdev-supported graphic
      cards because of the performance penalty by doing screen scrolling by
      software instead of using the existing graphic card 2D hardware
      acceleration.
      
      Console scrolling acceleration was disabled by dropping code which
      checked at runtime the driver hardware capabilities for the
      BINFO_HWACCEL_COPYAREA or FBINFO_HWACCEL_FILLRECT flags and if set, it
      enabled scrollmode SCROLL_MOVE which uses hardware acceleration to move
      screen contents.  After dropping those checks scrollmode was hard-wired
      to SCROLL_REDRAW instead, which forces all graphic cards to redraw every
      character at the new screen position when scrolling.
      
      This change effectively disabled all hardware-based scrolling acceleration for
      ALL drivers, because now all kind of 2D hardware acceleration (bitblt,
      fillrect) in the drivers isn't used any longer.
      
      The original commit message mentions that only 3 DRM drivers (nouveau, omapdrm
      and gma500) used hardware acceleration in the past and thus code for checking
      and using scrolling acceleration is obsolete.
      
      This statement is NOT TRUE, because beside the DRM drivers there are around 35
      other fbdev drivers which depend on fbdev/fbcon and still provide hardware
      acceleration for fbdev/fbcon.
      
      The original commit message also states that syzbot found lots of bugs in fbcon
      and thus it's "often the solution to just delete code and remove features".
      This is true, and the bugs - which actually affected all users of fbcon,
      including DRM - were fixed, or code was dropped like e.g. the support for
      software scrollback in vgacon (commit 973c096f).
      
      So to further analyze which bugs were found by syzbot, I've looked through all
      patches in drivers/video which were tagged with syzbot or syzkaller back to
      year 2005. The vast majority fixed the reported issues on a higher level, e.g.
      when screen is to be resized, or when font size is to be changed. The few ones
      which touched driver code fixed a real driver bug, e.g. by adding a check.
      
      But NONE of those patches touched code of either the SCROLL_MOVE or the
      SCROLL_REDRAW case.
      
      That means, there was no real reason why SCROLL_MOVE had to be ripped-out and
      just SCROLL_REDRAW had to be used instead. The only reason I can imagine so far
      was that SCROLL_MOVE wasn't used by DRM and as such it was assumed that it
      could go away. That argument completely missed the fact that SCROLL_MOVE is
      still heavily used by fbdev (non-DRM) drivers.
      
      Some people mention that using memcpy() instead of the hardware acceleration is
      pretty much the same speed. But that's not true, at least not for older graphic
      cards and machines where we see speed decreases by factor 10 and more and thus
      this change leads to console responsiveness way worse than before.
      
      That's why the original commit is to be reverted. By reverting we
      reintroduce hardware-based scrolling acceleration and fix the
      performance regression for fbdev drivers.
      
      There isn't any impact on DRM when reverting those patches.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarSven Schnelle <svens@stackframe.org>
      Cc: stable@vger.kernel.org # v5.16+
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220202135531.92183-2-deller@gmx.de
      1148836f
  4. 01 Feb, 2022 2 commits
  5. 31 Jan, 2022 8 commits
  6. 30 Jan, 2022 14 commits