From: Greg Kroah-Hartman Date: Sun, 22 Mar 2026 07:27:12 +0000 (+0100) Subject: 6.12-stable patches X-Git-Tag: v6.1.167~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c544f4fd2b90fd158879194091592f1963b50711;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: drm-i915-psr-compute-psr-entry_setup_frames-into-intel_crtc_state.patch hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch hwmon-pmbus-mp2975-add-error-check-for-pmbus_read_word_data-return-value.patch --- diff --git a/queue-6.12/drm-i915-psr-compute-psr-entry_setup_frames-into-intel_crtc_state.patch b/queue-6.12/drm-i915-psr-compute-psr-entry_setup_frames-into-intel_crtc_state.patch new file mode 100644 index 0000000000..c869e2477c --- /dev/null +++ b/queue-6.12/drm-i915-psr-compute-psr-entry_setup_frames-into-intel_crtc_state.patch @@ -0,0 +1,64 @@ +From 7caac659a837af9fd4cad85be851982b88859484 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jouni=20H=C3=B6gander?= +Date: Thu, 12 Mar 2026 10:37:10 +0200 +Subject: drm/i915/psr: Compute PSR entry_setup_frames into intel_crtc_state +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jouni Högander + +commit 7caac659a837af9fd4cad85be851982b88859484 upstream. + +PSR entry_setup_frames is currently computed directly into struct +intel_dp:intel_psr:entry_setup_frames. This causes a problem if mode change +gets rejected after PSR compute config: Psr_entry_setup_frames computed for +this rejected state is in intel_dp:intel_psr:entry_setup_frame. Fix this by +computing it into intel_crtc_state and copy the value into +intel_dp:intel_psr:entry_setup_frames on PSR enable. + +Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier") +Cc: Mika Kahola +Cc: # v6.8+ +Signed-off-by: Jouni Högander +Reviewed-by: Suraj Kandpal +Link: https://patch.msgid.link/20260312083710.1593781-3-jouni.hogander@intel.com +(cherry picked from commit 8c229b4aa00262c13787982e998c61c0783285e0) +Signed-off-by: Joonas Lahtinen +[ dropped intel_psr_needs_wa_18037818876 hunk and adjusted surrounding context ] +Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/i915/display/intel_display_types.h | 1 + + drivers/gpu/drm/i915/display/intel_psr.c | 3 ++- + 2 files changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/display/intel_display_types.h ++++ b/drivers/gpu/drm/i915/display/intel_display_types.h +@@ -1218,6 +1218,7 @@ struct intel_crtc_state { + bool wm_level_disabled; + u32 dc3co_exitline; + u16 su_y_granularity; ++ u8 entry_setup_frames; + + /* + * Frequence the dpll for the port should run at. Differs from the +--- a/drivers/gpu/drm/i915/display/intel_psr.c ++++ b/drivers/gpu/drm/i915/display/intel_psr.c +@@ -1571,7 +1571,7 @@ static bool _psr_compute_config(struct i + entry_setup_frames = intel_psr_entry_setup_frames(intel_dp, adjusted_mode); + + if (entry_setup_frames >= 0) { +- intel_dp->psr.entry_setup_frames = entry_setup_frames; ++ crtc_state->entry_setup_frames = entry_setup_frames; + } else { + drm_dbg_kms(display->drm, + "PSR condition failed: PSR setup timing not met\n"); +@@ -1979,6 +1979,7 @@ static void intel_psr_enable_locked(stru + intel_dp->psr.psr2_sel_fetch_cff_enabled = false; + intel_dp->psr.req_psr2_sdp_prior_scanline = + crtc_state->req_psr2_sdp_prior_scanline; ++ intel_dp->psr.entry_setup_frames = crtc_state->entry_setup_frames; + + if (!psr_interrupt_error_check(intel_dp)) + return; diff --git a/queue-6.12/hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch b/queue-6.12/hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch new file mode 100644 index 0000000000..3029eca31b --- /dev/null +++ b/queue-6.12/hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch @@ -0,0 +1,44 @@ +From 86259558e422b250aa6aa57163a6d759074573f5 Mon Sep 17 00:00:00 2001 +From: Sanman Pradhan +Date: Wed, 18 Mar 2026 19:40:19 +0000 +Subject: hwmon: (pmbus/isl68137) Fix unchecked return value and use sysfs_emit() + +From: Sanman Pradhan + +commit 86259558e422b250aa6aa57163a6d759074573f5 upstream. + +isl68137_avs_enable_show_page() uses the return value of +pmbus_read_byte_data() without checking for errors. If the I2C transaction +fails, a negative error code is passed through bitwise operations, +producing incorrect output. + +Add an error check to propagate the return value if it is negative. +Additionally, modernize the callback by replacing sprintf() +with sysfs_emit(). + +Fixes: 038a9c3d1e424 ("hwmon: (pmbus/isl68137) Add driver for Intersil ISL68137 PWM Controller") +Cc: stable@vger.kernel.org +Signed-off-by: Sanman Pradhan +Link: https://lore.kernel.org/r/20260318193952.47908-2-sanman.pradhan@hpe.com +Signed-off-by: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hwmon/pmbus/isl68137.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/hwmon/pmbus/isl68137.c ++++ b/drivers/hwmon/pmbus/isl68137.c +@@ -80,8 +80,11 @@ static ssize_t isl68137_avs_enable_show_ + { + int val = pmbus_read_byte_data(client, page, PMBUS_OPERATION); + +- return sprintf(buf, "%d\n", +- (val & ISL68137_VOUT_AVS) == ISL68137_VOUT_AVS ? 1 : 0); ++ if (val < 0) ++ return val; ++ ++ return sysfs_emit(buf, "%d\n", ++ (val & ISL68137_VOUT_AVS) == ISL68137_VOUT_AVS); + } + + static ssize_t isl68137_avs_enable_store_page(struct i2c_client *client, diff --git a/queue-6.12/hwmon-pmbus-mp2975-add-error-check-for-pmbus_read_word_data-return-value.patch b/queue-6.12/hwmon-pmbus-mp2975-add-error-check-for-pmbus_read_word_data-return-value.patch new file mode 100644 index 0000000000..6f6c19559e --- /dev/null +++ b/queue-6.12/hwmon-pmbus-mp2975-add-error-check-for-pmbus_read_word_data-return-value.patch @@ -0,0 +1,38 @@ +From 19d4b9c8a136704d5f2544e7ac550f27918a5004 Mon Sep 17 00:00:00 2001 +From: Sanman Pradhan +Date: Tue, 17 Mar 2026 17:37:17 +0000 +Subject: hwmon: (pmbus/mp2975) Add error check for pmbus_read_word_data() return value + +From: Sanman Pradhan + +commit 19d4b9c8a136704d5f2544e7ac550f27918a5004 upstream. + +mp2973_read_word_data() XORs the return value of pmbus_read_word_data() +with PB_STATUS_POWER_GOOD_N without first checking for errors. If the I2C +transaction fails, a negative error code is XORed with the constant, +producing a corrupted value that is returned as valid status data instead +of propagating the error. + +Add the missing error check before modifying the return value. + +Fixes: acda945afb465 ("hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD") +Cc: stable@vger.kernel.org +Signed-off-by: Sanman Pradhan +Link: https://lore.kernel.org/r/20260317173308.382545-3-sanman.pradhan@hpe.com +Signed-off-by: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hwmon/pmbus/mp2975.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/hwmon/pmbus/mp2975.c ++++ b/drivers/hwmon/pmbus/mp2975.c +@@ -313,6 +313,8 @@ static int mp2973_read_word_data(struct + case PMBUS_STATUS_WORD: + /* MP2973 & MP2971 return PGOOD instead of PB_STATUS_POWER_GOOD_N. */ + ret = pmbus_read_word_data(client, page, phase, reg); ++ if (ret < 0) ++ return ret; + ret ^= PB_STATUS_POWER_GOOD_N; + break; + case PMBUS_OT_FAULT_LIMIT: diff --git a/queue-6.12/series b/queue-6.12/series index 62bb07a345..92ecc1059a 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -431,3 +431,6 @@ nfnetlink_osf-validate-individual-option-lengths-in-.patch net-mvpp2-guard-flow-control-update-with-global_tx_f.patch net-dsa-bcm_sf2-fix-missing-clk_disable_unprepare-in.patch icmp-fix-null-pointer-dereference-in-icmp_tag_valida.patch +hwmon-pmbus-mp2975-add-error-check-for-pmbus_read_word_data-return-value.patch +hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch +drm-i915-psr-compute-psr-entry_setup_frames-into-intel_crtc_state.patch