From: Greg Kroah-Hartman Date: Mon, 12 Aug 2024 12:22:07 +0000 (+0200) Subject: 4.19-stable patches X-Git-Tag: v6.1.105~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b14fa03f4329f442308644ceb9b39f7ace791db1;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch drm-mgag200-set-ddc-timeout-in-milliseconds.patch --- diff --git a/queue-4.19/drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch b/queue-4.19/drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch new file mode 100644 index 00000000000..ab997303a35 --- /dev/null +++ b/queue-4.19/drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch @@ -0,0 +1,58 @@ +From e82290a2e0e8ec5e836ecad1ca025021b3855c2d Mon Sep 17 00:00:00 2001 +From: Lucas Stach +Date: Mon, 18 Mar 2024 21:39:23 +0100 +Subject: drm/bridge: analogix_dp: properly handle zero sized AUX transactions + +From: Lucas Stach + +commit e82290a2e0e8ec5e836ecad1ca025021b3855c2d upstream. + +Address only transactions without any data are valid and should not +be flagged as short transactions. Simply return the message size when +no transaction errors occured. + +CC: stable@vger.kernel.org +Signed-off-by: Lucas Stach +Reviewed-by: Robert Foss +Signed-off-by: Robert Foss +Link: https://patchwork.freedesktop.org/patch/msgid/20240318203925.2837689-1-l.stach@pengutronix.de +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c ++++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c +@@ -1109,7 +1109,6 @@ ssize_t analogix_dp_transfer(struct anal + u32 status_reg; + u8 *buffer = msg->buffer; + unsigned int i; +- int num_transferred = 0; + int ret; + + /* Buffer size of AUX CH is 16 bytes */ +@@ -1161,7 +1160,6 @@ ssize_t analogix_dp_transfer(struct anal + reg = buffer[i]; + writel(reg, dp->reg_base + ANALOGIX_DP_BUF_DATA_0 + + 4 * i); +- num_transferred++; + } + } + +@@ -1209,7 +1207,6 @@ ssize_t analogix_dp_transfer(struct anal + reg = readl(dp->reg_base + ANALOGIX_DP_BUF_DATA_0 + + 4 * i); + buffer[i] = (unsigned char)reg; +- num_transferred++; + } + } + +@@ -1226,7 +1223,7 @@ ssize_t analogix_dp_transfer(struct anal + (msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_NATIVE_READ) + msg->reply = DP_AUX_NATIVE_REPLY_ACK; + +- return num_transferred > 0 ? num_transferred : -EBUSY; ++ return msg->size; + + aux_error: + /* if aux err happen, reset aux */ diff --git a/queue-4.19/drm-mgag200-set-ddc-timeout-in-milliseconds.patch b/queue-4.19/drm-mgag200-set-ddc-timeout-in-milliseconds.patch new file mode 100644 index 00000000000..30c701d9c39 --- /dev/null +++ b/queue-4.19/drm-mgag200-set-ddc-timeout-in-milliseconds.patch @@ -0,0 +1,41 @@ +From ecde5db1598aecab54cc392282c15114f526f05f Mon Sep 17 00:00:00 2001 +From: Thomas Zimmermann +Date: Mon, 13 May 2024 14:51:06 +0200 +Subject: drm/mgag200: Set DDC timeout in milliseconds + +From: Thomas Zimmermann + +commit ecde5db1598aecab54cc392282c15114f526f05f upstream. + +Compute the i2c timeout in jiffies from a value in milliseconds. The +original values of 2 jiffies equals 2 milliseconds if HZ has been +configured to a value of 1000. This corresponds to 2.2 milliseconds +used by most other DRM drivers. Update mgag200 accordingly. + +Signed-off-by: Thomas Zimmermann +Reviewed-by: Jocelyn Falempe +Fixes: 414c45310625 ("mgag200: initial g200se driver (v2)") +Cc: Dave Airlie +Cc: Maarten Lankhorst +Cc: Maxime Ripard +Cc: Thomas Zimmermann +Cc: Jocelyn Falempe +Cc: dri-devel@lists.freedesktop.org +Cc: # v3.5+ +Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-2-tzimmermann@suse.de +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/mgag200/mgag200_i2c.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/mgag200/mgag200_i2c.c ++++ b/drivers/gpu/drm/mgag200/mgag200_i2c.c +@@ -133,7 +133,7 @@ struct mga_i2c_chan *mgag200_i2c_create( + i2c->adapter.algo_data = &i2c->bit; + + i2c->bit.udelay = 10; +- i2c->bit.timeout = 2; ++ i2c->bit.timeout = usecs_to_jiffies(2200); + i2c->bit.data = i2c; + i2c->bit.setsda = mga_gpio_setsda; + i2c->bit.setscl = mga_gpio_setscl; diff --git a/queue-4.19/series b/queue-4.19/series index 13bfb535b2a..3721221cda9 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -183,3 +183,5 @@ power-supply-axp288_charger-fix-constant_charge_voltage-writes.patch power-supply-axp288_charger-round-constant_charge_voltage-writes-down.patch tracing-fix-overflow-in-get_free_elt.patch x86-mtrr-check-if-fixed-mtrrs-exist-before-saving-them.patch +drm-bridge-analogix_dp-properly-handle-zero-sized-aux-transactions.patch +drm-mgag200-set-ddc-timeout-in-milliseconds.patch