1. 02 Dec, 2022 5 commits
    • Jiadong.Zhu's avatar
      drm/amdgpu: MCBP based on DRM scheduler (v9) · 3f4c175d
      Jiadong.Zhu authored
      Trigger Mid-Command Buffer Preemption according to the priority of the software
      rings and the hw fence signalling condition.
      
      The muxer saves the locations of the indirect buffer frames from the software
      ring together with the fence sequence number in its fifo queue, and pops out
      those records when the fences are signalled. The locations are used to resubmit
      packages in preemption scenarios by coping the chunks from the software ring.
      
      v2: Update comment style.
      v3: Fix conflict caused by previous modifications.
      v4: Remove unnecessary prints.
      v5: Fix corner cases for resubmission cases.
      v6: Refactor functions for resubmission, calling fence_process in irq handler.
      v7: Solve conflict for removing amdgpu_sw_ring.c.
      v8: Add time threshold to judge if preemption request is needed.
      v9: Correct comment spelling. Set fence emit timestamp before rsu assignment.
      
      Cc: Christian Koenig <Christian.Koenig@amd.com>
      Cc: Luben Tuikov <Luben.Tuikov@amd.com>
      Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Signed-off-by: default avatarJiadong.Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      3f4c175d
    • Jiadong.Zhu's avatar
      drm/amdgpu: Modify unmap_queue format for gfx9 (v6) · be254550
      Jiadong.Zhu authored
      1. Modify the unmap_queue package on gfx9. Add trailing fence to track the
         preemption done.
      2. Modify emit_ce_meta emit_de_meta functions for the resumed ibs.
      
      v2: Restyle code not to use ternary operator.
      v3: Modify code format.
      v4: Enable Mid-Command Buffer Preemption for gfx9 by default.
      v5: Optimize the flag bit set for emit_fence.
      v6: Modify log message for preemption timeout.
      
      Cc: Christian Koenig <Christian.Koenig@amd.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Cc: Luben Tuikov <Luben.Tuikov@amd.com>
      Signed-off-by: default avatarJiadong.Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      be254550
    • Jiadong.Zhu's avatar
      drm/amdgpu: Add software ring callbacks for gfx9 (v8) · 0c97a19a
      Jiadong.Zhu authored
      Set ring functions with software ring callbacks on gfx9.
      
      The software ring could be tested by debugfs_test_ib case.
      
      v2: Set sw_ring 2 to enable software ring by default.
      v3: Remove the parameter for software ring enablement.
      v4: Use amdgpu_ring_init/fini for software rings.
      v5: Update for code format. Fix conflict.
      v6: Remove unnecessary checks and enable software ring on gfx9 by default.
      v7: Use static array for software ring names and priorities.
      v8: Stop creating software rings if no gfx ring existed.
      
      Cc: Christian Koenig <Christian.Koenig@amd.com>
      Cc: Luben Tuikov <Luben.Tuikov@amd.com>
      Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Cc: Likun Gao <Likun.Gao@amd.com>
      Signed-off-by: default avatarJiadong.Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      0c97a19a
    • Jiadong.Zhu's avatar
      drm/amdgpu: Introduce gfx software ring (v9) · ded946f3
      Jiadong.Zhu authored
      The software ring is created to support priority context while there is only
      one hardware queue for gfx.
      
      Every software ring has its fence driver and could be used as an ordinary ring
      for the GPU scheduler.
      Multiple software rings are bound to a real ring with the ring muxer. The
      packages committed on the software ring are copied to the real ring.
      
      v2: Use array to store software ring entry.
      v3: Remove unnecessary prints.
      v4: Remove amdgpu_ring_sw_init/fini functions,
      using gtt for sw ring buffer for later dma copy
      optimization.
      v5: Allocate ring entry dynamically in the muxer.
      v6: Update comments for the ring muxer.
      v7: Modify for function naming.
      v8: Combine software ring functions into amdgpu_ring_mux.c
      v9: Use kernel-doc comment on the get_rptr function.
      
      Cc: Christian Koenig <Christian.Koenig@amd.com>
      Cc: Luben Tuikov <Luben.Tuikov@amd.com>
      Cc: Andrey Grodzovsky  <Andrey.Grodzovsky@amd.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Signed-off-by: default avatarJiadong.Zhu <Jiadong.Zhu@amd.com>
      Acked-by: default avatarHuang Rui <ray.huang@amd.com>
      Acked-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      ded946f3
    • Hamza Mahfooz's avatar
      drm/amd/display: add FB_DAMAGE_CLIPS support · 30ebe415
      Hamza Mahfooz authored
      Currently, userspace doesn't have a way to communicate selective updates
      to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer
      than DCN301, convert DRM damage clips to dc dirty rectangles and fill
      them into dirty_rects in fill_dc_dirty_rects().
      Reviewed-by: default avatarLeo Li <sunpeng.li@amd.com>
      Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      30ebe415
  2. 01 Dec, 2022 9 commits
  3. 29 Nov, 2022 26 commits