1. 16 Aug, 2021 19 commits
  2. 11 Aug, 2021 6 commits
  3. 10 Aug, 2021 8 commits
  4. 09 Aug, 2021 7 commits
    • Sergio Miguéns Iglesias's avatar
      drm/amdgpu: Removed unnecessary if statement · 6940db0f
      Sergio Miguéns Iglesias authored
      There was an "if" statement that did nothing so it was removed.
      Signed-off-by: default avatarSergio Miguéns Iglesias <sergio@lony.xyz>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      6940db0f
    • Randy Dunlap's avatar
      drm/amdgpu: fix kernel-doc warnings on non-kernel-doc comments · 7b42552b
      Randy Dunlap authored
      Don't use "begin kernel-doc notation" (/**) for comments that are
      not kernel-doc. This eliminates warnings reported by the 0day bot.
      
      drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:89: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
          * This shader is used to clear VGPRS and LDS, and also write the input
      drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:209: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
          * The below shaders are used to clear SGPRS, and also write the input
      drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c:301: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
          * This shader is used to clear the uninitiated sgprs after the above
      
      Fixes: 0e0036c7 ("drm/amdgpu: fix no full coverage issue for gprs initialization")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
      Cc: Dennis Li <Dennis.Li@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7b42552b
    • Randy Dunlap's avatar
      drm/amd/display: use do-while-0 for DC_TRACE_LEVEL_MESSAGE() · f59a66c1
      Randy Dunlap authored
      Building with W=1 complains about an empty 'else' statement, so use the
      usual do-nothing-while-0 loop to quieten this warning.
      
      ../drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dmub_psr.c:113:53: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
        113 |                                 *state, retry_count);
      
      Fixes: b30eda8d ("drm/amd/display: Add ETW log to dmub_psr_get_state")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Wyatt Wood <wyatt.wood@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Leo Li <sunpeng.li@amd.com>
      Cc: amd-gfx@lists.freedesktop.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f59a66c1
    • Anson Jacob's avatar
      drm/amd/display: use GFP_ATOMIC in amdgpu_dm_irq_schedule_work · 704bd535
      Anson Jacob authored
      Replace GFP_KERNEL with GFP_ATOMIC as amdgpu_dm_irq_schedule_work
      can't sleep.
      
      BUG: sleeping function called from invalid context at include/linux/sched/mm.h:196
      in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 253, name: kworker/6:1H
      CPU: 6 PID: 253 Comm: kworker/6:1H Tainted: G        W  OE     5.11.0-promotion_2021_06_07-18_36_28_prelim_revert_retrain #8
      Hardware name: System manufacturer System Product Name/PRIME X570-PRO, BIOS 3405 02/01/2021
      Workqueue: events_highpri dm_irq_work_func [amdgpu]
      Call Trace:
       <IRQ>
       dump_stack+0x5e/0x74
       ___might_sleep.cold+0x87/0x98
       __might_sleep+0x4b/0x80
       kmem_cache_alloc_trace+0x390/0x4f0
       amdgpu_dm_irq_handler+0x171/0x230 [amdgpu]
       amdgpu_irq_dispatch+0xc0/0x1e0 [amdgpu]
       amdgpu_ih_process+0x81/0x100 [amdgpu]
       amdgpu_irq_handler+0x26/0xa0 [amdgpu]
       __handle_irq_event_percpu+0x49/0x190
       ? __hrtimer_get_next_event+0x4d/0x80
       handle_irq_event_percpu+0x33/0x80
       handle_irq_event+0x33/0x60
       handle_edge_irq+0x82/0x190
       asm_call_irq_on_stack+0x12/0x20
       </IRQ>
       common_interrupt+0xbb/0x140
       asm_common_interrupt+0x1e/0x40
      RIP: 0010:amdgpu_device_rreg.part.0+0x44/0xf0 [amdgpu]
      Code: 53 48 89 fb 4c 3b af c8 08 00 00 73 6d 83 e2 02 75 0d f6 87 40 62 01 00 10 0f 85 83 00 00 00 4c 03 ab d0 08 00 00 45 8b 6d 00 <8b> 05 3e b6 52 00 85 c0 7e 62 48 8b 43 08 0f b7 70 3e 65 8b 05 e3
      RSP: 0018:ffffae7740fff9e8 EFLAGS: 00000286
      RAX: ffffffffc05ee610 RBX: ffff8aaf8f620000 RCX: 0000000000000006
      RDX: 0000000000000000 RSI: 0000000000005430 RDI: ffff8aaf8f620000
      RBP: ffffae7740fffa08 R08: 0000000000000001 R09: 000000000000000a
      R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000005430
      R13: 0000000071000000 R14: 0000000000000001 R15: 0000000000005430
       ? amdgpu_cgs_write_register+0x20/0x20 [amdgpu]
       amdgpu_device_rreg+0x17/0x20 [amdgpu]
       amdgpu_cgs_read_register+0x14/0x20 [amdgpu]
       dm_read_reg_func+0x38/0xb0 [amdgpu]
       generic_reg_wait+0x80/0x160 [amdgpu]
       dce_aux_transfer_raw+0x324/0x7c0 [amdgpu]
       dc_link_aux_transfer_raw+0x43/0x50 [amdgpu]
       dm_dp_aux_transfer+0x87/0x110 [amdgpu]
       drm_dp_dpcd_access+0x72/0x110 [drm_kms_helper]
       drm_dp_dpcd_read+0xb7/0xf0 [drm_kms_helper]
       drm_dp_get_one_sb_msg+0x349/0x480 [drm_kms_helper]
       drm_dp_mst_hpd_irq+0xc5/0xe40 [drm_kms_helper]
       ? drm_dp_mst_hpd_irq+0xc5/0xe40 [drm_kms_helper]
       dm_handle_hpd_rx_irq+0x184/0x1a0 [amdgpu]
       ? dm_handle_hpd_rx_irq+0x184/0x1a0 [amdgpu]
       handle_hpd_rx_irq+0x195/0x240 [amdgpu]
       ? __switch_to_asm+0x42/0x70
       ? __switch_to+0x131/0x450
       dm_irq_work_func+0x19/0x20 [amdgpu]
       process_one_work+0x209/0x400
       worker_thread+0x4d/0x3e0
       ? cancel_delayed_work+0xa0/0xa0
       kthread+0x124/0x160
       ? kthread_park+0x90/0x90
       ret_from_fork+0x22/0x30
      Reviewed-by: default avatarAurabindo Jayamohanan Pillai <Aurabindo.Pillai@amd.com>
      Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
      Signed-off-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
      Cc: stable@vger.kernel.org
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      704bd535
    • Nicholas Kazlauskas's avatar
      drm/amd/display: Increase timeout threshold for DMCUB reset · 314c7629
      Nicholas Kazlauskas authored
      [Why]
      If we're backdoor loading the DMCUB performs more work than just
      the PHY reset so we can end up resetting before the cleanup has fully
      finished.
      
      [How]
      Increase timeout, add udelay between spins to guarantee a minimum.
      Reviewed-by: default avatarRoy Chan <roy.chan@amd.com>
      Reviewed-by: default avatarEric Yang <Eric.Yang2@amd.com>
      Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
      Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      314c7629
    • Nicholas Kazlauskas's avatar
      drm/amd/display: Clear GPINT after DMCUB has reset · 19c618e6
      Nicholas Kazlauskas authored
      [Why]
      Otherwise we can end up processing whatever was left in the register
      if the DMCUB was previously reset.
      
      If DMCUB gets force reset too early from another client then we might
      not have even acked the disable yet - causing DMCUB instantly shutdown
      if the command was 10020000.
      
      [How]
      Move the GPINT clear outside of the reset loop and do it unconditionally
      after the DMCUB has been properly reset.
      Reviewed-by: default avatarRoy Chan <roy.chan@amd.com>
      Reviewed-by: default avatarEric Yang <Eric.Yang2@amd.com>
      Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
      Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      19c618e6
    • Anthony Koo's avatar
      drm/amd/display: 3.2.148 · c71f260a
      Anthony Koo authored
      This version brings along following fixes:
      - Fix memory allocation in dm IRQ context to use GFP_ATOMIC
      - Increase timeout threshold for DMCUB reset
      - Clear GPINT after DMCUB has reset
      - Add AUX I2C tracing
      - Fix code commenting style
      - Some refactoring
      - Remove invalid assert for ODM + MPC case
      Reviewed-by: default avatarWyatt Wood <Wyatt.Wood@amd.com>
      Acked-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
      Signed-off-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
      Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      c71f260a