History

Merge tag 'amd-drm-fixes-6.9-2024-05-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.9-2024-05-01: amdgpu: - Fix VRAM memory accounting - DCN 3.1 fixes - DCN 2.0 fix - DCN 3.1.5 fix - DCN 3.5 fix - DCN 3.2.1 fix - DP fixes - Seamless boot fix - Fix call order in amdgpu_ttm_move() - Fix doorbell regression - Disable panel replay temporarily amdkfd: - Flush wq before creating kfd process Signed-off-by: Dave Airlie <airlied@redhat.com>

Dave Airlie committed 2 years ago

Commit 306eca02 parents e67572c ab72d5915 files · +138 −55Browse files

Unified · Split

15 files
  1. drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +1 −1
  2. drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +9 −5
  3. drivers/gpu/drm/amd/amdgpu/amdgpu_object.h +3 −1
  4. drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +27 −23
  5. drivers/gpu/drm/amd/amdkfd/kfd_process.c +8 −0
  6. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +12 −9
  7. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +36 −12
  8. drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +1 −0
  9. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c +8 −0
  10. drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c +12 −3
  11. drivers/gpu/drm/amd/display/dc/core/dc.c +3 −0
  12. drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c +6 −0
  13. drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c +2 −0
  14. drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c +9 −1
  15. drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +1 −0
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c+1−1
@@ -220,7 +220,7 @@ int amdgpu_amdkfd_reserve_mem_limit(struct amdgpu_device *adev, · 219 unmodified lines
220220 (kfd_mem_limit.ttm_mem_used + ttm_mem_needed >
221221 kfd_mem_limit.max_ttm_mem_limit) ||
222222 (adev && xcp_id >= 0 && adev->kfd.vram_used[xcp_id] + vram_needed >
223− vram_size - reserved_for_pt)) {
223+ vram_size - reserved_for_pt - atomic64_read(&adev->vram_pin_size))) {
224224 ret = -ENOMEM;
225225 goto release;
226226 }
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c+9−5
@@ -1243,14 +1243,18 @@ int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer, · 1242 unmodified lines
12431243 * amdgpu_bo_move_notify - notification about a memory move
12441244 * @bo: pointer to a buffer object
12451245 * @evict: if this move is evicting the buffer from the graphics address space
1246+ * @new_mem: new resource for backing the BO
12461247 *
12471248 * Marks the corresponding &amdgpu_bo buffer object as invalid, also performs
12481249 * bookkeeping.
12491250 * TTM driver callback which is called when ttm moves a buffer.
12501251 */
1251−void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, bool evict)
1252+void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
1253+ bool evict,
1254+ struct ttm_resource *new_mem)
12521255 {
12531256 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
1257+ struct ttm_resource *old_mem = bo->resource;
12541258 struct amdgpu_bo *abo;
12551259
12561260 if (!amdgpu_bo_is_amdgpu_bo(bo))
@@ -1262,12 +1266,12 @@ void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, bool evict) · 5 unmodified lines
12621266 amdgpu_bo_kunmap(abo);
12631267
12641268 if (abo->tbo.base.dma_buf && !abo->tbo.base.import_attach &&
1265− bo->resource->mem_type != TTM_PL_SYSTEM)
1269+ old_mem && old_mem->mem_type != TTM_PL_SYSTEM)
12661270 dma_buf_move_notify(abo->tbo.base.dma_buf);
12671271
1268− /* remember the eviction */
1269− if (evict)
1270− atomic64_inc(&adev->num_evictions);
1272+ /* move_notify is called before move happens */
1273+ trace_amdgpu_bo_move(abo, new_mem ? new_mem->mem_type : -1,
1274+ old_mem ? old_mem->mem_type : -1);
12711275 }
12721276
12731277 void amdgpu_bo_get_memory(struct amdgpu_bo *bo,
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h+3−1
@@ -328,7 +328,9 @@ int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata, · 327 unmodified lines
328328 int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
329329 size_t buffer_size, uint32_t *metadata_size,
330330 uint64_t *flags);
331−void amdgpu_bo_move_notify(struct ttm_buffer_object *bo, bool evict);
331+void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
332+ bool evict,
333+ struct ttm_resource *new_mem);
332334 void amdgpu_bo_release_notify(struct ttm_buffer_object *bo);
333335 vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
334336 void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c+27−23
@@ -419,7 +419,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev, · 418 unmodified lines
419419 return false;
420420
421421 if (res->mem_type == TTM_PL_SYSTEM || res->mem_type == TTM_PL_TT ||
422− res->mem_type == AMDGPU_PL_PREEMPT)
422+ res->mem_type == AMDGPU_PL_PREEMPT || res->mem_type == AMDGPU_PL_DOORBELL)
423423 return true;
424424
425425 if (res->mem_type != TTM_PL_VRAM)
@@ -481,14 +481,16 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, · 55 unmodified lines
481481
482482 if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM &&
483483 bo->ttm == NULL)) {
484+ amdgpu_bo_move_notify(bo, evict, new_mem);
484485 ttm_bo_move_null(bo, new_mem);
485− goto out;
486+ return 0;
486487 }
487488 if (old_mem->mem_type == TTM_PL_SYSTEM &&
488489 (new_mem->mem_type == TTM_PL_TT ||
489490 new_mem->mem_type == AMDGPU_PL_PREEMPT)) {
491+ amdgpu_bo_move_notify(bo, evict, new_mem);
490492 ttm_bo_move_null(bo, new_mem);
491− goto out;
493+ return 0;
492494 }
493495 if ((old_mem->mem_type == TTM_PL_TT ||
494496 old_mem->mem_type == AMDGPU_PL_PREEMPT) &&
@@ -498,9 +500,10 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, · 3 unmodified lines
498500 return r;
499501
500502 amdgpu_ttm_backend_unbind(bo->bdev, bo->ttm);
503+ amdgpu_bo_move_notify(bo, evict, new_mem);
501504 ttm_resource_free(bo, &bo->resource);
502505 ttm_bo_assign_mem(bo, new_mem);
503− goto out;
506+ return 0;
504507 }
505508
506509 if (old_mem->mem_type == AMDGPU_PL_GDS ||
@@ -512,8 +515,9 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, · 5 unmodified lines
512515 new_mem->mem_type == AMDGPU_PL_OA ||
513516 new_mem->mem_type == AMDGPU_PL_DOORBELL) {
514517 /* Nothing to save here */
518+ amdgpu_bo_move_notify(bo, evict, new_mem);
515519 ttm_bo_move_null(bo, new_mem);
516− goto out;
520+ return 0;
517521 }
518522
519523 if (bo->type == ttm_bo_type_device &&
@@ -525,22 +529,23 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, · 5 unmodified lines
525529 abo->flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
526530 }
527531
528− if (adev->mman.buffer_funcs_enabled) {
529− if (((old_mem->mem_type == TTM_PL_SYSTEM &&
530− new_mem->mem_type == TTM_PL_VRAM) ||
531− (old_mem->mem_type == TTM_PL_VRAM &&
532− new_mem->mem_type == TTM_PL_SYSTEM))) {
533− hop->fpfn = 0;
534− hop->lpfn = 0;
535− hop->mem_type = TTM_PL_TT;
536− hop->flags = TTM_PL_FLAG_TEMPORARY;
537− return -EMULTIHOP;
538− }
532+ if (adev->mman.buffer_funcs_enabled &&
533+ ((old_mem->mem_type == TTM_PL_SYSTEM &&
534+ new_mem->mem_type == TTM_PL_VRAM) ||
535+ (old_mem->mem_type == TTM_PL_VRAM &&
536+ new_mem->mem_type == TTM_PL_SYSTEM))) {
537+ hop->fpfn = 0;
538+ hop->lpfn = 0;
539+ hop->mem_type = TTM_PL_TT;
540+ hop->flags = TTM_PL_FLAG_TEMPORARY;
541+ return -EMULTIHOP;
542+ }
539543
544+ amdgpu_bo_move_notify(bo, evict, new_mem);
545+ if (adev->mman.buffer_funcs_enabled)
540546 r = amdgpu_move_blit(bo, evict, new_mem, old_mem);
541− } else {
547+ else
542548 r = -ENODEV;
543− }
544549
545550 if (r) {
546551 /* Check that all memory is CPU accessible */
@@ -555,11 +560,10 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, · 8 unmodified lines
555560 return r;
556561 }
557562
558− trace_amdgpu_bo_move(abo, new_mem->mem_type, old_mem->mem_type);
559−out:
560− /* update statistics */
563+ /* update statistics after the move */
564+ if (evict)
565+ atomic64_inc(&adev->num_evictions);
561566 atomic64_add(bo->base.size, &adev->num_bytes_moved);
562− amdgpu_bo_move_notify(bo, evict);
563567 return 0;
564568 }
565569
@@ -1559,7 +1563,7 @@ static int amdgpu_ttm_access_memory(struct ttm_buffer_object *bo, · 993 unmodified lines
15591563 static void
15601564 amdgpu_bo_delete_mem_notify(struct ttm_buffer_object *bo)
15611565 {
1562− amdgpu_bo_move_notify(bo, false);
1566+ amdgpu_bo_move_notify(bo, false, NULL);
15631567 }
15641568
15651569 static struct ttm_device_funcs amdgpu_bo_driver = {
drivers/gpu/drm/amd/amdkfd/kfd_process.c+8−0
@@ -829,6 +829,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread) · 828 unmodified lines
829829 if (process) {
830830 pr_debug("Process already found\n");
831831 } else {
832+ /* If the process just called exec(3), it is possible that the
833+ * cleanup of the kfd_process (following the release of the mm
834+ * of the old process image) is still in the cleanup work queue.
835+ * Make sure to drain any job before trying to recreate any
836+ * resource for this process.
837+ */
838+ flush_workqueue(kfd_process_wq);
839+
832840 process = create_process(thread);
833841 if (IS_ERR(process))
834842 goto out;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+12−9
@@ -4537,15 +4537,18 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev) · 4536 unmodified lines
45374537 /* Determine whether to enable Replay support by default. */
45384538 if (!(amdgpu_dc_debug_mask & DC_DISABLE_REPLAY)) {
45394539 switch (amdgpu_ip_version(adev, DCE_HWIP, 0)) {
4540− case IP_VERSION(3, 1, 4):
4541− case IP_VERSION(3, 1, 5):
4542− case IP_VERSION(3, 1, 6):
4543− case IP_VERSION(3, 2, 0):
4544− case IP_VERSION(3, 2, 1):
4545− case IP_VERSION(3, 5, 0):
4546− case IP_VERSION(3, 5, 1):
4547− replay_feature_enabled = true;
4548− break;
4540+/*
4541+ * Disabled by default due to https://gitlab.freedesktop.org/drm/amd/-/issues/3344
4542+ * case IP_VERSION(3, 1, 4):
4543+ * case IP_VERSION(3, 1, 5):
4544+ * case IP_VERSION(3, 1, 6):
4545+ * case IP_VERSION(3, 2, 0):
4546+ * case IP_VERSION(3, 2, 1):
4547+ * case IP_VERSION(3, 5, 0):
4548+ * case IP_VERSION(3, 5, 1):
4549+ * replay_feature_enabled = true;
4550+ * break;
4551+ */
45494552 default:
45504553 replay_feature_enabled = amdgpu_dc_feature_mask & DC_REPLAY_MASK;
45514554 break;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c+36−12
@@ -1495,7 +1495,9 @@ static ssize_t dp_dsc_clock_en_read(struct file *f, char __user *buf, · 1494 unmodified lines
14951495 for (i = 0; i < MAX_PIPES; i++) {
14961496 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
14971497 if (pipe_ctx->stream &&
1498− pipe_ctx->stream->link == aconnector->dc_link)
1498+ pipe_ctx->stream->link == aconnector->dc_link &&
1499+ pipe_ctx->stream->sink &&
1500+ pipe_ctx->stream->sink == aconnector->dc_sink)
14991501 break;
15001502 }
15011503
@@ -1596,7 +1598,9 @@ static ssize_t dp_dsc_clock_en_write(struct file *f, const char __user *buf, · 94 unmodified lines
15961598 for (i = 0; i < MAX_PIPES; i++) {
15971599 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
15981600 if (pipe_ctx->stream &&
1599− pipe_ctx->stream->link == aconnector->dc_link)
1601+ pipe_ctx->stream->link == aconnector->dc_link &&
1602+ pipe_ctx->stream->sink &&
1603+ pipe_ctx->stream->sink == aconnector->dc_sink)
16001604 break;
16011605 }
16021606
@@ -1681,7 +1685,9 @@ static ssize_t dp_dsc_slice_width_read(struct file *f, char __user *buf, · 78 unmodified lines
16811685 for (i = 0; i < MAX_PIPES; i++) {
16821686 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
16831687 if (pipe_ctx->stream &&
1684− pipe_ctx->stream->link == aconnector->dc_link)
1688+ pipe_ctx->stream->link == aconnector->dc_link &&
1689+ pipe_ctx->stream->sink &&
1690+ pipe_ctx->stream->sink == aconnector->dc_sink)
16851691 break;
16861692 }
16871693
@@ -1780,7 +1786,9 @@ static ssize_t dp_dsc_slice_width_write(struct file *f, const char __user *buf, · 92 unmodified lines
17801786 for (i = 0; i < MAX_PIPES; i++) {
17811787 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
17821788 if (pipe_ctx->stream &&
1783− pipe_ctx->stream->link == aconnector->dc_link)
1789+ pipe_ctx->stream->link == aconnector->dc_link &&
1790+ pipe_ctx->stream->sink &&
1791+ pipe_ctx->stream->sink == aconnector->dc_sink)
17841792 break;
17851793 }
17861794
@@ -1865,7 +1873,9 @@ static ssize_t dp_dsc_slice_height_read(struct file *f, char __user *buf, · 78 unmodified lines
18651873 for (i = 0; i < MAX_PIPES; i++) {
18661874 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
18671875 if (pipe_ctx->stream &&
1868− pipe_ctx->stream->link == aconnector->dc_link)
1876+ pipe_ctx->stream->link == aconnector->dc_link &&
1877+ pipe_ctx->stream->sink &&
1878+ pipe_ctx->stream->sink == aconnector->dc_sink)
18691879 break;
18701880 }
18711881
@@ -1964,7 +1974,9 @@ static ssize_t dp_dsc_slice_height_write(struct file *f, const char __user *buf, · 92 unmodified lines
19641974 for (i = 0; i < MAX_PIPES; i++) {
19651975 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
19661976 if (pipe_ctx->stream &&
1967− pipe_ctx->stream->link == aconnector->dc_link)
1977+ pipe_ctx->stream->link == aconnector->dc_link &&
1978+ pipe_ctx->stream->sink &&
1979+ pipe_ctx->stream->sink == aconnector->dc_sink)
19681980 break;
19691981 }
19701982
@@ -2045,7 +2057,9 @@ static ssize_t dp_dsc_bits_per_pixel_read(struct file *f, char __user *buf, · 74 unmodified lines
20452057 for (i = 0; i < MAX_PIPES; i++) {
20462058 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
20472059 if (pipe_ctx->stream &&
2048− pipe_ctx->stream->link == aconnector->dc_link)
2060+ pipe_ctx->stream->link == aconnector->dc_link &&
2061+ pipe_ctx->stream->sink &&
2062+ pipe_ctx->stream->sink == aconnector->dc_sink)
20492063 break;
20502064 }
20512065
@@ -2141,7 +2155,9 @@ static ssize_t dp_dsc_bits_per_pixel_write(struct file *f, const char __user *bu · 89 unmodified lines
21412155 for (i = 0; i < MAX_PIPES; i++) {
21422156 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
21432157 if (pipe_ctx->stream &&
2144− pipe_ctx->stream->link == aconnector->dc_link)
2158+ pipe_ctx->stream->link == aconnector->dc_link &&
2159+ pipe_ctx->stream->sink &&
2160+ pipe_ctx->stream->sink == aconnector->dc_sink)
21452161 break;
21462162 }
21472163
@@ -2220,7 +2236,9 @@ static ssize_t dp_dsc_pic_width_read(struct file *f, char __user *buf, · 72 unmodified lines
22202236 for (i = 0; i < MAX_PIPES; i++) {
22212237 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
22222238 if (pipe_ctx->stream &&
2223− pipe_ctx->stream->link == aconnector->dc_link)
2239+ pipe_ctx->stream->link == aconnector->dc_link &&
2240+ pipe_ctx->stream->sink &&
2241+ pipe_ctx->stream->sink == aconnector->dc_sink)
22242242 break;
22252243 }
22262244
@@ -2276,7 +2294,9 @@ static ssize_t dp_dsc_pic_height_read(struct file *f, char __user *buf, · 49 unmodified lines
22762294 for (i = 0; i < MAX_PIPES; i++) {
22772295 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
22782296 if (pipe_ctx->stream &&
2279− pipe_ctx->stream->link == aconnector->dc_link)
2297+ pipe_ctx->stream->link == aconnector->dc_link &&
2298+ pipe_ctx->stream->sink &&
2299+ pipe_ctx->stream->sink == aconnector->dc_sink)
22802300 break;
22812301 }
22822302
@@ -2347,7 +2367,9 @@ static ssize_t dp_dsc_chunk_size_read(struct file *f, char __user *buf, · 64 unmodified lines
23472367 for (i = 0; i < MAX_PIPES; i++) {
23482368 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
23492369 if (pipe_ctx->stream &&
2350− pipe_ctx->stream->link == aconnector->dc_link)
2370+ pipe_ctx->stream->link == aconnector->dc_link &&
2371+ pipe_ctx->stream->sink &&
2372+ pipe_ctx->stream->sink == aconnector->dc_sink)
23512373 break;
23522374 }
23532375
@@ -2418,7 +2440,9 @@ static ssize_t dp_dsc_slice_bpg_offset_read(struct file *f, char __user *buf, · 64 unmodified lines
24182440 for (i = 0; i < MAX_PIPES; i++) {
24192441 pipe_ctx = &aconnector->dc_link->dc->current_state->res_ctx.pipe_ctx[i];
24202442 if (pipe_ctx->stream &&
2421− pipe_ctx->stream->link == aconnector->dc_link)
2443+ pipe_ctx->stream->link == aconnector->dc_link &&
2444+ pipe_ctx->stream->sink &&
2445+ pipe_ctx->stream->sink == aconnector->dc_sink)
24222446 break;
24232447 }
24242448
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c+1−0
@@ -2948,6 +2948,7 @@ static enum bp_result construct_integrated_info( · 2947 unmodified lines
29482948 result = get_integrated_info_v2_1(bp, info);
29492949 break;
29502950 case 2:
2951+ case 3:
29512952 result = get_integrated_info_v2_2(bp, info);
29522953 break;
29532954 default:
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c+8−0
@@ -145,6 +145,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base, · 144 unmodified lines
145145 */
146146 clk_mgr_base->clks.zstate_support = new_clocks->zstate_support;
147147 if (safe_to_lower) {
148+ if (clk_mgr_base->clks.dtbclk_en && !new_clocks->dtbclk_en) {
149+ dcn315_smu_set_dtbclk(clk_mgr, false);
150+ clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en;
151+ }
148152 /* check that we're not already in lower */
149153 if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_LOW_POWER) {
150154 display_count = dcn315_get_active_display_cnt_wa(dc, context);
@@ -160,6 +164,10 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base, · 9 unmodified lines
160164 }
161165 }
162166 } else {
167+ if (!clk_mgr_base->clks.dtbclk_en && new_clocks->dtbclk_en) {
168+ dcn315_smu_set_dtbclk(clk_mgr, true);
169+ clk_mgr_base->clks.dtbclk_en = new_clocks->dtbclk_en;
170+ }
163171 /* check that we're not already in D0 */
164172 if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_MISSION_MODE) {
165173 union display_idle_optimization_u idle_info = { 0 };
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c+12−3
@@ -712,8 +712,12 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base, · 711 unmodified lines
712712 * since we calculate mode support based on softmax being the max UCLK
713713 * frequency.
714714 */
715− dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK,
716− dc->clk_mgr->bw_params->dc_mode_softmax_memclk);
715+ if (dc->debug.disable_dc_mode_overwrite) {
716+ dcn30_smu_set_hard_max_by_freq(clk_mgr, PPCLK_UCLK, dc->clk_mgr->bw_params->max_memclk_mhz);
717+ dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK, dc->clk_mgr->bw_params->max_memclk_mhz);
718+ } else
719+ dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK,
720+ dc->clk_mgr->bw_params->dc_mode_softmax_memclk);
717721 } else {
718722 dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK, dc->clk_mgr->bw_params->max_memclk_mhz);
719723 }
@@ -746,8 +750,13 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base, · 26 unmodified lines
746750 /* set UCLK to requested value if P-State switching is supported, or to re-enable P-State switching */
747751 if (clk_mgr_base->clks.p_state_change_support &&
748752 (update_uclk || !clk_mgr_base->clks.prev_p_state_change_support) &&
749− !dc->work_arounds.clock_update_disable_mask.uclk)
753+ !dc->work_arounds.clock_update_disable_mask.uclk) {
754+ if (dc->clk_mgr->dc_mode_softmax_enabled && dc->debug.disable_dc_mode_overwrite)
755+ dcn30_smu_set_hard_max_by_freq(clk_mgr, PPCLK_UCLK,
756+ max((int)dc->clk_mgr->bw_params->dc_mode_softmax_memclk, khz_to_mhz_ceil(clk_mgr_base->clks.dramclk_khz)));
757+
750758 dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_UCLK, khz_to_mhz_ceil(clk_mgr_base->clks.dramclk_khz));
759+ }
751760
752761 if (clk_mgr_base->clks.num_ways != new_clocks->num_ways &&
753762 clk_mgr_base->clks.num_ways > new_clocks->num_ways) {
drivers/gpu/drm/amd/display/dc/core/dc.c+3−0
@@ -1801,6 +1801,9 @@ bool dc_validate_boot_timing(const struct dc *dc, · 1800 unmodified lines
18011801 return false;
18021802 }
18031803
1804+ if (link->dpcd_caps.channel_coding_cap.bits.DP_128b_132b_SUPPORTED)
1805+ return false;
1806+
18041807 if (dc->link_srv->edp_is_ilr_optimization_required(link, crtc_timing)) {
18051808 DC_LOG_EVENT_LINK_TRAINING("Seamless boot disabled to optimize eDP link rate\n");
18061809 return false;
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hpo_dp_link_encoder.c+6−0
@@ -395,6 +395,12 @@ void dcn31_hpo_dp_link_enc_set_throttled_vcp_size( · 394 unmodified lines
395395 x),
396396 25));
397397
398+ // If y rounds up to integer, carry it over to x.
399+ if (y >> 25) {
400+ x += 1;
401+ y = 0;
402+ }
403+
398404 switch (stream_encoder_inst) {
399405 case 0:
400406 REG_SET_2(DP_DPHY_SYM32_VC_RATE_CNTL0, 0,
drivers/gpu/drm/amd/display/dc/dml/dcn31/dcn31_fpu.c+2−0
@@ -291,6 +291,7 @@ static struct _vcs_dpi_soc_bounding_box_st dcn3_15_soc = { · 290 unmodified lines
291291 .do_urgent_latency_adjustment = false,
292292 .urgent_latency_adjustment_fabric_clock_component_us = 0,
293293 .urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
294+ .dispclk_dppclk_vco_speed_mhz = 2400.0,
294295 .num_chans = 4,
295296 .dummy_pstate_latency_us = 10.0
296297 };
@@ -438,6 +439,7 @@ static struct _vcs_dpi_soc_bounding_box_st dcn3_16_soc = { · 141 unmodified lines
438439 .do_urgent_latency_adjustment = false,
439440 .urgent_latency_adjustment_fabric_clock_component_us = 0,
440441 .urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
442+ .dispclk_dppclk_vco_speed_mhz = 2500.0,
441443 };
442444
443445 void dcn31_zero_pipe_dcc_fraction(display_e2e_pipe_params_st *pipes,
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c+9−1
@@ -270,7 +270,7 @@ static void set_usb4_req_bw_req(struct dc_link *link, int req_bw) · 269 unmodified lines
270270
271271 /* Error check whether requested and allocated are equal */
272272 req_bw = requested_bw * (Kbps_TO_Gbps / link->dpia_bw_alloc_config.bw_granularity);
273− if (req_bw == link->dpia_bw_alloc_config.allocated_bw) {
273+ if (req_bw && (req_bw == link->dpia_bw_alloc_config.allocated_bw)) {
274274 DC_LOG_ERROR("%s: Request bw equals to allocated bw for link(%d)\n",
275275 __func__, link->link_index);
276276 }
@@ -341,6 +341,14 @@ bool link_dp_dpia_set_dptx_usb4_bw_alloc_support(struct dc_link *link) · 64 unmodified lines
341341 ret = true;
342342 init_usb4_bw_struct(link);
343343 link->dpia_bw_alloc_config.bw_alloc_enabled = true;
344+
345+ /*
346+ * During DP tunnel creation, CM preallocates BW and reduces estimated BW of other
347+ * DPIA. CM release preallocation only when allocation is complete. Do zero alloc
348+ * to make the CM to release preallocation and update estimated BW correctly for
349+ * all DPIAs per host router
350+ */
351+ link_dp_dpia_allocate_usb4_bandwidth_for_stream(link, 0);
344352 }
345353 }
346354
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c+1−0
@@ -2449,6 +2449,7 @@ static bool dcn20_resource_construct( · 2448 unmodified lines
24492449 dc->caps.post_blend_color_processing = true;
24502450 dc->caps.force_dp_tps4_for_cp2520 = true;
24512451 dc->caps.extended_aux_timeout_support = true;
2452+ dc->caps.dmcub_support = true;
24522453
24532454 /* Color pipeline capabilities */
24542455 dc->caps.color.dpp.dcn_arch = 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t