Skip to content

Commit 17bf3df

Browse files
committed
Merge tag 'drm-fixes-2023-07-28' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Regular scheduled fixes, msm and amdgpu leading the way, with some i915 and a single misc fbdev, all seems fine. fbdev: - remove unused function amdgpu: - gfxhub partition fix - Fix error handling in psp_sw_init() - SMU13 fix - DCN 3.1 fix - DCN 3.2 fix - Fix for display PHY programming sequence - DP MST error handling fix - GFX 9.4.3 fix amdkfd: - GFX11 trap handling fix i915: - Use shmem for dpt objects - Fix an error handling path in igt_write_huge() msm: - display: - Fix to correct the UBWC programming for decoder version 4.3 seen on SM8550 - Add the missing flush and fetch bits for DMA4 and DMA5 SSPPs. - Fix to drop the unused dpu_core_perf_data_bus_id enum from the code - Drop the unused dsi_phy_14nm_17mA_regulators from QCM 2290 DSI cfg. - gpu: - Fix warn splat for newer devices without revn - Remove name/revn for a690.. we shouldn't be populating these for newer devices, for consistency, but it slipped through review - Fix a6xx gpu snapshot BINDLESS_DATA size (was listed in bytes instead of dwords, causing AHB faults on a6xx gen4/a660-family) - Disallow submit with fence id 0" * tag 'drm-fixes-2023-07-28' of git://anongit.freedesktop.org/drm/drm: (22 commits) drm/msm: Disallow submit with fence id 0 drm/amdgpu: Restore HQD persistent state register drm/amd/display: Unlock on error path in dm_handle_mst_sideband_msg_ready_event() drm/amd/display: Exit idle optimizations before attempt to access PHY drm/amd/display: Don't apply FIFO resync W/A if rdivider = 0 drm/amd/display: Guard DCN31 PHYD32CLK logic against chip family drm/amd/smu: use AverageGfxclkFrequency* to replace previous GFX Curr Clock drm/amd: Fix an error handling mistake in psp_sw_init() drm/amdgpu: Fix infinite loop in gfxhub_v1_2_xcc_gart_enable (v2) drm/amdkfd: fix trap handling work around for debugging drm/fb-helper: Remove unused inline function drm_fb_helper_defio_init() drm/i915: Fix an error handling path in igt_write_huge() drm/i915/dpt: Use shmem for dpt objects drm/msm: Fix hw_fence error path cleanup drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb() drm/msm/adreno: Fix snapshot BINDLESS_DATA size drm/msm/a690: Remove revn and name drm/msm/adreno: Fix warn splat for devices without revn drm/msm/dsi: Drop unused regulators from QCM2290 14nm DSI PHY config drm/msm/dpu: drop enum dpu_core_perf_data_bus_id ...
2 parents f24767c + 9a767fa commit 17bf3df

File tree

24 files changed

+88
-55
lines changed

24 files changed

+88
-55
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,11 @@ static int psp_sw_init(void *handle)
498498
return 0;
499499

500500
failed2:
501-
amdgpu_bo_free_kernel(&psp->fw_pri_bo,
502-
&psp->fw_pri_mc_addr, &psp->fw_pri_buf);
503-
failed1:
504501
amdgpu_bo_free_kernel(&psp->fence_buf_bo,
505502
&psp->fence_buf_mc_addr, &psp->fence_buf);
503+
failed1:
504+
amdgpu_bo_free_kernel(&psp->fw_pri_bo,
505+
&psp->fw_pri_mc_addr, &psp->fw_pri_buf);
506506
return ret;
507507
}
508508

drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ MODULE_FIRMWARE("amdgpu/gc_9_4_3_rlc.bin");
4646
#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L
4747

4848
#define GOLDEN_GB_ADDR_CONFIG 0x2a114042
49+
#define CP_HQD_PERSISTENT_STATE_DEFAULT 0xbe05301
4950

5051
struct amdgpu_gfx_ras gfx_v9_4_3_ras;
5152

@@ -1736,7 +1737,7 @@ static int gfx_v9_4_3_xcc_q_fini_register(struct amdgpu_ring *ring,
17361737

17371738
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_IQ_TIMER, 0);
17381739
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_IB_CONTROL, 0);
1739-
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PERSISTENT_STATE, 0);
1740+
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PERSISTENT_STATE, CP_HQD_PERSISTENT_STATE_DEFAULT);
17401741
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_DOORBELL_CONTROL, 0x40000000);
17411742
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_DOORBELL_CONTROL, 0);
17421743
WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_RPTR, 0);

drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,18 +402,15 @@ static void gfxhub_v1_2_xcc_program_invalidation(struct amdgpu_device *adev,
402402
static int gfxhub_v1_2_xcc_gart_enable(struct amdgpu_device *adev,
403403
uint32_t xcc_mask)
404404
{
405-
uint32_t tmp_mask;
406405
int i;
407406

408-
tmp_mask = xcc_mask;
409407
/*
410408
* MC_VM_FB_LOCATION_BASE/TOP is NULL for VF, because they are
411409
* VF copy registers so vbios post doesn't program them, for
412410
* SRIOV driver need to program them
413411
*/
414412
if (amdgpu_sriov_vf(adev)) {
415-
for_each_inst(i, tmp_mask) {
416-
i = ffs(tmp_mask) - 1;
413+
for_each_inst(i, xcc_mask) {
417414
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_BASE,
418415
adev->gmc.vram_start >> 24);
419416
WREG32_SOC15_RLC(GC, GET_INST(GC, i), regMC_VM_FB_LOCATION_TOP,

drivers/gpu/drm/amd/amdkfd/kfd_debug.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ static int kfd_dbg_set_queue_workaround(struct queue *q, bool enable)
302302
if (!q)
303303
return 0;
304304

305-
if (KFD_GC_VERSION(q->device) < IP_VERSION(11, 0, 0) ||
306-
KFD_GC_VERSION(q->device) >= IP_VERSION(12, 0, 0))
305+
if (!kfd_dbg_has_cwsr_workaround(q->device))
307306
return 0;
308307

309308
if (enable && q->properties.is_user_cu_masked)
@@ -349,7 +348,7 @@ int kfd_dbg_set_mes_debug_mode(struct kfd_process_device *pdd)
349348
{
350349
uint32_t spi_dbg_cntl = pdd->spi_dbg_override | pdd->spi_dbg_launch_mode;
351350
uint32_t flags = pdd->process->dbg_flags;
352-
bool sq_trap_en = !!spi_dbg_cntl;
351+
bool sq_trap_en = !!spi_dbg_cntl || !kfd_dbg_has_cwsr_workaround(pdd->dev);
353352

354353
if (!kfd_dbg_is_per_vmid_supported(pdd->dev))
355354
return 0;

drivers/gpu/drm/amd/amdkfd/kfd_debug.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ static inline bool kfd_dbg_is_rlc_restore_supported(struct kfd_node *dev)
100100
KFD_GC_VERSION(dev) == IP_VERSION(10, 1, 1));
101101
}
102102

103+
static inline bool kfd_dbg_has_cwsr_workaround(struct kfd_node *dev)
104+
{
105+
return KFD_GC_VERSION(dev) >= IP_VERSION(11, 0, 0) &&
106+
KFD_GC_VERSION(dev) <= IP_VERSION(11, 0, 3);
107+
}
108+
103109
static inline bool kfd_dbg_has_gws_support(struct kfd_node *dev)
104110
{
105111
if ((KFD_GC_VERSION(dev) == IP_VERSION(9, 0, 1)

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
226226
queue_input.paging = false;
227227
queue_input.tba_addr = qpd->tba_addr;
228228
queue_input.tma_addr = qpd->tma_addr;
229-
queue_input.trap_en = KFD_GC_VERSION(q->device) < IP_VERSION(11, 0, 0) ||
230-
KFD_GC_VERSION(q->device) > IP_VERSION(11, 0, 3);
229+
queue_input.trap_en = !kfd_dbg_has_cwsr_workaround(q->device);
231230
queue_input.skip_process_ctx_clear = qpd->pqm->process->debug_trap_enabled;
232231

233232
queue_type = convert_to_mes_queue_type(q->properties.type);
@@ -1806,8 +1805,7 @@ static int create_queue_cpsch(struct device_queue_manager *dqm, struct queue *q,
18061805
*/
18071806
q->properties.is_evicted = !!qpd->evicted;
18081807
q->properties.is_dbg_wa = qpd->pqm->process->debug_trap_enabled &&
1809-
KFD_GC_VERSION(q->device) >= IP_VERSION(11, 0, 0) &&
1810-
KFD_GC_VERSION(q->device) <= IP_VERSION(11, 0, 3);
1808+
kfd_dbg_has_cwsr_workaround(q->device);
18111809

18121810
if (qd)
18131811
mqd_mgr->restore_mqd(mqd_mgr, &q->mqd, q->mqd_mem_obj, &q->gart_mqd_addr,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ void dm_handle_mst_sideband_msg_ready_event(
706706

707707
if (retry == 3) {
708708
DRM_ERROR("Failed to ack MST event.\n");
709-
return;
709+
break;
710710
}
711711

712712
drm_dp_mst_hpd_irq_send_new_request(&aconnector->mst_mgr);

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,10 +1792,13 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
17921792
hws->funcs.edp_backlight_control(edp_link_with_sink, false);
17931793
}
17941794
/*resume from S3, no vbios posting, no need to power down again*/
1795+
clk_mgr_exit_optimized_pwr_state(dc, dc->clk_mgr);
1796+
17951797
power_down_all_hw_blocks(dc);
17961798
disable_vga_and_power_gate_all_controllers(dc);
17971799
if (edp_link_with_sink && !keep_edp_vdd_on)
17981800
dc->hwss.edp_power_control(edp_link_with_sink, false);
1801+
clk_mgr_optimize_pwr_state(dc, dc->clk_mgr);
17991802
}
18001803
bios_set_scratch_acc_mode_change(dc->ctx->dc_bios, 1);
18011804
}

drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dccg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ static enum phyd32clk_clock_source get_phy_mux_symclk(
8484
struct dcn_dccg *dccg_dcn,
8585
enum phyd32clk_clock_source src)
8686
{
87-
if (dccg_dcn->base.ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
87+
if (dccg_dcn->base.ctx->asic_id.chip_family == FAMILY_YELLOW_CARP &&
88+
dccg_dcn->base.ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
8889
if (src == PHYD32CLKC)
8990
src = PHYD32CLKF;
9091
if (src == PHYD32CLKD)

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dccg.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ static void dccg32_trigger_dio_fifo_resync(
4949
uint32_t dispclk_rdivider_value = 0;
5050

5151
REG_GET(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_RDIVIDER, &dispclk_rdivider_value);
52-
REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_WDIVIDER, dispclk_rdivider_value);
52+
53+
/* Not valid for the WDIVIDER to be set to 0 */
54+
if (dispclk_rdivider_value != 0)
55+
REG_UPDATE(DENTIST_DISPCLK_CNTL, DENTIST_DISPCLK_WDIVIDER, dispclk_rdivider_value);
5356
}
5457

5558
static void dccg32_get_pixel_rate_div(

0 commit comments

Comments
 (0)