[arch-commits] Commit in linux-hardened/trunk (3 files)

Levente Polyak anthraxx at archlinux.org
Wed Dec 30 22:08:37 UTC 2020


    Date: Wednesday, December 30, 2020 @ 22:08:37
  Author: anthraxx
Revision: 405126

upgpkg: linux-hardened 5.10.4.a-1

Added:
  linux-hardened/trunk/drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch
Modified:
  linux-hardened/trunk/PKGBUILD
Deleted:
  linux-hardened/trunk/sphinx-workaround.patch

----------------------------------------------------------+
 PKGBUILD                                                 |   15 -
 drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch |  111 +++++++++++++
 sphinx-workaround.patch                                  |   13 -
 3 files changed, 118 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-30 21:26:20 UTC (rev 405125)
+++ PKGBUILD	2020-12-30 22:08:37 UTC (rev 405126)
@@ -4,7 +4,7 @@
 # Contributor: Thomas Baechler <thomas at archlinux.org>
 
 pkgbase=linux-hardened
-pkgver=5.9.16.a
+pkgver=5.10.4.a
 pkgrel=1
 pkgdesc='Security-Hardened Linux'
 url='https://github.com/anthraxx/linux-hardened'
@@ -11,7 +11,7 @@
 arch=(x86_64)
 license=(GPL2)
 makedepends=(
-  bc kmod libelf
+  bc kmod libelf pahole cpio perl tar xz
   xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick
 )
 options=('!strip')
@@ -20,20 +20,19 @@
   https://www.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/${_srcname}.tar.{xz,sign}
   https://github.com/anthraxx/${pkgbase}/releases/download/${pkgver}/${pkgbase}-${pkgver}.patch{,.sig}
   config         # the main kernel config file
-  sphinx-workaround.patch
+  drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch
 )
 validpgpkeys=(
   'ABAF11C65A2970B130ABE3C479BE3E4300411886'  # Linus Torvalds
   '647F28654894E3BD457199BE38DBBDC86092693E'  # Greg Kroah-Hartman
-  '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A'  # Daniel Micay
   'E240B57E2C4630BA768E2F26FC1B547C8D8172C8'  # Levente Polyak
 )
-sha256sums=('b0d7abae88e5f91893627c645e680a95c818defd1b4fcaf3e2afb4b2b6b4ab86'
+sha256sums=('904e396c26e9992a16cd1cc989460171536bed7739bf36049f6eb020ee5d56ec'
             'SKIP'
-            '3c1f201e97ceed65c4a282b6aae167b20ccabe5a86824f9a25f9f195d86f9c08'
+            '0406850c58a3d248ef92de86f1bea1f0777e15c05a8747ce2c7f07a223abf62a'
             'SKIP'
-            'e3db4b85ab6a98de1c66fd06bb5bfab68dba1fa3366b2b88b00da06ba29267d2'
-            '8cb21e0b3411327b627a9dd15b8eb773295a0d2782b1a41b2a8839d1b2f5778c')
+            '8c642f2f61b3e5bc37b9e02678ba5001afbe2996a7514f5466f6e98df42b7095'
+            '56ca378a03341bbe8ddd13a5630922b0c4e0d505b738aec3b21dcfa55ff200d7')
 
 export KBUILD_BUILD_HOST=archlinux
 export KBUILD_BUILD_USER=$pkgbase

Added: drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch
===================================================================
--- drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch	                        (rev 0)
+++ drm-amd-display-add-get_dig_frontend-impl-for-DCEx.patch	2020-12-30 22:08:37 UTC (rev 405126)
@@ -0,0 +1,111 @@
+From 39136f88e40628ff112fa5efd035e7707750d1a9 Mon Sep 17 00:00:00 2001
+From: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
+Date: Tue, 15 Dec 2020 10:33:34 -0500
+Subject: drm/amd/display: Add get_dig_frontend implementation for DCEx
+
+Some old ASICs might not implement/require get_dig_frontend helper; in
+this scenario, we can have a NULL pointer exception when we try to call
+it inside vbios disable operation. For example, this situation might
+happen when using Polaris12 with an eDP panel. This commit avoids this
+situation by adding a specific get_dig_frontend implementation for DCEx.
+
+Cc: Alex Deucher <alexander.deucher at amd.com>
+Cc: Borislav Petkov <bp at alien8.de>
+Cc: Harry Wentland <Harry.Wentland at amd.com>
+Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas at amd.com>
+Cc: Chiawen Huang <chiawen.huang at amd.com>
+Reported-and-tested-by: Borislav Petkov <bp at suse.de>
+Acked-by: Alex Deucher <alexander.deucher at amd.com>
+Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
+Cc: stable at vger.kernel.org
+---
+ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.c  | 44 +++++++++++++++++++++-
+ .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h  |  2 +
+ 2 files changed, 44 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
+index b409f6b2bfd8..56bc401536c5 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
+@@ -119,7 +119,8 @@ static const struct link_encoder_funcs dce110_lnk_enc_funcs = {
+ 	.disable_hpd = dce110_link_encoder_disable_hpd,
+ 	.is_dig_enabled = dce110_is_dig_enabled,
+ 	.destroy = dce110_link_encoder_destroy,
+-	.get_max_link_cap = dce110_link_encoder_get_max_link_cap
++	.get_max_link_cap = dce110_link_encoder_get_max_link_cap,
++	.get_dig_frontend = dce110_get_dig_frontend
+ };
+ 
+ static enum bp_result link_transmitter_control(
+@@ -235,6 +236,44 @@ static void set_link_training_complete(
+ 
+ }
+ 
++unsigned int dce110_get_dig_frontend(struct link_encoder *enc)
++{
++	struct dce110_link_encoder *enc110 = TO_DCE110_LINK_ENC(enc);
++	u32 value;
++	enum engine_id result;
++
++	REG_GET(DIG_BE_CNTL, DIG_FE_SOURCE_SELECT, &value);
++
++	switch (value) {
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGA:
++		result = ENGINE_ID_DIGA;
++		break;
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGB:
++		result = ENGINE_ID_DIGB;
++		break;
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGC:
++		result = ENGINE_ID_DIGC;
++		break;
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGD:
++		result = ENGINE_ID_DIGD;
++		break;
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGE:
++		result = ENGINE_ID_DIGE;
++		break;
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGF:
++		result = ENGINE_ID_DIGF;
++		break;
++	case DCE110_DIG_FE_SOURCE_SELECT_DIGG:
++		result = ENGINE_ID_DIGG;
++		break;
++	default:
++		// invalid source select DIG
++		result = ENGINE_ID_UNKNOWN;
++	}
++
++	return result;
++}
++
+ void dce110_link_encoder_set_dp_phy_pattern_training_pattern(
+ 	struct link_encoder *enc,
+ 	uint32_t index)
+@@ -1665,7 +1704,8 @@ static const struct link_encoder_funcs dce60_lnk_enc_funcs = {
+ 	.disable_hpd = dce110_link_encoder_disable_hpd,
+ 	.is_dig_enabled = dce110_is_dig_enabled,
+ 	.destroy = dce110_link_encoder_destroy,
+-	.get_max_link_cap = dce110_link_encoder_get_max_link_cap
++	.get_max_link_cap = dce110_link_encoder_get_max_link_cap,
++	.get_dig_frontend = dce110_get_dig_frontend
+ };
+ 
+ void dce60_link_encoder_construct(
+diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h
+index cb714a48b171..fc6ade824c23 100644
+--- a/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h
++++ b/drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h
+@@ -295,6 +295,8 @@ void dce110_link_encoder_connect_dig_be_to_fe(
+ 	enum engine_id engine,
+ 	bool connect);
+ 
++unsigned int dce110_get_dig_frontend(struct link_encoder *enc);
++
+ void dce110_link_encoder_set_dp_phy_pattern_training_pattern(
+ 	struct link_encoder *enc,
+ 	uint32_t index);
+-- 
+cgit v1.2.3-1-gf6bb5
+

Deleted: sphinx-workaround.patch
===================================================================
--- sphinx-workaround.patch	2020-12-30 21:26:20 UTC (rev 405125)
+++ sphinx-workaround.patch	2020-12-30 22:08:37 UTC (rev 405126)
@@ -1,13 +0,0 @@
-diff --git i/Documentation/conf.py w/Documentation/conf.py
-index 3c7bdf4cd31f..9a0ced58a3e9 100644
---- i/Documentation/conf.py
-+++ w/Documentation/conf.py
-@@ -36,7 +36,7 @@ needs_sphinx = '1.3'
- # Add any Sphinx extension module names here, as strings. They can be
- # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
- # ones.
--extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain',
-+extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include',
-               'kfigure', 'sphinx.ext.ifconfig', 'automarkup',
-               'maintainers_include']
- 



More information about the arch-commits mailing list