From 9046012f1f1c8d0d9f39fc3ab649dcd30a9dee3a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 27 Jan 2024 15:41:54 -0800 Subject: [PATCH] 6.6-stable patches added patches: drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch drm-amd-display-fix-variable-deferencing-before-null-check-in-edp_setup_replay.patch drm-amd-display-port-dentist-hang-and-tdr-fixes-to-otg-disable-w-a.patch drm-amdgpu-correct-the-cu-count-for-gfx-v11.patch drm-amdgpu-pm-fix-the-power-source-flag-error.patch drm-bridge-nxp-ptn3460-simplify-some-error-checking.patch revert-drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch --- ...e-returned-error-code-with-legacy-dp.patch | 44 ++++++++++ ...dsc-check-in-link_set_dsc_pps_packet.patch | 50 +++++++++++ ...link_-read_dpcd-write_dpcd-functions.patch | 53 ++++++++++++ ...efore-null-check-in-edp_setup_replay.patch | 63 ++++++++++++++ ...ang-and-tdr-fixes-to-otg-disable-w-a.patch | 83 ++++++++++++++++++ ...gpu-correct-the-cu-count-for-gfx-v11.patch | 33 ++++++++ ...u-pm-fix-the-power-source-flag-error.patch | 84 +++++++++++++++++++ ...ptn3460-simplify-some-error-checking.patch | 62 ++++++++++++++ ...dwidth-validation-failure-on-dcn-2.1.patch | 46 ++++++++++ queue-6.6/series | 9 ++ 10 files changed, 527 insertions(+) create mode 100644 queue-6.6/drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch create mode 100644 queue-6.6/drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch create mode 100644 queue-6.6/drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch create mode 100644 queue-6.6/drm-amd-display-fix-variable-deferencing-before-null-check-in-edp_setup_replay.patch create mode 100644 queue-6.6/drm-amd-display-port-dentist-hang-and-tdr-fixes-to-otg-disable-w-a.patch create mode 100644 queue-6.6/drm-amdgpu-correct-the-cu-count-for-gfx-v11.patch create mode 100644 queue-6.6/drm-amdgpu-pm-fix-the-power-source-flag-error.patch create mode 100644 queue-6.6/drm-bridge-nxp-ptn3460-simplify-some-error-checking.patch create mode 100644 queue-6.6/revert-drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch diff --git a/queue-6.6/drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch b/queue-6.6/drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch new file mode 100644 index 00000000000..1314fd8ea96 --- /dev/null +++ b/queue-6.6/drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch @@ -0,0 +1,44 @@ +From bfe79f5fff1300d96203383582b078c7b0aec80a Mon Sep 17 00:00:00 2001 +From: Wayne Lin +Date: Tue, 2 Jan 2024 14:20:37 +0800 +Subject: drm/amd/display: Align the returned error code with legacy DP + +From: Wayne Lin + +commit bfe79f5fff1300d96203383582b078c7b0aec80a upstream. + +[Why] +For usb4 connector, AUX transaction is handled by dmub utilizing a differnt +code path comparing to legacy DP connector. If the usb4 DP connector is +disconnected, AUX access will report EBUSY and cause igt@kms_dp_aux_dev +fail. + +[How] +Align the error code with the one reported by legacy DP as EIO. + +Cc: Mario Limonciello +Cc: Alex Deucher +Cc: stable@vger.kernel.org +Acked-by: Alex Hung +Signed-off-by: Wayne Lin +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +@@ -956,6 +956,11 @@ int dm_helper_dmub_aux_transfer_sync( + struct aux_payload *payload, + enum aux_return_code_type *operation_result) + { ++ if (!link->hpd_status) { ++ *operation_result = AUX_RET_ERROR_HPD_DISCON; ++ return -1; ++ } ++ + return amdgpu_dm_process_dmub_aux_transfer_sync(ctx, link->link_index, payload, + operation_result); + } diff --git a/queue-6.6/drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch b/queue-6.6/drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch new file mode 100644 index 00000000000..d5915f02562 --- /dev/null +++ b/queue-6.6/drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch @@ -0,0 +1,50 @@ +From 3bb9b1f958c3d986ed90a3ff009f1e77e9553207 Mon Sep 17 00:00:00 2001 +From: Srinivasan Shanmugam +Date: Wed, 10 Jan 2024 20:58:35 +0530 +Subject: drm/amd/display: Fix late derefrence 'dsc' check in 'link_set_dsc_pps_packet()' + +From: Srinivasan Shanmugam + +commit 3bb9b1f958c3d986ed90a3ff009f1e77e9553207 upstream. + +In link_set_dsc_pps_packet(), 'struct display_stream_compressor *dsc' +was dereferenced in a DC_LOGGER_INIT(dsc->ctx->logger); before the 'dsc' +NULL pointer check. + +Fixes the below: +drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dpms.c:905 link_set_dsc_pps_packet() warn: variable dereferenced before check 'dsc' (see line 903) + +Cc: stable@vger.kernel.org +Cc: Aurabindo Pillai +Cc: Rodrigo Siqueira +Cc: Hamza Mahfooz +Cc: Wenjing Liu +Cc: Qingqing Zhuo +Signed-off-by: Srinivasan Shanmugam +Reviewed-by: Aurabindo Pillai +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c ++++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c +@@ -873,11 +873,15 @@ bool link_set_dsc_pps_packet(struct pipe + { + struct display_stream_compressor *dsc = pipe_ctx->stream_res.dsc; + struct dc_stream_state *stream = pipe_ctx->stream; +- DC_LOGGER_INIT(dsc->ctx->logger); + +- if (!pipe_ctx->stream->timing.flags.DSC || !dsc) ++ if (!pipe_ctx->stream->timing.flags.DSC) ++ return false; ++ ++ if (!dsc) + return false; + ++ DC_LOGGER_INIT(dsc->ctx->logger); ++ + if (enable) { + struct dsc_config dsc_cfg; + uint8_t dsc_packed_pps[128]; diff --git a/queue-6.6/drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch b/queue-6.6/drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch new file mode 100644 index 00000000000..5cc4c08fe4e --- /dev/null +++ b/queue-6.6/drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch @@ -0,0 +1,53 @@ +From a58371d632ebab9ea63f10893a6b6731196b6f8d Mon Sep 17 00:00:00 2001 +From: Srinivasan Shanmugam +Date: Wed, 17 Jan 2024 08:41:52 +0530 +Subject: drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions + +From: Srinivasan Shanmugam + +commit a58371d632ebab9ea63f10893a6b6731196b6f8d upstream. + +The 'status' variable in 'core_link_read_dpcd()' & +'core_link_write_dpcd()' was uninitialized. + +Thus, initializing 'status' variable to 'DC_ERROR_UNEXPECTED' by default. + +Fixes the below: +drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dpcd.c:226 core_link_read_dpcd() error: uninitialized symbol 'status'. +drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dpcd.c:248 core_link_write_dpcd() error: uninitialized symbol 'status'. + +Cc: stable@vger.kernel.org +Cc: Jerry Zuo +Cc: Jun Lei +Cc: Wayne Lin +Cc: Aurabindo Pillai +Cc: Rodrigo Siqueira +Cc: Hamza Mahfooz +Signed-off-by: Srinivasan Shanmugam +Reviewed-by: Rodrigo Siqueira +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c ++++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dpcd.c +@@ -205,7 +205,7 @@ enum dc_status core_link_read_dpcd( + uint32_t extended_size; + /* size of the remaining partitioned address space */ + uint32_t size_left_to_read; +- enum dc_status status; ++ enum dc_status status = DC_ERROR_UNEXPECTED; + /* size of the next partition to be read from */ + uint32_t partition_size; + uint32_t data_index = 0; +@@ -234,7 +234,7 @@ enum dc_status core_link_write_dpcd( + { + uint32_t partition_size; + uint32_t data_index = 0; +- enum dc_status status; ++ enum dc_status status = DC_ERROR_UNEXPECTED; + + while (size) { + partition_size = dpcd_get_next_partition_size(address, size); diff --git a/queue-6.6/drm-amd-display-fix-variable-deferencing-before-null-check-in-edp_setup_replay.patch b/queue-6.6/drm-amd-display-fix-variable-deferencing-before-null-check-in-edp_setup_replay.patch new file mode 100644 index 00000000000..8635eff0d12 --- /dev/null +++ b/queue-6.6/drm-amd-display-fix-variable-deferencing-before-null-check-in-edp_setup_replay.patch @@ -0,0 +1,63 @@ +From 7073934f5d73f8b53308963cee36f0d389ea857c Mon Sep 17 00:00:00 2001 +From: Srinivasan Shanmugam +Date: Mon, 8 Jan 2024 21:20:28 +0530 +Subject: drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay() + +From: Srinivasan Shanmugam + +commit 7073934f5d73f8b53308963cee36f0d389ea857c upstream. + +In edp_setup_replay(), 'struct dc *dc' & 'struct dmub_replay *replay' +was dereferenced before the pointer 'link' & 'replay' NULL check. + +Fixes the below: +drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:947 edp_setup_replay() warn: variable dereferenced before check 'link' (see line 933) + +Cc: stable@vger.kernel.org +Cc: Bhawanpreet Lakha +Cc: Harry Wentland +Cc: Rodrigo Siqueira +Cc: Aurabindo Pillai +Cc: Alex Deucher +Signed-off-by: Srinivasan Shanmugam +Reviewed-by: Aurabindo Pillai +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c | 11 ++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c ++++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +@@ -920,8 +920,8 @@ bool edp_get_replay_state(const struct d + bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream) + { + /* To-do: Setup Replay */ +- struct dc *dc = link->ctx->dc; +- struct dmub_replay *replay = dc->res_pool->replay; ++ struct dc *dc; ++ struct dmub_replay *replay; + int i; + unsigned int panel_inst; + struct replay_context replay_context = { 0 }; +@@ -937,6 +937,10 @@ bool edp_setup_replay(struct dc_link *li + if (!link) + return false; + ++ dc = link->ctx->dc; ++ ++ replay = dc->res_pool->replay; ++ + if (!replay) + return false; + +@@ -965,8 +969,7 @@ bool edp_setup_replay(struct dc_link *li + + replay_context.line_time_in_ns = lineTimeInNs; + +- if (replay) +- link->replay_settings.replay_feature_enabled = ++ link->replay_settings.replay_feature_enabled = + replay->funcs->replay_copy_settings(replay, link, &replay_context, panel_inst); + if (link->replay_settings.replay_feature_enabled) { + diff --git a/queue-6.6/drm-amd-display-port-dentist-hang-and-tdr-fixes-to-otg-disable-w-a.patch b/queue-6.6/drm-amd-display-port-dentist-hang-and-tdr-fixes-to-otg-disable-w-a.patch new file mode 100644 index 00000000000..8af0a07651b --- /dev/null +++ b/queue-6.6/drm-amd-display-port-dentist-hang-and-tdr-fixes-to-otg-disable-w-a.patch @@ -0,0 +1,83 @@ +From 4b56f7d47be87cde5f368b67bc7fac53a2c3e8d2 Mon Sep 17 00:00:00 2001 +From: Nicholas Kazlauskas +Date: Fri, 15 Dec 2023 11:01:42 -0500 +Subject: drm/amd/display: Port DENTIST hang and TDR fixes to OTG disable W/A + +From: Nicholas Kazlauskas + +commit 4b56f7d47be87cde5f368b67bc7fac53a2c3e8d2 upstream. + +[Why] +We can experience DENTIST hangs during optimize_bandwidth or TDRs if +FIFO is toggled and hangs. + +[How] +Port the DCN35 fixes to DCN314. + +Cc: Mario Limonciello +Cc: Alex Deucher +Cc: stable@vger.kernel.org +Reviewed-by: Charlene Liu +Acked-by: Alex Hung +Signed-off-by: Nicholas Kazlauskas +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c | 21 ++++------ + 1 file changed, 9 insertions(+), 12 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c ++++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c +@@ -131,30 +131,27 @@ static int dcn314_get_active_display_cnt + return display_count; + } + +-static void dcn314_disable_otg_wa(struct clk_mgr *clk_mgr_base, struct dc_state *context, bool disable) ++static void dcn314_disable_otg_wa(struct clk_mgr *clk_mgr_base, struct dc_state *context, ++ bool safe_to_lower, bool disable) + { + struct dc *dc = clk_mgr_base->ctx->dc; + int i; + + for (i = 0; i < dc->res_pool->pipe_count; ++i) { +- struct pipe_ctx *pipe = &dc->current_state->res_ctx.pipe_ctx[i]; ++ struct pipe_ctx *pipe = safe_to_lower ++ ? &context->res_ctx.pipe_ctx[i] ++ : &dc->current_state->res_ctx.pipe_ctx[i]; + + if (pipe->top_pipe || pipe->prev_odm_pipe) + continue; + if (pipe->stream && (pipe->stream->dpms_off || dc_is_virtual_signal(pipe->stream->signal))) { +- struct stream_encoder *stream_enc = pipe->stream_res.stream_enc; +- + if (disable) { +- if (stream_enc && stream_enc->funcs->disable_fifo) +- pipe->stream_res.stream_enc->funcs->disable_fifo(stream_enc); ++ if (pipe->stream_res.tg && pipe->stream_res.tg->funcs->immediate_disable_crtc) ++ pipe->stream_res.tg->funcs->immediate_disable_crtc(pipe->stream_res.tg); + +- pipe->stream_res.tg->funcs->immediate_disable_crtc(pipe->stream_res.tg); + reset_sync_context_for_pipe(dc, context, i); + } else { + pipe->stream_res.tg->funcs->enable_crtc(pipe->stream_res.tg); +- +- if (stream_enc && stream_enc->funcs->enable_fifo) +- pipe->stream_res.stream_enc->funcs->enable_fifo(stream_enc); + } + } + } +@@ -252,11 +249,11 @@ void dcn314_update_clocks(struct clk_mgr + } + + if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) { +- dcn314_disable_otg_wa(clk_mgr_base, context, true); ++ dcn314_disable_otg_wa(clk_mgr_base, context, safe_to_lower, true); + + clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz; + dcn314_smu_set_dispclk(clk_mgr, clk_mgr_base->clks.dispclk_khz); +- dcn314_disable_otg_wa(clk_mgr_base, context, false); ++ dcn314_disable_otg_wa(clk_mgr_base, context, safe_to_lower, false); + + update_dispclk = true; + } diff --git a/queue-6.6/drm-amdgpu-correct-the-cu-count-for-gfx-v11.patch b/queue-6.6/drm-amdgpu-correct-the-cu-count-for-gfx-v11.patch new file mode 100644 index 00000000000..6558b6f6a44 --- /dev/null +++ b/queue-6.6/drm-amdgpu-correct-the-cu-count-for-gfx-v11.patch @@ -0,0 +1,33 @@ +From f4a94dbb6dc0bed10a5fc63718d00f1de45b12c0 Mon Sep 17 00:00:00 2001 +From: Likun Gao +Date: Fri, 5 Jan 2024 17:33:34 +0800 +Subject: drm/amdgpu: correct the cu count for gfx v11 + +From: Likun Gao + +commit f4a94dbb6dc0bed10a5fc63718d00f1de45b12c0 upstream. + +Correct the algorithm of active CU to skip disabled +sa for gfx v11. + +Signed-off-by: Likun Gao +Reviewed-by: Hawking Zhang +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +@@ -6353,6 +6353,9 @@ static int gfx_v11_0_get_cu_info(struct + mutex_lock(&adev->grbm_idx_mutex); + for (i = 0; i < adev->gfx.config.max_shader_engines; i++) { + for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) { ++ bitmap = i * adev->gfx.config.max_sh_per_se + j; ++ if (!((gfx_v11_0_get_sa_active_bitmap(adev) >> bitmap) & 1)) ++ continue; + mask = 1; + counter = 0; + gfx_v11_0_select_se_sh(adev, i, j, 0xffffffff, 0); diff --git a/queue-6.6/drm-amdgpu-pm-fix-the-power-source-flag-error.patch b/queue-6.6/drm-amdgpu-pm-fix-the-power-source-flag-error.patch new file mode 100644 index 00000000000..a04ccb9622d --- /dev/null +++ b/queue-6.6/drm-amdgpu-pm-fix-the-power-source-flag-error.patch @@ -0,0 +1,84 @@ +From ca1ffb174f16b699c536734fc12a4162097c49f4 Mon Sep 17 00:00:00 2001 +From: Ma Jun +Date: Wed, 17 Jan 2024 14:35:29 +0800 +Subject: drm/amdgpu/pm: Fix the power source flag error + +From: Ma Jun + +commit ca1ffb174f16b699c536734fc12a4162097c49f4 upstream. + +The power source flag should be updated when +[1] System receives an interrupt indicating that the power source +has changed. +[2] System resumes from suspend or runtime suspend + +Signed-off-by: Ma Jun +Reviewed-by: Lijo Lazar +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 13 +++---------- + drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 ++ + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 ++ + 3 files changed, 7 insertions(+), 10 deletions(-) + +--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c ++++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +@@ -24,6 +24,7 @@ + + #include + #include ++#include + #include + + #include "amdgpu.h" +@@ -741,16 +742,8 @@ static int smu_late_init(void *handle) + * handle the switch automatically. Driver involvement + * is unnecessary. + */ +- if (!smu->dc_controlled_by_gpio) { +- ret = smu_set_power_source(smu, +- adev->pm.ac_power ? SMU_POWER_SOURCE_AC : +- SMU_POWER_SOURCE_DC); +- if (ret) { +- dev_err(adev->dev, "Failed to switch to %s mode!\n", +- adev->pm.ac_power ? "AC" : "DC"); +- return ret; +- } +- } ++ adev->pm.ac_power = power_supply_is_system_supplied() > 0; ++ smu_set_ac_dc(smu); + + if ((adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 1)) || + (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 3))) +--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c ++++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +@@ -1441,10 +1441,12 @@ static int smu_v11_0_irq_process(struct + case 0x3: + dev_dbg(adev->dev, "Switched to AC mode!\n"); + schedule_work(&smu->interrupt_work); ++ adev->pm.ac_power = true; + break; + case 0x4: + dev_dbg(adev->dev, "Switched to DC mode!\n"); + schedule_work(&smu->interrupt_work); ++ adev->pm.ac_power = false; + break; + case 0x7: + /* +--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c ++++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c +@@ -1377,10 +1377,12 @@ static int smu_v13_0_irq_process(struct + case 0x3: + dev_dbg(adev->dev, "Switched to AC mode!\n"); + smu_v13_0_ack_ac_dc_interrupt(smu); ++ adev->pm.ac_power = true; + break; + case 0x4: + dev_dbg(adev->dev, "Switched to DC mode!\n"); + smu_v13_0_ack_ac_dc_interrupt(smu); ++ adev->pm.ac_power = false; + break; + case 0x7: + /* diff --git a/queue-6.6/drm-bridge-nxp-ptn3460-simplify-some-error-checking.patch b/queue-6.6/drm-bridge-nxp-ptn3460-simplify-some-error-checking.patch new file mode 100644 index 00000000000..508d06dcfc0 --- /dev/null +++ b/queue-6.6/drm-bridge-nxp-ptn3460-simplify-some-error-checking.patch @@ -0,0 +1,62 @@ +From 28d3d0696688154cc04983f343011d07bf0508e4 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Wed, 6 Dec 2023 18:05:15 +0300 +Subject: drm/bridge: nxp-ptn3460: simplify some error checking + +From: Dan Carpenter + +commit 28d3d0696688154cc04983f343011d07bf0508e4 upstream. + +The i2c_master_send/recv() functions return negative error codes or +they return "len" on success. So the error handling here can be written +as just normal checks for "if (ret < 0) return ret;". No need to +complicate things. + +Btw, in this code the "len" parameter can never be zero, but even if +it were, then I feel like this would still be the best way to write it. + +Fixes: 914437992876 ("drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking") +Suggested-by: Neil Armstrong +Signed-off-by: Dan Carpenter +Reviewed-by: Robert Foss +Signed-off-by: Robert Foss +Link: https://patchwork.freedesktop.org/patch/msgid/04242630-42d8-4920-8c67-24ac9db6b3c9@moroto.mountain +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/bridge/nxp-ptn3460.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/gpu/drm/bridge/nxp-ptn3460.c ++++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c +@@ -54,15 +54,15 @@ static int ptn3460_read_bytes(struct ptn + int ret; + + ret = i2c_master_send(ptn_bridge->client, &addr, 1); +- if (ret <= 0) { ++ if (ret < 0) { + DRM_ERROR("Failed to send i2c command, ret=%d\n", ret); +- return ret ?: -EIO; ++ return ret; + } + + ret = i2c_master_recv(ptn_bridge->client, buf, len); +- if (ret != len) { ++ if (ret < 0) { + DRM_ERROR("Failed to recv i2c data, ret=%d\n", ret); +- return ret < 0 ? ret : -EIO; ++ return ret; + } + + return 0; +@@ -78,9 +78,9 @@ static int ptn3460_write_byte(struct ptn + buf[1] = val; + + ret = i2c_master_send(ptn_bridge->client, buf, ARRAY_SIZE(buf)); +- if (ret != ARRAY_SIZE(buf)) { ++ if (ret < 0) { + DRM_ERROR("Failed to send i2c command, ret=%d\n", ret); +- return ret < 0 ? ret : -EIO; ++ return ret; + } + + return 0; diff --git a/queue-6.6/revert-drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch b/queue-6.6/revert-drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch new file mode 100644 index 00000000000..cd161bd0c61 --- /dev/null +++ b/queue-6.6/revert-drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch @@ -0,0 +1,46 @@ +From c2ab9ce0ee7225fc05f58a6671c43b8a3684f530 Mon Sep 17 00:00:00 2001 +From: Ivan Lipski +Date: Fri, 5 Jan 2024 19:40:50 -0500 +Subject: Revert "drm/amd/display: fix bandwidth validation failure on DCN 2.1" + +From: Ivan Lipski + +commit c2ab9ce0ee7225fc05f58a6671c43b8a3684f530 upstream. + +This commit causes dmesg-warn on several IGT tests on DCN 3.1.6: *ERROR* +link_enc_cfg_validate: Invalid link encoder assignments - 0x1c + +Affected IGT tests include: +- amdgpu/[amd_assr|amd_plane|amd_hotplug] +- kms_atomic +- kms_color +- kms_flip +- kms_properties +- kms_universal_plane + +and some other tests + +This reverts commit 3a0fa3bc245ef92838a8296e0055569b8dff94c4. + +Cc: Melissa Wen +Cc: Hamza Mahfooz +Reviewed-by: Rodrigo Siqueira +Signed-off-by: Ivan Lipski +Signed-off-by: Rodrigo Siqueira +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -10400,7 +10400,7 @@ static int amdgpu_dm_atomic_check(struct + DRM_DEBUG_DRIVER("drm_dp_mst_atomic_check() failed\n"); + goto fail; + } +- status = dc_validate_global_state(dc, dm_state->context, false); ++ status = dc_validate_global_state(dc, dm_state->context, true); + if (status != DC_OK) { + DRM_DEBUG_DRIVER("DC global validation failure: %s (%d)", + dc_status_to_str(status), status); diff --git a/queue-6.6/series b/queue-6.6/series index 4ba887ec6fa..27cc82de5bb 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -261,3 +261,12 @@ drm-virtio-disable-damage-clipping-if-fb-changed-since-last-page-flip.patch drm-allow-drivers-to-indicate-the-damage-helpers-to-ignore-damage-clips.patch drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch drm-amd-display-disable-psr-su-on-parade-0803-tcon-again.patch +revert-drm-amd-display-fix-bandwidth-validation-failure-on-dcn-2.1.patch +drm-bridge-nxp-ptn3460-simplify-some-error-checking.patch +drm-amdgpu-correct-the-cu-count-for-gfx-v11.patch +drm-amd-display-fix-variable-deferencing-before-null-check-in-edp_setup_replay.patch +drm-amd-display-port-dentist-hang-and-tdr-fixes-to-otg-disable-w-a.patch +drm-amd-display-align-the-returned-error-code-with-legacy-dp.patch +drm-amd-display-fix-late-derefrence-dsc-check-in-link_set_dsc_pps_packet.patch +drm-amdgpu-pm-fix-the-power-source-flag-error.patch +drm-amd-display-fix-uninitialized-variable-usage-in-core_link_-read_dpcd-write_dpcd-functions.patch -- 2.47.3