diff options
-rw-r--r-- | HID-core-fix-grouping-by-application.patch | 78 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | config.x86_64 | 14 | ||||
-rw-r--r-- | drm-i915-Increase-LSPCON-timeout.patch | 54 | ||||
-rw-r--r-- | increase-timeout-in-lspcon_wait_mode.patch | 23 |
5 files changed, 158 insertions, 44 deletions
diff --git a/HID-core-fix-grouping-by-application.patch b/HID-core-fix-grouping-by-application.patch new file mode 100644 index 0000000..6da2c18 --- /dev/null +++ b/HID-core-fix-grouping-by-application.patch @@ -0,0 +1,78 @@ +From 20acb01da9443e3ca814bb5d17f01b3fea754010 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires <benjamin.tissoires@redhat.com> +Date: Tue, 4 Sep 2018 15:31:14 +0200 +Subject: [PATCH] HID: core: fix grouping by application + +commit f07b3c1da92d ("HID: generic: create one input report per +application type") was effectively the same as MULTI_INPUT: +hidinput->report was never set, so hidinput_match_application() +always returned null. + +Fix that by testing against the real application. + +Note that this breaks some old eGalax touchscreens that expect MULTI_INPUT +instead of HID_QUIRK_INPUT_PER_APP. Enable this quirk for backward +compatibility on all non-Win8 touchscreens. + +link: https://bugzilla.kernel.org/show_bug.cgi?id=200847 +link: https://bugzilla.kernel.org/show_bug.cgi?id=200849 +link: https://bugs.archlinux.org/task/59699 +link: https://github.com/NixOS/nixpkgs/issues/45165 + +Cc: stable@vger.kernel.org # v4.18+ +Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> +Signed-off-by: Jiri Kosina <jkosina@suse.cz> +--- + drivers/hid/hid-input.c | 4 ++-- + drivers/hid/hid-multitouch.c | 3 +++ + include/linux/hid.h | 1 + + 3 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c +index ab93dd5927c3a..a137d2835f328 100644 +--- a/drivers/hid/hid-input.c ++++ b/drivers/hid/hid-input.c +@@ -1579,6 +1579,7 @@ static struct hid_input *hidinput_allocate(struct hid_device *hid, + input_dev->dev.parent = &hid->dev; + + hidinput->input = input_dev; ++ hidinput->application = application; + list_add_tail(&hidinput->list, &hid->inputs); + + INIT_LIST_HEAD(&hidinput->reports); +@@ -1674,8 +1675,7 @@ static struct hid_input *hidinput_match_application(struct hid_report *report) + struct hid_input *hidinput; + + list_for_each_entry(hidinput, &hid->inputs, list) { +- if (hidinput->report && +- hidinput->report->application == report->application) ++ if (hidinput->application == report->application) + return hidinput; + } + +diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c +index 45968f7970f87..1a987345692a6 100644 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -1476,6 +1476,9 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) + */ + hdev->quirks |= HID_QUIRK_INPUT_PER_APP; + ++ if (id->group != HID_GROUP_MULTITOUCH_WIN_8) ++ hdev->quirks |= HID_QUIRK_MULTI_INPUT; ++ + timer_setup(&td->release_timer, mt_expired_timeout, 0); + + ret = hid_parse(hdev); +diff --git a/include/linux/hid.h b/include/linux/hid.h +index 773bcb1d4044e..5482dd6ae9efd 100644 +--- a/include/linux/hid.h ++++ b/include/linux/hid.h +@@ -520,6 +520,7 @@ struct hid_input { + const char *name; + bool registered; + struct list_head reports; /* the list of reports */ ++ unsigned int application; /* application usage for this input */ + }; + + enum hid_type { @@ -1,15 +1,17 @@ -# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> -# Contributor: Daniel Micay <danielmicay@gmail.com> -# Contributor: Tobias Powalowski <tpowa@archlinux.org> -# Contributor: Thomas Baechler <thomas@archlinux.org> +# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net> +# Maintainer (Arch): Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor (Arch): Daniel Micay <danielmicay@gmail.com> +# Contributor (Arch): Tobias Powalowski <tpowa@archlinux.org> +# Contributor (Arch): Thomas Baechler <thomas@archlinux.org> pkgbase=linux-libre-hardened _majver=4.18 -_minver=5 +_minver=6 _pkgver=${_majver}.${_minver} _gnumajver=${_majver}-gnu _gnupkgver=${_pkgver}-gnu _hardenedver=a +_gcc_more_v='20180509' _srcname=linux-${_majver} pkgver=${_pkgver}.${_hardenedver} pkgrel=1 @@ -21,28 +23,30 @@ options=('!strip') source=(https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnumajver}/linux-libre-${_gnumajver}.tar.xz{,.sign} https://linux-libre.fsfla.org/pub/linux-libre/releases/${_gnupkgver}/patch-${_gnumajver}-${_gnupkgver}.xz{,.sign} https://github.com/anthraxx/linux-hardened/releases/download/${_pkgver}.${_hardenedver}/linux-hardened-${_pkgver}.${_hardenedver}.patch{,.sig} - https://github.com/graysky2/kernel_gcc_patch/raw/master/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch + enable_additional_cpu_optimizations-$_gcc_more_v.tar.gz::https://github.com/graysky2/kernel_gcc_patch/archive/$_gcc_more_v.tar.gz ath9k-regdom-hack.patch config.x86_64 # the main kernel config files 60-linux.hook # pacman hook for depmod 90-linux.hook # pacman hook for initramfs regeneration linux.preset # standard config files for mkinitcpio ramdisk - increase-timeout-in-lspcon_wait_mode.patch + drm-i915-Increase-LSPCON-timeout.patch + HID-core-fix-grouping-by-application.patch ) sha256sums=('55ddf20702311cf3e32127135a38cb272313679962e8a798c108b01cadaeca4f' 'SKIP' - 'ad530ad0158e96bd18da455b6d08193ac7ae5d025787a2b2aa0c09a9927b360b' + '185787198ae1ef2121d74ac05bc23f64a912010bc2df82b27d8b3e299d1e838a' 'SKIP' - 'a06238ea0ce66d090fa899d6951c9d40fa993c7b4975088dded2c1e660c1ff69' + 'd3a244e228a566d536a26fcfe57252bb6e9b61c0f070ef4bb9eaad868196bef3' 'SKIP' - '9f7177679c8d3f8d699ef0566a51349d828436dba04603bc2223f98c60d2d178' + '226e30068ea0fecdb22f337391385701996bfbdba37cdcf0f1dbf55f1080542d' 'e7ebf050c22bcec0028c0b3c79fd6d3913b0370ecc6a23dfe78ce475630cf503' - 'd035f14f91f802a35d81b917759ab444baf528b683fd1e07464ad2c5ac8b75cc' + 'afc9c7320dd7a2c01e974730d32e4b34639b8956d59809852cf2f7ffd6d27337' 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' 'ad6344badc91ad0630caacde83f7f9b97276f80d26a20619a87952be65492c65' - '0fa6899b57d32988b70050f1a67f435936273ce1aa98575271d564ccfaf45f77') + '2f26b6273ded6d4031fd7115fac843b7bb90df9a28da8dc1b7f49294d3d39ee7' + '472f606f043b16336f5335021285efe3a7658fb8467917409cb58c9a57a7b0a5') validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay @@ -61,7 +65,8 @@ prepare() { # Hotfixes msg2 "Applying hotfixes" - patch -p1 -i ../increase-timeout-in-lspcon_wait_mode.patch + patch -p1 -i ../drm-i915-Increase-LSPCON-timeout.patch + patch -p1 -i ../HID-core-fix-grouping-by-application.patch # linux hardened patch msg2 "Applying hardened patch" @@ -69,7 +74,7 @@ prepare() { # graysky2 gcc patch msg2 "Applying graysky2 cpu patch" - patch -p1 -i ../enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch + patch -p1 -i ../kernel_gcc_patch-${_gcc_more_v}/enable_additional_cpu_optimizations_for_gcc_v8.1+_kernel_v4.13+.patch # Ignore ath9k eeprom patch msg2 "Applying ath9k patch" diff --git a/config.x86_64 b/config.x86_64 index bdad967..4f575f5 100644 --- a/config.x86_64 +++ b/config.x86_64 @@ -1,10 +1,10 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 4.18.2 Kernel Configuration +# Linux/x86 4.18.6 Kernel Configuration # # -# Compiler: gcc (GCC) 8.2.0 +# Compiler: gcc (GCC) 8.2.1 20180831 # CONFIG_64BIT=y CONFIG_X86_64=y @@ -47,7 +47,7 @@ CONFIG_FIX_EARLYCON_MEM=y CONFIG_DYNAMIC_PHYSICAL_MASK=y CONFIG_PGTABLE_LEVELS=4 CONFIG_CC_IS_GCC=y -CONFIG_GCC_VERSION=80200 +CONFIG_GCC_VERSION=80201 CONFIG_CLANG_VERSION=0 CONFIG_IRQ_WORK=y CONFIG_BUILDTIME_EXTABLE_SORT=y @@ -322,6 +322,7 @@ CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_HAVE_RCU_TABLE_INVALIDATE=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y @@ -1485,8 +1486,7 @@ CONFIG_BRIDGE_EBT_REDIRECT=m CONFIG_BRIDGE_EBT_SNAT=m CONFIG_BRIDGE_EBT_LOG=m CONFIG_BRIDGE_EBT_NFLOG=m -CONFIG_BPFILTER=y -CONFIG_BPFILTER_UMH=m +# CONFIG_BPFILTER is not set CONFIG_IP_DCCP=m CONFIG_INET_DCCP_DIAG=m @@ -6153,7 +6153,7 @@ CONFIG_SND_OPL3_LIB_SEQ=m CONFIG_SND_VX_LIB=m CONFIG_SND_AC97_CODEC=m CONFIG_SND_DRIVERS=y -CONFIG_SND_PCSP=m +# CONFIG_SND_PCSP is not set CONFIG_SND_DUMMY=m CONFIG_SND_ALOOP=m CONFIG_SND_VIRMIDI=m @@ -7373,7 +7373,7 @@ CONFIG_RTC_DRV_RV3029_HWMON=y # # Platform RTC drivers # -CONFIG_RTC_DRV_CMOS=m +CONFIG_RTC_DRV_CMOS=y CONFIG_RTC_DRV_DS1286=m CONFIG_RTC_DRV_DS1511=m CONFIG_RTC_DRV_DS1553=m diff --git a/drm-i915-Increase-LSPCON-timeout.patch b/drm-i915-Increase-LSPCON-timeout.patch new file mode 100644 index 0000000..38ec01f --- /dev/null +++ b/drm-i915-Increase-LSPCON-timeout.patch @@ -0,0 +1,54 @@ +From 299c2a904b1e8d5096d4813df6371357d97a6cd1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fredrik=20Sch=C3=B6n?= <fredrikschon@gmail.com> +Date: Fri, 17 Aug 2018 22:07:28 +0200 +Subject: [PATCH] drm/i915: Increase LSPCON timeout +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +100 ms is not enough time for the LSPCON adapter on Intel NUC devices to +settle. This causes dropped display modes at boot or screen reconfiguration. +Empirical testing can reproduce the error up to a timeout of 190 ms. Basic +boot and stress testing at 200 ms has not (yet) failed. + +Increase timeout to 400 ms to get some margin of error. + +Changes from v1: +The initial suggestion of 1000 ms was lowered due to concerns about delaying +valid timeout cases. +Update patch metadata. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107503 +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1570392 +Fixes: 357c0ae9198a ("drm/i915/lspcon: Wait for expected LSPCON mode to settle") +Cc: Shashank Sharma <shashank.sharma@intel.com> +Cc: Imre Deak <imre.deak@intel.com> +Cc: Jani Nikula <jani.nikula@intel.com> +Cc: <stable@vger.kernel.org> # v4.11+ +Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> +Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> +Signed-off-by: Fredrik Schön <fredrik.schon@gmail.com> +Signed-off-by: Jani Nikula <jani.nikula@intel.com> +Link: https://patchwork.freedesktop.org/patch/msgid/20180817200728.8154-1-fredrik.schon@gmail.com +(cherry picked from commit 59f1c8ab30d6f9042562949f42cbd3f3cf69de94) +Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> +--- + drivers/gpu/drm/i915/intel_lspcon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c +index 5dae16ccd9f1..3e085c5f2b81 100644 +--- a/drivers/gpu/drm/i915/intel_lspcon.c ++++ b/drivers/gpu/drm/i915/intel_lspcon.c +@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, + DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n", + lspcon_mode_name(mode)); + +- wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); ++ wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 400); + if (current_mode != mode) + DRM_ERROR("LSPCON mode hasn't settled\n"); + +-- +2.18.0 + diff --git a/increase-timeout-in-lspcon_wait_mode.patch b/increase-timeout-in-lspcon_wait_mode.patch deleted file mode 100644 index b94872a..0000000 --- a/increase-timeout-in-lspcon_wait_mode.patch +++ /dev/null @@ -1,23 +0,0 @@ -From f9199cfdc7f09601adbb40827077991a1f6bd73a Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> -Date: Mon, 13 Aug 2018 00:40:29 +0200 -Subject: [PATCH] Increase timeout in lspcon_wait_mode - -From https://bugs.freedesktop.org/attachment.cgi?id=141051&action=edit ---- - drivers/gpu/drm/i915/intel_lspcon.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c -index 8ae8f42f430a1..be1b08f589a46 100644 ---- a/drivers/gpu/drm/i915/intel_lspcon.c -+++ b/drivers/gpu/drm/i915/intel_lspcon.c -@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_mode(struct intel_lspcon *lspcon, - DRM_DEBUG_KMS("Waiting for LSPCON mode %s to settle\n", - lspcon_mode_name(mode)); - -- wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 100); -+ wait_for((current_mode = lspcon_get_current_mode(lspcon)) == mode, 1000); - if (current_mode != mode) - DRM_ERROR("LSPCON mode hasn't settled\n"); - |