summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--timerrework.patch218
3 files changed, 229 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5c1efb83f9d..3a5aa428386 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-amd-raven
pkgver = 5.4.v.41
- pkgrel = 2
+ pkgrel = 3
url = https://www.kernel.org/
arch = x86_64
license = GPL2
@@ -17,11 +17,13 @@ pkgbase = linux-amd-raven
source = linux-amd-raven.preset
source = 5012_enable-cpu-optimizations-for-gcc91.patch
source = disable_proc_ac.patch
+ source = timerrework.patch
sha256sums = SKIP
sha256sums = 7971dcdb001c9a13e0f5b29af30ba382cf7d7e0fd13328c6c38297a4b2708ce0
sha256sums = 0ac0cf410b0f3eeaa07d41505613e118ea59e01144e905f2dc0a808379f87e87
sha256sums = fb98e49d7a640e05bf0d3a65ca49d0adb19de7547cb7ffca7a6cbacb1f461f0b
sha256sums = f412d719977af563ca74b41b218977e49672ac93ab7cc96a0833b66abbfb8b10
+ sha256sums = 44e739d674b0909d3dd1edb29ad9c4ab6543c32f488cbbcc30ba0fdc2bf902dc
pkgname = linux-amd-raven
pkgdesc = Linux kernel with working amdgpu for Raven Ridge hardware
diff --git a/PKGBUILD b/PKGBUILD
index 8b654e6deec..50b8e3b7a16 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgbase=linux-amd-raven
_srcname=linux
gitver=v5.4.41
pkgver=5.4.v.41
-pkgrel=2
+pkgrel=3
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
@@ -23,6 +23,8 @@ source=('git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git'
'5012_enable-cpu-optimizations-for-gcc91.patch'
# disable acountingspam patchfile
'disable_proc_ac.patch'
+ # i2c write rework patch
+ 'timerrework.patch'
)
sha256sums=('SKIP'
#config.x86_64
@@ -33,6 +35,8 @@ sha256sums=('SKIP'
'fb98e49d7a640e05bf0d3a65ca49d0adb19de7547cb7ffca7a6cbacb1f461f0b'
#disable acountingspam patchfile
'f412d719977af563ca74b41b218977e49672ac93ab7cc96a0833b66abbfb8b10'
+ #i2c write rework patchfile
+ '44e739d674b0909d3dd1edb29ad9c4ab6543c32f488cbbcc30ba0fdc2bf902dc'
)
_kernelname=${pkgbase#linux}
@@ -61,6 +65,9 @@ prepare() {
# Implement disable acountingspam patchfile
git apply ../disable_proc_ac.patch
+ # Implement i2c write retimers patch
+ git apply ../timerrework.patch
+
# get kernel version
yes "" | make prepare
diff --git a/timerrework.patch b/timerrework.patch
new file mode 100644
index 00000000000..df6e083e2d9
--- /dev/null
+++ b/timerrework.patch
@@ -0,0 +1,218 @@
+Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx>
+Reviewed-by: Hersen Wu <hersenxs.wu@xxxxxxx>
+Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx>
+Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
+Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 67 ++++++++-----------
+ 1 file changed, 29 insertions(+), 38 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+index 70846ae7d854d..7fe6fbf41a7fa 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+@@ -1771,8 +1771,7 @@ static void write_i2c_retimer_setting(
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Based on DP159 specs, APPLY_RX_TX_CHANGE bit in 0x0A
+ * needs to be set to 1 on every 0xA-0xC write.
+@@ -1790,8 +1789,7 @@ static void write_i2c_retimer_setting(
+ pipe_ctx->stream->link->ddc,
+ slave_address, &offset, 1, &value, 1);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+ }
+
+ buffer[0] = offset;
+@@ -1803,8 +1801,7 @@ static void write_i2c_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+ }
+ }
+ }
+@@ -1824,8 +1821,7 @@ static void write_i2c_retimer_setting(
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Based on DP159 specs, APPLY_RX_TX_CHANGE bit in 0x0A
+ * needs to be set to 1 on every 0xA-0xC write.
+@@ -1843,8 +1839,7 @@ static void write_i2c_retimer_setting(
+ pipe_ctx->stream->link->ddc,
+ slave_address, &offset, 1, &value, 1);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+ }
+
+ buffer[0] = offset;
+@@ -1856,8 +1851,7 @@ static void write_i2c_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+ }
+ }
+ }
+@@ -1875,8 +1869,7 @@ static void write_i2c_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x00 to 0x23 */
+ buffer[0] = 0x00;
+@@ -1887,8 +1880,7 @@ static void write_i2c_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0xff to 0x00 */
+ buffer[0] = 0xff;
+@@ -1899,10 +1891,14 @@ static void write_i2c_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ }
++
++ return;
++
++i2c_write_fail:
++ DC_LOG_DEBUG("Set retimer failed");
+ }
+
+ static void write_i2c_default_retimer_setting(
+@@ -1927,8 +1923,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x0A to 0x17 */
+ buffer[0] = 0x0A;
+@@ -1939,8 +1934,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x0B to 0xDA or 0xD8 */
+ buffer[0] = 0x0B;
+@@ -1951,8 +1945,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x0A to 0x17 */
+ buffer[0] = 0x0A;
+@@ -1963,8 +1956,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val= 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x0C to 0x1D or 0x91 */
+ buffer[0] = 0x0C;
+@@ -1975,8 +1967,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x0A to 0x17 */
+ buffer[0] = 0x0A;
+@@ -1987,8 +1978,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+
+ if (is_vga_mode) {
+@@ -2003,8 +1993,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val = 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0x00 to 0x23 */
+ buffer[0] = 0x00;
+@@ -2015,8 +2004,7 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val= 0x%x, i2c_success = %d\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+
+ /* Write offset 0xff to 0x00 */
+ buffer[0] = 0xff;
+@@ -2027,9 +2015,13 @@ static void write_i2c_default_retimer_setting(
+ offset = 0x%x, reg_val= 0x%x, i2c_success = %d end here\n",
+ slave_address, buffer[0], buffer[1], i2c_success?1:0);
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ goto i2c_write_fail;
+ }
++
++ return;
++
++i2c_write_fail:
++ DC_LOG_DEBUG("Set default retimer failed");
+ }
+
+ static void write_i2c_redriver_setting(
+@@ -2058,8 +2050,7 @@ static void write_i2c_redriver_setting(
+ slave_address, buffer[3], buffer[4], buffer[5], buffer[6], i2c_success?1:0);
+
+ if (!i2c_success)
+- /* Write failure */
+- ASSERT(i2c_success);
++ DC_LOG_DEBUG("Set redriver failed");
+ }
+
+ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
+--
+2.20.1