Compare commits
178 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69b8d47fa0 | ||
|
|
eee01b8335 | ||
|
|
42041fa804 | ||
|
|
cfb276ec02 | ||
|
|
acfa1c4c29 | ||
|
|
c161e56db4 | ||
|
|
676e9e309b | ||
|
|
0cf0fdc16f | ||
|
|
67f15457db | ||
|
|
80700245f5 | ||
|
|
a87a3d19a0 | ||
|
|
323f25a1ee | ||
|
|
5c30996f59 | ||
|
|
ff051365e4 | ||
|
|
9f2a885abc | ||
|
|
f18f5059a8 | ||
|
|
8e87aba0e3 | ||
|
|
7f97617b93 | ||
|
|
6a68437996 | ||
|
|
e5d0bcfb4f | ||
|
|
5a21c7fe58 | ||
|
|
7c40397f72 | ||
|
|
6681bf218f | ||
|
|
7e43881444 | ||
|
|
d43b6c054a | ||
|
|
d0804f723a | ||
|
|
d36c2e5471 | ||
|
|
f23167b8b1 | ||
|
|
f6c1aa8844 | ||
|
|
bd19f6f7e0 | ||
|
|
d3dacb86cf | ||
|
|
bd4e2ed2a4 | ||
|
|
02c2fcec70 | ||
|
|
762c15194e | ||
|
|
1a35ea6540 | ||
|
|
b5970da6c9 | ||
|
|
78cd327119 | ||
|
|
5d1df62b20 | ||
|
|
54e45590c4 | ||
|
|
38a4514f20 | ||
|
|
59aac79c26 | ||
|
|
00a0a74174 | ||
|
|
b1d4476bf3 | ||
|
|
3cbf1c284c | ||
|
|
e17c43b24a | ||
|
|
11b2bd1547 | ||
|
|
7af45b5b25 | ||
|
|
f839cb38ec | ||
|
|
4e7be4201e | ||
|
|
aa2d2eee14 | ||
|
|
111278c14e | ||
|
|
4e5efc03c3 | ||
|
|
8cbf8ccb0a | ||
|
|
a760bf919f | ||
|
|
ba3a5f47de | ||
|
|
58b171ce58 | ||
|
|
f9381cf012 | ||
|
|
b149e37827 | ||
|
|
e80611595f | ||
|
|
4b6e0ccf79 | ||
|
|
7213e886c3 | ||
|
|
2fdd468ba1 | ||
|
|
19b3730040 | ||
|
|
a14ea55bfe | ||
|
|
71893eb2f6 | ||
|
|
35699a5435 | ||
|
|
d0c72d0f53 | ||
|
|
e0e066aa6b | ||
|
|
16c5c0f7b3 | ||
|
|
680aa3e5c4 | ||
|
|
76320b5307 | ||
|
|
2c2797a4fe | ||
|
|
6b83912455 | ||
|
|
24e8702e2e | ||
|
|
98bf49ad0d | ||
|
|
c5fe8f9648 | ||
|
|
a723b3453a | ||
|
|
5bc585d35d | ||
|
|
07ae1e1270 | ||
|
|
45f76820a0 | ||
|
|
40f61d706c | ||
|
|
281d5b5f30 | ||
|
|
019446019b | ||
|
|
348755927b | ||
|
|
c2ef4b9a83 | ||
|
|
c5ecc439ca | ||
|
|
7f01999341 | ||
|
|
4f633fbc33 | ||
|
|
ec9adec78c | ||
|
|
ddfd56365f | ||
|
|
742215ba51 | ||
|
|
7231c57832 | ||
|
|
8bc294d7d7 | ||
|
|
5c8a69fcca | ||
|
|
1da0d7a024 | ||
|
|
d7d00d12af | ||
|
|
3f0347895c | ||
|
|
8300262941 | ||
|
|
73e68cc29d | ||
|
|
c0329ab89a | ||
|
|
73ef7ec883 | ||
|
|
be68e8579a | ||
|
|
478f01e4e4 | ||
|
|
6ed7c3491e | ||
|
|
ce45763b58 | ||
|
|
5166b3b763 | ||
|
|
e8abab3854 | ||
|
|
40a1cf57d3 | ||
|
|
9a4238fbd6 | ||
|
|
9607b5faaa | ||
|
|
8476c193cb | ||
|
|
34597fed7b | ||
|
|
d304e5f9ba | ||
|
|
ebe613e907 | ||
|
|
6bd09e8ecc | ||
|
|
094f2c110c | ||
|
|
03cd5911df | ||
|
|
a2d46139d9 | ||
|
|
b787ad1672 | ||
|
|
493595acdb | ||
|
|
b74acbd377 | ||
|
|
0690844121 | ||
|
|
48e1a4dcfc | ||
|
|
4b1925a90e | ||
|
|
3c560c6bd0 | ||
|
|
86e67ee11e | ||
|
|
ef41d9b816 | ||
|
|
61f347b6ff | ||
|
|
85835e68c4 | ||
|
|
5750778493 | ||
|
|
da7e076b23 | ||
|
|
fbd3f73ad4 | ||
|
|
bf6e2e5c45 | ||
|
|
82d983221c | ||
|
|
137fde170d | ||
|
|
94fd6d88ca | ||
|
|
45948240a7 | ||
|
|
e15ee21114 | ||
|
|
a4828aea55 | ||
|
|
6dfe5c1ffb | ||
|
|
396ad4eaca | ||
|
|
b5a4168451 | ||
|
|
9db1e5ec27 | ||
|
|
3180dfe446 | ||
|
|
3181ab1054 | ||
|
|
d8f7b1fa42 | ||
|
|
f60b42ed46 | ||
|
|
f64e21df99 | ||
|
|
3ca9f3d998 | ||
|
|
cd74d7acd3 | ||
|
|
6ee917b9e5 | ||
|
|
db2600b8ff | ||
|
|
7fa6a6fed5 | ||
|
|
6bd74d76fe | ||
|
|
aec7c80393 | ||
|
|
cda78490b3 | ||
|
|
4bba71a878 | ||
|
|
176603ba7c | ||
|
|
30675b84bb | ||
|
|
839d783d52 | ||
|
|
db060559f7 | ||
|
|
8bb21014a5 | ||
|
|
04b2e9ec7b | ||
|
|
988883b98d | ||
|
|
1ab25b7c73 | ||
|
|
7110e42ccf | ||
|
|
36123dbc39 | ||
|
|
6aef52e400 | ||
|
|
ac89b4ad91 | ||
|
|
e163d28535 | ||
|
|
715d406753 | ||
|
|
138f36aa16 | ||
|
|
b07dd9aa6f | ||
|
|
e0ac22bfc2 | ||
|
|
0498fb5dc5 | ||
|
|
06340ec177 | ||
|
|
9f3562b7a0 | ||
|
|
a948dfad97 |
11514 changed files with 50713 additions and 306444 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -1,2 +1,11 @@
|
|||
clog
|
||||
*.xz
|
||||
*.gz
|
||||
*.bz2
|
||||
*.rpm
|
||||
*.orig
|
||||
*.sign
|
||||
kernel-[2345]*/
|
||||
perf-man-*.tar.gz
|
||||
kernel-headers/
|
||||
kernel-tools/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Al Stone <ahs3@redhat.com>
|
||||
Date: Tue, 27 Feb 2018 00:21:23 -0500
|
||||
Subject: [PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
|
||||
|
||||
Message-id: <20180227002123.21608-1-ahs3@redhat.com>
|
||||
Patchwork-id: 206052
|
||||
O-Subject: [RHEL8 BZ1518076 PATCH] ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
|
||||
Bugzilla: 1518076
|
||||
RH-Acked-by: Mark Salter <msalter@redhat.com>
|
||||
RH-Acked-by: Jeremy McNicoll <jmcnicol@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1518076
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=15417197
|
||||
Tested: compile-only; several other patches are required for full booting
|
||||
QE has tested limited boot (see comment#12 of BZ)
|
||||
|
||||
This is a re-post of a RHEL-ALT-7.5 patch specific to aarch64 moonshots
|
||||
that we use in beaker. It is required for these machines to boot.
|
||||
|
||||
commit 8a663a264863efedf8bb4a9d76ac603920fdd739
|
||||
Author: Robert Richter <rrichter@redhat.com>
|
||||
Date: Wed Aug 16 19:49:30 2017 -0400
|
||||
|
||||
[acpi] APEI: arm64: Ignore broken HPE moonshot APEI support
|
||||
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1344237
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13768971
|
||||
Tested: Booted on moonshot with patched 4.11.0-20 kernel
|
||||
Upstream: RHEL-only
|
||||
|
||||
The aarch64 HP moonshot platforms we have in beaker and elsewhere have
|
||||
a firmware bug which causes a spurious fatal memory error via APEI at
|
||||
boot time. This platform is no longer supported and no further firmware
|
||||
updates are expected. This is a downstream-only hack to avoid the problem
|
||||
by bailing out of HEST table probing if we detect a moonshot HEST table.
|
||||
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
Signed-off-by: Robert Richter <rrichter@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Al Stone <ahs3@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
drivers/acpi/apei/hest.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
|
||||
index 953a2fae8b15..7ea07f7da582 100644
|
||||
--- a/drivers/acpi/apei/hest.c
|
||||
+++ b/drivers/acpi/apei/hest.c
|
||||
@@ -88,6 +88,14 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
|
||||
if (hest_disable || !hest_tab)
|
||||
return -EINVAL;
|
||||
|
||||
+#ifdef CONFIG_ARM64
|
||||
+ /* Ignore broken firmware */
|
||||
+ if (!strncmp(hest_tab->header.oem_id, "HPE ", 6) &&
|
||||
+ !strncmp(hest_tab->header.oem_table_id, "ProLiant", 8) &&
|
||||
+ MIDR_IMPLEMENTOR(read_cpuid_id()) == ARM_CPU_IMP_APM)
|
||||
+ return -EINVAL;
|
||||
+#endif
|
||||
+
|
||||
hest_hdr = (struct acpi_hest_header *)(hest_tab + 1);
|
||||
for (i = 0; i < hest_tab->error_source_count; i++) {
|
||||
len = hest_esrc_len(hest_hdr);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
Date: Thu, 10 May 2018 17:38:43 -0400
|
||||
Subject: [PATCH] ACPI / irq: Workaround firmware issue on X-Gene based m400
|
||||
|
||||
Message-id: <20180510173844.29580-3-msalter@redhat.com>
|
||||
Patchwork-id: 214383
|
||||
O-Subject: [RHEL-8 BZ1519554 2/3] ACPI / irq: Workaround firmware issue on X-Gene based m400
|
||||
Bugzilla: 1519554
|
||||
RH-Acked-by: Al Stone <astone@redhat.com>
|
||||
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519554
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16144520
|
||||
|
||||
The ACPI firmware on the xgene-based m400 platorms erroneously
|
||||
describes its UART interrupt as ACPI_PRODUCER rather than
|
||||
ACPI_CONSUMER. This leads to the UART driver being unable to
|
||||
find its interrupt and the kernel unable find a console.
|
||||
Work around this by avoiding the producer/consumer check
|
||||
for X-Gene UARTs.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
drivers/acpi/irq.c | 17 +++++++++++++++--
|
||||
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c
|
||||
index e209081d644b..7484bcf59a1b 100644
|
||||
--- a/drivers/acpi/irq.c
|
||||
+++ b/drivers/acpi/irq.c
|
||||
@@ -126,6 +126,7 @@ struct acpi_irq_parse_one_ctx {
|
||||
unsigned int index;
|
||||
unsigned long *res_flags;
|
||||
struct irq_fwspec *fwspec;
|
||||
+ bool skip_producer_check;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -197,7 +198,8 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares,
|
||||
return AE_CTRL_TERMINATE;
|
||||
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
|
||||
eirq = &ares->data.extended_irq;
|
||||
- if (eirq->producer_consumer == ACPI_PRODUCER)
|
||||
+ if (!ctx->skip_producer_check &&
|
||||
+ eirq->producer_consumer == ACPI_PRODUCER)
|
||||
return AE_OK;
|
||||
if (ctx->index >= eirq->interrupt_count) {
|
||||
ctx->index -= eirq->interrupt_count;
|
||||
@@ -232,8 +234,19 @@ static acpi_status acpi_irq_parse_one_cb(struct acpi_resource *ares,
|
||||
static int acpi_irq_parse_one(acpi_handle handle, unsigned int index,
|
||||
struct irq_fwspec *fwspec, unsigned long *flags)
|
||||
{
|
||||
- struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec };
|
||||
+ struct acpi_irq_parse_one_ctx ctx = { -EINVAL, index, flags, fwspec, false };
|
||||
|
||||
+ /*
|
||||
+ * Firmware on arm64-based HPE m400 platform incorrectly marks
|
||||
+ * its UART interrupt as ACPI_PRODUCER rather than ACPI_CONSUMER.
|
||||
+ * Don't do the producer/consumer check for that device.
|
||||
+ */
|
||||
+ if (IS_ENABLED(CONFIG_ARM64)) {
|
||||
+ struct acpi_device *adev = acpi_bus_get_acpi_device(handle);
|
||||
+
|
||||
+ if (adev && !strcmp(acpi_device_hid(adev), "APMC0D08"))
|
||||
+ ctx.skip_producer_check = true;
|
||||
+ }
|
||||
acpi_walk_resources(handle, METHOD_NAME__CRS, acpi_irq_parse_one_cb, &ctx);
|
||||
return ctx.rc;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Date: Mon, 30 Sep 2019 14:59:25 +0900
|
||||
Subject: [PATCH] ARM: fix __get_user_check() in case uaccess_* calls are not
|
||||
inlined
|
||||
|
||||
KernelCI reports that bcm2835_defconfig is no longer booting since
|
||||
commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING
|
||||
forcibly"):
|
||||
|
||||
https://lkml.org/lkml/2019/9/26/825
|
||||
|
||||
I also received a regression report from Nicolas Saenz Julienne:
|
||||
|
||||
https://lkml.org/lkml/2019/9/27/263
|
||||
|
||||
This problem has cropped up on arch/arm/config/bcm2835_defconfig
|
||||
because it enables CONFIG_CC_OPTIMIZE_FOR_SIZE. The compiler tends
|
||||
to prefer not inlining functions with -Os. I was able to reproduce
|
||||
it with other boards and defconfig files by manually enabling
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE.
|
||||
|
||||
The __get_user_check() specifically uses r0, r1, r2 registers.
|
||||
So, uaccess_save_and_enable() and uaccess_restore() must be inlined
|
||||
in order to avoid those registers being overwritten in the callees.
|
||||
|
||||
Prior to commit 9012d011660e ("compiler: allow all arches to enable
|
||||
CONFIG_OPTIMIZE_INLINING"), the 'inline' marker was always enough for
|
||||
inlining functions, except on x86.
|
||||
|
||||
Since that commit, all architectures can enable CONFIG_OPTIMIZE_INLINING.
|
||||
So, __always_inline is now the only guaranteed way of forcible inlining.
|
||||
|
||||
I want to keep as much compiler's freedom as possible about the inlining
|
||||
decision. So, I changed the function call order instead of adding
|
||||
__always_inline around.
|
||||
|
||||
Call uaccess_save_and_enable() before assigning the __p ("r0"), and
|
||||
uaccess_restore() after evacuating the __e ("r0").
|
||||
|
||||
Fixes: 9012d011660e ("compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING")
|
||||
Reported-by: "kernelci.org bot" <bot@kernelci.org>
|
||||
Reported-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
|
||||
Acked-by: Arnd Bergmann <arnd@arndb.de>
|
||||
Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Tested-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
|
||||
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
|
||||
---
|
||||
arch/arm/include/asm/uaccess.h | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
|
||||
index 98c6b91be4a8..60055827dddc 100644
|
||||
--- a/arch/arm/include/asm/uaccess.h
|
||||
+++ b/arch/arm/include/asm/uaccess.h
|
||||
@@ -191,11 +191,12 @@ extern int __get_user_64t_4(void *);
|
||||
#define __get_user_check(x, p) \
|
||||
({ \
|
||||
unsigned long __limit = current_thread_info()->addr_limit - 1; \
|
||||
+ unsigned int __ua_flags = uaccess_save_and_enable(); \
|
||||
register typeof(*(p)) __user *__p asm("r0") = (p); \
|
||||
register __inttype(x) __r2 asm("r2"); \
|
||||
register unsigned long __l asm("r1") = __limit; \
|
||||
register int __e asm("r0"); \
|
||||
- unsigned int __ua_flags = uaccess_save_and_enable(); \
|
||||
+ unsigned int __err; \
|
||||
switch (sizeof(*(__p))) { \
|
||||
case 1: \
|
||||
if (sizeof((x)) >= 8) \
|
||||
@@ -223,9 +224,10 @@ extern int __get_user_64t_4(void *);
|
||||
break; \
|
||||
default: __e = __get_user_bad(); break; \
|
||||
} \
|
||||
- uaccess_restore(__ua_flags); \
|
||||
+ __err = __e; \
|
||||
x = (typeof(*(p))) __r2; \
|
||||
- __e; \
|
||||
+ uaccess_restore(__ua_flags); \
|
||||
+ __err; \
|
||||
})
|
||||
|
||||
#define get_user(x, p) \
|
||||
--
|
||||
2.26.2
|
||||
|
||||
32
0001-ARM-tegra-usb-no-reset.patch
Normal file
32
0001-ARM-tegra-usb-no-reset.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Thu, 3 May 2012 20:27:11 +0100
|
||||
Subject: [PATCH] ARM: tegra: usb no reset
|
||||
|
||||
Patch for disconnect issues with storage attached to a
|
||||
tegra-ehci controller
|
||||
---
|
||||
drivers/usb/core/hub.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index b1e14beaac5f..b28779779058 100644
|
||||
--- a/drivers/usb/core/hub.c
|
||||
+++ b/drivers/usb/core/hub.c
|
||||
@@ -5517,6 +5517,13 @@ static void hub_event(struct work_struct *work)
|
||||
(u16) hub->change_bits[0],
|
||||
(u16) hub->event_bits[0]);
|
||||
|
||||
+ /* Don't disconnect USB-SATA on TrimSlice */
|
||||
+ if (strcmp(dev_name(hdev->bus->controller), "tegra-ehci.0") == 0) {
|
||||
+ if ((hdev->state == 7) && (hub->change_bits[0] == 0) &&
|
||||
+ (hub->event_bits[0] == 0x2))
|
||||
+ hub->event_bits[0] = 0;
|
||||
+ }
|
||||
+
|
||||
/* Lock the device, then check to see if we were
|
||||
* disconnected while waiting for the lock to succeed. */
|
||||
usb_lock_device(hdev);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
185
0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch
Normal file
185
0001-Add-efi_status_to_str-and-rework-efi_status_to_err.patch
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 2 Oct 2017 18:22:13 -0400
|
||||
Subject: [PATCH] Add efi_status_to_str() and rework efi_status_to_err().
|
||||
|
||||
This adds efi_status_to_str() for use when printing efi_status_t
|
||||
messages, and reworks efi_status_to_err() so that the two use a common
|
||||
list of errors.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
drivers/firmware/efi/efi.c | 124 +++++++++++++++++++++++++++----------
|
||||
include/linux/efi.h | 3 +
|
||||
2 files changed, 96 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
|
||||
index fdd1db025dbf..8ef7d1df09dd 100644
|
||||
--- a/drivers/firmware/efi/efi.c
|
||||
+++ b/drivers/firmware/efi/efi.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <linux/ucs2_string.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/security.h>
|
||||
+#include <linux/bsearch.h>
|
||||
|
||||
#include <asm/early_ioremap.h>
|
||||
|
||||
@@ -831,40 +832,101 @@ int efi_mem_type(unsigned long phys_addr)
|
||||
}
|
||||
#endif
|
||||
|
||||
+struct efi_error_code {
|
||||
+ efi_status_t status;
|
||||
+ int errno;
|
||||
+ const char *description;
|
||||
+};
|
||||
+
|
||||
+static const struct efi_error_code efi_error_codes[] = {
|
||||
+ { EFI_SUCCESS, 0, "Success"},
|
||||
+#if 0
|
||||
+ { EFI_LOAD_ERROR, -EPICK_AN_ERRNO, "Load Error"},
|
||||
+#endif
|
||||
+ { EFI_INVALID_PARAMETER, -EINVAL, "Invalid Parameter"},
|
||||
+ { EFI_UNSUPPORTED, -ENOSYS, "Unsupported"},
|
||||
+ { EFI_BAD_BUFFER_SIZE, -ENOSPC, "Bad Buffer Size"},
|
||||
+ { EFI_BUFFER_TOO_SMALL, -ENOSPC, "Buffer Too Small"},
|
||||
+ { EFI_NOT_READY, -EAGAIN, "Not Ready"},
|
||||
+ { EFI_DEVICE_ERROR, -EIO, "Device Error"},
|
||||
+ { EFI_WRITE_PROTECTED, -EROFS, "Write Protected"},
|
||||
+ { EFI_OUT_OF_RESOURCES, -ENOMEM, "Out of Resources"},
|
||||
+#if 0
|
||||
+ { EFI_VOLUME_CORRUPTED, -EPICK_AN_ERRNO, "Volume Corrupt"},
|
||||
+ { EFI_VOLUME_FULL, -EPICK_AN_ERRNO, "Volume Full"},
|
||||
+ { EFI_NO_MEDIA, -EPICK_AN_ERRNO, "No Media"},
|
||||
+ { EFI_MEDIA_CHANGED, -EPICK_AN_ERRNO, "Media changed"},
|
||||
+#endif
|
||||
+ { EFI_NOT_FOUND, -ENOENT, "Not Found"},
|
||||
+#if 0
|
||||
+ { EFI_ACCESS_DENIED, -EPICK_AN_ERRNO, "Access Denied"},
|
||||
+ { EFI_NO_RESPONSE, -EPICK_AN_ERRNO, "No Response"},
|
||||
+ { EFI_NO_MAPPING, -EPICK_AN_ERRNO, "No mapping"},
|
||||
+ { EFI_TIMEOUT, -EPICK_AN_ERRNO, "Time out"},
|
||||
+ { EFI_NOT_STARTED, -EPICK_AN_ERRNO, "Not started"},
|
||||
+ { EFI_ALREADY_STARTED, -EPICK_AN_ERRNO, "Already started"},
|
||||
+#endif
|
||||
+ { EFI_ABORTED, -EINTR, "Aborted"},
|
||||
+#if 0
|
||||
+ { EFI_ICMP_ERROR, -EPICK_AN_ERRNO, "ICMP Error"},
|
||||
+ { EFI_TFTP_ERROR, -EPICK_AN_ERRNO, "TFTP Error"},
|
||||
+ { EFI_PROTOCOL_ERROR, -EPICK_AN_ERRNO, "Protocol Error"},
|
||||
+ { EFI_INCOMPATIBLE_VERSION, -EPICK_AN_ERRNO, "Incompatible Version"},
|
||||
+#endif
|
||||
+ { EFI_SECURITY_VIOLATION, -EACCES, "Security Policy Violation"},
|
||||
+#if 0
|
||||
+ { EFI_CRC_ERROR, -EPICK_AN_ERRNO, "CRC Error"},
|
||||
+ { EFI_END_OF_MEDIA, -EPICK_AN_ERRNO, "End of Media"},
|
||||
+ { EFI_END_OF_FILE, -EPICK_AN_ERRNO, "End of File"},
|
||||
+ { EFI_INVALID_LANGUAGE, -EPICK_AN_ERRNO, "Invalid Languages"},
|
||||
+ { EFI_COMPROMISED_DATA, -EPICK_AN_ERRNO, "Compromised Data"},
|
||||
+
|
||||
+ // warnings
|
||||
+ { EFI_WARN_UNKOWN_GLYPH, -EPICK_AN_ERRNO, "Warning Unknown Glyph"},
|
||||
+ { EFI_WARN_DELETE_FAILURE, -EPICK_AN_ERRNO, "Warning Delete Failure"},
|
||||
+ { EFI_WARN_WRITE_FAILURE, -EPICK_AN_ERRNO, "Warning Write Failure"},
|
||||
+ { EFI_WARN_BUFFER_TOO_SMALL, -EPICK_AN_ERRNO, "Warning Buffer Too Small"},
|
||||
+#endif
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+efi_status_cmp_bsearch(const void *key, const void *item)
|
||||
+{
|
||||
+ u64 status = (u64)(uintptr_t)key;
|
||||
+ struct efi_error_code *code = (struct efi_error_code *)item;
|
||||
+
|
||||
+ if (status < code->status)
|
||||
+ return -1;
|
||||
+ if (status > code->status)
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
int efi_status_to_err(efi_status_t status)
|
||||
{
|
||||
- int err;
|
||||
-
|
||||
- switch (status) {
|
||||
- case EFI_SUCCESS:
|
||||
- err = 0;
|
||||
- break;
|
||||
- case EFI_INVALID_PARAMETER:
|
||||
- err = -EINVAL;
|
||||
- break;
|
||||
- case EFI_OUT_OF_RESOURCES:
|
||||
- err = -ENOSPC;
|
||||
- break;
|
||||
- case EFI_DEVICE_ERROR:
|
||||
- err = -EIO;
|
||||
- break;
|
||||
- case EFI_WRITE_PROTECTED:
|
||||
- err = -EROFS;
|
||||
- break;
|
||||
- case EFI_SECURITY_VIOLATION:
|
||||
- err = -EACCES;
|
||||
- break;
|
||||
- case EFI_NOT_FOUND:
|
||||
- err = -ENOENT;
|
||||
- break;
|
||||
- case EFI_ABORTED:
|
||||
- err = -EINTR;
|
||||
- break;
|
||||
- default:
|
||||
- err = -EINVAL;
|
||||
- }
|
||||
+ struct efi_error_code *found;
|
||||
+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code);
|
||||
|
||||
- return err;
|
||||
+ found = bsearch((void *)(uintptr_t)status, efi_error_codes,
|
||||
+ sizeof(struct efi_error_code), num,
|
||||
+ efi_status_cmp_bsearch);
|
||||
+ if (!found)
|
||||
+ return -EINVAL;
|
||||
+ return found->errno;
|
||||
+}
|
||||
+
|
||||
+const char *
|
||||
+efi_status_to_str(efi_status_t status)
|
||||
+{
|
||||
+ struct efi_error_code *found;
|
||||
+ size_t num = sizeof(efi_error_codes) / sizeof(struct efi_error_code);
|
||||
+
|
||||
+ found = bsearch((void *)(uintptr_t)status, efi_error_codes,
|
||||
+ sizeof(struct efi_error_code), num,
|
||||
+ efi_status_cmp_bsearch);
|
||||
+ if (!found)
|
||||
+ return "Unknown error code";
|
||||
+ return found->description;
|
||||
}
|
||||
|
||||
static DEFINE_SPINLOCK(efi_mem_reserve_persistent_lock);
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 05c47f857383..2e2f9f608f68 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -43,6 +43,8 @@
|
||||
#define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1)))
|
||||
#define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1)))
|
||||
|
||||
+#define EFI_IS_ERROR(x) ((x) & (1UL << (BITS_PER_LONG-1)))
|
||||
+
|
||||
typedef unsigned long efi_status_t;
|
||||
typedef u8 efi_bool_t;
|
||||
typedef u16 efi_char16_t; /* UNICODE character */
|
||||
@@ -828,6 +830,7 @@ static inline bool efi_rt_services_supported(unsigned int mask)
|
||||
#endif
|
||||
|
||||
extern int efi_status_to_err(efi_status_t status);
|
||||
+extern const char *efi_status_to_str(efi_status_t status);
|
||||
|
||||
/*
|
||||
* Variable Attributes
|
||||
--
|
||||
2.26.2
|
||||
|
||||
32
0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch
Normal file
32
0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Wed, 26 Feb 2020 13:38:40 -0500
|
||||
Subject: [PATCH] Add option of 13 for FORCE_MAX_ZONEORDER
|
||||
|
||||
This is a hack, but it's what the other distros currently use
|
||||
for aarch64 with 4K pages so we'll do the same while upstream
|
||||
decides what the best outcome is (which isn't this).
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
[Add a dependency on RHEL_DIFFERENCES]
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
arch/arm64/Kconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 2e0700a451e5..77e7e749d7e5 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -1133,6 +1133,7 @@ config XEN
|
||||
config FORCE_MAX_ZONEORDER
|
||||
int
|
||||
default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
|
||||
+ default "13" if (ARCH_THUNDER && !ARM64_64K_PAGES && !RHEL_DIFFERENCES)
|
||||
default "12" if (ARM64_16K_PAGES && TRANSPARENT_HUGEPAGE)
|
||||
default "11"
|
||||
help
|
||||
--
|
||||
2.26.2
|
||||
|
||||
25
0001-Drop-that-for-now.patch
Normal file
25
0001-Drop-that-for-now.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Wed, 23 Jan 2019 14:36:37 +0100
|
||||
Subject: [PATCH] Drop that for now
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 37cfb39d77af..c65a263990ae 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -496,7 +496,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
|
||||
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
|
||||
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
|
||||
-Werror=implicit-function-declaration -Werror=implicit-int \
|
||||
- -Wno-format-security \
|
||||
+ -Wno-format-security -Wno-address-of-packed-member \
|
||||
-std=gnu89
|
||||
KBUILD_CPPFLAGS := -D__KERNEL__
|
||||
KBUILD_AFLAGS_KERNEL :=
|
||||
--
|
||||
2.26.2
|
||||
|
||||
330
0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch
Normal file
330
0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Mon, 3 Apr 2017 18:18:21 +0200
|
||||
Subject: [PATCH] Input: rmi4 - remove the need for artificial IRQ in case of
|
||||
HID
|
||||
|
||||
The IRQ from rmi4 may interfere with the one we currently use on i2c-hid.
|
||||
Given that there is already a need for an external API from rmi4 to
|
||||
forward the attention data, we can, in this particular case rely on a
|
||||
separate workqueue to prevent cursor jumps.
|
||||
|
||||
Reported-by: Cameron Gutman <aicommander@gmail.com>
|
||||
Reported-by: Thorsten Leemhuis <linux@leemhuis.info>
|
||||
Reported-by: Jason Ekstrand <jason@jlekstrand.net>
|
||||
Tested-by: Andrew Duggan <aduggan@synaptics.com>
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Signed-off-by: Lyude <lyude@redhat.com>
|
||||
---
|
||||
drivers/hid/hid-rmi.c | 64 -----------------
|
||||
drivers/input/rmi4/rmi_driver.c | 124 +++++++++++++++++++-------------
|
||||
include/linux/rmi.h | 1 +
|
||||
3 files changed, 75 insertions(+), 114 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
|
||||
index 8cffa84c9650..6c4e3675601a 100644
|
||||
--- a/drivers/hid/hid-rmi.c
|
||||
+++ b/drivers/hid/hid-rmi.c
|
||||
@@ -322,19 +322,12 @@ static int rmi_input_event(struct hid_device *hdev, u8 *data, int size)
|
||||
{
|
||||
struct rmi_data *hdata = hid_get_drvdata(hdev);
|
||||
struct rmi_device *rmi_dev = hdata->xport.rmi_dev;
|
||||
- unsigned long flags;
|
||||
|
||||
if (!(test_bit(RMI_STARTED, &hdata->flags)))
|
||||
return 0;
|
||||
|
||||
- local_irq_save(flags);
|
||||
-
|
||||
rmi_set_attn_data(rmi_dev, data[1], &data[2], size - 2);
|
||||
|
||||
- generic_handle_irq(hdata->rmi_irq);
|
||||
-
|
||||
- local_irq_restore(flags);
|
||||
-
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -592,56 +585,6 @@ static const struct rmi_transport_ops hid_rmi_ops = {
|
||||
.reset = rmi_hid_reset,
|
||||
};
|
||||
|
||||
-static void rmi_irq_teardown(void *data)
|
||||
-{
|
||||
- struct rmi_data *hdata = data;
|
||||
- struct irq_domain *domain = hdata->domain;
|
||||
-
|
||||
- if (!domain)
|
||||
- return;
|
||||
-
|
||||
- irq_dispose_mapping(irq_find_mapping(domain, 0));
|
||||
-
|
||||
- irq_domain_remove(domain);
|
||||
- hdata->domain = NULL;
|
||||
- hdata->rmi_irq = 0;
|
||||
-}
|
||||
-
|
||||
-static int rmi_irq_map(struct irq_domain *h, unsigned int virq,
|
||||
- irq_hw_number_t hw_irq_num)
|
||||
-{
|
||||
- irq_set_chip_and_handler(virq, &dummy_irq_chip, handle_simple_irq);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static const struct irq_domain_ops rmi_irq_ops = {
|
||||
- .map = rmi_irq_map,
|
||||
-};
|
||||
-
|
||||
-static int rmi_setup_irq_domain(struct hid_device *hdev)
|
||||
-{
|
||||
- struct rmi_data *hdata = hid_get_drvdata(hdev);
|
||||
- int ret;
|
||||
-
|
||||
- hdata->domain = irq_domain_create_linear(hdev->dev.fwnode, 1,
|
||||
- &rmi_irq_ops, hdata);
|
||||
- if (!hdata->domain)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
- ret = devm_add_action_or_reset(&hdev->dev, &rmi_irq_teardown, hdata);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- hdata->rmi_irq = irq_create_mapping(hdata->domain, 0);
|
||||
- if (hdata->rmi_irq <= 0) {
|
||||
- hid_err(hdev, "Can't allocate an IRQ\n");
|
||||
- return hdata->rmi_irq < 0 ? hdata->rmi_irq : -ENXIO;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
{
|
||||
struct rmi_data *data = NULL;
|
||||
@@ -714,18 +657,11 @@ static int rmi_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
|
||||
mutex_init(&data->page_mutex);
|
||||
|
||||
- ret = rmi_setup_irq_domain(hdev);
|
||||
- if (ret) {
|
||||
- hid_err(hdev, "failed to allocate IRQ domain\n");
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
if (data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS)
|
||||
rmi_hid_pdata.f30_data.disable = true;
|
||||
|
||||
data->xport.dev = hdev->dev.parent;
|
||||
data->xport.pdata = rmi_hid_pdata;
|
||||
- data->xport.pdata.irq = data->rmi_irq;
|
||||
data->xport.proto_name = "hid";
|
||||
data->xport.ops = &hid_rmi_ops;
|
||||
|
||||
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
|
||||
index 258d5fe3d395..f7298e3dc8f3 100644
|
||||
--- a/drivers/input/rmi4/rmi_driver.c
|
||||
+++ b/drivers/input/rmi4/rmi_driver.c
|
||||
@@ -182,34 +182,47 @@ void rmi_set_attn_data(struct rmi_device *rmi_dev, unsigned long irq_status,
|
||||
attn_data.data = fifo_data;
|
||||
|
||||
kfifo_put(&drvdata->attn_fifo, attn_data);
|
||||
+
|
||||
+ schedule_work(&drvdata->attn_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rmi_set_attn_data);
|
||||
|
||||
-static irqreturn_t rmi_irq_fn(int irq, void *dev_id)
|
||||
+static void attn_callback(struct work_struct *work)
|
||||
{
|
||||
- struct rmi_device *rmi_dev = dev_id;
|
||||
- struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev);
|
||||
+ struct rmi_driver_data *drvdata = container_of(work,
|
||||
+ struct rmi_driver_data,
|
||||
+ attn_work);
|
||||
struct rmi4_attn_data attn_data = {0};
|
||||
int ret, count;
|
||||
|
||||
count = kfifo_get(&drvdata->attn_fifo, &attn_data);
|
||||
- if (count) {
|
||||
- *(drvdata->irq_status) = attn_data.irq_status;
|
||||
- drvdata->attn_data = attn_data;
|
||||
- }
|
||||
+ if (!count)
|
||||
+ return;
|
||||
|
||||
- ret = rmi_process_interrupt_requests(rmi_dev);
|
||||
+ *(drvdata->irq_status) = attn_data.irq_status;
|
||||
+ drvdata->attn_data = attn_data;
|
||||
+
|
||||
+ ret = rmi_process_interrupt_requests(drvdata->rmi_dev);
|
||||
if (ret)
|
||||
- rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev,
|
||||
+ rmi_dbg(RMI_DEBUG_CORE, &drvdata->rmi_dev->dev,
|
||||
"Failed to process interrupt request: %d\n", ret);
|
||||
|
||||
- if (count) {
|
||||
- kfree(attn_data.data);
|
||||
- drvdata->attn_data.data = NULL;
|
||||
- }
|
||||
+ kfree(attn_data.data);
|
||||
+ drvdata->attn_data.data = NULL;
|
||||
|
||||
if (!kfifo_is_empty(&drvdata->attn_fifo))
|
||||
- return rmi_irq_fn(irq, dev_id);
|
||||
+ schedule_work(&drvdata->attn_work);
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t rmi_irq_fn(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct rmi_device *rmi_dev = dev_id;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = rmi_process_interrupt_requests(rmi_dev);
|
||||
+ if (ret)
|
||||
+ rmi_dbg(RMI_DEBUG_CORE, &rmi_dev->dev,
|
||||
+ "Failed to process interrupt request: %d\n", ret);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@@ -217,7 +230,6 @@ static irqreturn_t rmi_irq_fn(int irq, void *dev_id)
|
||||
static int rmi_irq_init(struct rmi_device *rmi_dev)
|
||||
{
|
||||
struct rmi_device_platform_data *pdata = rmi_get_platform_data(rmi_dev);
|
||||
- struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
|
||||
int irq_flags = irq_get_trigger_type(pdata->irq);
|
||||
int ret;
|
||||
|
||||
@@ -235,8 +247,6 @@ static int rmi_irq_init(struct rmi_device *rmi_dev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- data->enabled = true;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -886,23 +896,27 @@ void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake)
|
||||
if (data->enabled)
|
||||
goto out;
|
||||
|
||||
- enable_irq(irq);
|
||||
- data->enabled = true;
|
||||
- if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) {
|
||||
- retval = disable_irq_wake(irq);
|
||||
- if (retval)
|
||||
- dev_warn(&rmi_dev->dev,
|
||||
- "Failed to disable irq for wake: %d\n",
|
||||
- retval);
|
||||
- }
|
||||
+ if (irq) {
|
||||
+ enable_irq(irq);
|
||||
+ data->enabled = true;
|
||||
+ if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) {
|
||||
+ retval = disable_irq_wake(irq);
|
||||
+ if (retval)
|
||||
+ dev_warn(&rmi_dev->dev,
|
||||
+ "Failed to disable irq for wake: %d\n",
|
||||
+ retval);
|
||||
+ }
|
||||
|
||||
- /*
|
||||
- * Call rmi_process_interrupt_requests() after enabling irq,
|
||||
- * otherwise we may lose interrupt on edge-triggered systems.
|
||||
- */
|
||||
- irq_flags = irq_get_trigger_type(pdata->irq);
|
||||
- if (irq_flags & IRQ_TYPE_EDGE_BOTH)
|
||||
- rmi_process_interrupt_requests(rmi_dev);
|
||||
+ /*
|
||||
+ * Call rmi_process_interrupt_requests() after enabling irq,
|
||||
+ * otherwise we may lose interrupt on edge-triggered systems.
|
||||
+ */
|
||||
+ irq_flags = irq_get_trigger_type(pdata->irq);
|
||||
+ if (irq_flags & IRQ_TYPE_EDGE_BOTH)
|
||||
+ rmi_process_interrupt_requests(rmi_dev);
|
||||
+ } else {
|
||||
+ data->enabled = true;
|
||||
+ }
|
||||
|
||||
out:
|
||||
mutex_unlock(&data->enabled_mutex);
|
||||
@@ -922,20 +936,22 @@ void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake)
|
||||
goto out;
|
||||
|
||||
data->enabled = false;
|
||||
- disable_irq(irq);
|
||||
- if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) {
|
||||
- retval = enable_irq_wake(irq);
|
||||
- if (retval)
|
||||
- dev_warn(&rmi_dev->dev,
|
||||
- "Failed to enable irq for wake: %d\n",
|
||||
- retval);
|
||||
- }
|
||||
-
|
||||
- /* make sure the fifo is clean */
|
||||
- while (!kfifo_is_empty(&data->attn_fifo)) {
|
||||
- count = kfifo_get(&data->attn_fifo, &attn_data);
|
||||
- if (count)
|
||||
- kfree(attn_data.data);
|
||||
+ if (irq) {
|
||||
+ disable_irq(irq);
|
||||
+ if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) {
|
||||
+ retval = enable_irq_wake(irq);
|
||||
+ if (retval)
|
||||
+ dev_warn(&rmi_dev->dev,
|
||||
+ "Failed to enable irq for wake: %d\n",
|
||||
+ retval);
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* make sure the fifo is clean */
|
||||
+ while (!kfifo_is_empty(&data->attn_fifo)) {
|
||||
+ count = kfifo_get(&data->attn_fifo, &attn_data);
|
||||
+ if (count)
|
||||
+ kfree(attn_data.data);
|
||||
+ }
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -981,6 +997,8 @@ static int rmi_driver_remove(struct device *dev)
|
||||
irq_domain_remove(data->irqdomain);
|
||||
data->irqdomain = NULL;
|
||||
|
||||
+ cancel_work_sync(&data->attn_work);
|
||||
+
|
||||
rmi_f34_remove_sysfs(rmi_dev);
|
||||
rmi_free_function_list(rmi_dev);
|
||||
|
||||
@@ -1219,9 +1237,15 @@ static int rmi_driver_probe(struct device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
- retval = rmi_irq_init(rmi_dev);
|
||||
- if (retval < 0)
|
||||
- goto err_destroy_functions;
|
||||
+ if (pdata->irq) {
|
||||
+ retval = rmi_irq_init(rmi_dev);
|
||||
+ if (retval < 0)
|
||||
+ goto err_destroy_functions;
|
||||
+ }
|
||||
+
|
||||
+ data->enabled = true;
|
||||
+
|
||||
+ INIT_WORK(&data->attn_work, attn_callback);
|
||||
|
||||
if (data->f01_container->dev.driver) {
|
||||
/* Driver already bound, so enable ATTN now. */
|
||||
diff --git a/include/linux/rmi.h b/include/linux/rmi.h
|
||||
index 7b22366d0065..307a651b2755 100644
|
||||
--- a/include/linux/rmi.h
|
||||
+++ b/include/linux/rmi.h
|
||||
@@ -363,6 +363,7 @@ struct rmi_driver_data {
|
||||
|
||||
struct rmi4_attn_data attn_data;
|
||||
DECLARE_KFIFO(attn_fifo, struct rmi4_attn_data, 16);
|
||||
+ struct work_struct attn_work;
|
||||
};
|
||||
|
||||
int rmi_register_transport_device(struct rmi_transport_dev *xport);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Holmes <robeholmes@gmail.com>
|
||||
Date: Tue, 23 Apr 2019 07:39:29 +0000
|
||||
Subject: [PATCH] KEYS: Make use of platform keyring for module signature
|
||||
verify
|
||||
|
||||
This patch completes commit 278311e417be ("kexec, KEYS: Make use of
|
||||
platform keyring for signature verify") which, while adding the
|
||||
platform keyring for bzImage verification, neglected to also add
|
||||
this keyring for module verification.
|
||||
|
||||
As such, kernel modules signed with keys from the MokList variable
|
||||
were not successfully verified.
|
||||
|
||||
Signed-off-by: Robert Holmes <robeholmes@gmail.com>
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
kernel/module_signing.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
|
||||
index 9d9fc678c91d..84ad75a53c83 100644
|
||||
--- a/kernel/module_signing.c
|
||||
+++ b/kernel/module_signing.c
|
||||
@@ -38,8 +38,15 @@ int mod_verify_sig(const void *mod, struct load_info *info)
|
||||
modlen -= sig_len + sizeof(ms);
|
||||
info->len = modlen;
|
||||
|
||||
- return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
VERIFY_USE_SECONDARY_KEYRING,
|
||||
VERIFYING_MODULE_SIGNATURE,
|
||||
NULL, NULL);
|
||||
+ if (ret == -ENOKEY && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) {
|
||||
+ ret = verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
|
||||
+ VERIFY_USE_PLATFORM_KEYRING,
|
||||
+ VERIFYING_MODULE_SIGNATURE,
|
||||
+ NULL, NULL);
|
||||
+ }
|
||||
+ return ret;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 2 Oct 2017 18:18:30 -0400
|
||||
Subject: [PATCH] Make get_cert_list() use efi_status_to_str() to print error
|
||||
messages.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
security/integrity/platform_certs/load_uefi.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/security/integrity/platform_certs/load_uefi.c b/security/integrity/platform_certs/load_uefi.c
|
||||
index 253fb9a7fc98..8c95b68d86d4 100644
|
||||
--- a/security/integrity/platform_certs/load_uefi.c
|
||||
+++ b/security/integrity/platform_certs/load_uefi.c
|
||||
@@ -46,7 +46,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
return NULL;
|
||||
|
||||
if (*status != EFI_BUFFER_TOO_SMALL) {
|
||||
- pr_err("Couldn't get size: 0x%lx\n", *status);
|
||||
+ pr_err("Couldn't get size: %s (0x%lx)\n",
|
||||
+ efi_status_to_str(*status), *status);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -57,7 +58,8 @@ static __init void *get_cert_list(efi_char16_t *name, efi_guid_t *guid,
|
||||
*status = efi.get_variable(name, guid, NULL, &lsize, db);
|
||||
if (*status != EFI_SUCCESS) {
|
||||
kfree(db);
|
||||
- pr_err("Error reading db var: 0x%lx\n", *status);
|
||||
+ pr_err("Error reading db var: %s (0x%lx)\n",
|
||||
+ efi_status_to_str(*status), *status);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
240
0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch
Normal file
240
0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch
Normal file
|
|
@ -0,0 +1,240 @@
|
|||
From 9134295c0515492b1ab7733c0290b2afde336d6b Mon Sep 17 00:00:00 2001
|
||||
From: Vidya Sagar <vidyas@nvidia.com>
|
||||
Date: Sat, 11 Jan 2020 00:45:00 +0530
|
||||
Subject: [PATCH] PCI: Add MCFG quirks for Tegra194 host controllers
|
||||
|
||||
The PCIe controller in Tegra194 SoC is not completely ECAM-compliant.
|
||||
With the current hardware design limitations in place, ECAM can be enabled
|
||||
only for one controller (C5 controller to be precise) with bus numbers
|
||||
starting from 160 instead of 0. A different approach is taken to avoid this
|
||||
abnormal way of enabling ECAM for just one controller but to enable
|
||||
configuration space access for all the other controllers. In this approach,
|
||||
ops are added through MCFG quirk mechanism which access the configuration
|
||||
spaces by dynamically programming iATU (internal AddressTranslation Unit)
|
||||
to generate respective configuration accesses just like the way it is
|
||||
done in DesignWare core sub-system.
|
||||
|
||||
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
|
||||
Acked-by: Thierry Reding <treding@nvidia.com>
|
||||
[ Updated by jonathanh@nvidia.com only permit building the Tegra194
|
||||
PCIe driver into the kernel and not as a module ]
|
||||
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 7 ++
|
||||
drivers/pci/controller/dwc/Kconfig | 10 +-
|
||||
drivers/pci/controller/dwc/Makefile | 2 +-
|
||||
drivers/pci/controller/dwc/pcie-tegra194.c | 102 +++++++++++++++++++++
|
||||
include/linux/pci-ecam.h | 1 +
|
||||
5 files changed, 117 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index 54b36b7ad47d9..6573d495d9c1f 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -116,6 +116,13 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
THUNDER_ECAM_QUIRK(2, 12),
|
||||
THUNDER_ECAM_QUIRK(2, 13),
|
||||
|
||||
+ { "NVIDIA", "TEGRA194", 1, 0, MCFG_BUS_ANY, &tegra194_pcie_ops},
|
||||
+ { "NVIDIA", "TEGRA194", 1, 1, MCFG_BUS_ANY, &tegra194_pcie_ops},
|
||||
+ { "NVIDIA", "TEGRA194", 1, 2, MCFG_BUS_ANY, &tegra194_pcie_ops},
|
||||
+ { "NVIDIA", "TEGRA194", 1, 3, MCFG_BUS_ANY, &tegra194_pcie_ops},
|
||||
+ { "NVIDIA", "TEGRA194", 1, 4, MCFG_BUS_ANY, &tegra194_pcie_ops},
|
||||
+ { "NVIDIA", "TEGRA194", 1, 5, MCFG_BUS_ANY, &tegra194_pcie_ops},
|
||||
+
|
||||
#define XGENE_V1_ECAM_MCFG(rev, seg) \
|
||||
{"APM ", "XGENE ", rev, seg, MCFG_BUS_ANY, \
|
||||
&xgene_v1_pcie_ecam_ops }
|
||||
diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
|
||||
index 044a3761c44f2..e4ee4bf9ac64a 100644
|
||||
--- a/drivers/pci/controller/dwc/Kconfig
|
||||
+++ b/drivers/pci/controller/dwc/Kconfig
|
||||
@@ -247,25 +247,27 @@ config PCI_MESON
|
||||
implement the driver.
|
||||
|
||||
config PCIE_TEGRA194
|
||||
- tristate
|
||||
+ bool
|
||||
|
||||
config PCIE_TEGRA194_HOST
|
||||
- tristate "NVIDIA Tegra194 (and later) PCIe controller - Host Mode"
|
||||
+ bool "NVIDIA Tegra194 (and later) PCIe controller - Host Mode"
|
||||
depends on ARCH_TEGRA_194_SOC || COMPILE_TEST
|
||||
depends on PCI_MSI_IRQ_DOMAIN
|
||||
select PCIE_DW_HOST
|
||||
select PHY_TEGRA194_P2U
|
||||
select PCIE_TEGRA194
|
||||
+ default y if ARCH_TEGRA_194_SOC
|
||||
help
|
||||
Enables support for the PCIe controller in the NVIDIA Tegra194 SoC to
|
||||
work in host mode. There are two instances of PCIe controllers in
|
||||
Tegra194. This controller can work either as EP or RC. In order to
|
||||
enable host-specific features PCIE_TEGRA194_HOST must be selected and
|
||||
in order to enable device-specific features PCIE_TEGRA194_EP must be
|
||||
- selected. This uses the DesignWare core.
|
||||
+ selected. This uses the DesignWare core. ACPI platforms with Tegra194
|
||||
+ don't need to enable this.
|
||||
|
||||
config PCIE_TEGRA194_EP
|
||||
- tristate "NVIDIA Tegra194 (and later) PCIe controller - Endpoint Mode"
|
||||
+ bool "NVIDIA Tegra194 (and later) PCIe controller - Endpoint Mode"
|
||||
depends on ARCH_TEGRA_194_SOC || COMPILE_TEST
|
||||
depends on PCI_ENDPOINT
|
||||
select PCIE_DW_EP
|
||||
diff --git a/drivers/pci/controller/dwc/Makefile b/drivers/pci/controller/dwc/Makefile
|
||||
index a751553fa0dbd..dbb9818765566 100644
|
||||
--- a/drivers/pci/controller/dwc/Makefile
|
||||
+++ b/drivers/pci/controller/dwc/Makefile
|
||||
@@ -17,7 +17,6 @@ obj-$(CONFIG_PCIE_INTEL_GW) += pcie-intel-gw.o
|
||||
obj-$(CONFIG_PCIE_KIRIN) += pcie-kirin.o
|
||||
obj-$(CONFIG_PCIE_HISI_STB) += pcie-histb.o
|
||||
obj-$(CONFIG_PCI_MESON) += pci-meson.o
|
||||
-obj-$(CONFIG_PCIE_TEGRA194) += pcie-tegra194.o
|
||||
obj-$(CONFIG_PCIE_UNIPHIER) += pcie-uniphier.o
|
||||
obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o
|
||||
|
||||
@@ -34,4 +33,5 @@ obj-$(CONFIG_PCIE_UNIPHIER_EP) += pcie-uniphier-ep.o
|
||||
ifdef CONFIG_PCI
|
||||
obj-$(CONFIG_ARM64) += pcie-al.o
|
||||
obj-$(CONFIG_ARM64) += pcie-hisi.o
|
||||
+obj-$(CONFIG_ARM64) += pcie-tegra194.o
|
||||
endif
|
||||
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
|
||||
index 92b77f7d83546..7b3d581795197 100644
|
||||
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
|
||||
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_pci.h>
|
||||
#include <linux/pci.h>
|
||||
+#include <linux/pci-acpi.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/platform_device.h>
|
||||
@@ -324,6 +326,103 @@ struct tegra_pcie_dw_of_data {
|
||||
enum dw_pcie_device_mode mode;
|
||||
};
|
||||
|
||||
+#if defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS)
|
||||
+struct tegra194_pcie_acpi {
|
||||
+ void __iomem *config_base;
|
||||
+ void __iomem *iatu_base;
|
||||
+ void __iomem *dbi_base;
|
||||
+};
|
||||
+
|
||||
+static int tegra194_acpi_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ struct tegra194_pcie_acpi *pcie;
|
||||
+
|
||||
+ pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
|
||||
+ if (!pcie)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ pcie->config_base = cfg->win;
|
||||
+ pcie->iatu_base = cfg->win + SZ_256K;
|
||||
+ pcie->dbi_base = cfg->win + SZ_512K;
|
||||
+ cfg->priv = pcie;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline void atu_reg_write(struct tegra194_pcie_acpi *pcie, int index,
|
||||
+ u32 val, u32 reg)
|
||||
+{
|
||||
+ u32 offset = PCIE_GET_ATU_OUTB_UNR_REG_OFFSET(index);
|
||||
+
|
||||
+ writel(val, pcie->iatu_base + offset + reg);
|
||||
+}
|
||||
+
|
||||
+static void program_outbound_atu(struct tegra194_pcie_acpi *pcie, int index,
|
||||
+ int type, u64 cpu_addr, u64 pci_addr, u64 size)
|
||||
+{
|
||||
+ atu_reg_write(pcie, index, lower_32_bits(cpu_addr),
|
||||
+ PCIE_ATU_LOWER_BASE);
|
||||
+ atu_reg_write(pcie, index, upper_32_bits(cpu_addr),
|
||||
+ PCIE_ATU_UPPER_BASE);
|
||||
+ atu_reg_write(pcie, index, lower_32_bits(pci_addr),
|
||||
+ PCIE_ATU_LOWER_TARGET);
|
||||
+ atu_reg_write(pcie, index, lower_32_bits(cpu_addr + size - 1),
|
||||
+ PCIE_ATU_LIMIT);
|
||||
+ atu_reg_write(pcie, index, upper_32_bits(pci_addr),
|
||||
+ PCIE_ATU_UPPER_TARGET);
|
||||
+ atu_reg_write(pcie, index, type, PCIE_ATU_CR1);
|
||||
+ atu_reg_write(pcie, index, PCIE_ATU_ENABLE, PCIE_ATU_CR2);
|
||||
+}
|
||||
+
|
||||
+static void __iomem *tegra194_map_bus(struct pci_bus *bus,
|
||||
+ unsigned int devfn, int where)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct tegra194_pcie_acpi *pcie = cfg->priv;
|
||||
+ u32 busdev;
|
||||
+ int type;
|
||||
+
|
||||
+ if (bus->number < cfg->busr.start || bus->number > cfg->busr.end)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if (bus->number == cfg->busr.start) {
|
||||
+ if (PCI_SLOT(devfn) == 0)
|
||||
+ return pcie->dbi_base + where;
|
||||
+ else
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) |
|
||||
+ PCIE_ATU_FUNC(PCI_FUNC(devfn));
|
||||
+
|
||||
+ if (bus->parent->number == cfg->busr.start) {
|
||||
+ if (PCI_SLOT(devfn) == 0)
|
||||
+ type = PCIE_ATU_TYPE_CFG0;
|
||||
+ else
|
||||
+ return NULL;
|
||||
+ } else {
|
||||
+ type = PCIE_ATU_TYPE_CFG1;
|
||||
+ }
|
||||
+
|
||||
+ program_outbound_atu(pcie, PCIE_ATU_REGION_INDEX0, type,
|
||||
+ cfg->res.start, busdev, SZ_256K);
|
||||
+ return (void __iomem *)(pcie->config_base + where);
|
||||
+}
|
||||
+
|
||||
+const struct pci_ecam_ops tegra194_pcie_ops = {
|
||||
+ .bus_shift = 20,
|
||||
+ .init = tegra194_acpi_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = tegra194_map_bus,
|
||||
+ .read = pci_generic_config_read,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+#endif /* defined(CONFIG_ACPI) && defined(CONFIG_PCI_QUIRKS) */
|
||||
+
|
||||
+#ifdef CONFIG_PCIE_TEGRA194
|
||||
+
|
||||
static inline struct tegra_pcie_dw *to_tegra_pcie(struct dw_pcie *pci)
|
||||
{
|
||||
return container_of(pci, struct tegra_pcie_dw, pci);
|
||||
@@ -2405,3 +2504,6 @@ MODULE_DEVICE_TABLE(of, tegra_pcie_dw_of_match);
|
||||
MODULE_AUTHOR("Vidya Sagar <vidyas@nvidia.com>");
|
||||
MODULE_DESCRIPTION("NVIDIA PCIe host controller driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
+
|
||||
+#endif /* CONFIG_PCIE_TEGRA194 */
|
||||
+
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 1af5cb02ef7f9..3fb16ada505a0 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -57,6 +57,7 @@ extern const struct pci_ecam_ops pci_thunder_ecam_ops; /* Cavium ThunderX 1.x */
|
||||
extern const struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */
|
||||
extern const struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */
|
||||
extern const struct pci_ecam_ops al_pcie_ops; /* Amazon Annapurna Labs PCIe */
|
||||
+extern const struct pci_ecam_ops tegra194_pcie_ops; /* Tegra194 PCIe */
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_PCI_HOST_COMMON)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 12 Jul 2020 13:42:14 +0100
|
||||
Subject: [PATCH] Revert "arm64: allwinner: dts: a64: add LCD-related device
|
||||
nodes for PinePhone"
|
||||
|
||||
This reverts commit 6b9deda8c30064a254bc66e3f6763281c96db7db.
|
||||
---
|
||||
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 37 -------------------
|
||||
1 file changed, 37 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
index 96d9150423e0..cefda145c3c9 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
@@ -16,15 +16,6 @@ aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
- backlight: backlight {
|
||||
- compatible = "pwm-backlight";
|
||||
- pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
- brightness-levels = <0 16 18 20 22 24 26 29 32 35 38 42 46 51 56 62 68 75 83 91 100>;
|
||||
- default-brightness-level = <15>;
|
||||
- enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
|
||||
- power-supply = <®_ldo_io0>;
|
||||
- };
|
||||
-
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
@@ -93,30 +84,6 @@ &dai {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&de {
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
-&dphy {
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
-&dsi {
|
||||
- vcc-dsi-supply = <®_dldo1>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- status = "okay";
|
||||
-
|
||||
- panel@0 {
|
||||
- compatible = "xingbangda,xbd599";
|
||||
- reg = <0>;
|
||||
- reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
|
||||
- iovcc-supply = <®_dldo2>;
|
||||
- vcc-supply = <®_ldo_io0>;
|
||||
- backlight = <&backlight>;
|
||||
- };
|
||||
-};
|
||||
-
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -221,10 +188,6 @@ &r_pio {
|
||||
*/
|
||||
};
|
||||
|
||||
-&r_pwm {
|
||||
- status = "okay";
|
||||
-};
|
||||
-
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
418
0001-Revert-drm-panel-add-Xingbangda-XBD599-panel.patch
Normal file
418
0001-Revert-drm-panel-add-Xingbangda-XBD599-panel.patch
Normal file
|
|
@ -0,0 +1,418 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 12 Jul 2020 13:41:56 +0100
|
||||
Subject: [PATCH] Revert "drm: panel: add Xingbangda XBD599 panel"
|
||||
|
||||
This reverts commit 5d53795bb19e39f048ac8028ec36ff04765e1237.
|
||||
---
|
||||
drivers/gpu/drm/panel/Kconfig | 9 -
|
||||
drivers/gpu/drm/panel/Makefile | 1 -
|
||||
.../gpu/drm/panel/panel-xingbangda-xbd599.c | 366 ------------------
|
||||
3 files changed, 376 deletions(-)
|
||||
delete mode 100644 drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
|
||||
index 1f55a87bb657..39055c1f0e2f 100644
|
||||
--- a/drivers/gpu/drm/panel/Kconfig
|
||||
+++ b/drivers/gpu/drm/panel/Kconfig
|
||||
@@ -462,15 +462,6 @@ config DRM_PANEL_VISIONOX_RM69299
|
||||
Say Y here if you want to enable support for Visionox
|
||||
RM69299 DSI Video Mode panel.
|
||||
|
||||
-config DRM_PANEL_XINGBANGDA_XBD599
|
||||
- tristate "Xingbangda XBD599 panel"
|
||||
- depends on OF
|
||||
- depends on DRM_MIPI_DSI
|
||||
- depends on BACKLIGHT_CLASS_DEVICE
|
||||
- help
|
||||
- Say Y here if you want to enable support for the Xingbangda XBD599
|
||||
- MIPI DSI Video Mode panel.
|
||||
-
|
||||
config DRM_PANEL_XINPENG_XPP055C272
|
||||
tristate "Xinpeng XPP055C272 panel driver"
|
||||
depends on OF
|
||||
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
|
||||
index 7b6b0c0397d6..de74f282c433 100644
|
||||
--- a/drivers/gpu/drm/panel/Makefile
|
||||
+++ b/drivers/gpu/drm/panel/Makefile
|
||||
@@ -49,5 +49,4 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
|
||||
obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o
|
||||
obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o
|
||||
obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o
|
||||
-obj-$(CONFIG_DRM_PANEL_XINGBANGDA_XBD599) += panel-xingbangda-xbd599.o
|
||||
obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o
|
||||
diff --git a/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
|
||||
deleted file mode 100644
|
||||
index b483f96ee1db..000000000000
|
||||
--- a/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
|
||||
+++ /dev/null
|
||||
@@ -1,366 +0,0 @@
|
||||
-// SPDX-License-Identifier: GPL-2.0
|
||||
-/*
|
||||
- * Xingbangda XBD599 MIPI-DSI panel driver
|
||||
- *
|
||||
- * Copyright (C) 2019-2020 Icenowy Zheng <icenowy@aosc.io>
|
||||
- *
|
||||
- * Based on panel-rocktech-jh057n00900.c, which is:
|
||||
- * Copyright (C) Purism SPC 2019
|
||||
- */
|
||||
-
|
||||
-#include <linux/delay.h>
|
||||
-#include <linux/gpio/consumer.h>
|
||||
-#include <linux/mod_devicetable.h>
|
||||
-#include <linux/module.h>
|
||||
-#include <linux/of_device.h>
|
||||
-#include <linux/regulator/consumer.h>
|
||||
-
|
||||
-#include <drm/drm_mipi_dsi.h>
|
||||
-#include <drm/drm_modes.h>
|
||||
-#include <drm/drm_panel.h>
|
||||
-#include <drm/drm_print.h>
|
||||
-
|
||||
-/* Manufacturer specific Commands send via DSI */
|
||||
-#define ST7703_CMD_ALL_PIXEL_OFF 0x22
|
||||
-#define ST7703_CMD_ALL_PIXEL_ON 0x23
|
||||
-#define ST7703_CMD_SETDISP 0xB2
|
||||
-#define ST7703_CMD_SETRGBIF 0xB3
|
||||
-#define ST7703_CMD_SETCYC 0xB4
|
||||
-#define ST7703_CMD_SETBGP 0xB5
|
||||
-#define ST7703_CMD_SETVCOM 0xB6
|
||||
-#define ST7703_CMD_SETOTP 0xB7
|
||||
-#define ST7703_CMD_SETPOWER_EXT 0xB8
|
||||
-#define ST7703_CMD_SETEXTC 0xB9
|
||||
-#define ST7703_CMD_SETMIPI 0xBA
|
||||
-#define ST7703_CMD_SETVDC 0xBC
|
||||
-#define ST7703_CMD_SETSCR 0xC0
|
||||
-#define ST7703_CMD_SETPOWER 0xC1
|
||||
-#define ST7703_CMD_UNK_C6 0xC6
|
||||
-#define ST7703_CMD_SETPANEL 0xCC
|
||||
-#define ST7703_CMD_SETGAMMA 0xE0
|
||||
-#define ST7703_CMD_SETEQ 0xE3
|
||||
-#define ST7703_CMD_SETGIP1 0xE9
|
||||
-#define ST7703_CMD_SETGIP2 0xEA
|
||||
-
|
||||
-static const char * const regulator_names[] = {
|
||||
- "iovcc",
|
||||
- "vcc",
|
||||
-};
|
||||
-
|
||||
-struct xbd599 {
|
||||
- struct device *dev;
|
||||
- struct drm_panel panel;
|
||||
- struct gpio_desc *reset_gpio;
|
||||
- struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)];
|
||||
- bool prepared;
|
||||
-};
|
||||
-
|
||||
-static inline struct xbd599 *panel_to_xbd599(struct drm_panel *panel)
|
||||
-{
|
||||
- return container_of(panel, struct xbd599, panel);
|
||||
-}
|
||||
-
|
||||
-#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \
|
||||
- static const u8 d[] = { seq }; \
|
||||
- int ret; \
|
||||
- ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \
|
||||
- if (ret < 0) \
|
||||
- return ret; \
|
||||
- } while (0)
|
||||
-
|
||||
-static int xbd599_init_sequence(struct xbd599 *ctx)
|
||||
-{
|
||||
- struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
- struct device *dev = ctx->dev;
|
||||
- int ret;
|
||||
-
|
||||
- /*
|
||||
- * Init sequence was supplied by the panel vendor.
|
||||
- */
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC,
|
||||
- 0xF1, 0x12, 0x83);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
|
||||
- 0x33, 0x81, 0x05, 0xF9, 0x0E, 0x0E, 0x20, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
|
||||
- 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, 0x4F, 0x11,
|
||||
- 0x00, 0x00, 0x37);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT,
|
||||
- 0x25, 0x22, 0x20, 0x03);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
- 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00,
|
||||
- 0x00, 0x00);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
- 0x73, 0x73, 0x50, 0x50, 0x00, 0xC0, 0x08, 0x70,
|
||||
- 0x00);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0xF0);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
- 0x00, 0x00, 0x0B, 0x0B, 0x10, 0x10, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10);
|
||||
- dsi_dcs_write_seq(dsi, 0xC6, 0x01, 0x00, 0xFF, 0xFF, 0x00);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
|
||||
- 0x74, 0x00, 0x32, 0x32, 0x77, 0xF1, 0xFF, 0xFF,
|
||||
- 0xCC, 0xCC, 0x77, 0x77);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x07, 0x07);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x2C, 0x2C);
|
||||
- dsi_dcs_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00);
|
||||
-
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
- 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12,
|
||||
- 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
- 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
- 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88,
|
||||
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64,
|
||||
- 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
- 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
- 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
- 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
- 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A,
|
||||
- 0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
- dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
- 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35,
|
||||
- 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12,
|
||||
- 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41,
|
||||
- 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12,
|
||||
- 0x12, 0x18);
|
||||
- msleep(20);
|
||||
-
|
||||
- ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(dev, "Failed to exit sleep mode\n");
|
||||
- return ret;
|
||||
- }
|
||||
- msleep(250);
|
||||
-
|
||||
- ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
- msleep(50);
|
||||
-
|
||||
- DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n");
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int xbd599_prepare(struct drm_panel *panel)
|
||||
-{
|
||||
- struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
- int ret;
|
||||
-
|
||||
- if (ctx->prepared)
|
||||
- return 0;
|
||||
-
|
||||
- ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n");
|
||||
- gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
- usleep_range(20, 40);
|
||||
- gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
- msleep(20);
|
||||
-
|
||||
- ctx->prepared = true;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int xbd599_enable(struct drm_panel *panel)
|
||||
-{
|
||||
- struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
- int ret;
|
||||
-
|
||||
- ret = xbd599_init_sequence(ctx);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n",
|
||||
- ret);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int xbd599_disable(struct drm_panel *panel)
|
||||
-{
|
||||
- struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
- struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
-
|
||||
- return mipi_dsi_dcs_set_display_off(dsi);
|
||||
-}
|
||||
-
|
||||
-static int xbd599_unprepare(struct drm_panel *panel)
|
||||
-{
|
||||
- struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
-
|
||||
- if (!ctx->prepared)
|
||||
- return 0;
|
||||
-
|
||||
- gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
- regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
|
||||
- ctx->prepared = false;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static const struct drm_display_mode xbd599_default_mode = {
|
||||
- .hdisplay = 720,
|
||||
- .hsync_start = 720 + 40,
|
||||
- .hsync_end = 720 + 40 + 40,
|
||||
- .htotal = 720 + 40 + 40 + 40,
|
||||
- .vdisplay = 1440,
|
||||
- .vsync_start = 1440 + 18,
|
||||
- .vsync_end = 1440 + 18 + 10,
|
||||
- .vtotal = 1440 + 18 + 10 + 17,
|
||||
- .vrefresh = 60,
|
||||
- .clock = 69000,
|
||||
- .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
-
|
||||
- .width_mm = 68,
|
||||
- .height_mm = 136,
|
||||
- .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
|
||||
-};
|
||||
-
|
||||
-static int xbd599_get_modes(struct drm_panel *panel,
|
||||
- struct drm_connector *connector)
|
||||
-{
|
||||
- struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
- struct drm_display_mode *mode;
|
||||
-
|
||||
- mode = drm_mode_duplicate(connector->dev, &xbd599_default_mode);
|
||||
- if (!mode) {
|
||||
- DRM_DEV_ERROR(ctx->dev, "Failed to add mode\n");
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
-
|
||||
- drm_mode_set_name(mode);
|
||||
-
|
||||
- mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
- connector->display_info.width_mm = mode->width_mm;
|
||||
- connector->display_info.height_mm = mode->height_mm;
|
||||
- drm_mode_probed_add(connector, mode);
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-static const struct drm_panel_funcs xbd599_drm_funcs = {
|
||||
- .prepare = xbd599_prepare,
|
||||
- .enable = xbd599_enable,
|
||||
- .disable = xbd599_disable,
|
||||
- .unprepare = xbd599_unprepare,
|
||||
- .get_modes = xbd599_get_modes,
|
||||
-};
|
||||
-
|
||||
-static int xbd599_probe(struct mipi_dsi_device *dsi)
|
||||
-{
|
||||
- struct device *dev = &dsi->dev;
|
||||
- struct xbd599 *ctx;
|
||||
- int i, ret;
|
||||
-
|
||||
- ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
- if (!ctx)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
- for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++)
|
||||
- ctx->supplies[i].supply = regulator_names[i];
|
||||
-
|
||||
- ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
|
||||
- ctx->supplies);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(&dsi->dev, "cannot get regulators\n");
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
|
||||
- if (IS_ERR(ctx->reset_gpio)) {
|
||||
- DRM_DEV_ERROR(dev, "cannot get reset gpio\n");
|
||||
- return PTR_ERR(ctx->reset_gpio);
|
||||
- }
|
||||
-
|
||||
- mipi_dsi_set_drvdata(dsi, ctx);
|
||||
-
|
||||
- ctx->dev = dev;
|
||||
-
|
||||
- dsi->lanes = 4;
|
||||
- dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
-
|
||||
- drm_panel_init(&ctx->panel, &dsi->dev, &xbd599_drm_funcs,
|
||||
- DRM_MODE_CONNECTOR_DSI);
|
||||
-
|
||||
- ret = drm_panel_of_backlight(&ctx->panel);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- drm_panel_add(&ctx->panel);
|
||||
-
|
||||
- ret = mipi_dsi_attach(dsi);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(dev, "mipi_dsi_attach failed. Is host ready?\n");
|
||||
- drm_panel_remove(&ctx->panel);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n",
|
||||
- xbd599_default_mode.hdisplay,
|
||||
- xbd599_default_mode.vdisplay,
|
||||
- xbd599_default_mode.vrefresh,
|
||||
- mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static void xbd599_shutdown(struct mipi_dsi_device *dsi)
|
||||
-{
|
||||
- struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
- int ret;
|
||||
-
|
||||
- ret = drm_panel_unprepare(&ctx->panel);
|
||||
- if (ret < 0)
|
||||
- DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n",
|
||||
- ret);
|
||||
-}
|
||||
-
|
||||
-static int xbd599_remove(struct mipi_dsi_device *dsi)
|
||||
-{
|
||||
- struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
- int ret;
|
||||
-
|
||||
- xbd599_shutdown(dsi);
|
||||
-
|
||||
- ret = mipi_dsi_detach(dsi);
|
||||
- if (ret < 0)
|
||||
- DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n",
|
||||
- ret);
|
||||
-
|
||||
- drm_panel_remove(&ctx->panel);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static const struct of_device_id xbd599_of_match[] = {
|
||||
- { .compatible = "xingbangda,xbd599", },
|
||||
- { /* sentinel */ }
|
||||
-};
|
||||
-MODULE_DEVICE_TABLE(of, xbd599_of_match);
|
||||
-
|
||||
-static struct mipi_dsi_driver xbd599_driver = {
|
||||
- .probe = xbd599_probe,
|
||||
- .remove = xbd599_remove,
|
||||
- .shutdown = xbd599_shutdown,
|
||||
- .driver = {
|
||||
- .name = "panel-xingbangda-xbd599",
|
||||
- .of_match_table = xbd599_of_match,
|
||||
- },
|
||||
-};
|
||||
-module_mipi_dsi_driver(xbd599_driver);
|
||||
-
|
||||
-MODULE_AUTHOR("Icenowy Zheng <icenowy@aosc.io>");
|
||||
-MODULE_DESCRIPTION("DRM driver for Xingbangda XBD599 MIPI DSI panel");
|
||||
-MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 12 Jul 2020 13:42:04 +0100
|
||||
Subject: [PATCH] Revert "drm/sun4i: sun6i_mipi_dsi: fix horizontal timing
|
||||
calculation"
|
||||
|
||||
This reverts commit d20a2ac9c6ecf514e115f06b6744b584bbc7c1b8.
|
||||
---
|
||||
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
|
||||
index 52e009dc632b..aa67cb037e9d 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
|
||||
@@ -556,7 +556,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HSA_PACKET_OVERHEAD 10
|
||||
hsa = max((unsigned int)HSA_PACKET_OVERHEAD,
|
||||
- (mode->hsync_end - mode->hsync_start) * Bpp) - HSA_PACKET_OVERHEAD;
|
||||
+ (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
* The backporch is set using a blanking packet (4
|
||||
@@ -565,7 +565,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HBP_PACKET_OVERHEAD 6
|
||||
hbp = max((unsigned int)HBP_PACKET_OVERHEAD,
|
||||
- (mode->htotal - mode->hsync_end) * Bpp) - HBP_PACKET_OVERHEAD;
|
||||
+ (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
* The frontporch is set using a sync event (4 bytes)
|
||||
@@ -575,7 +575,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HFP_PACKET_OVERHEAD 16
|
||||
hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
|
||||
- (mode->hsync_start - mode->hdisplay) * Bpp) - HFP_PACKET_OVERHEAD;
|
||||
+ (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
* The blanking is set using a sync event (4 bytes)
|
||||
@@ -584,8 +584,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HBLK_PACKET_OVERHEAD 10
|
||||
hblk = max((unsigned int)HBLK_PACKET_OVERHEAD,
|
||||
- (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp) -
|
||||
- HBLK_PACKET_OVERHEAD;
|
||||
+ (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp -
|
||||
+ HBLK_PACKET_OVERHEAD);
|
||||
|
||||
/*
|
||||
* And I'm not entirely sure what vblk is about. The driver in
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 12 Jul 2020 13:41:49 +0100
|
||||
Subject: [PATCH] Revert "dt-bindings: panel: add binding for Xingbangda XBD599
|
||||
panel"
|
||||
|
||||
This reverts commit 8a717270db2000ff734d89e9448b32fbc038c49a.
|
||||
---
|
||||
.../display/panel/xingbangda,xbd599.yaml | 50 -------------------
|
||||
1 file changed, 50 deletions(-)
|
||||
delete mode 100644 Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
|
||||
deleted file mode 100644
|
||||
index b27bcf11198f..000000000000
|
||||
--- a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
|
||||
+++ /dev/null
|
||||
@@ -1,50 +0,0 @@
|
||||
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
-%YAML 1.2
|
||||
----
|
||||
-$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml#
|
||||
-$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
-
|
||||
-title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel
|
||||
-
|
||||
-maintainers:
|
||||
- - Icenowy Zheng <icenowy@aosc.io>
|
||||
-
|
||||
-allOf:
|
||||
- - $ref: panel-common.yaml#
|
||||
-
|
||||
-properties:
|
||||
- compatible:
|
||||
- const: xingbangda,xbd599
|
||||
- reg: true
|
||||
- backlight: true
|
||||
- reset-gpios: true
|
||||
- vcc-supply:
|
||||
- description: regulator that supplies the VCC voltage
|
||||
- iovcc-supply:
|
||||
- description: regulator that supplies the IOVCC voltage
|
||||
-
|
||||
-required:
|
||||
- - compatible
|
||||
- - reg
|
||||
- - backlight
|
||||
- - vcc-supply
|
||||
- - iovcc-supply
|
||||
-
|
||||
-additionalProperties: false
|
||||
-
|
||||
-examples:
|
||||
- - |
|
||||
- dsi {
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- panel@0 {
|
||||
- compatible = "xingbangda,xbd599";
|
||||
- reg = <0>;
|
||||
- backlight = <&backlight>;
|
||||
- iovcc-supply = <®_dldo2>;
|
||||
- vcc-supply = <®_ldo_io0>;
|
||||
- };
|
||||
- };
|
||||
-
|
||||
-...
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Richter <rrichter@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 22:59:32 -0400
|
||||
Subject: [PATCH] Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon
|
||||
|
||||
Message-id: <1528412373-19128-2-git-send-email-rrichter@redhat.com>
|
||||
Patchwork-id: 220950
|
||||
O-Subject: [RHEL-8.0 BZ 1563590 v2 1/2] PCI: Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon
|
||||
Bugzilla: 1563590
|
||||
RH-Acked-by: Dean Nelson <dnelson@redhat.com>
|
||||
RH-Acked-by: Mark Langsdorf <mlangsdo@redhat.com>
|
||||
RH-Acked-by: Mark Salter <msalter@redhat.com>
|
||||
|
||||
From: Ashok Kumar Sekar <asekar@redhat.com>
|
||||
|
||||
PCI BAR 5 is not setup correctly for the on-board AHCI
|
||||
controller on Broadcom's Vulcan processor. Added a quirk to fix BAR 5
|
||||
by using BAR 4's resources which are populated correctly but NOT used
|
||||
by the AHCI controller actually.
|
||||
|
||||
RHEL-only:
|
||||
|
||||
Both patches are in RHEL-7.6 also. Inclusion of the patches into RHEL-8
|
||||
was discussed. Since there are partners with Ax system configurations it
|
||||
was decided to carry them in RHEL8 too. See:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1563590#c1
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Ashok Kumar Sekar <asekar@redhat.com>
|
||||
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
|
||||
Signed-off-by: Robert Richter <rrichter@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
drivers/pci/quirks.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index 2ea61abd5830..abb314891f5b 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -4196,6 +4196,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084,
|
||||
quirk_bridge_cavm_thrx2_pcie_root);
|
||||
|
||||
+/*
|
||||
+ * PCI BAR 5 is not setup correctly for the on-board AHCI controller
|
||||
+ * on Broadcom's Vulcan processor. Added a quirk to fix BAR 5 by
|
||||
+ * using BAR 4's resources which are populated correctly and NOT
|
||||
+ * actually used by the AHCI controller.
|
||||
+ */
|
||||
+static void quirk_fix_vulcan_ahci_bars(struct pci_dev *dev)
|
||||
+{
|
||||
+ struct resource *r = &dev->resource[4];
|
||||
+
|
||||
+ if (!(r->flags & IORESOURCE_MEM) || (r->start == 0))
|
||||
+ return;
|
||||
+
|
||||
+ /* Set BAR5 resource to BAR4 */
|
||||
+ dev->resource[5] = *r;
|
||||
+
|
||||
+ /* Update BAR5 in pci config space */
|
||||
+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_5, r->start);
|
||||
+
|
||||
+ /* Clear BAR4's resource */
|
||||
+ memset(r, 0, sizeof(*r));
|
||||
+}
|
||||
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9027, quirk_fix_vulcan_ahci_bars);
|
||||
+
|
||||
/*
|
||||
* Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
|
||||
* class code. Fix it.
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 90750a5b1205a7dcc002224738585b861779cdae Mon Sep 17 00:00:00 2001
|
||||
From: "Justin M. Forbes" <jforbes@fedoraproject.org>
|
||||
Date: Thu, 30 Jul 2020 10:26:11 -0500
|
||||
Subject: [PATCH] Work around for gcc bug
|
||||
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96377
|
||||
|
||||
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
|
||||
---
|
||||
crypto/aegis128-neon-inner.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/crypto/aegis128-neon-inner.c b/crypto/aegis128-neon-inner.c
|
||||
index 2a660ac1bc3a..fa87ff6a2a71 100644
|
||||
--- a/crypto/aegis128-neon-inner.c
|
||||
+++ b/crypto/aegis128-neon-inner.c
|
||||
@@ -148,8 +148,8 @@ void crypto_aegis128_init_neon(void *state, const void *key, const void *iv)
|
||||
kiv,
|
||||
vld1q_u8(const1),
|
||||
vld1q_u8(const0),
|
||||
- k ^ vld1q_u8(const0),
|
||||
- k ^ vld1q_u8(const1),
|
||||
+ (uint8x16_t) (k ^ vld1q_u8(const0)),
|
||||
+ (uint8x16_t) (k ^ vld1q_u8(const1)),
|
||||
}};
|
||||
int i;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
Date: Thu, 10 May 2018 17:38:44 -0400
|
||||
Subject: [PATCH] aarch64: acpi scan: Fix regression related to X-Gene UARTs
|
||||
|
||||
Message-id: <20180510173844.29580-4-msalter@redhat.com>
|
||||
Patchwork-id: 214381
|
||||
O-Subject: [RHEL-8 BZ1519554 3/3] aarch64: acpi scan: Fix regression related to X-Gene UARTs
|
||||
Bugzilla: 1519554
|
||||
RH-Acked-by: Al Stone <astone@redhat.com>
|
||||
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519554
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16144520
|
||||
|
||||
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
|
||||
devices") caused a regression with some X-Gene based platforms (Mustang
|
||||
and M400) with invalid DSDT. The DSDT makes it appear that the UART
|
||||
device is also a slave device attached to itself. With the above commit
|
||||
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
|
||||
be). So check for X-Gene UART device and skip slace device check on it.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
drivers/acpi/scan.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index 8777faced51a..2e60d792005f 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -1572,6 +1572,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||
if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
|
||||
return false;
|
||||
|
||||
+ /*
|
||||
+ * Firmware on some arm64 X-Gene platforms will make the UART
|
||||
+ * device appear as both a UART and a slave of that UART. Just
|
||||
+ * bail out here for X-Gene UARTs.
|
||||
+ */
|
||||
+ if (IS_ENABLED(CONFIG_ARM64) &&
|
||||
+ !strcmp(acpi_device_hid(device), "APMC0D08"))
|
||||
+ return false;
|
||||
+
|
||||
INIT_LIST_HEAD(&resource_list);
|
||||
acpi_dev_get_resources(device, &resource_list,
|
||||
acpi_check_serial_bus_slave,
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Richter <rrichter@redhat.com>
|
||||
Date: Thu, 7 Jun 2018 22:59:33 -0400
|
||||
Subject: [PATCH] ahci: thunderx2: Fix for errata that affects stop engine
|
||||
|
||||
Message-id: <1528412373-19128-3-git-send-email-rrichter@redhat.com>
|
||||
Patchwork-id: 220952
|
||||
O-Subject: [RHEL-8.0 BZ 1563590 v2 2/2] ahci: thunderx2: Fix for errata that affects stop engine
|
||||
Bugzilla: 1563590
|
||||
RH-Acked-by: Dean Nelson <dnelson@redhat.com>
|
||||
RH-Acked-by: Mark Langsdorf <mlangsdo@redhat.com>
|
||||
RH-Acked-by: Mark Salter <msalter@redhat.com>
|
||||
|
||||
From: Jayachandran C <jnair@caviumnetworks.com>
|
||||
|
||||
Apply workaround for this errata:
|
||||
Synopsis: Resetting PxCMD.ST may hang the SATA device
|
||||
|
||||
Description: An internal ping-pong buffer state is not reset
|
||||
correctly for an PxCMD.ST=0 command for a SATA channel. This
|
||||
may cause the SATA interface to hang when a PxCMD.ST=0 command
|
||||
is received.
|
||||
|
||||
Workaround: A SATA_BIU_CORE_ENABLE.sw_init_bsi must be asserted
|
||||
by the driver whenever the PxCMD.ST needs to be de-asserted. This
|
||||
will reset both the ports. So, it may not always work in a 2
|
||||
channel SATA system.
|
||||
|
||||
Resolution: Fix in B0.
|
||||
|
||||
Add the code to ahci_stop_engine() to do this. It is not easy to
|
||||
stop the other "port" since it is associated with a different AHCI
|
||||
interface. Please note that with this fix, SATA reset does not
|
||||
hang any more, but it can cause failures on the other interface
|
||||
if that is in active use.
|
||||
|
||||
Unfortunately, we have nothing other the the CPU ID to check if the
|
||||
SATA block has this issue.
|
||||
|
||||
RHEL-only:
|
||||
|
||||
Both patches are in RHEL-7.6 also. Inclusion of the patches into RHEL-8
|
||||
was discussed. Since there are partners with Ax system configurations it
|
||||
was decided to carry them in RHEL8 too. See:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1563590#c1
|
||||
|
||||
[v3 with new delays]
|
||||
Signed-off-by: Jayachandran C <jnair@caviumnetworks.com>
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Robert Richter <rrichter@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
drivers/ata/libahci.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
|
||||
index ea5bf5f4cbed..71c55cae27ac 100644
|
||||
--- a/drivers/ata/libahci.c
|
||||
+++ b/drivers/ata/libahci.c
|
||||
@@ -666,6 +666,24 @@ int ahci_stop_engine(struct ata_port *ap)
|
||||
tmp &= ~PORT_CMD_START;
|
||||
writel(tmp, port_mmio + PORT_CMD);
|
||||
|
||||
+#ifdef CONFIG_ARM64
|
||||
+ /* Rev Ax of Cavium CN99XX needs a hack for port stop */
|
||||
+ if (dev_is_pci(ap->host->dev) &&
|
||||
+ to_pci_dev(ap->host->dev)->vendor == 0x14e4 &&
|
||||
+ to_pci_dev(ap->host->dev)->device == 0x9027 &&
|
||||
+ midr_is_cpu_model_range(read_cpuid_id(),
|
||||
+ MIDR_CPU_MODEL(ARM_CPU_IMP_BRCM, BRCM_CPU_PART_VULCAN),
|
||||
+ MIDR_CPU_VAR_REV(0, 0),
|
||||
+ MIDR_CPU_VAR_REV(0, MIDR_REVISION_MASK))) {
|
||||
+ tmp = readl(hpriv->mmio + 0x8000);
|
||||
+ udelay(100);
|
||||
+ writel(tmp | (1 << 26), hpriv->mmio + 0x8000);
|
||||
+ udelay(100);
|
||||
+ writel(tmp & ~(1 << 26), hpriv->mmio + 0x8000);
|
||||
+ dev_warn(ap->host->dev, "CN99XX SATA reset workaround applied\n");
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/* wait for engine to stop. This could be as long as 500 msec */
|
||||
tmp = ata_wait_register(ap, port_mmio + PORT_CMD,
|
||||
PORT_CMD_LIST_ON, PORT_CMD_LIST_ON, 1, 500);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Cline <jcline@redhat.com>
|
||||
Date: Tue, 1 Oct 2019 15:51:23 +0000
|
||||
Subject: [PATCH] arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT
|
||||
|
||||
Message-id: <20191001181256.22935-1-jcline@redhat.com>
|
||||
Patchwork-id: 275498
|
||||
O-Subject: [ARK INTERNAL PATCH] [ARK INTERNAL PATCH] [redhat] Add patch
|
||||
to drop the EXPERT setting from ARM64_FORCE_52BIT
|
||||
Bugzilla:
|
||||
RH-Acked-by: Laura Abbott <labbott@redhat.com>
|
||||
|
||||
We don't turn on EXPERT as there are few settings we actually want to
|
||||
mess with. Remove the dependency for ARM64_FORCE_52BIT as we do want
|
||||
that on in debug builds to help find 52-bit bugs.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
arch/arm64/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 66dc41fd49f2..2e0700a451e5 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -861,7 +861,7 @@ endchoice
|
||||
|
||||
config ARM64_FORCE_52BIT
|
||||
bool "Force 52-bit virtual addresses for userspace"
|
||||
- depends on ARM64_VA_BITS_52 && EXPERT
|
||||
+ depends on ARM64_VA_BITS_52
|
||||
help
|
||||
For systems with 52-bit userspace VAs enabled, the kernel will attempt
|
||||
to maintain compatibility with older software by providing 48-bit VAs
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jon Masters <jcm@redhat.com>
|
||||
Date: Thu, 18 Jul 2019 15:47:26 -0400
|
||||
Subject: [PATCH] arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT
|
||||
|
||||
We will use this to force CONFIG_HIGHPTE off on LPAE for now
|
||||
|
||||
Signed-off-by: Jon Masters <jcm@redhat.com>
|
||||
---
|
||||
arch/arm/Kconfig | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||
index 2ac74904a3ce..f0094424f76a 100644
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1549,9 +1549,9 @@ config HIGHMEM
|
||||
If unsure, say n.
|
||||
|
||||
config HIGHPTE
|
||||
- bool "Allocate 2nd-level pagetables from highmem" if EXPERT
|
||||
+ bool "Allocate 2nd-level pagetables from highmem"
|
||||
depends on HIGHMEM
|
||||
- default y
|
||||
+ default n
|
||||
help
|
||||
The VM uses one page of physical memory for each page table.
|
||||
For systems with a lot of processes, this can use a lot of
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Mon, 16 Mar 2020 21:35:03 +0800
|
||||
Subject: [PATCH] arm64: allwinner: dts: a64: add LCD-related device nodes for
|
||||
PinePhone
|
||||
|
||||
PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for
|
||||
display.
|
||||
|
||||
Add its device nodes.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
---
|
||||
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 37 +++++++++++++++++++
|
||||
1 file changed, 37 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
index cefda145c3c9..96d9150423e0 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
@@ -16,6 +16,15 @@ aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
+ backlight: backlight {
|
||||
+ compatible = "pwm-backlight";
|
||||
+ pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
+ brightness-levels = <0 16 18 20 22 24 26 29 32 35 38 42 46 51 56 62 68 75 83 91 100>;
|
||||
+ default-brightness-level = <15>;
|
||||
+ enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
|
||||
+ power-supply = <®_ldo_io0>;
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
@@ -84,6 +93,30 @@ &dai {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dsi {
|
||||
+ vcc-dsi-supply = <®_dldo1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ panel@0 {
|
||||
+ compatible = "xingbangda,xbd599";
|
||||
+ reg = <0>;
|
||||
+ reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
|
||||
+ iovcc-supply = <®_dldo2>;
|
||||
+ vcc-supply = <®_ldo_io0>;
|
||||
+ backlight = <&backlight>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -188,6 +221,10 @@ &r_pio {
|
||||
*/
|
||||
};
|
||||
|
||||
+&r_pwm {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:56:01 +0200
|
||||
Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: Add touchscreen support
|
||||
|
||||
Pinephone has a Goodix GT917S capacitive touchscreen controller on
|
||||
I2C0 bus. Add support for it.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
index 85a7aa5efd32..2d5694446d17 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
@@ -123,6 +123,25 @@ &ehci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&i2c0 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c0_pins>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ touchscreen@5d {
|
||||
+ compatible = "goodix,gt917s", "goodix,gt911";
|
||||
+ reg = <0x5d>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */
|
||||
+ irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
|
||||
+ reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */
|
||||
+ AVDD28-supply = <®_ldo_io0>;
|
||||
+ VDDIO-supply = <®_ldo_io0>;
|
||||
+ touchscreen-size-x = <720>;
|
||||
+ touchscreen-size-y = <1440>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
112
0001-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch
Normal file
112
0001-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Fri, 26 Jun 2020 02:56:00 +0200
|
||||
Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: Enable LCD support on
|
||||
PinePhone
|
||||
|
||||
PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for
|
||||
display.
|
||||
|
||||
Backlight levels curve was optimized by Martijn Braam using a
|
||||
lux meter.
|
||||
|
||||
Add its device nodes.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
Signed-off-by: Martijn Braam <martijn@brixit.nl>
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
.../allwinner/sun50i-a64-pinephone-1.1.dts | 19 ++++++++++
|
||||
.../dts/allwinner/sun50i-a64-pinephone.dtsi | 35 +++++++++++++++++++
|
||||
2 files changed, 54 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
||||
index 06a775c41664..3e99a87e9ce5 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
|
||||
@@ -9,3 +9,22 @@ / {
|
||||
model = "Pine64 PinePhone Braveheart (1.1)";
|
||||
compatible = "pine64,pinephone-1.1", "allwinner,sun50i-a64";
|
||||
};
|
||||
+
|
||||
+&backlight {
|
||||
+ power-supply = <®_ldo_io0>;
|
||||
+ /*
|
||||
+ * PWM backlight circuit on this PinePhone revision was changed since
|
||||
+ * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight
|
||||
+ * being off is around 20%. Duty cycle for the lowest brightness level
|
||||
+ * also varries quite a bit between individual boards, so the lowest
|
||||
+ * value here was chosen as a safe default.
|
||||
+ */
|
||||
+ brightness-levels = <
|
||||
+ 774 793 814 842
|
||||
+ 882 935 1003 1088
|
||||
+ 1192 1316 1462 1633
|
||||
+ 1830 2054 2309 2596
|
||||
+ 2916 3271 3664 4096>;
|
||||
+ num-interpolated-steps = <50>;
|
||||
+ default-brightness-level = <400>;
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
index cefda145c3c9..85a7aa5efd32 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
|
||||
@@ -16,6 +16,13 @@ aliases {
|
||||
serial0 = &uart0;
|
||||
};
|
||||
|
||||
+ backlight: backlight {
|
||||
+ compatible = "pwm-backlight";
|
||||
+ pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>;
|
||||
+ enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
|
||||
+ /* Backlight configuration differs per PinePhone revision. */
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
@@ -84,6 +91,30 @@ &dai {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dphy {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&dsi {
|
||||
+ vcc-dsi-supply = <®_dldo1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ panel@0 {
|
||||
+ compatible = "xingbangda,xbd599";
|
||||
+ reg = <0>;
|
||||
+ reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */
|
||||
+ iovcc-supply = <®_dldo2>;
|
||||
+ vcc-supply = <®_ldo_io0>;
|
||||
+ backlight = <&backlight>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -188,6 +219,10 @@ &r_pio {
|
||||
*/
|
||||
};
|
||||
|
||||
+&r_pwm {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
423
0001-drm-panel-add-Xingbangda-XBD599-panel.patch
Normal file
423
0001-drm-panel-add-Xingbangda-XBD599-panel.patch
Normal file
|
|
@ -0,0 +1,423 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Mon, 16 Mar 2020 21:35:01 +0800
|
||||
Subject: [PATCH] drm: panel: add Xingbangda XBD599 panel
|
||||
|
||||
Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI IPS LCD panel made by
|
||||
Xingbangda, which is used on PinePhone final assembled phones.
|
||||
|
||||
Add support for it.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
---
|
||||
drivers/gpu/drm/panel/Kconfig | 9 +
|
||||
drivers/gpu/drm/panel/Makefile | 1 +
|
||||
.../gpu/drm/panel/panel-xingbangda-xbd599.c | 366 ++++++++++++++++++
|
||||
3 files changed, 376 insertions(+)
|
||||
create mode 100644 drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
|
||||
index 39055c1f0e2f..1f55a87bb657 100644
|
||||
--- a/drivers/gpu/drm/panel/Kconfig
|
||||
+++ b/drivers/gpu/drm/panel/Kconfig
|
||||
@@ -462,6 +462,15 @@ config DRM_PANEL_VISIONOX_RM69299
|
||||
Say Y here if you want to enable support for Visionox
|
||||
RM69299 DSI Video Mode panel.
|
||||
|
||||
+config DRM_PANEL_XINGBANGDA_XBD599
|
||||
+ tristate "Xingbangda XBD599 panel"
|
||||
+ depends on OF
|
||||
+ depends on DRM_MIPI_DSI
|
||||
+ depends on BACKLIGHT_CLASS_DEVICE
|
||||
+ help
|
||||
+ Say Y here if you want to enable support for the Xingbangda XBD599
|
||||
+ MIPI DSI Video Mode panel.
|
||||
+
|
||||
config DRM_PANEL_XINPENG_XPP055C272
|
||||
tristate "Xinpeng XPP055C272 panel driver"
|
||||
depends on OF
|
||||
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
|
||||
index de74f282c433..7b6b0c0397d6 100644
|
||||
--- a/drivers/gpu/drm/panel/Makefile
|
||||
+++ b/drivers/gpu/drm/panel/Makefile
|
||||
@@ -49,4 +49,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
|
||||
obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o
|
||||
obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o
|
||||
obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o
|
||||
+obj-$(CONFIG_DRM_PANEL_XINGBANGDA_XBD599) += panel-xingbangda-xbd599.o
|
||||
obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o
|
||||
diff --git a/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
|
||||
new file mode 100644
|
||||
index 000000000000..b483f96ee1db
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
|
||||
@@ -0,0 +1,366 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Xingbangda XBD599 MIPI-DSI panel driver
|
||||
+ *
|
||||
+ * Copyright (C) 2019-2020 Icenowy Zheng <icenowy@aosc.io>
|
||||
+ *
|
||||
+ * Based on panel-rocktech-jh057n00900.c, which is:
|
||||
+ * Copyright (C) Purism SPC 2019
|
||||
+ */
|
||||
+
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_device.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+
|
||||
+#include <drm/drm_mipi_dsi.h>
|
||||
+#include <drm/drm_modes.h>
|
||||
+#include <drm/drm_panel.h>
|
||||
+#include <drm/drm_print.h>
|
||||
+
|
||||
+/* Manufacturer specific Commands send via DSI */
|
||||
+#define ST7703_CMD_ALL_PIXEL_OFF 0x22
|
||||
+#define ST7703_CMD_ALL_PIXEL_ON 0x23
|
||||
+#define ST7703_CMD_SETDISP 0xB2
|
||||
+#define ST7703_CMD_SETRGBIF 0xB3
|
||||
+#define ST7703_CMD_SETCYC 0xB4
|
||||
+#define ST7703_CMD_SETBGP 0xB5
|
||||
+#define ST7703_CMD_SETVCOM 0xB6
|
||||
+#define ST7703_CMD_SETOTP 0xB7
|
||||
+#define ST7703_CMD_SETPOWER_EXT 0xB8
|
||||
+#define ST7703_CMD_SETEXTC 0xB9
|
||||
+#define ST7703_CMD_SETMIPI 0xBA
|
||||
+#define ST7703_CMD_SETVDC 0xBC
|
||||
+#define ST7703_CMD_SETSCR 0xC0
|
||||
+#define ST7703_CMD_SETPOWER 0xC1
|
||||
+#define ST7703_CMD_UNK_C6 0xC6
|
||||
+#define ST7703_CMD_SETPANEL 0xCC
|
||||
+#define ST7703_CMD_SETGAMMA 0xE0
|
||||
+#define ST7703_CMD_SETEQ 0xE3
|
||||
+#define ST7703_CMD_SETGIP1 0xE9
|
||||
+#define ST7703_CMD_SETGIP2 0xEA
|
||||
+
|
||||
+static const char * const regulator_names[] = {
|
||||
+ "iovcc",
|
||||
+ "vcc",
|
||||
+};
|
||||
+
|
||||
+struct xbd599 {
|
||||
+ struct device *dev;
|
||||
+ struct drm_panel panel;
|
||||
+ struct gpio_desc *reset_gpio;
|
||||
+ struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)];
|
||||
+ bool prepared;
|
||||
+};
|
||||
+
|
||||
+static inline struct xbd599 *panel_to_xbd599(struct drm_panel *panel)
|
||||
+{
|
||||
+ return container_of(panel, struct xbd599, panel);
|
||||
+}
|
||||
+
|
||||
+#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
+static int xbd599_init_sequence(struct xbd599 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ struct device *dev = ctx->dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ /*
|
||||
+ * Init sequence was supplied by the panel vendor.
|
||||
+ */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC,
|
||||
+ 0xF1, 0x12, 0x83);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
|
||||
+ 0x33, 0x81, 0x05, 0xF9, 0x0E, 0x0E, 0x20, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
|
||||
+ 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, 0x4F, 0x11,
|
||||
+ 0x00, 0x00, 0x37);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT,
|
||||
+ 0x25, 0x22, 0x20, 0x03);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
+ 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00,
|
||||
+ 0x00, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
+ 0x73, 0x73, 0x50, 0x50, 0x00, 0xC0, 0x08, 0x70,
|
||||
+ 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0xF0);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
+ 0x00, 0x00, 0x0B, 0x0B, 0x10, 0x10, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10);
|
||||
+ dsi_dcs_write_seq(dsi, 0xC6, 0x01, 0x00, 0xFF, 0xFF, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
|
||||
+ 0x74, 0x00, 0x32, 0x32, 0x77, 0xF1, 0xFF, 0xFF,
|
||||
+ 0xCC, 0xCC, 0x77, 0x77);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x07, 0x07);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x2C, 0x2C);
|
||||
+ dsi_dcs_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
+ 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12,
|
||||
+ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
+ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
+ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64,
|
||||
+ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
+ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
+ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A,
|
||||
+ 0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
+ 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35,
|
||||
+ 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12,
|
||||
+ 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41,
|
||||
+ 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12,
|
||||
+ 0x12, 0x18);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(dev, "Failed to exit sleep mode\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+ msleep(250);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ msleep(50);
|
||||
+
|
||||
+ DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xbd599_prepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ctx->prepared)
|
||||
+ return 0;
|
||||
+
|
||||
+ ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n");
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+ usleep_range(20, 40);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ctx->prepared = true;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xbd599_enable(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = xbd599_init_sequence(ctx);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n",
|
||||
+ ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xbd599_disable(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ return mipi_dsi_dcs_set_display_off(dsi);
|
||||
+}
|
||||
+
|
||||
+static int xbd599_unprepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
+
|
||||
+ if (!ctx->prepared)
|
||||
+ return 0;
|
||||
+
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+ regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
|
||||
+ ctx->prepared = false;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_display_mode xbd599_default_mode = {
|
||||
+ .hdisplay = 720,
|
||||
+ .hsync_start = 720 + 40,
|
||||
+ .hsync_end = 720 + 40 + 40,
|
||||
+ .htotal = 720 + 40 + 40 + 40,
|
||||
+ .vdisplay = 1440,
|
||||
+ .vsync_start = 1440 + 18,
|
||||
+ .vsync_end = 1440 + 18 + 10,
|
||||
+ .vtotal = 1440 + 18 + 10 + 17,
|
||||
+ .vrefresh = 60,
|
||||
+ .clock = 69000,
|
||||
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+
|
||||
+ .width_mm = 68,
|
||||
+ .height_mm = 136,
|
||||
+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
|
||||
+};
|
||||
+
|
||||
+static int xbd599_get_modes(struct drm_panel *panel,
|
||||
+ struct drm_connector *connector)
|
||||
+{
|
||||
+ struct xbd599 *ctx = panel_to_xbd599(panel);
|
||||
+ struct drm_display_mode *mode;
|
||||
+
|
||||
+ mode = drm_mode_duplicate(connector->dev, &xbd599_default_mode);
|
||||
+ if (!mode) {
|
||||
+ DRM_DEV_ERROR(ctx->dev, "Failed to add mode\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ drm_mode_set_name(mode);
|
||||
+
|
||||
+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
+ connector->display_info.width_mm = mode->width_mm;
|
||||
+ connector->display_info.height_mm = mode->height_mm;
|
||||
+ drm_mode_probed_add(connector, mode);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_panel_funcs xbd599_drm_funcs = {
|
||||
+ .prepare = xbd599_prepare,
|
||||
+ .enable = xbd599_enable,
|
||||
+ .disable = xbd599_disable,
|
||||
+ .unprepare = xbd599_unprepare,
|
||||
+ .get_modes = xbd599_get_modes,
|
||||
+};
|
||||
+
|
||||
+static int xbd599_probe(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct device *dev = &dsi->dev;
|
||||
+ struct xbd599 *ctx;
|
||||
+ int i, ret;
|
||||
+
|
||||
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
+ if (!ctx)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++)
|
||||
+ ctx->supplies[i].supply = regulator_names[i];
|
||||
+
|
||||
+ ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
|
||||
+ ctx->supplies);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(&dsi->dev, "cannot get regulators\n");
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
|
||||
+ if (IS_ERR(ctx->reset_gpio)) {
|
||||
+ DRM_DEV_ERROR(dev, "cannot get reset gpio\n");
|
||||
+ return PTR_ERR(ctx->reset_gpio);
|
||||
+ }
|
||||
+
|
||||
+ mipi_dsi_set_drvdata(dsi, ctx);
|
||||
+
|
||||
+ ctx->dev = dev;
|
||||
+
|
||||
+ dsi->lanes = 4;
|
||||
+ dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
+
|
||||
+ drm_panel_init(&ctx->panel, &dsi->dev, &xbd599_drm_funcs,
|
||||
+ DRM_MODE_CONNECTOR_DSI);
|
||||
+
|
||||
+ ret = drm_panel_of_backlight(&ctx->panel);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ drm_panel_add(&ctx->panel);
|
||||
+
|
||||
+ ret = mipi_dsi_attach(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(dev, "mipi_dsi_attach failed. Is host ready?\n");
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n",
|
||||
+ xbd599_default_mode.hdisplay,
|
||||
+ xbd599_default_mode.vdisplay,
|
||||
+ xbd599_default_mode.vrefresh,
|
||||
+ mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void xbd599_shutdown(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = drm_panel_unprepare(&ctx->panel);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n",
|
||||
+ ret);
|
||||
+}
|
||||
+
|
||||
+static int xbd599_remove(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ int ret;
|
||||
+
|
||||
+ xbd599_shutdown(dsi);
|
||||
+
|
||||
+ ret = mipi_dsi_detach(dsi);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id xbd599_of_match[] = {
|
||||
+ { .compatible = "xingbangda,xbd599", },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, xbd599_of_match);
|
||||
+
|
||||
+static struct mipi_dsi_driver xbd599_driver = {
|
||||
+ .probe = xbd599_probe,
|
||||
+ .remove = xbd599_remove,
|
||||
+ .shutdown = xbd599_shutdown,
|
||||
+ .driver = {
|
||||
+ .name = "panel-xingbangda-xbd599",
|
||||
+ .of_match_table = xbd599_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_mipi_dsi_driver(xbd599_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Icenowy Zheng <icenowy@aosc.io>");
|
||||
+MODULE_DESCRIPTION("DRM driver for Xingbangda XBD599 MIPI DSI panel");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.26.2
|
||||
|
||||
948
0001-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch
Normal file
948
0001-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch
Normal file
|
|
@ -0,0 +1,948 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:52 +0200
|
||||
Subject: [PATCH] drm/panel: rocktech-jh057n00900: Rename the driver to st7703
|
||||
|
||||
This rename is done so that the driver matches the name of the
|
||||
display controller and in preparation for adding support for more
|
||||
panels to the driver.
|
||||
|
||||
This is just a basic file rename, with no code changes.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/Kconfig | 26 +-
|
||||
drivers/gpu/drm/panel/Makefile | 2 +-
|
||||
.../drm/panel/panel-rocktech-jh057n00900.c | 424 ------------------
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 424 ++++++++++++++++++
|
||||
4 files changed, 438 insertions(+), 438 deletions(-)
|
||||
delete mode 100644 drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
|
||||
create mode 100644 drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
|
||||
index 39055c1f0e2f..de2f2a452be5 100644
|
||||
--- a/drivers/gpu/drm/panel/Kconfig
|
||||
+++ b/drivers/gpu/drm/panel/Kconfig
|
||||
@@ -283,19 +283,6 @@ config DRM_PANEL_RAYDIUM_RM68200
|
||||
Say Y here if you want to enable support for Raydium RM68200
|
||||
720x1280 DSI video mode panel.
|
||||
|
||||
-config DRM_PANEL_ROCKTECH_JH057N00900
|
||||
- tristate "Rocktech JH057N00900 MIPI touchscreen panel"
|
||||
- depends on OF
|
||||
- depends on DRM_MIPI_DSI
|
||||
- depends on BACKLIGHT_CLASS_DEVICE
|
||||
- help
|
||||
- Say Y here if you want to enable support for Rocktech JH057N00900
|
||||
- MIPI DSI panel as e.g. used in the Librem 5 devkit. It has a
|
||||
- resolution of 720x1440 pixels, a built in backlight and touch
|
||||
- controller.
|
||||
- Touch input support is provided by the goodix driver and needs to be
|
||||
- selected separately.
|
||||
-
|
||||
config DRM_PANEL_RONBO_RB070D30
|
||||
tristate "Ronbo Electronics RB070D30 panel"
|
||||
depends on OF
|
||||
@@ -395,6 +382,19 @@ config DRM_PANEL_SITRONIX_ST7701
|
||||
ST7701 controller for 480X864 LCD panels with MIPI/RGB/SPI
|
||||
system interfaces.
|
||||
|
||||
+config DRM_PANEL_SITRONIX_ST7703
|
||||
+ tristate "Sitronix ST7703 based MIPI touchscreen panels"
|
||||
+ depends on OF
|
||||
+ depends on DRM_MIPI_DSI
|
||||
+ depends on BACKLIGHT_CLASS_DEVICE
|
||||
+ help
|
||||
+ Say Y here if you want to enable support for Sitronix ST7703 based
|
||||
+ panels, souch as Rocktech JH057N00900 MIPI DSI panel as e.g. used in
|
||||
+ the Librem 5 devkit. It has a resolution of 720x1440 pixels, a built
|
||||
+ in backlight and touch controller.
|
||||
+ Touch input support is provided by the goodix driver and needs to be
|
||||
+ selected separately.
|
||||
+
|
||||
config DRM_PANEL_SITRONIX_ST7789V
|
||||
tristate "Sitronix ST7789V panel"
|
||||
depends on OF && SPI
|
||||
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
|
||||
index de74f282c433..e45ceac6286f 100644
|
||||
--- a/drivers/gpu/drm/panel/Makefile
|
||||
+++ b/drivers/gpu/drm/panel/Makefile
|
||||
@@ -27,7 +27,6 @@ obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o
|
||||
obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen.o
|
||||
obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o
|
||||
obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o
|
||||
-obj-$(CONFIG_DRM_PANEL_ROCKTECH_JH057N00900) += panel-rocktech-jh057n00900.o
|
||||
obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o
|
||||
obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o
|
||||
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o
|
||||
@@ -41,6 +40,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o
|
||||
obj-$(CONFIG_DRM_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
|
||||
obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o
|
||||
obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o
|
||||
+obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o
|
||||
obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o
|
||||
obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o
|
||||
obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o
|
||||
diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
|
||||
deleted file mode 100644
|
||||
index 38ff742bc120..000000000000
|
||||
--- a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
|
||||
+++ /dev/null
|
||||
@@ -1,424 +0,0 @@
|
||||
-// SPDX-License-Identifier: GPL-2.0
|
||||
-/*
|
||||
- * Rockteck jh057n00900 5.5" MIPI-DSI panel driver
|
||||
- *
|
||||
- * Copyright (C) Purism SPC 2019
|
||||
- */
|
||||
-
|
||||
-#include <linux/debugfs.h>
|
||||
-#include <linux/delay.h>
|
||||
-#include <linux/gpio/consumer.h>
|
||||
-#include <linux/media-bus-format.h>
|
||||
-#include <linux/mod_devicetable.h>
|
||||
-#include <linux/module.h>
|
||||
-#include <linux/regulator/consumer.h>
|
||||
-
|
||||
-#include <video/display_timing.h>
|
||||
-#include <video/mipi_display.h>
|
||||
-
|
||||
-#include <drm/drm_mipi_dsi.h>
|
||||
-#include <drm/drm_modes.h>
|
||||
-#include <drm/drm_panel.h>
|
||||
-#include <drm/drm_print.h>
|
||||
-
|
||||
-#define DRV_NAME "panel-rocktech-jh057n00900"
|
||||
-
|
||||
-/* Manufacturer specific Commands send via DSI */
|
||||
-#define ST7703_CMD_ALL_PIXEL_OFF 0x22
|
||||
-#define ST7703_CMD_ALL_PIXEL_ON 0x23
|
||||
-#define ST7703_CMD_SETDISP 0xB2
|
||||
-#define ST7703_CMD_SETRGBIF 0xB3
|
||||
-#define ST7703_CMD_SETCYC 0xB4
|
||||
-#define ST7703_CMD_SETBGP 0xB5
|
||||
-#define ST7703_CMD_SETVCOM 0xB6
|
||||
-#define ST7703_CMD_SETOTP 0xB7
|
||||
-#define ST7703_CMD_SETPOWER_EXT 0xB8
|
||||
-#define ST7703_CMD_SETEXTC 0xB9
|
||||
-#define ST7703_CMD_SETMIPI 0xBA
|
||||
-#define ST7703_CMD_SETVDC 0xBC
|
||||
-#define ST7703_CMD_UNKNOWN0 0xBF
|
||||
-#define ST7703_CMD_SETSCR 0xC0
|
||||
-#define ST7703_CMD_SETPOWER 0xC1
|
||||
-#define ST7703_CMD_SETPANEL 0xCC
|
||||
-#define ST7703_CMD_SETGAMMA 0xE0
|
||||
-#define ST7703_CMD_SETEQ 0xE3
|
||||
-#define ST7703_CMD_SETGIP1 0xE9
|
||||
-#define ST7703_CMD_SETGIP2 0xEA
|
||||
-
|
||||
-struct jh057n {
|
||||
- struct device *dev;
|
||||
- struct drm_panel panel;
|
||||
- struct gpio_desc *reset_gpio;
|
||||
- struct regulator *vcc;
|
||||
- struct regulator *iovcc;
|
||||
- bool prepared;
|
||||
-
|
||||
- struct dentry *debugfs;
|
||||
-};
|
||||
-
|
||||
-static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel)
|
||||
-{
|
||||
- return container_of(panel, struct jh057n, panel);
|
||||
-}
|
||||
-
|
||||
-#define dsi_generic_write_seq(dsi, seq...) do { \
|
||||
- static const u8 d[] = { seq }; \
|
||||
- int ret; \
|
||||
- ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \
|
||||
- if (ret < 0) \
|
||||
- return ret; \
|
||||
- } while (0)
|
||||
-
|
||||
-static int jh057n_init_sequence(struct jh057n *ctx)
|
||||
-{
|
||||
- struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
- struct device *dev = ctx->dev;
|
||||
- int ret;
|
||||
-
|
||||
- /*
|
||||
- * Init sequence was supplied by the panel vendor. Most of the commands
|
||||
- * resemble the ST7703 but the number of parameters often don't match
|
||||
- * so it's likely a clone.
|
||||
- */
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETEXTC,
|
||||
- 0xF1, 0x12, 0x83);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
- 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00,
|
||||
- 0x00, 0x00);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
- 0x73, 0x73, 0x50, 0x50, 0x00, 0x00, 0x08, 0x70,
|
||||
- 0x00);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0x30);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
- 0x07, 0x07, 0x0B, 0x0B, 0x03, 0x0B, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETBGP, 0x08, 0x08);
|
||||
- msleep(20);
|
||||
-
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN0, 0x02, 0x11, 0x00);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
- 0x82, 0x10, 0x06, 0x05, 0x9E, 0x0A, 0xA5, 0x12,
|
||||
- 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
- 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
- 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88,
|
||||
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64,
|
||||
- 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
- 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
- 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
- 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
- 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
- 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0A,
|
||||
- 0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
- 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41, 0x37,
|
||||
- 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10, 0x11,
|
||||
- 0x18, 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41,
|
||||
- 0x37, 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10,
|
||||
- 0x11, 0x18);
|
||||
- msleep(20);
|
||||
-
|
||||
- ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(dev, "Failed to exit sleep mode: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
- /* Panel is operational 120 msec after reset */
|
||||
- msleep(60);
|
||||
- ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n");
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int jh057n_enable(struct drm_panel *panel)
|
||||
-{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
- int ret;
|
||||
-
|
||||
- ret = jh057n_init_sequence(ctx);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n",
|
||||
- ret);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int jh057n_disable(struct drm_panel *panel)
|
||||
-{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
- struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
-
|
||||
- return mipi_dsi_dcs_set_display_off(dsi);
|
||||
-}
|
||||
-
|
||||
-static int jh057n_unprepare(struct drm_panel *panel)
|
||||
-{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
-
|
||||
- if (!ctx->prepared)
|
||||
- return 0;
|
||||
-
|
||||
- regulator_disable(ctx->iovcc);
|
||||
- regulator_disable(ctx->vcc);
|
||||
- ctx->prepared = false;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int jh057n_prepare(struct drm_panel *panel)
|
||||
-{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
- int ret;
|
||||
-
|
||||
- if (ctx->prepared)
|
||||
- return 0;
|
||||
-
|
||||
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n");
|
||||
- ret = regulator_enable(ctx->vcc);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(ctx->dev,
|
||||
- "Failed to enable vcc supply: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
- ret = regulator_enable(ctx->iovcc);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(ctx->dev,
|
||||
- "Failed to enable iovcc supply: %d\n", ret);
|
||||
- goto disable_vcc;
|
||||
- }
|
||||
-
|
||||
- gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
- usleep_range(20, 40);
|
||||
- gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
- msleep(20);
|
||||
-
|
||||
- ctx->prepared = true;
|
||||
-
|
||||
- return 0;
|
||||
-
|
||||
-disable_vcc:
|
||||
- regulator_disable(ctx->vcc);
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static const struct drm_display_mode default_mode = {
|
||||
- .hdisplay = 720,
|
||||
- .hsync_start = 720 + 90,
|
||||
- .hsync_end = 720 + 90 + 20,
|
||||
- .htotal = 720 + 90 + 20 + 20,
|
||||
- .vdisplay = 1440,
|
||||
- .vsync_start = 1440 + 20,
|
||||
- .vsync_end = 1440 + 20 + 4,
|
||||
- .vtotal = 1440 + 20 + 4 + 12,
|
||||
- .vrefresh = 60,
|
||||
- .clock = 75276,
|
||||
- .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
- .width_mm = 65,
|
||||
- .height_mm = 130,
|
||||
-};
|
||||
-
|
||||
-static int jh057n_get_modes(struct drm_panel *panel,
|
||||
- struct drm_connector *connector)
|
||||
-{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
- struct drm_display_mode *mode;
|
||||
-
|
||||
- mode = drm_mode_duplicate(connector->dev, &default_mode);
|
||||
- if (!mode) {
|
||||
- DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n",
|
||||
- default_mode.hdisplay, default_mode.vdisplay,
|
||||
- default_mode.vrefresh);
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
-
|
||||
- drm_mode_set_name(mode);
|
||||
-
|
||||
- mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
- connector->display_info.width_mm = mode->width_mm;
|
||||
- connector->display_info.height_mm = mode->height_mm;
|
||||
- drm_mode_probed_add(connector, mode);
|
||||
-
|
||||
- return 1;
|
||||
-}
|
||||
-
|
||||
-static const struct drm_panel_funcs jh057n_drm_funcs = {
|
||||
- .disable = jh057n_disable,
|
||||
- .unprepare = jh057n_unprepare,
|
||||
- .prepare = jh057n_prepare,
|
||||
- .enable = jh057n_enable,
|
||||
- .get_modes = jh057n_get_modes,
|
||||
-};
|
||||
-
|
||||
-static int allpixelson_set(void *data, u64 val)
|
||||
-{
|
||||
- struct jh057n *ctx = data;
|
||||
- struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
-
|
||||
- DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n");
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_ALL_PIXEL_ON);
|
||||
- msleep(val * 1000);
|
||||
- /* Reset the panel to get video back */
|
||||
- drm_panel_disable(&ctx->panel);
|
||||
- drm_panel_unprepare(&ctx->panel);
|
||||
- drm_panel_prepare(&ctx->panel);
|
||||
- drm_panel_enable(&ctx->panel);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL,
|
||||
- allpixelson_set, "%llu\n");
|
||||
-
|
||||
-static void jh057n_debugfs_init(struct jh057n *ctx)
|
||||
-{
|
||||
- ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL);
|
||||
-
|
||||
- debugfs_create_file("allpixelson", 0600, ctx->debugfs, ctx,
|
||||
- &allpixelson_fops);
|
||||
-}
|
||||
-
|
||||
-static void jh057n_debugfs_remove(struct jh057n *ctx)
|
||||
-{
|
||||
- debugfs_remove_recursive(ctx->debugfs);
|
||||
- ctx->debugfs = NULL;
|
||||
-}
|
||||
-
|
||||
-static int jh057n_probe(struct mipi_dsi_device *dsi)
|
||||
-{
|
||||
- struct device *dev = &dsi->dev;
|
||||
- struct jh057n *ctx;
|
||||
- int ret;
|
||||
-
|
||||
- ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
- if (!ctx)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
- ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
|
||||
- if (IS_ERR(ctx->reset_gpio)) {
|
||||
- DRM_DEV_ERROR(dev, "cannot get reset gpio\n");
|
||||
- return PTR_ERR(ctx->reset_gpio);
|
||||
- }
|
||||
-
|
||||
- mipi_dsi_set_drvdata(dsi, ctx);
|
||||
-
|
||||
- ctx->dev = dev;
|
||||
-
|
||||
- dsi->lanes = 4;
|
||||
- dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
- MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
-
|
||||
- ctx->vcc = devm_regulator_get(dev, "vcc");
|
||||
- if (IS_ERR(ctx->vcc)) {
|
||||
- ret = PTR_ERR(ctx->vcc);
|
||||
- if (ret != -EPROBE_DEFER)
|
||||
- DRM_DEV_ERROR(dev,
|
||||
- "Failed to request vcc regulator: %d\n",
|
||||
- ret);
|
||||
- return ret;
|
||||
- }
|
||||
- ctx->iovcc = devm_regulator_get(dev, "iovcc");
|
||||
- if (IS_ERR(ctx->iovcc)) {
|
||||
- ret = PTR_ERR(ctx->iovcc);
|
||||
- if (ret != -EPROBE_DEFER)
|
||||
- DRM_DEV_ERROR(dev,
|
||||
- "Failed to request iovcc regulator: %d\n",
|
||||
- ret);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- drm_panel_init(&ctx->panel, dev, &jh057n_drm_funcs,
|
||||
- DRM_MODE_CONNECTOR_DSI);
|
||||
-
|
||||
- ret = drm_panel_of_backlight(&ctx->panel);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
-
|
||||
- drm_panel_add(&ctx->panel);
|
||||
-
|
||||
- ret = mipi_dsi_attach(dsi);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(dev,
|
||||
- "mipi_dsi_attach failed (%d). Is host ready?\n",
|
||||
- ret);
|
||||
- drm_panel_remove(&ctx->panel);
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n",
|
||||
- default_mode.hdisplay, default_mode.vdisplay,
|
||||
- default_mode.vrefresh,
|
||||
- mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
|
||||
-
|
||||
- jh057n_debugfs_init(ctx);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static void jh057n_shutdown(struct mipi_dsi_device *dsi)
|
||||
-{
|
||||
- struct jh057n *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
- int ret;
|
||||
-
|
||||
- ret = drm_panel_unprepare(&ctx->panel);
|
||||
- if (ret < 0)
|
||||
- DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n",
|
||||
- ret);
|
||||
-
|
||||
- ret = drm_panel_disable(&ctx->panel);
|
||||
- if (ret < 0)
|
||||
- DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n",
|
||||
- ret);
|
||||
-}
|
||||
-
|
||||
-static int jh057n_remove(struct mipi_dsi_device *dsi)
|
||||
-{
|
||||
- struct jh057n *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
- int ret;
|
||||
-
|
||||
- jh057n_shutdown(dsi);
|
||||
-
|
||||
- ret = mipi_dsi_detach(dsi);
|
||||
- if (ret < 0)
|
||||
- DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n",
|
||||
- ret);
|
||||
-
|
||||
- drm_panel_remove(&ctx->panel);
|
||||
-
|
||||
- jh057n_debugfs_remove(ctx);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static const struct of_device_id jh057n_of_match[] = {
|
||||
- { .compatible = "rocktech,jh057n00900" },
|
||||
- { /* sentinel */ }
|
||||
-};
|
||||
-MODULE_DEVICE_TABLE(of, jh057n_of_match);
|
||||
-
|
||||
-static struct mipi_dsi_driver jh057n_driver = {
|
||||
- .probe = jh057n_probe,
|
||||
- .remove = jh057n_remove,
|
||||
- .shutdown = jh057n_shutdown,
|
||||
- .driver = {
|
||||
- .name = DRV_NAME,
|
||||
- .of_match_table = jh057n_of_match,
|
||||
- },
|
||||
-};
|
||||
-module_mipi_dsi_driver(jh057n_driver);
|
||||
-
|
||||
-MODULE_AUTHOR("Guido Günther <agx@sigxcpu.org>");
|
||||
-MODULE_DESCRIPTION("DRM driver for Rocktech JH057N00900 MIPI DSI panel");
|
||||
-MODULE_LICENSE("GPL v2");
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
new file mode 100644
|
||||
index 000000000000..38ff742bc120
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -0,0 +1,424 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Rockteck jh057n00900 5.5" MIPI-DSI panel driver
|
||||
+ *
|
||||
+ * Copyright (C) Purism SPC 2019
|
||||
+ */
|
||||
+
|
||||
+#include <linux/debugfs.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/media-bus-format.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+
|
||||
+#include <video/display_timing.h>
|
||||
+#include <video/mipi_display.h>
|
||||
+
|
||||
+#include <drm/drm_mipi_dsi.h>
|
||||
+#include <drm/drm_modes.h>
|
||||
+#include <drm/drm_panel.h>
|
||||
+#include <drm/drm_print.h>
|
||||
+
|
||||
+#define DRV_NAME "panel-rocktech-jh057n00900"
|
||||
+
|
||||
+/* Manufacturer specific Commands send via DSI */
|
||||
+#define ST7703_CMD_ALL_PIXEL_OFF 0x22
|
||||
+#define ST7703_CMD_ALL_PIXEL_ON 0x23
|
||||
+#define ST7703_CMD_SETDISP 0xB2
|
||||
+#define ST7703_CMD_SETRGBIF 0xB3
|
||||
+#define ST7703_CMD_SETCYC 0xB4
|
||||
+#define ST7703_CMD_SETBGP 0xB5
|
||||
+#define ST7703_CMD_SETVCOM 0xB6
|
||||
+#define ST7703_CMD_SETOTP 0xB7
|
||||
+#define ST7703_CMD_SETPOWER_EXT 0xB8
|
||||
+#define ST7703_CMD_SETEXTC 0xB9
|
||||
+#define ST7703_CMD_SETMIPI 0xBA
|
||||
+#define ST7703_CMD_SETVDC 0xBC
|
||||
+#define ST7703_CMD_UNKNOWN0 0xBF
|
||||
+#define ST7703_CMD_SETSCR 0xC0
|
||||
+#define ST7703_CMD_SETPOWER 0xC1
|
||||
+#define ST7703_CMD_SETPANEL 0xCC
|
||||
+#define ST7703_CMD_SETGAMMA 0xE0
|
||||
+#define ST7703_CMD_SETEQ 0xE3
|
||||
+#define ST7703_CMD_SETGIP1 0xE9
|
||||
+#define ST7703_CMD_SETGIP2 0xEA
|
||||
+
|
||||
+struct jh057n {
|
||||
+ struct device *dev;
|
||||
+ struct drm_panel panel;
|
||||
+ struct gpio_desc *reset_gpio;
|
||||
+ struct regulator *vcc;
|
||||
+ struct regulator *iovcc;
|
||||
+ bool prepared;
|
||||
+
|
||||
+ struct dentry *debugfs;
|
||||
+};
|
||||
+
|
||||
+static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel)
|
||||
+{
|
||||
+ return container_of(panel, struct jh057n, panel);
|
||||
+}
|
||||
+
|
||||
+#define dsi_generic_write_seq(dsi, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
+static int jh057n_init_sequence(struct jh057n *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ struct device *dev = ctx->dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ /*
|
||||
+ * Init sequence was supplied by the panel vendor. Most of the commands
|
||||
+ * resemble the ST7703 but the number of parameters often don't match
|
||||
+ * so it's likely a clone.
|
||||
+ */
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETEXTC,
|
||||
+ 0xF1, 0x12, 0x83);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
+ 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00,
|
||||
+ 0x00, 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
+ 0x73, 0x73, 0x50, 0x50, 0x00, 0x00, 0x08, 0x70,
|
||||
+ 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0x30);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
+ 0x07, 0x07, 0x0B, 0x0B, 0x03, 0x0B, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETBGP, 0x08, 0x08);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN0, 0x02, 0x11, 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
+ 0x82, 0x10, 0x06, 0x05, 0x9E, 0x0A, 0xA5, 0x12,
|
||||
+ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
+ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
+ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64,
|
||||
+ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
+ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
+ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0A,
|
||||
+ 0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
+ 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41, 0x37,
|
||||
+ 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10, 0x11,
|
||||
+ 0x18, 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41,
|
||||
+ 0x37, 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10,
|
||||
+ 0x11, 0x18);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(dev, "Failed to exit sleep mode: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ /* Panel is operational 120 msec after reset */
|
||||
+ msleep(60);
|
||||
+ ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int jh057n_enable(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = jh057n_init_sequence(ctx);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n",
|
||||
+ ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int jh057n_disable(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ return mipi_dsi_dcs_set_display_off(dsi);
|
||||
+}
|
||||
+
|
||||
+static int jh057n_unprepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+
|
||||
+ if (!ctx->prepared)
|
||||
+ return 0;
|
||||
+
|
||||
+ regulator_disable(ctx->iovcc);
|
||||
+ regulator_disable(ctx->vcc);
|
||||
+ ctx->prepared = false;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int jh057n_prepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ int ret;
|
||||
+
|
||||
+ if (ctx->prepared)
|
||||
+ return 0;
|
||||
+
|
||||
+ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n");
|
||||
+ ret = regulator_enable(ctx->vcc);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(ctx->dev,
|
||||
+ "Failed to enable vcc supply: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ret = regulator_enable(ctx->iovcc);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(ctx->dev,
|
||||
+ "Failed to enable iovcc supply: %d\n", ret);
|
||||
+ goto disable_vcc;
|
||||
+ }
|
||||
+
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+ usleep_range(20, 40);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ctx->prepared = true;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+disable_vcc:
|
||||
+ regulator_disable(ctx->vcc);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_display_mode default_mode = {
|
||||
+ .hdisplay = 720,
|
||||
+ .hsync_start = 720 + 90,
|
||||
+ .hsync_end = 720 + 90 + 20,
|
||||
+ .htotal = 720 + 90 + 20 + 20,
|
||||
+ .vdisplay = 1440,
|
||||
+ .vsync_start = 1440 + 20,
|
||||
+ .vsync_end = 1440 + 20 + 4,
|
||||
+ .vtotal = 1440 + 20 + 4 + 12,
|
||||
+ .vrefresh = 60,
|
||||
+ .clock = 75276,
|
||||
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+ .width_mm = 65,
|
||||
+ .height_mm = 130,
|
||||
+};
|
||||
+
|
||||
+static int jh057n_get_modes(struct drm_panel *panel,
|
||||
+ struct drm_connector *connector)
|
||||
+{
|
||||
+ struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct drm_display_mode *mode;
|
||||
+
|
||||
+ mode = drm_mode_duplicate(connector->dev, &default_mode);
|
||||
+ if (!mode) {
|
||||
+ DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n",
|
||||
+ default_mode.hdisplay, default_mode.vdisplay,
|
||||
+ default_mode.vrefresh);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ drm_mode_set_name(mode);
|
||||
+
|
||||
+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
+ connector->display_info.width_mm = mode->width_mm;
|
||||
+ connector->display_info.height_mm = mode->height_mm;
|
||||
+ drm_mode_probed_add(connector, mode);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_panel_funcs jh057n_drm_funcs = {
|
||||
+ .disable = jh057n_disable,
|
||||
+ .unprepare = jh057n_unprepare,
|
||||
+ .prepare = jh057n_prepare,
|
||||
+ .enable = jh057n_enable,
|
||||
+ .get_modes = jh057n_get_modes,
|
||||
+};
|
||||
+
|
||||
+static int allpixelson_set(void *data, u64 val)
|
||||
+{
|
||||
+ struct jh057n *ctx = data;
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n");
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_ALL_PIXEL_ON);
|
||||
+ msleep(val * 1000);
|
||||
+ /* Reset the panel to get video back */
|
||||
+ drm_panel_disable(&ctx->panel);
|
||||
+ drm_panel_unprepare(&ctx->panel);
|
||||
+ drm_panel_prepare(&ctx->panel);
|
||||
+ drm_panel_enable(&ctx->panel);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL,
|
||||
+ allpixelson_set, "%llu\n");
|
||||
+
|
||||
+static void jh057n_debugfs_init(struct jh057n *ctx)
|
||||
+{
|
||||
+ ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL);
|
||||
+
|
||||
+ debugfs_create_file("allpixelson", 0600, ctx->debugfs, ctx,
|
||||
+ &allpixelson_fops);
|
||||
+}
|
||||
+
|
||||
+static void jh057n_debugfs_remove(struct jh057n *ctx)
|
||||
+{
|
||||
+ debugfs_remove_recursive(ctx->debugfs);
|
||||
+ ctx->debugfs = NULL;
|
||||
+}
|
||||
+
|
||||
+static int jh057n_probe(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct device *dev = &dsi->dev;
|
||||
+ struct jh057n *ctx;
|
||||
+ int ret;
|
||||
+
|
||||
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
+ if (!ctx)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
|
||||
+ if (IS_ERR(ctx->reset_gpio)) {
|
||||
+ DRM_DEV_ERROR(dev, "cannot get reset gpio\n");
|
||||
+ return PTR_ERR(ctx->reset_gpio);
|
||||
+ }
|
||||
+
|
||||
+ mipi_dsi_set_drvdata(dsi, ctx);
|
||||
+
|
||||
+ ctx->dev = dev;
|
||||
+
|
||||
+ dsi->lanes = 4;
|
||||
+ dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
+ MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
+
|
||||
+ ctx->vcc = devm_regulator_get(dev, "vcc");
|
||||
+ if (IS_ERR(ctx->vcc)) {
|
||||
+ ret = PTR_ERR(ctx->vcc);
|
||||
+ if (ret != -EPROBE_DEFER)
|
||||
+ DRM_DEV_ERROR(dev,
|
||||
+ "Failed to request vcc regulator: %d\n",
|
||||
+ ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ ctx->iovcc = devm_regulator_get(dev, "iovcc");
|
||||
+ if (IS_ERR(ctx->iovcc)) {
|
||||
+ ret = PTR_ERR(ctx->iovcc);
|
||||
+ if (ret != -EPROBE_DEFER)
|
||||
+ DRM_DEV_ERROR(dev,
|
||||
+ "Failed to request iovcc regulator: %d\n",
|
||||
+ ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ drm_panel_init(&ctx->panel, dev, &jh057n_drm_funcs,
|
||||
+ DRM_MODE_CONNECTOR_DSI);
|
||||
+
|
||||
+ ret = drm_panel_of_backlight(&ctx->panel);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ drm_panel_add(&ctx->panel);
|
||||
+
|
||||
+ ret = mipi_dsi_attach(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(dev,
|
||||
+ "mipi_dsi_attach failed (%d). Is host ready?\n",
|
||||
+ ret);
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n",
|
||||
+ default_mode.hdisplay, default_mode.vdisplay,
|
||||
+ default_mode.vrefresh,
|
||||
+ mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
|
||||
+
|
||||
+ jh057n_debugfs_init(ctx);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void jh057n_shutdown(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct jh057n *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = drm_panel_unprepare(&ctx->panel);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
+ ret = drm_panel_disable(&ctx->panel);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(&dsi->dev, "Failed to disable panel: %d\n",
|
||||
+ ret);
|
||||
+}
|
||||
+
|
||||
+static int jh057n_remove(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct jh057n *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ int ret;
|
||||
+
|
||||
+ jh057n_shutdown(dsi);
|
||||
+
|
||||
+ ret = mipi_dsi_detach(dsi);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n",
|
||||
+ ret);
|
||||
+
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+
|
||||
+ jh057n_debugfs_remove(ctx);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id jh057n_of_match[] = {
|
||||
+ { .compatible = "rocktech,jh057n00900" },
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, jh057n_of_match);
|
||||
+
|
||||
+static struct mipi_dsi_driver jh057n_driver = {
|
||||
+ .probe = jh057n_probe,
|
||||
+ .remove = jh057n_remove,
|
||||
+ .shutdown = jh057n_shutdown,
|
||||
+ .driver = {
|
||||
+ .name = DRV_NAME,
|
||||
+ .of_match_table = jh057n_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_mipi_dsi_driver(jh057n_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Guido Günther <agx@sigxcpu.org>");
|
||||
+MODULE_DESCRIPTION("DRM driver for Rocktech JH057N00900 MIPI DSI panel");
|
||||
+MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.26.2
|
||||
|
||||
251
0001-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch
Normal file
251
0001-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch
Normal file
|
|
@ -0,0 +1,251 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:57 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Add support for Xingbangda XBD599
|
||||
|
||||
Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel used in
|
||||
PinePhone. Add support for it.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 199 +++++++++++++++++-
|
||||
1 file changed, 197 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index cdbf7dfb4dd4..33611419059a 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -39,10 +39,11 @@
|
||||
#define ST7703_CMD_SETEXTC 0xB9
|
||||
#define ST7703_CMD_SETMIPI 0xBA
|
||||
#define ST7703_CMD_SETVDC 0xBC
|
||||
-#define ST7703_CMD_UNKNOWN0 0xBF
|
||||
+#define ST7703_CMD_UNKNOWN_BF 0xBF
|
||||
#define ST7703_CMD_SETSCR 0xC0
|
||||
#define ST7703_CMD_SETPOWER 0xC1
|
||||
#define ST7703_CMD_SETPANEL 0xCC
|
||||
+#define ST7703_CMD_UNKNOWN_C6 0xC6
|
||||
#define ST7703_CMD_SETGAMMA 0xE0
|
||||
#define ST7703_CMD_SETEQ 0xE3
|
||||
#define ST7703_CMD_SETGIP1 0xE9
|
||||
@@ -109,7 +110,7 @@ static int jh057n_init_sequence(struct st7703 *ctx)
|
||||
msleep(20);
|
||||
|
||||
dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F);
|
||||
- dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN0, 0x02, 0x11, 0x00);
|
||||
+ dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
0x82, 0x10, 0x06, 0x05, 0x9E, 0x0A, 0xA5, 0x12,
|
||||
0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
@@ -163,6 +164,199 @@ struct st7703_panel_desc jh057n00900_panel_desc = {
|
||||
.init_sequence = jh057n_init_sequence,
|
||||
};
|
||||
|
||||
+#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \
|
||||
+ static const u8 d[] = { seq }; \
|
||||
+ int ret; \
|
||||
+ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \
|
||||
+ if (ret < 0) \
|
||||
+ return ret; \
|
||||
+ } while (0)
|
||||
+
|
||||
+
|
||||
+static int xbd599_init_sequence(struct st7703 *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+
|
||||
+ /*
|
||||
+ * Init sequence was supplied by the panel vendor.
|
||||
+ */
|
||||
+
|
||||
+ /* Magic sequence to unlock user commands below. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xF1, 0x12, 0x83);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
|
||||
+ 0x33, /* VC_main = 0, Lane_Number = 3 (4 lanes) */
|
||||
+ 0x81, /* DSI_LDO_SEL = 1.7V, RTERM = 90 Ohm */
|
||||
+ 0x05, /* IHSRX = x6 (Low High Speed driving ability) */
|
||||
+ 0xF9, /* TX_CLK_SEL = fDSICLK/16 */
|
||||
+ 0x0E, /* HFP_OSC (min. HFP number in DSI mode) */
|
||||
+ 0x0E, /* HBP_OSC (min. HBP number in DSI mode) */
|
||||
+ /* The rest is undocumented in ST7703 datasheet */
|
||||
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x44, 0x25, 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02,
|
||||
+ 0x4F, 0x11, 0x00, 0x00, 0x37);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT,
|
||||
+ 0x25, /* PCCS = 2, ECP_DC_DIV = 1/4 HSYNC */
|
||||
+ 0x22, /* DT = 15ms XDK_ECP = x2 */
|
||||
+ 0x20, /* PFM_DC_DIV = /1 */
|
||||
+ 0x03 /* ECP_SYNC_EN = 1, VGX_SYNC_EN = 1 */);
|
||||
+
|
||||
+ /* RGB I/F porch timing */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
|
||||
+ 0x10, /* VBP_RGB_GEN */
|
||||
+ 0x10, /* VFP_RGB_GEN */
|
||||
+ 0x05, /* DE_BP_RGB_GEN */
|
||||
+ 0x05, /* DE_FP_RGB_GEN */
|
||||
+ /* The rest is undocumented in ST7703 datasheet */
|
||||
+ 0x03, 0xFF,
|
||||
+ 0x00, 0x00,
|
||||
+ 0x00, 0x00);
|
||||
+
|
||||
+ /* Source driving settings. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
|
||||
+ 0x73, /* N_POPON */
|
||||
+ 0x73, /* N_NOPON */
|
||||
+ 0x50, /* I_POPON */
|
||||
+ 0x50, /* I_NOPON */
|
||||
+ 0x00, /* SCR[31,24] */
|
||||
+ 0xC0, /* SCR[23,16] */
|
||||
+ 0x08, /* SCR[15,8] */
|
||||
+ 0x70, /* SCR[7,0] */
|
||||
+ 0x00 /* Undocumented */);
|
||||
+
|
||||
+ /* NVDDD_SEL = -1.8V, VDDD_SEL = out of range (possibly 1.9V?) */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
|
||||
+
|
||||
+ /*
|
||||
+ * SS_PANEL = 1 (reverse scan), GS_PANEL = 0 (normal scan)
|
||||
+ * REV_PANEL = 1 (normally black panel), BGR_PANEL = 1 (BGR)
|
||||
+ */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
|
||||
+
|
||||
+ /* Zig-Zag Type C column inversion. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
|
||||
+
|
||||
+ /* Set display resolution. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP,
|
||||
+ 0xF0, /* NL = 240 */
|
||||
+ 0x12, /* RES_V_LSB = 0, BLK_CON = VSSD,
|
||||
+ * RESO_SEL = 720RGB
|
||||
+ */
|
||||
+ 0xF0 /* WHITE_GND_EN = 1 (GND),
|
||||
+ * WHITE_FRAME_SEL = 7 frames,
|
||||
+ * ISC = 0 frames
|
||||
+ */);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
|
||||
+ 0x00, /* PNOEQ */
|
||||
+ 0x00, /* NNOEQ */
|
||||
+ 0x0B, /* PEQGND */
|
||||
+ 0x0B, /* NEQGND */
|
||||
+ 0x10, /* PEQVCI */
|
||||
+ 0x10, /* NEQVCI */
|
||||
+ 0x00, /* PEQVCI1 */
|
||||
+ 0x00, /* NEQVCI1 */
|
||||
+ 0x00, /* reserved */
|
||||
+ 0x00, /* reserved */
|
||||
+ 0xFF, /* reserved */
|
||||
+ 0x00, /* reserved */
|
||||
+ 0xC0, /* ESD_DET_DATA_WHITE = 1, ESD_WHITE_EN = 1 */
|
||||
+ 0x10 /* SLPIN_OPTION = 1 (no need vsync after sleep-in)
|
||||
+ * VEDIO_NO_CHECK_EN = 0
|
||||
+ * ESD_WHITE_GND_EN = 0
|
||||
+ * ESD_DET_TIME_SEL = 0 frames
|
||||
+ */);
|
||||
+
|
||||
+ /* Undocumented command. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_C6, 0x01, 0x00, 0xFF, 0xFF, 0x00);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
|
||||
+ 0x74, /* VBTHS, VBTLS: VGH = 17V, VBL = -11V */
|
||||
+ 0x00, /* FBOFF_VGH = 0, FBOFF_VGL = 0 */
|
||||
+ 0x32, /* VRP */
|
||||
+ 0x32, /* VRN */
|
||||
+ 0x77, /* reserved */
|
||||
+ 0xF1, /* APS = 1 (small),
|
||||
+ * VGL_DET_EN = 1, VGH_DET_EN = 1,
|
||||
+ * VGL_TURBO = 1, VGH_TURBO = 1
|
||||
+ */
|
||||
+ 0xFF, /* VGH1_L_DIV, VGL1_L_DIV (1.5MHz) */
|
||||
+ 0xFF, /* VGH1_R_DIV, VGL1_R_DIV (1.5MHz) */
|
||||
+ 0xCC, /* VGH2_L_DIV, VGL2_L_DIV (2.6MHz) */
|
||||
+ 0xCC, /* VGH2_R_DIV, VGL2_R_DIV (2.6MHz) */
|
||||
+ 0x77, /* VGH3_L_DIV, VGL3_L_DIV (4.5MHz) */
|
||||
+ 0x77 /* VGH3_R_DIV, VGL3_R_DIV (4.5MHz) */);
|
||||
+
|
||||
+ /* Reference voltage. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP,
|
||||
+ 0x07, /* VREF_SEL = 4.2V */
|
||||
+ 0x07 /* NVREF_SEL = 4.2V */);
|
||||
+
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM,
|
||||
+ 0x2C, /* VCOMDC_F = -0.67V */
|
||||
+ 0x2C /* VCOMDC_B = -0.67V */);
|
||||
+
|
||||
+ /* Undocumented command. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00);
|
||||
+
|
||||
+ /* This command is to set forward GIP timing. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1,
|
||||
+ 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12,
|
||||
+ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38,
|
||||
+ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00,
|
||||
+ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64,
|
||||
+ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
+
|
||||
+ /* This command is to set backward GIP timing. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2,
|
||||
+ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88,
|
||||
+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13,
|
||||
+ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
+ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A,
|
||||
+ 0xA5, 0x00, 0x00, 0x00, 0x00);
|
||||
+
|
||||
+ /* Adjust the gamma characteristics of the panel. */
|
||||
+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA,
|
||||
+ 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35,
|
||||
+ 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12,
|
||||
+ 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41,
|
||||
+ 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12,
|
||||
+ 0x12, 0x18);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_display_mode xbd599_mode = {
|
||||
+ .hdisplay = 720,
|
||||
+ .hsync_start = 720 + 40,
|
||||
+ .hsync_end = 720 + 40 + 40,
|
||||
+ .htotal = 720 + 40 + 40 + 40,
|
||||
+ .vdisplay = 1440,
|
||||
+ .vsync_start = 1440 + 18,
|
||||
+ .vsync_end = 1440 + 18 + 10,
|
||||
+ .vtotal = 1440 + 18 + 10 + 17,
|
||||
+ .vrefresh = 60,
|
||||
+ .clock = 69000,
|
||||
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+ .width_mm = 68,
|
||||
+ .height_mm = 136,
|
||||
+};
|
||||
+
|
||||
+static const struct st7703_panel_desc xbd599_desc = {
|
||||
+ .mode = &xbd599_mode,
|
||||
+ .lanes = 4,
|
||||
+ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
|
||||
+ .format = MIPI_DSI_FMT_RGB888,
|
||||
+ .init_sequence = xbd599_init_sequence,
|
||||
+};
|
||||
+
|
||||
static int st7703_enable(struct drm_panel *panel)
|
||||
{
|
||||
struct st7703 *ctx = panel_to_st7703(panel);
|
||||
@@ -428,6 +622,7 @@ static int st7703_remove(struct mipi_dsi_device *dsi)
|
||||
|
||||
static const struct of_device_id st7703_of_match[] = {
|
||||
{ .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc },
|
||||
+ { .compatible = "xingbangda,xbd599", .data = &xbd599_desc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st7703_of_match);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:59 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Assert reset prior to powering down the
|
||||
regulators
|
||||
|
||||
The reset pin is inverted, so if we don't assert reset, the actual gpio
|
||||
will be high and may keep driving the IO port of the panel.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index e771281eb547..92930e127559 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -416,6 +416,7 @@ static int st7703_unprepare(struct drm_panel *panel)
|
||||
if (!ctx->prepared)
|
||||
return 0;
|
||||
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
regulator_disable(ctx->iovcc);
|
||||
regulator_disable(ctx->vcc);
|
||||
ctx->prepared = false;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
41
0001-drm-panel-st7703-Enter-sleep-after-display-off.patch
Normal file
41
0001-drm-panel-st7703-Enter-sleep-after-display-off.patch
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:58 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Enter sleep after display off
|
||||
|
||||
The datasheet suggests to issue sleep in after display off
|
||||
as a part of the panel's shutdown sequence.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index 33611419059a..e771281eb547 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -394,8 +394,19 @@ static int st7703_disable(struct drm_panel *panel)
|
||||
{
|
||||
struct st7703 *ctx = panel_to_st7703(panel);
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_set_display_off(dsi);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(ctx->dev,
|
||||
+ "Failed to turn off the display: %d\n", ret);
|
||||
|
||||
- return mipi_dsi_dcs_set_display_off(dsi);
|
||||
+ ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
|
||||
+ if (ret < 0)
|
||||
+ DRM_DEV_ERROR(ctx->dev,
|
||||
+ "Failed to enter sleep mode: %d\n", ret);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int st7703_unprepare(struct drm_panel *panel)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:55 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Move code specific to jh057n closer
|
||||
together
|
||||
|
||||
It's better than having it spread around the driver.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 50 +++++++++----------
|
||||
1 file changed, 25 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index 08cbc316266c..d03aab10cfef 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -153,6 +153,31 @@ static int jh057n_init_sequence(struct st7703 *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static const struct drm_display_mode jh057n00900_mode = {
|
||||
+ .hdisplay = 720,
|
||||
+ .hsync_start = 720 + 90,
|
||||
+ .hsync_end = 720 + 90 + 20,
|
||||
+ .htotal = 720 + 90 + 20 + 20,
|
||||
+ .vdisplay = 1440,
|
||||
+ .vsync_start = 1440 + 20,
|
||||
+ .vsync_end = 1440 + 20 + 4,
|
||||
+ .vtotal = 1440 + 20 + 4 + 12,
|
||||
+ .vrefresh = 60,
|
||||
+ .clock = 75276,
|
||||
+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
+ .width_mm = 65,
|
||||
+ .height_mm = 130,
|
||||
+};
|
||||
+
|
||||
+struct st7703_panel_desc jh057n00900_panel_desc = {
|
||||
+ .mode = &jh057n00900_mode,
|
||||
+ .lanes = 4,
|
||||
+ .mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
+ MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
|
||||
+ .format = MIPI_DSI_FMT_RGB888,
|
||||
+ .init_sequence = jh057n_init_sequence,
|
||||
+};
|
||||
+
|
||||
static int st7703_enable(struct drm_panel *panel)
|
||||
{
|
||||
struct st7703 *ctx = panel_to_st7703(panel);
|
||||
@@ -226,31 +251,6 @@ static int st7703_prepare(struct drm_panel *panel)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static const struct drm_display_mode jh057n00900_mode = {
|
||||
- .hdisplay = 720,
|
||||
- .hsync_start = 720 + 90,
|
||||
- .hsync_end = 720 + 90 + 20,
|
||||
- .htotal = 720 + 90 + 20 + 20,
|
||||
- .vdisplay = 1440,
|
||||
- .vsync_start = 1440 + 20,
|
||||
- .vsync_end = 1440 + 20 + 4,
|
||||
- .vtotal = 1440 + 20 + 4 + 12,
|
||||
- .vrefresh = 60,
|
||||
- .clock = 75276,
|
||||
- .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
|
||||
- .width_mm = 65,
|
||||
- .height_mm = 130,
|
||||
-};
|
||||
-
|
||||
-struct st7703_panel_desc jh057n00900_panel_desc = {
|
||||
- .mode = &jh057n00900_mode,
|
||||
- .lanes = 4,
|
||||
- .mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
- MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
|
||||
- .format = MIPI_DSI_FMT_RGB888,
|
||||
- .init_sequence = jh057n_init_sequence,
|
||||
-};
|
||||
-
|
||||
static int st7703_get_modes(struct drm_panel *panel,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:56 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Move generic part of init sequence to
|
||||
enable callback
|
||||
|
||||
Calling sleep out and display on is a controller specific part
|
||||
of the initialization process. Move it out of the panel specific
|
||||
initialization function to the enable callback.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 33 ++++++++++---------
|
||||
1 file changed, 18 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index d03aab10cfef..cdbf7dfb4dd4 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -84,8 +84,6 @@ static inline struct st7703 *panel_to_st7703(struct drm_panel *panel)
|
||||
static int jh057n_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
- struct device *dev = ctx->dev;
|
||||
- int ret;
|
||||
|
||||
/*
|
||||
* Init sequence was supplied by the panel vendor. Most of the commands
|
||||
@@ -136,20 +134,7 @@ static int jh057n_init_sequence(struct st7703 *ctx)
|
||||
0x18, 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41,
|
||||
0x37, 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10,
|
||||
0x11, 0x18);
|
||||
- msleep(20);
|
||||
-
|
||||
- ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
- if (ret < 0) {
|
||||
- DRM_DEV_ERROR(dev, "Failed to exit sleep mode: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
- /* Panel is operational 120 msec after reset */
|
||||
- msleep(60);
|
||||
- ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
- if (ret)
|
||||
- return ret;
|
||||
|
||||
- DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -181,6 +166,7 @@ struct st7703_panel_desc jh057n00900_panel_desc = {
|
||||
static int st7703_enable(struct drm_panel *panel)
|
||||
{
|
||||
struct st7703 *ctx = panel_to_st7703(panel);
|
||||
+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
int ret;
|
||||
|
||||
ret = ctx->desc->init_sequence(ctx);
|
||||
@@ -190,6 +176,23 @@ static int st7703_enable(struct drm_panel *panel)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ /* Panel is operational 120 msec after reset */
|
||||
+ msleep(60);
|
||||
+
|
||||
+ ret = mipi_dsi_dcs_set_display_on(dsi);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Panel init sequence done\n");
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
128
0001-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch
Normal file
128
0001-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:54 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Prepare for supporting multiple panels
|
||||
|
||||
Parametrize the driver so that it can support more panels based
|
||||
on st7703 controller.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 43 +++++++++++++------
|
||||
1 file changed, 31 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index 511af659f273..08cbc316266c 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <linux/media-bus-format.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
+#include <linux/of_device.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include <video/display_timing.h>
|
||||
@@ -56,6 +57,15 @@ struct st7703 {
|
||||
bool prepared;
|
||||
|
||||
struct dentry *debugfs;
|
||||
+ const struct st7703_panel_desc *desc;
|
||||
+};
|
||||
+
|
||||
+struct st7703_panel_desc {
|
||||
+ const struct drm_display_mode *mode;
|
||||
+ unsigned int lanes;
|
||||
+ unsigned long mode_flags;
|
||||
+ enum mipi_dsi_pixel_format format;
|
||||
+ int (*init_sequence)(struct st7703 *ctx);
|
||||
};
|
||||
|
||||
static inline struct st7703 *panel_to_st7703(struct drm_panel *panel)
|
||||
@@ -148,7 +158,7 @@ static int st7703_enable(struct drm_panel *panel)
|
||||
struct st7703 *ctx = panel_to_st7703(panel);
|
||||
int ret;
|
||||
|
||||
- ret = jh057n_init_sequence(ctx);
|
||||
+ ret = ctx->desc->init_sequence(ctx);
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n",
|
||||
ret);
|
||||
@@ -216,7 +226,7 @@ static int st7703_prepare(struct drm_panel *panel)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static const struct drm_display_mode default_mode = {
|
||||
+static const struct drm_display_mode jh057n00900_mode = {
|
||||
.hdisplay = 720,
|
||||
.hsync_start = 720 + 90,
|
||||
.hsync_end = 720 + 90 + 20,
|
||||
@@ -232,17 +242,26 @@ static const struct drm_display_mode default_mode = {
|
||||
.height_mm = 130,
|
||||
};
|
||||
|
||||
+struct st7703_panel_desc jh057n00900_panel_desc = {
|
||||
+ .mode = &jh057n00900_mode,
|
||||
+ .lanes = 4,
|
||||
+ .mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
+ MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
|
||||
+ .format = MIPI_DSI_FMT_RGB888,
|
||||
+ .init_sequence = jh057n_init_sequence,
|
||||
+};
|
||||
+
|
||||
static int st7703_get_modes(struct drm_panel *panel,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
struct st7703 *ctx = panel_to_st7703(panel);
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
- mode = drm_mode_duplicate(connector->dev, &default_mode);
|
||||
+ mode = drm_mode_duplicate(connector->dev, ctx->desc->mode);
|
||||
if (!mode) {
|
||||
DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n",
|
||||
- default_mode.hdisplay, default_mode.vdisplay,
|
||||
- default_mode.vrefresh);
|
||||
+ ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay,
|
||||
+ ctx->desc->mode->vrefresh);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -317,11 +336,11 @@ static int st7703_probe(struct mipi_dsi_device *dsi)
|
||||
mipi_dsi_set_drvdata(dsi, ctx);
|
||||
|
||||
ctx->dev = dev;
|
||||
+ ctx->desc = of_device_get_match_data(dev);
|
||||
|
||||
- dsi->lanes = 4;
|
||||
- dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
- dsi->mode_flags = MIPI_DSI_MODE_VIDEO |
|
||||
- MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
|
||||
+ dsi->mode_flags = ctx->desc->mode_flags;
|
||||
+ dsi->format = ctx->desc->format;
|
||||
+ dsi->lanes = ctx->desc->lanes;
|
||||
|
||||
ctx->vcc = devm_regulator_get(dev, "vcc");
|
||||
if (IS_ERR(ctx->vcc)) {
|
||||
@@ -361,8 +380,8 @@ static int st7703_probe(struct mipi_dsi_device *dsi)
|
||||
}
|
||||
|
||||
DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n",
|
||||
- default_mode.hdisplay, default_mode.vdisplay,
|
||||
- default_mode.vrefresh,
|
||||
+ ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay,
|
||||
+ ctx->desc->mode->vrefresh,
|
||||
mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
|
||||
|
||||
st7703_debugfs_init(ctx);
|
||||
@@ -405,7 +424,7 @@ static int st7703_remove(struct mipi_dsi_device *dsi)
|
||||
}
|
||||
|
||||
static const struct of_device_id st7703_of_match[] = {
|
||||
- { .compatible = "rocktech,jh057n00900" },
|
||||
+ { .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, st7703_of_match);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
265
0001-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch
Normal file
265
0001-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch
Normal file
|
|
@ -0,0 +1,265 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:53 +0200
|
||||
Subject: [PATCH] drm/panel: st7703: Rename functions from jh057n prefix to
|
||||
st7703
|
||||
|
||||
This is done so that code that's not specific to a particular
|
||||
jh057n panel is named after the controller. Functions specific
|
||||
to the panel are kept named after the panel.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
drivers/gpu/drm/panel/panel-sitronix-st7703.c | 90 ++++++++++---------
|
||||
1 file changed, 46 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
index 38ff742bc120..511af659f273 100644
|
||||
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
- * Rockteck jh057n00900 5.5" MIPI-DSI panel driver
|
||||
+ * Driver for panels based on Sitronix ST7703 controller, souch as:
|
||||
+ *
|
||||
+ * - Rocktech jh057n00900 5.5" MIPI-DSI panel
|
||||
*
|
||||
* Copyright (C) Purism SPC 2019
|
||||
*/
|
||||
@@ -21,7 +23,7 @@
|
||||
#include <drm/drm_panel.h>
|
||||
#include <drm/drm_print.h>
|
||||
|
||||
-#define DRV_NAME "panel-rocktech-jh057n00900"
|
||||
+#define DRV_NAME "panel-sitronix-st7703"
|
||||
|
||||
/* Manufacturer specific Commands send via DSI */
|
||||
#define ST7703_CMD_ALL_PIXEL_OFF 0x22
|
||||
@@ -45,7 +47,7 @@
|
||||
#define ST7703_CMD_SETGIP1 0xE9
|
||||
#define ST7703_CMD_SETGIP2 0xEA
|
||||
|
||||
-struct jh057n {
|
||||
+struct st7703 {
|
||||
struct device *dev;
|
||||
struct drm_panel panel;
|
||||
struct gpio_desc *reset_gpio;
|
||||
@@ -56,9 +58,9 @@ struct jh057n {
|
||||
struct dentry *debugfs;
|
||||
};
|
||||
|
||||
-static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel)
|
||||
+static inline struct st7703 *panel_to_st7703(struct drm_panel *panel)
|
||||
{
|
||||
- return container_of(panel, struct jh057n, panel);
|
||||
+ return container_of(panel, struct st7703, panel);
|
||||
}
|
||||
|
||||
#define dsi_generic_write_seq(dsi, seq...) do { \
|
||||
@@ -69,7 +71,7 @@ static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel)
|
||||
return ret; \
|
||||
} while (0)
|
||||
|
||||
-static int jh057n_init_sequence(struct jh057n *ctx)
|
||||
+static int jh057n_init_sequence(struct st7703 *ctx)
|
||||
{
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
struct device *dev = ctx->dev;
|
||||
@@ -141,9 +143,9 @@ static int jh057n_init_sequence(struct jh057n *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int jh057n_enable(struct drm_panel *panel)
|
||||
+static int st7703_enable(struct drm_panel *panel)
|
||||
{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct st7703 *ctx = panel_to_st7703(panel);
|
||||
int ret;
|
||||
|
||||
ret = jh057n_init_sequence(ctx);
|
||||
@@ -156,17 +158,17 @@ static int jh057n_enable(struct drm_panel *panel)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int jh057n_disable(struct drm_panel *panel)
|
||||
+static int st7703_disable(struct drm_panel *panel)
|
||||
{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct st7703 *ctx = panel_to_st7703(panel);
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
||||
return mipi_dsi_dcs_set_display_off(dsi);
|
||||
}
|
||||
|
||||
-static int jh057n_unprepare(struct drm_panel *panel)
|
||||
+static int st7703_unprepare(struct drm_panel *panel)
|
||||
{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct st7703 *ctx = panel_to_st7703(panel);
|
||||
|
||||
if (!ctx->prepared)
|
||||
return 0;
|
||||
@@ -178,9 +180,9 @@ static int jh057n_unprepare(struct drm_panel *panel)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int jh057n_prepare(struct drm_panel *panel)
|
||||
+static int st7703_prepare(struct drm_panel *panel)
|
||||
{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct st7703 *ctx = panel_to_st7703(panel);
|
||||
int ret;
|
||||
|
||||
if (ctx->prepared)
|
||||
@@ -230,10 +232,10 @@ static const struct drm_display_mode default_mode = {
|
||||
.height_mm = 130,
|
||||
};
|
||||
|
||||
-static int jh057n_get_modes(struct drm_panel *panel,
|
||||
+static int st7703_get_modes(struct drm_panel *panel,
|
||||
struct drm_connector *connector)
|
||||
{
|
||||
- struct jh057n *ctx = panel_to_jh057n(panel);
|
||||
+ struct st7703 *ctx = panel_to_st7703(panel);
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
mode = drm_mode_duplicate(connector->dev, &default_mode);
|
||||
@@ -254,17 +256,17 @@ static int jh057n_get_modes(struct drm_panel *panel,
|
||||
return 1;
|
||||
}
|
||||
|
||||
-static const struct drm_panel_funcs jh057n_drm_funcs = {
|
||||
- .disable = jh057n_disable,
|
||||
- .unprepare = jh057n_unprepare,
|
||||
- .prepare = jh057n_prepare,
|
||||
- .enable = jh057n_enable,
|
||||
- .get_modes = jh057n_get_modes,
|
||||
+static const struct drm_panel_funcs st7703_drm_funcs = {
|
||||
+ .disable = st7703_disable,
|
||||
+ .unprepare = st7703_unprepare,
|
||||
+ .prepare = st7703_prepare,
|
||||
+ .enable = st7703_enable,
|
||||
+ .get_modes = st7703_get_modes,
|
||||
};
|
||||
|
||||
static int allpixelson_set(void *data, u64 val)
|
||||
{
|
||||
- struct jh057n *ctx = data;
|
||||
+ struct st7703 *ctx = data;
|
||||
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n");
|
||||
@@ -282,7 +284,7 @@ static int allpixelson_set(void *data, u64 val)
|
||||
DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL,
|
||||
allpixelson_set, "%llu\n");
|
||||
|
||||
-static void jh057n_debugfs_init(struct jh057n *ctx)
|
||||
+static void st7703_debugfs_init(struct st7703 *ctx)
|
||||
{
|
||||
ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL);
|
||||
|
||||
@@ -290,16 +292,16 @@ static void jh057n_debugfs_init(struct jh057n *ctx)
|
||||
&allpixelson_fops);
|
||||
}
|
||||
|
||||
-static void jh057n_debugfs_remove(struct jh057n *ctx)
|
||||
+static void st7703_debugfs_remove(struct st7703 *ctx)
|
||||
{
|
||||
debugfs_remove_recursive(ctx->debugfs);
|
||||
ctx->debugfs = NULL;
|
||||
}
|
||||
|
||||
-static int jh057n_probe(struct mipi_dsi_device *dsi)
|
||||
+static int st7703_probe(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
struct device *dev = &dsi->dev;
|
||||
- struct jh057n *ctx;
|
||||
+ struct st7703 *ctx;
|
||||
int ret;
|
||||
|
||||
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
@@ -340,7 +342,7 @@ static int jh057n_probe(struct mipi_dsi_device *dsi)
|
||||
return ret;
|
||||
}
|
||||
|
||||
- drm_panel_init(&ctx->panel, dev, &jh057n_drm_funcs,
|
||||
+ drm_panel_init(&ctx->panel, dev, &st7703_drm_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
ret = drm_panel_of_backlight(&ctx->panel);
|
||||
@@ -363,13 +365,13 @@ static int jh057n_probe(struct mipi_dsi_device *dsi)
|
||||
default_mode.vrefresh,
|
||||
mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes);
|
||||
|
||||
- jh057n_debugfs_init(ctx);
|
||||
+ st7703_debugfs_init(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void jh057n_shutdown(struct mipi_dsi_device *dsi)
|
||||
+static void st7703_shutdown(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
- struct jh057n *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ struct st7703 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
int ret;
|
||||
|
||||
ret = drm_panel_unprepare(&ctx->panel);
|
||||
@@ -383,12 +385,12 @@ static void jh057n_shutdown(struct mipi_dsi_device *dsi)
|
||||
ret);
|
||||
}
|
||||
|
||||
-static int jh057n_remove(struct mipi_dsi_device *dsi)
|
||||
+static int st7703_remove(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
- struct jh057n *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ struct st7703 *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
int ret;
|
||||
|
||||
- jh057n_shutdown(dsi);
|
||||
+ st7703_shutdown(dsi);
|
||||
|
||||
ret = mipi_dsi_detach(dsi);
|
||||
if (ret < 0)
|
||||
@@ -397,28 +399,28 @@ static int jh057n_remove(struct mipi_dsi_device *dsi)
|
||||
|
||||
drm_panel_remove(&ctx->panel);
|
||||
|
||||
- jh057n_debugfs_remove(ctx);
|
||||
+ st7703_debugfs_remove(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static const struct of_device_id jh057n_of_match[] = {
|
||||
+static const struct of_device_id st7703_of_match[] = {
|
||||
{ .compatible = "rocktech,jh057n00900" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
-MODULE_DEVICE_TABLE(of, jh057n_of_match);
|
||||
+MODULE_DEVICE_TABLE(of, st7703_of_match);
|
||||
|
||||
-static struct mipi_dsi_driver jh057n_driver = {
|
||||
- .probe = jh057n_probe,
|
||||
- .remove = jh057n_remove,
|
||||
- .shutdown = jh057n_shutdown,
|
||||
+static struct mipi_dsi_driver st7703_driver = {
|
||||
+ .probe = st7703_probe,
|
||||
+ .remove = st7703_remove,
|
||||
+ .shutdown = st7703_shutdown,
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
- .of_match_table = jh057n_of_match,
|
||||
+ .of_match_table = st7703_of_match,
|
||||
},
|
||||
};
|
||||
-module_mipi_dsi_driver(jh057n_driver);
|
||||
+module_mipi_dsi_driver(st7703_driver);
|
||||
|
||||
MODULE_AUTHOR("Guido Günther <agx@sigxcpu.org>");
|
||||
-MODULE_DESCRIPTION("DRM driver for Rocktech JH057N00900 MIPI DSI panel");
|
||||
+MODULE_DESCRIPTION("DRM driver for Sitronix ST7703 based MIPI DSI panels");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Mon, 16 Mar 2020 21:35:02 +0800
|
||||
Subject: [PATCH] drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation
|
||||
|
||||
The max() function call in horizontal timing calculation shouldn't pad a
|
||||
length already subtracted with overhead to overhead, instead it should
|
||||
only prevent the set timing to underflow.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
---
|
||||
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
|
||||
index aa67cb037e9d..52e009dc632b 100644
|
||||
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
|
||||
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
|
||||
@@ -556,7 +556,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HSA_PACKET_OVERHEAD 10
|
||||
hsa = max((unsigned int)HSA_PACKET_OVERHEAD,
|
||||
- (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD);
|
||||
+ (mode->hsync_end - mode->hsync_start) * Bpp) - HSA_PACKET_OVERHEAD;
|
||||
|
||||
/*
|
||||
* The backporch is set using a blanking packet (4
|
||||
@@ -565,7 +565,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HBP_PACKET_OVERHEAD 6
|
||||
hbp = max((unsigned int)HBP_PACKET_OVERHEAD,
|
||||
- (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
|
||||
+ (mode->htotal - mode->hsync_end) * Bpp) - HBP_PACKET_OVERHEAD;
|
||||
|
||||
/*
|
||||
* The frontporch is set using a sync event (4 bytes)
|
||||
@@ -575,7 +575,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HFP_PACKET_OVERHEAD 16
|
||||
hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
|
||||
- (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
|
||||
+ (mode->hsync_start - mode->hdisplay) * Bpp) - HFP_PACKET_OVERHEAD;
|
||||
|
||||
/*
|
||||
* The blanking is set using a sync event (4 bytes)
|
||||
@@ -584,8 +584,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
|
||||
*/
|
||||
#define HBLK_PACKET_OVERHEAD 10
|
||||
hblk = max((unsigned int)HBLK_PACKET_OVERHEAD,
|
||||
- (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp -
|
||||
- HBLK_PACKET_OVERHEAD);
|
||||
+ (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp) -
|
||||
+ HBLK_PACKET_OVERHEAD;
|
||||
|
||||
/*
|
||||
* And I'm not entirely sure what vblk is about. The driver in
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:51 +0200
|
||||
Subject: [PATCH] dt-bindings: panel: Add compatible for Xingbangda XBD599
|
||||
panel
|
||||
|
||||
Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel. It is based on
|
||||
Sitronix ST7703 LCD controller just like rocktech,jh057n00900. It is
|
||||
used in PinePhone.
|
||||
|
||||
Add a compatible for it.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
.../bindings/display/panel/rocktech,jh057n00900.yaml | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
index f97c48550741..4d43a1b36d7c 100644
|
||||
--- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
+++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
@@ -18,7 +18,11 @@ allOf:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
- const: rocktech,jh057n00900
|
||||
+ enum:
|
||||
+ # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
|
||||
+ - rocktech,jh057n00900
|
||||
+ # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel
|
||||
+ - xingbangda,xbd599
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
--
|
||||
2.26.2
|
||||
|
||||
119
0001-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch
Normal file
119
0001-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:50 +0200
|
||||
Subject: [PATCH] dt-bindings: panel: Convert rocktech, jh057n00900 to yaml
|
||||
|
||||
Convert Rocktech MIPI DSI panel driver from txt to yaml bindings.
|
||||
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
---
|
||||
.../display/panel/rocktech,jh057n00900.txt | 23 -------
|
||||
.../display/panel/rocktech,jh057n00900.yaml | 66 +++++++++++++++++++
|
||||
2 files changed, 66 insertions(+), 23 deletions(-)
|
||||
delete mode 100644 Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt
|
||||
create mode 100644 Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt
|
||||
deleted file mode 100644
|
||||
index a372c5d84695..000000000000
|
||||
--- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt
|
||||
+++ /dev/null
|
||||
@@ -1,23 +0,0 @@
|
||||
-Rocktech jh057n00900 5.5" 720x1440 TFT LCD panel
|
||||
-
|
||||
-Required properties:
|
||||
-- compatible: should be "rocktech,jh057n00900"
|
||||
-- reg: DSI virtual channel of the peripheral
|
||||
-- reset-gpios: panel reset gpio
|
||||
-- backlight: phandle of the backlight device attached to the panel
|
||||
-- vcc-supply: phandle of the regulator that provides the vcc supply voltage.
|
||||
-- iovcc-supply: phandle of the regulator that provides the iovcc supply
|
||||
- voltage.
|
||||
-
|
||||
-Example:
|
||||
-
|
||||
- &mipi_dsi {
|
||||
- panel@0 {
|
||||
- compatible = "rocktech,jh057n00900";
|
||||
- reg = <0>;
|
||||
- backlight = <&backlight>;
|
||||
- reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
|
||||
- vcc-supply = <®_2v8_p>;
|
||||
- iovcc-supply = <®_1v8_p>;
|
||||
- };
|
||||
- };
|
||||
diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
new file mode 100644
|
||||
index 000000000000..f97c48550741
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
@@ -0,0 +1,66 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/display/panel/rocktech,jh057n00900.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel
|
||||
+
|
||||
+maintainers:
|
||||
+ - Ondrej Jirman <megi@xff.cz>
|
||||
+
|
||||
+description: |
|
||||
+ Rocktech JH057N00900 is a 720x1440 TFT LCD panel
|
||||
+ connected using a MIPI-DSI video interface.
|
||||
+
|
||||
+allOf:
|
||||
+ - $ref: panel-common.yaml#
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ const: rocktech,jh057n00900
|
||||
+
|
||||
+ reg:
|
||||
+ maxItems: 1
|
||||
+ description: DSI virtual channel
|
||||
+
|
||||
+ vcc-supply:
|
||||
+ description: Panel power supply
|
||||
+
|
||||
+ vccio-supply:
|
||||
+ description: I/O voltage supply
|
||||
+
|
||||
+ reset-gpios:
|
||||
+ description: GPIO used for the reset pin
|
||||
+ maxItems: 1
|
||||
+
|
||||
+ backlight:
|
||||
+ description: Backlight used by the panel
|
||||
+ $ref: "/schemas/types.yaml#/definitions/phandle"
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+ - vcc-supply
|
||||
+ - vccio-supply
|
||||
+ - reset-gpios
|
||||
+
|
||||
+additionalProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ #include <dt-bindings/gpio/gpio.h>
|
||||
+
|
||||
+ dsi {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ panel@0 {
|
||||
+ compatible = "rocktech,jh057n00900";
|
||||
+ reg = <0>;
|
||||
+ vcc-supply = <®_2v8_p>;
|
||||
+ iovcc-supply = <®_1v8_p>;
|
||||
+ reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
|
||||
+ backlight = <&backlight>;
|
||||
+ };
|
||||
+ };
|
||||
+...
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Mon, 16 Mar 2020 21:35:00 +0800
|
||||
Subject: [PATCH] dt-bindings: panel: add binding for Xingbangda XBD599 panel
|
||||
|
||||
Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel.
|
||||
|
||||
Add its device tree binding.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
---
|
||||
.../display/panel/xingbangda,xbd599.yaml | 50 +++++++++++++++++++
|
||||
1 file changed, 50 insertions(+)
|
||||
create mode 100644 Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
|
||||
new file mode 100644
|
||||
index 000000000000..b27bcf11198f
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
|
||||
@@ -0,0 +1,50 @@
|
||||
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||
+%YAML 1.2
|
||||
+---
|
||||
+$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml#
|
||||
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
+
|
||||
+title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel
|
||||
+
|
||||
+maintainers:
|
||||
+ - Icenowy Zheng <icenowy@aosc.io>
|
||||
+
|
||||
+allOf:
|
||||
+ - $ref: panel-common.yaml#
|
||||
+
|
||||
+properties:
|
||||
+ compatible:
|
||||
+ const: xingbangda,xbd599
|
||||
+ reg: true
|
||||
+ backlight: true
|
||||
+ reset-gpios: true
|
||||
+ vcc-supply:
|
||||
+ description: regulator that supplies the VCC voltage
|
||||
+ iovcc-supply:
|
||||
+ description: regulator that supplies the IOVCC voltage
|
||||
+
|
||||
+required:
|
||||
+ - compatible
|
||||
+ - reg
|
||||
+ - backlight
|
||||
+ - vcc-supply
|
||||
+ - iovcc-supply
|
||||
+
|
||||
+additionalProperties: false
|
||||
+
|
||||
+examples:
|
||||
+ - |
|
||||
+ dsi {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ panel@0 {
|
||||
+ compatible = "xingbangda,xbd599";
|
||||
+ reg = <0>;
|
||||
+ backlight = <&backlight>;
|
||||
+ iovcc-supply = <®_dldo2>;
|
||||
+ vcc-supply = <®_ldo_io0>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+...
|
||||
--
|
||||
2.26.2
|
||||
|
||||
33
0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch
Normal file
33
0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Icenowy Zheng <icenowy@aosc.io>
|
||||
Date: Fri, 26 Jun 2020 02:55:49 +0200
|
||||
Subject: [PATCH] dt-bindings: vendor-prefixes: Add Xingbangda
|
||||
|
||||
Shenzhen Xingbangda Display Technology Co., Ltd is a company which
|
||||
produces LCD modules. It supplies the LCD panels for the PinePhone.
|
||||
|
||||
Add the vendor prefix of it.
|
||||
|
||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
|
||||
Signed-off-by: Ondrej Jirman <megous@megous.com>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
index 9aeab66be85f..740b116b179f 100644
|
||||
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
@@ -1157,6 +1157,8 @@ patternProperties:
|
||||
description: Xiaomi Technology Co., Ltd.
|
||||
"^xillybus,.*":
|
||||
description: Xillybus Ltd.
|
||||
+ "^xingbangda,.*":
|
||||
+ description: Shenzhen Xingbangda Display Technology Co., Ltd
|
||||
"^xinpeng,.*":
|
||||
description: Shenzhen Xinpeng Technology Co., Ltd
|
||||
"^xlnx,.*":
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Ma <aaron.ma@canonical.com>
|
||||
Date: Tue, 24 Mar 2020 03:16:39 +0800
|
||||
Subject: [PATCH] e1000e: bump up timeout to wait when ME un-configure ULP mode
|
||||
|
||||
ME takes 2+ seconds to un-configure ULP mode done after resume
|
||||
from s2idle on some ThinkPad laptops.
|
||||
Without enough wait, reset and re-init will fail with error.
|
||||
|
||||
Fixes: f15bb6dde738cc8fa0 ("e1000e: Add support for S0ix")
|
||||
BugLink: https://bugs.launchpad.net/bugs/1865570
|
||||
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
|
||||
---
|
||||
drivers/net/ethernet/intel/e1000e/ich8lan.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
index 489bb5b59475..26bb39b62956 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
@@ -1245,9 +1245,9 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
|
||||
ew32(H2ME, mac_reg);
|
||||
}
|
||||
|
||||
- /* Poll up to 300msec for ME to clear ULP_CFG_DONE. */
|
||||
+ /* Poll up to 2.5sec for ME to clear ULP_CFG_DONE. */
|
||||
while (er32(FWSM) & E1000_FWSM_ULP_CFG_DONE) {
|
||||
- if (i++ == 30) {
|
||||
+ if (i++ == 250) {
|
||||
ret_val = -E1000_ERR_PHY;
|
||||
goto out;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
161
0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch
Normal file
161
0001-efi-Add-an-EFI_SECURE_BOOT-flag-to-indicate-secure-b.patch
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Tue, 27 Feb 2018 10:04:55 +0000
|
||||
Subject: [PATCH] efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode
|
||||
|
||||
UEFI machines can be booted in Secure Boot mode. Add an EFI_SECURE_BOOT
|
||||
flag that can be passed to efi_enabled() to find out whether secure boot is
|
||||
enabled.
|
||||
|
||||
Move the switch-statement in x86's setup_arch() that inteprets the
|
||||
secure_boot boot parameter to generic code and set the bit there.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
||||
cc: linux-efi@vger.kernel.org
|
||||
[Rebased for context; efi_is_table_address was moved to arch/x86]
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
arch/x86/kernel/setup.c | 14 +-----------
|
||||
drivers/firmware/efi/Makefile | 1 +
|
||||
drivers/firmware/efi/secureboot.c | 38 +++++++++++++++++++++++++++++++
|
||||
include/linux/efi.h | 18 ++++++++++-----
|
||||
4 files changed, 52 insertions(+), 19 deletions(-)
|
||||
create mode 100644 drivers/firmware/efi/secureboot.c
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index a1b8cb9a2579..28d43754aeb6 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1256,19 +1256,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
/* Allocate bigger log buffer */
|
||||
setup_log_buf(1);
|
||||
|
||||
- if (efi_enabled(EFI_BOOT)) {
|
||||
- switch (boot_params.secure_boot) {
|
||||
- case efi_secureboot_mode_disabled:
|
||||
- pr_info("Secure boot disabled\n");
|
||||
- break;
|
||||
- case efi_secureboot_mode_enabled:
|
||||
- pr_info("Secure boot enabled\n");
|
||||
- break;
|
||||
- default:
|
||||
- pr_info("Secure boot could not be determined\n");
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
+ efi_set_secure_boot(boot_params.secure_boot);
|
||||
|
||||
reserve_initrd();
|
||||
|
||||
diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile
|
||||
index 7a216984552b..f0ef02d733af 100644
|
||||
--- a/drivers/firmware/efi/Makefile
|
||||
+++ b/drivers/firmware/efi/Makefile
|
||||
@@ -25,6 +25,7 @@ obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_map.o
|
||||
obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o
|
||||
obj-$(CONFIG_EFI_TEST) += test/
|
||||
obj-$(CONFIG_EFI_DEV_PATH_PARSER) += dev-path-parser.o
|
||||
+obj-$(CONFIG_EFI) += secureboot.o
|
||||
obj-$(CONFIG_APPLE_PROPERTIES) += apple-properties.o
|
||||
obj-$(CONFIG_EFI_RCI2_TABLE) += rci2-table.o
|
||||
obj-$(CONFIG_EFI_EMBEDDED_FIRMWARE) += embedded-firmware.o
|
||||
diff --git a/drivers/firmware/efi/secureboot.c b/drivers/firmware/efi/secureboot.c
|
||||
new file mode 100644
|
||||
index 000000000000..de0a3714a5d4
|
||||
--- /dev/null
|
||||
+++ b/drivers/firmware/efi/secureboot.c
|
||||
@@ -0,0 +1,38 @@
|
||||
+/* Core kernel secure boot support.
|
||||
+ *
|
||||
+ * Copyright (C) 2017 Red Hat, Inc. All Rights Reserved.
|
||||
+ * Written by David Howells (dhowells@redhat.com)
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public Licence
|
||||
+ * as published by the Free Software Foundation; either version
|
||||
+ * 2 of the Licence, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
+
|
||||
+#include <linux/efi.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/printk.h>
|
||||
+
|
||||
+/*
|
||||
+ * Decide what to do when UEFI secure boot mode is enabled.
|
||||
+ */
|
||||
+void __init efi_set_secure_boot(enum efi_secureboot_mode mode)
|
||||
+{
|
||||
+ if (efi_enabled(EFI_BOOT)) {
|
||||
+ switch (mode) {
|
||||
+ case efi_secureboot_mode_disabled:
|
||||
+ pr_info("Secure boot disabled\n");
|
||||
+ break;
|
||||
+ case efi_secureboot_mode_enabled:
|
||||
+ set_bit(EFI_SECURE_BOOT, &efi.flags);
|
||||
+ pr_info("Secure boot enabled\n");
|
||||
+ break;
|
||||
+ default:
|
||||
+ pr_warn("Secure boot could not be determined (mode %u)\n",
|
||||
+ mode);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 2e2f9f608f68..6f5b3b019d3e 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -781,6 +781,14 @@ extern int __init efi_setup_pcdp_console(char *);
|
||||
#define EFI_MEM_ATTR 10 /* Did firmware publish an EFI_MEMORY_ATTRIBUTES table? */
|
||||
#define EFI_MEM_NO_SOFT_RESERVE 11 /* Is the kernel configured to ignore soft reservations? */
|
||||
#define EFI_PRESERVE_BS_REGIONS 12 /* Are EFI boot-services memory segments available? */
|
||||
+#define EFI_SECURE_BOOT 13 /* Are we in Secure Boot mode? */
|
||||
+
|
||||
+enum efi_secureboot_mode {
|
||||
+ efi_secureboot_mode_unset,
|
||||
+ efi_secureboot_mode_unknown,
|
||||
+ efi_secureboot_mode_disabled,
|
||||
+ efi_secureboot_mode_enabled,
|
||||
+};
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
/*
|
||||
@@ -792,6 +800,8 @@ static inline bool efi_enabled(int feature)
|
||||
}
|
||||
extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
|
||||
|
||||
+extern void __init efi_set_secure_boot(enum efi_secureboot_mode mode);
|
||||
+
|
||||
bool __pure __efi_soft_reserve_enabled(void);
|
||||
|
||||
static inline bool __pure efi_soft_reserve_enabled(void)
|
||||
@@ -818,6 +828,8 @@ efi_capsule_pending(int *reset_type)
|
||||
return false;
|
||||
}
|
||||
|
||||
+static inline void efi_set_secure_boot(enum efi_secureboot_mode mode) {}
|
||||
+
|
||||
static inline bool efi_soft_reserve_enabled(void)
|
||||
{
|
||||
return false;
|
||||
@@ -1090,12 +1102,6 @@ static inline bool efi_runtime_disabled(void) { return true; }
|
||||
extern void efi_call_virt_check_flags(unsigned long flags, const char *call);
|
||||
extern unsigned long efi_call_virt_save_flags(void);
|
||||
|
||||
-enum efi_secureboot_mode {
|
||||
- efi_secureboot_mode_unset,
|
||||
- efi_secureboot_mode_unknown,
|
||||
- efi_secureboot_mode_disabled,
|
||||
- efi_secureboot_mode_enabled,
|
||||
-};
|
||||
enum efi_secureboot_mode efi_get_secureboot(void);
|
||||
|
||||
#ifdef CONFIG_RESET_ATTACK_MITIGATION
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: David Howells <dhowells@redhat.com>
|
||||
Date: Mon, 30 Sep 2019 21:28:16 +0000
|
||||
Subject: [PATCH] efi: Lock down the kernel if booted in secure boot mode
|
||||
|
||||
UEFI Secure Boot provides a mechanism for ensuring that the firmware
|
||||
will only load signed bootloaders and kernels. Certain use cases may
|
||||
also require that all kernel modules also be signed. Add a
|
||||
configuration option that to lock down the kernel - which includes
|
||||
requiring validly signed modules - if the kernel is secure-booted.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
arch/x86/kernel/setup.c | 8 ++++++++
|
||||
security/lockdown/Kconfig | 13 +++++++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index 28d43754aeb6..19d57bfc12f9 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/sfi.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/tboot.h>
|
||||
+#include <linux/security.h>
|
||||
#include <linux/usb/xhci-dbgp.h>
|
||||
|
||||
#include <uapi/linux/mount.h>
|
||||
@@ -1105,6 +1106,13 @@ void __init setup_arch(char **cmdline_p)
|
||||
if (efi_enabled(EFI_BOOT))
|
||||
efi_init();
|
||||
|
||||
+ efi_set_secure_boot(boot_params.secure_boot);
|
||||
+
|
||||
+#ifdef CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT
|
||||
+ if (efi_enabled(EFI_SECURE_BOOT))
|
||||
+ security_lock_kernel_down("EFI Secure Boot mode", LOCKDOWN_INTEGRITY_MAX);
|
||||
+#endif
|
||||
+
|
||||
dmi_setup();
|
||||
|
||||
/*
|
||||
diff --git a/security/lockdown/Kconfig b/security/lockdown/Kconfig
|
||||
index e84ddf484010..d0501353a4b9 100644
|
||||
--- a/security/lockdown/Kconfig
|
||||
+++ b/security/lockdown/Kconfig
|
||||
@@ -16,6 +16,19 @@ config SECURITY_LOCKDOWN_LSM_EARLY
|
||||
subsystem is fully initialised. If enabled, lockdown will
|
||||
unconditionally be called before any other LSMs.
|
||||
|
||||
+config LOCK_DOWN_IN_EFI_SECURE_BOOT
|
||||
+ bool "Lock down the kernel in EFI Secure Boot mode"
|
||||
+ default n
|
||||
+ depends on EFI && SECURITY_LOCKDOWN_LSM_EARLY
|
||||
+ help
|
||||
+ UEFI Secure Boot provides a mechanism for ensuring that the firmware
|
||||
+ will only load signed bootloaders and kernels. Secure boot mode may
|
||||
+ be determined from EFI variables provided by the system firmware if
|
||||
+ not indicated by the boot parameters.
|
||||
+
|
||||
+ Enabling this option results in kernel lockdown being triggered if
|
||||
+ EFI Secure Boot is set.
|
||||
+
|
||||
choice
|
||||
prompt "Kernel default lockdown mode"
|
||||
default LOCK_DOWN_KERNEL_FORCE_NONE
|
||||
--
|
||||
2.26.2
|
||||
|
||||
98
0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch
Normal file
98
0001-iommu-arm-smmu-workaround-DMA-mode-issues.patch
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Mon, 20 May 2019 22:21:02 -0400
|
||||
Subject: [PATCH] iommu/arm-smmu: workaround DMA mode issues
|
||||
|
||||
Message-id: <20190520222102.19488-1-labbott@redhat.com>
|
||||
Patchwork-id: 259215
|
||||
O-Subject: [ARK INTERNAL PATCH] iommu/arm-smmu: workaround DMA mode issues
|
||||
Bugzilla:
|
||||
RH-Acked-by: Mark Langsdorf <mlangsdo@redhat.com>
|
||||
RH-Acked-by: Mark Salter <msalter@redhat.com>
|
||||
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
|
||||
Rebased for v5.2-rc1
|
||||
|
||||
Bugzilla: 1652259
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=19244562
|
||||
Upstream status: RHEL only.
|
||||
|
||||
rhel8 commit 65feb1ed0ec9a088a63a90d46c0f7563ac96ad0f
|
||||
Author: Mark Salter <msalter@redhat.com>
|
||||
Date: Wed Nov 21 17:15:59 2018 +0100
|
||||
|
||||
[iommu] iommu/arm-smmu: workaround DMA mode issues
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1624077
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=18112820
|
||||
Testing: Verified iommu.passthrough=1 no longer needed on gigabyte platforms.
|
||||
Upstream Status: RHEL-only
|
||||
|
||||
In RHEL_ALT 7.5 we carried a RHEL-only patch which forced the arm smmuv2
|
||||
into bypass mode due to performance issues on CN88xx. This was intended
|
||||
to be a temporary hack until the issues were resolved. Another vendor
|
||||
had issues with the iommu in bypass mode so we reverted the RHEL-only
|
||||
patch so that iommu is in DMA mode by default (upstream default).
|
||||
|
||||
It turns on that there are remaining SMMU DMA mode issues on Gigabyte
|
||||
platformws with CN88xx cpus. The problem manifests itself by pcie
|
||||
card drivers failing to initialize the cards when SMMU is in DMA mode.
|
||||
The root cause has not been determined yet, but looks likely to be
|
||||
a hw or firmware issue. This patch forces bypass mode for Gigabyte
|
||||
platforms. CN88xx isn't officially supported in RHEL but we have a
|
||||
lot of them being used internally for testing, so I think we want
|
||||
this to support that use case in RHEL8.
|
||||
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
|
||||
Acked-by: Mark Salter <msalter@redhat.com>
|
||||
Acked-by: Donald Dutile <ddutile@redhat.com>
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
---
|
||||
drivers/iommu/iommu.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
|
||||
index b6858adc4f17..4c2da9f17514 100644
|
||||
--- a/drivers/iommu/iommu.c
|
||||
+++ b/drivers/iommu/iommu.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#define pr_fmt(fmt) "iommu: " fmt
|
||||
|
||||
#include <linux/device.h>
|
||||
+#include <linux/dmi.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/types.h>
|
||||
@@ -2838,3 +2839,24 @@ int iommu_sva_get_pasid(struct iommu_sva *handle)
|
||||
return ops->sva_get_pasid(handle);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(iommu_sva_get_pasid);
|
||||
+
|
||||
+#ifdef CONFIG_ARM64
|
||||
+static int __init iommu_quirks(void)
|
||||
+{
|
||||
+ const char *vendor, *name;
|
||||
+
|
||||
+ vendor = dmi_get_system_info(DMI_SYS_VENDOR);
|
||||
+ name = dmi_get_system_info(DMI_PRODUCT_NAME);
|
||||
+
|
||||
+ if (vendor &&
|
||||
+ (strncmp(vendor, "GIGABYTE", 8) == 0 && name &&
|
||||
+ (strncmp(name, "R120", 4) == 0 ||
|
||||
+ strncmp(name, "R270", 4) == 0))) {
|
||||
+ pr_warn("Gigabyte %s detected, force iommu passthrough mode", name);
|
||||
+ iommu_def_domain_type = IOMMU_DOMAIN_IDENTITY;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+arch_initcall(iommu_quirks);
|
||||
+#endif
|
||||
--
|
||||
2.26.2
|
||||
|
||||
123
0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch
Normal file
123
0001-ipmi-do-not-configure-ipmi-for-HPE-m400.patch
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Laura Abbott <labbott@redhat.com>
|
||||
Date: Sun, 10 Feb 2019 01:27:54 +0000
|
||||
Subject: [PATCH] ipmi: do not configure ipmi for HPE m400
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1670017
|
||||
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=20147017
|
||||
|
||||
Commit 913a89f009d9 ("ipmi: Don't initialize anything in the core until
|
||||
something uses it") added new locking which broke context.
|
||||
|
||||
Message-id: <20180713142210.15700-1-tcamuso@redhat.com>
|
||||
Patchwork-id: 224899
|
||||
O-Subject: [RHEL8 BZ 1583537 1/1] ipmi: do not configure ipmi for HPE m400
|
||||
Bugzilla: 1583537
|
||||
RH-Acked-by: Dean Nelson <dnelson@redhat.com>
|
||||
RH-Acked-by: Al Stone <ahs3@redhat.com>
|
||||
RH-Acked-by: Mark Salter <msalter@redhat.com>
|
||||
|
||||
bugzilla:https://bugzilla.redhat.com/show_bug.cgi?id=1583537
|
||||
brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17150528
|
||||
|
||||
RHEL-only
|
||||
|
||||
The ARM-based HPE m400 reports host-side ipmi as residing in intel
|
||||
port-io space, which does not exist in ARM processors. Therefore, when
|
||||
running on an m400, host-side ipmi configuration code must simply return
|
||||
zero without trying to configure the host-side ipmi.
|
||||
|
||||
This patch prevents panic on boot by averting attempts to configure
|
||||
host-side ipmi on this platform.
|
||||
|
||||
Though HPE m400 is not certified with RHEL, and HPE has relegated it to
|
||||
EOL status, the platform is still used extensively in ARM development
|
||||
and test for RHEL.
|
||||
|
||||
Testing:
|
||||
Boot without blacklisting ipmi and check to see that no ipmi modules
|
||||
are loaded.
|
||||
|
||||
Signed-off-by: Tony Camuso <tcamuso@redhat.com>
|
||||
|
||||
cc: Prarit Bhargava <prarit@redhat.com>
|
||||
cc: Brendan Conoboy <blc@redhat.com>
|
||||
cc: Jeff Bastian <jbastian@redhat.com>
|
||||
cc: Scott Herold <sherold@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Laura Abbott <labbott@redhat.com>
|
||||
Acked-by: Tony Camuso <tcamuso@redhat.com>
|
||||
Acked-by: Dean Nelson <dnelson@redhat.com>
|
||||
Acked-by: Jarod Wilson <jarod@redhat.com>
|
||||
Acked-by: Mark Salter <msalter@redhat.com>
|
||||
---
|
||||
drivers/char/ipmi/ipmi_dmi.c | 15 +++++++++++++++
|
||||
drivers/char/ipmi/ipmi_msghandler.c | 16 +++++++++++++++-
|
||||
2 files changed, 30 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/char/ipmi/ipmi_dmi.c b/drivers/char/ipmi/ipmi_dmi.c
|
||||
index bbf7029e224b..cf7faa970dd6 100644
|
||||
--- a/drivers/char/ipmi/ipmi_dmi.c
|
||||
+++ b/drivers/char/ipmi/ipmi_dmi.c
|
||||
@@ -215,6 +215,21 @@ static int __init scan_for_dmi_ipmi(void)
|
||||
{
|
||||
const struct dmi_device *dev = NULL;
|
||||
|
||||
+#ifdef CONFIG_ARM64
|
||||
+ /* RHEL-only
|
||||
+ * If this is ARM-based HPE m400, return now, because that platform
|
||||
+ * reports the host-side ipmi address as intel port-io space, which
|
||||
+ * does not exist in the ARM architecture.
|
||||
+ */
|
||||
+ const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME);
|
||||
+
|
||||
+ if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) {
|
||||
+ pr_debug("%s does not support host ipmi\n", dmistr);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* END RHEL-only */
|
||||
+#endif
|
||||
+
|
||||
while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev)))
|
||||
dmi_decode_ipmi((const struct dmi_header *) dev->device_data);
|
||||
|
||||
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
|
||||
index e1b22fe0916c..894eda427214 100644
|
||||
--- a/drivers/char/ipmi/ipmi_msghandler.c
|
||||
+++ b/drivers/char/ipmi/ipmi_msghandler.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/vmalloc.h>
|
||||
+#include <linux/dmi.h>
|
||||
|
||||
#define IPMI_DRIVER_VERSION "39.2"
|
||||
|
||||
@@ -5155,8 +5156,21 @@ static int __init ipmi_init_msghandler_mod(void)
|
||||
{
|
||||
int rv;
|
||||
|
||||
- pr_info("version " IPMI_DRIVER_VERSION "\n");
|
||||
+#ifdef CONFIG_ARM64
|
||||
+ /* RHEL-only
|
||||
+ * If this is ARM-based HPE m400, return now, because that platform
|
||||
+ * reports the host-side ipmi address as intel port-io space, which
|
||||
+ * does not exist in the ARM architecture.
|
||||
+ */
|
||||
+ const char *dmistr = dmi_get_system_info(DMI_PRODUCT_NAME);
|
||||
|
||||
+ if (dmistr && (strcmp("ProLiant m400 Server", dmistr) == 0)) {
|
||||
+ pr_debug("%s does not support host ipmi\n", dmistr);
|
||||
+ return -ENOSYS;
|
||||
+ }
|
||||
+ /* END RHEL-only */
|
||||
+#endif
|
||||
+ pr_info("version " IPMI_DRIVER_VERSION "\n");
|
||||
mutex_lock(&ipmi_interfaces_mutex);
|
||||
rv = ipmi_register_driver();
|
||||
mutex_unlock(&ipmi_interfaces_mutex);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
189
0001-kdump-add-support-for-crashkernel-auto.patch
Normal file
189
0001-kdump-add-support-for-crashkernel-auto.patch
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Cline <jcline@redhat.com>
|
||||
Date: Tue, 23 Jul 2019 15:24:30 +0000
|
||||
Subject: [PATCH] kdump: add support for crashkernel=auto
|
||||
|
||||
Rebased for v5.3-rc1 because the documentation has moved.
|
||||
|
||||
Message-id: <20180604013831.574215750@redhat.com>
|
||||
Patchwork-id: 8166
|
||||
O-Subject: [kernel team] [PATCH RHEL8.0 V2 2/2] kdump: add support for crashkernel=auto
|
||||
Bugzilla: 1507353
|
||||
RH-Acked-by: Don Zickus <dzickus@redhat.com>
|
||||
RH-Acked-by: Baoquan He <bhe@redhat.com>
|
||||
RH-Acked-by: Pingfan Liu <piliu@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1507353
|
||||
Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16534135
|
||||
Tested: ppc64le, x86_64 with several memory sizes.
|
||||
kdump qe tested 160M on various x86 machines in lab.
|
||||
|
||||
We continue to provide crashkernel=auto like we did in RHEL6
|
||||
and RHEL7, this will simplify the kdump deployment for common
|
||||
use cases that kdump just works with the auto reserved values.
|
||||
But this is still a best effort estimation, we can not know the
|
||||
exact memory requirement because it depends on a lot of different
|
||||
factors.
|
||||
|
||||
The implementation of crashkernel=auto is simplified as a wrapper
|
||||
to use below kernel cmdline:
|
||||
x86_64: crashkernel=1G-64G:160M,64G-1T:256M,1T-:512M
|
||||
s390x: crashkernel=4G-64G:160M,64G-1T:256M,1T-:512M
|
||||
arm64: crashkernel=2G-:512M
|
||||
ppc64: crashkernel=2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G
|
||||
|
||||
The difference between this way and the old implementation in
|
||||
RHEL6/7 is we do not scale the crash reserved memory size according
|
||||
to system memory size anymore.
|
||||
|
||||
Latest effort to move upstream is below thread:
|
||||
https://lkml.org/lkml/2018/5/20/262
|
||||
But unfortunately it is still unlikely to be accepted, thus we
|
||||
will still use a RHEL only patch in RHEL8.
|
||||
|
||||
Copied old patch description about the history reason see below:
|
||||
'''
|
||||
Non-upstream explanations:
|
||||
Besides "crashkenrel=X@Y" format, upstream also has advanced
|
||||
"crashkernel=range1:size1[,range2:size2,...][@offset]", and
|
||||
"crashkernel=X,high{low}" formats, but they need more careful
|
||||
manual configuration, and have different values for different
|
||||
architectures.
|
||||
|
||||
Most of the distributions use the standard "crashkernel=X@Y"
|
||||
upstream format, and use crashkernel range format for advanced
|
||||
scenarios, heavily relying on the user's involvement.
|
||||
|
||||
While "crashkernel=auto" is redhat's special feature, it exists
|
||||
and has been used as the default boot cmdline since 2008 rhel6.
|
||||
It does not require users to figure out how many crash memory
|
||||
size for their systems, also has been proved to be able to work
|
||||
pretty well for common scenarios.
|
||||
|
||||
"crashkernel=auto" was tested/based on rhel-related products, as
|
||||
we have stable kernel configurations which means more or less
|
||||
stable memory consumption. In 2014 we tried to post them again to
|
||||
upstream but NACKed by people because they think it's not general
|
||||
and unnecessary, users can specify their own values or do that by
|
||||
scripts. However our customers insist on having it added to rhel.
|
||||
|
||||
Also see one previous discussion related to this backport to Pegas:
|
||||
On 10/17/2016 at 10:15 PM, Don Zickus wrote:
|
||||
> On Fri, Oct 14, 2016 at 10:57:41AM +0800, Dave Young wrote:
|
||||
>> Don, agree with you we should evaluate them instead of just inherit
|
||||
>> them blindly. Below is what I think about kdump auto memory:
|
||||
>> There are two issues for crashkernel=auto in upstream:
|
||||
>> 1) It will be seen as a policy which should not go to kernel
|
||||
>> 2) It is hard to get a good number for the crash reserved size,
|
||||
>> considering various different kernel config options one can setups.
|
||||
>> In RHEL we are easier because our supported Kconfig is limited.
|
||||
>> I digged the upstream mail archive, but I'm not sure I got all the
|
||||
>> information, at least Michael Ellerman was objecting the series for
|
||||
>> 1).
|
||||
> Yes, I know. Vivek and I have argued about this for years. :-)
|
||||
>
|
||||
> I had hoped all the changes internally to the makedumpfile would allow
|
||||
> the memory configuration to stabilize at a number like 192M or 128M and
|
||||
> only in the rare cases extend beyond that.
|
||||
>
|
||||
> So I always treated that as a temporary hack until things were better.
|
||||
> With the hope of every new RHEL release we get smarter and better. :-)
|
||||
> Ideally it would be great if we could get the number down to 64M for most
|
||||
> cases and just turn it on in Fedora. Maybe someday.... ;-)
|
||||
>
|
||||
> We can have this conversation when the patch gets reposted/refreshed
|
||||
> for upstream on rhkl?
|
||||
>
|
||||
> Cheers,
|
||||
> Don
|
||||
|
||||
We had proposed to drop the historic crashkernel=auto code and move
|
||||
to use crashkernel=range:size format and pass them in anaconda.
|
||||
|
||||
The initial reason is crashkernel=range:size works just fine because
|
||||
we do not need complex algorithm to scale crashkernel reserved size
|
||||
any more. The old linear scaling is mainly for old makedumpfile
|
||||
requirements, now it is not necessary.
|
||||
|
||||
But With the new approach, backward compatibility is potentially at risk.
|
||||
For e.g. let's consider the following cases:
|
||||
1) When we upgrade from an older distribution like rhel-alt-7.4(which
|
||||
uses crashkernel=auto) to rhel-alt-7.5 (which uses the crashkernel=xY
|
||||
format)
|
||||
In this case we can use anaconda scripts for checking
|
||||
'crashkernel=auto' in kernel spec and update to the new
|
||||
'crashkernel=range:size' format.
|
||||
2) When we upgrade from rhel-alt-7.5(which uses crashkernel=xY format)
|
||||
to rhel-alt-7.6(which uses crashkernel=xY format), but the x and/or Y
|
||||
values are changed in rhel-alt-7.6.
|
||||
For example from crashkernel=2G-:160M to crashkernel=2G-:192M, then we have
|
||||
no way to determine if the X and/or Y values were distribution
|
||||
provided or user specified ones.
|
||||
Since it is recommended to give precedence to user-specified values,
|
||||
so we cannot do an upgrade in such a case."
|
||||
|
||||
Thus turn back to resolve it in kernel, and add a simpler version
|
||||
which just hacks to use the range:size style in code, and make
|
||||
rhel-only code easily to maintain.
|
||||
'''
|
||||
|
||||
Signed-off-by: Dave Young <dyoung@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
Documentation/admin-guide/kdump/kdump.rst | 11 +++++++++++
|
||||
kernel/crash_core.c | 14 ++++++++++++++
|
||||
2 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst
|
||||
index 2da65fef2a1c..d53a524f80f0 100644
|
||||
--- a/Documentation/admin-guide/kdump/kdump.rst
|
||||
+++ b/Documentation/admin-guide/kdump/kdump.rst
|
||||
@@ -285,6 +285,17 @@ This would mean:
|
||||
2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M
|
||||
3) if the RAM size is larger than 2G, then reserve 128M
|
||||
|
||||
+Or you can use crashkernel=auto if you have enough memory. The threshold
|
||||
+is 2G on x86_64, arm64, ppc64 and ppc64le. The threshold is 4G for s390x.
|
||||
+If your system memory is less than the threshold crashkernel=auto will not
|
||||
+reserve memory.
|
||||
+
|
||||
+The automatically reserved memory size varies based on architecture.
|
||||
+The size changes according to system memory size like below:
|
||||
+ x86_64: 1G-64G:160M,64G-1T:256M,1T-:512M
|
||||
+ s390x: 4G-64G:160M,64G-1T:256M,1T-:512M
|
||||
+ arm64: 2G-:512M
|
||||
+ ppc64: 2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G
|
||||
|
||||
|
||||
Boot into System Kernel
|
||||
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
|
||||
index d631d22089ba..c252221b2f4b 100644
|
||||
--- a/kernel/crash_core.c
|
||||
+++ b/kernel/crash_core.c
|
||||
@@ -258,6 +258,20 @@ static int __init __parse_crashkernel(char *cmdline,
|
||||
if (suffix)
|
||||
return parse_crashkernel_suffix(ck_cmdline, crash_size,
|
||||
suffix);
|
||||
+
|
||||
+ if (strncmp(ck_cmdline, "auto", 4) == 0) {
|
||||
+#ifdef CONFIG_X86_64
|
||||
+ ck_cmdline = "1G-64G:160M,64G-1T:256M,1T-:512M";
|
||||
+#elif defined(CONFIG_S390)
|
||||
+ ck_cmdline = "4G-64G:160M,64G-1T:256M,1T-:512M";
|
||||
+#elif defined(CONFIG_ARM64)
|
||||
+ ck_cmdline = "2G-:512M";
|
||||
+#elif defined(CONFIG_PPC64)
|
||||
+ ck_cmdline = "2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G";
|
||||
+#endif
|
||||
+ pr_info("Using crashkernel=auto, the size choosed is a best effort estimation.\n");
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* if the commandline contains a ':', then that's the extended
|
||||
* syntax -- if not, it must be the classic syntax
|
||||
--
|
||||
2.26.2
|
||||
|
||||
43
0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch
Normal file
43
0001-kdump-fix-a-grammar-issue-in-a-kernel-message.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Young <dyoung@redhat.com>
|
||||
Date: Tue, 12 Jun 2018 00:54:22 -0400
|
||||
Subject: [PATCH] kdump: fix a grammar issue in a kernel message
|
||||
|
||||
Message-id: <20180612005422.GA2568@dhcp-128-65.nay.redhat.com>
|
||||
Patchwork-id: 8201
|
||||
O-Subject: [kernel team] [RHEL8.0 PATCH V2] kdump: fix a grammar issue in a kernel message
|
||||
Bugzilla: 1507353
|
||||
RH-Acked-by: Myron Stowe <mstowe@redhat.com>
|
||||
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
||||
RH-Acked-by: Jiri Benc <jbenc@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1507353
|
||||
Upstream Status: RHEL-only as crashkernel=auto is not accepted in upstream
|
||||
Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16661950
|
||||
Test: verified on a kvm guest
|
||||
|
||||
s/choosed/chosen
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Dave Young <dyoung@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
kernel/crash_core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
|
||||
index c252221b2f4b..df551fc9034c 100644
|
||||
--- a/kernel/crash_core.c
|
||||
+++ b/kernel/crash_core.c
|
||||
@@ -269,7 +269,7 @@ static int __init __parse_crashkernel(char *cmdline,
|
||||
#elif defined(CONFIG_PPC64)
|
||||
ck_cmdline = "2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G";
|
||||
#endif
|
||||
- pr_info("Using crashkernel=auto, the size choosed is a best effort estimation.\n");
|
||||
+ pr_info("Using crashkernel=auto, the size chosen is a best effort estimation.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Young <dyoung@redhat.com>
|
||||
Date: Mon, 4 Jun 2018 01:38:25 -0400
|
||||
Subject: [PATCH] kdump: round up the total memory size to 128M for crashkernel
|
||||
reservation
|
||||
|
||||
Message-id: <20180604013831.523644967@redhat.com>
|
||||
Patchwork-id: 8165
|
||||
O-Subject: [kernel team] [PATCH RHEL8.0 V2 1/2] kdump: round up the total memory size to 128M for crashkernel reservation
|
||||
Bugzilla: 1507353
|
||||
RH-Acked-by: Don Zickus <dzickus@redhat.com>
|
||||
RH-Acked-by: Baoquan He <bhe@redhat.com>
|
||||
RH-Acked-by: Pingfan Liu <piliu@redhat.com>
|
||||
|
||||
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1507353
|
||||
Build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16534135
|
||||
Tested: ppc64le, x86_64 with several memory sizes.
|
||||
|
||||
The total memory size we get in kernel is usually slightly less than 2G with
|
||||
2G memory module machine. The main reason is bios/firmware reserve some area
|
||||
it will not export all memory as usable to Linux.
|
||||
|
||||
2G memory X86 kvm guest test result of the total_mem value:
|
||||
UEFI boot with ovmf: 0x7ef10000
|
||||
Legacy boot kvm guest: 0x7ff7cc00
|
||||
This is also a problem on arm64 UEFI booted system according to my test.
|
||||
|
||||
Thus for example crashkernel=1G-2G:128M, if we have a 1G memory
|
||||
machine, we get total size 1023M from firmware then it will not fall
|
||||
into 1G-2G thus no memory reserved. User will never know that, it is
|
||||
hard to let user to know the exact total value we get in kernel
|
||||
|
||||
An option is to use dmi/smbios to get physical memory size, but it's not
|
||||
reliable as well. According to Prarit hardware vendors sometimes screw this up.
|
||||
Thus round up total size to 128M to workaround this problem.
|
||||
|
||||
Posted below patch in upstream, but no response yet:
|
||||
http://lists.infradead.org/pipermail/kexec/2018-April/020568.html
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Dave Young <dyoung@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
kernel/crash_core.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
|
||||
index 9f1557b98468..d631d22089ba 100644
|
||||
--- a/kernel/crash_core.c
|
||||
+++ b/kernel/crash_core.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <linux/crash_core.h>
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/vmalloc.h>
|
||||
+#include <linux/sizes.h>
|
||||
|
||||
#include <asm/page.h>
|
||||
#include <asm/sections.h>
|
||||
@@ -39,6 +40,15 @@ static int __init parse_crashkernel_mem(char *cmdline,
|
||||
unsigned long long *crash_base)
|
||||
{
|
||||
char *cur = cmdline, *tmp;
|
||||
+ unsigned long long total_mem = system_ram;
|
||||
+
|
||||
+ /*
|
||||
+ * Firmware sometimes reserves some memory regions for it's own use.
|
||||
+ * so we get less than actual system memory size.
|
||||
+ * Workaround this by round up the total size to 128M which is
|
||||
+ * enough for most test cases.
|
||||
+ */
|
||||
+ total_mem = roundup(total_mem, SZ_128M);
|
||||
|
||||
/* for each entry of the comma-separated list */
|
||||
do {
|
||||
@@ -83,13 +93,13 @@ static int __init parse_crashkernel_mem(char *cmdline,
|
||||
return -EINVAL;
|
||||
}
|
||||
cur = tmp;
|
||||
- if (size >= system_ram) {
|
||||
+ if (size >= total_mem) {
|
||||
pr_warn("crashkernel: invalid size\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* match ? */
|
||||
- if (system_ram >= start && system_ram < end) {
|
||||
+ if (total_mem >= start && total_mem < end) {
|
||||
*crash_size = size;
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
71
0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch
Normal file
71
0001-mm-kmemleak-skip-late_init-if-not-skip-disable.patch
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Murphy Zhou <jencce.kernel@gmail.com>
|
||||
Date: Sun, 29 Sep 2019 17:56:59 +0800
|
||||
Subject: [PATCH] mm/kmemleak: skip late_init if not skip disable
|
||||
|
||||
Now if DEFAULT_OFF set to y, kmemleak_init will start the cleanup_work
|
||||
workqueue. Then late_init call will set kmemleak_initialized to 1, the
|
||||
cleaup workqueue will try to do cleanup, triggering:
|
||||
|
||||
[24.738773] ==================================================================
|
||||
[24.742784] BUG: KASAN: global-out-of-bounds in __kmemleak_do_cleanup+0x166/0x180
|
||||
[24.744144] Key type ._fscrypt registered
|
||||
[24.745680] Read of size 8 at addr ffffffff88746c90 by task kworker/3:1/171
|
||||
[24.745687]
|
||||
[24.745697] CPU: 3 PID: 171 Comm: kworker/3:1 Not tainted 5.3.0-v5.3-12475-gcbafe18 #1
|
||||
[24.745701] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
|
||||
[24.745710] Workqueue: events kmemleak_do_cleanup
|
||||
[24.745717] Call Trace:
|
||||
[24.745736] dump_stack+0x7c/0xc0
|
||||
[24.745755] print_address_description.constprop.4+0x1f/0x300
|
||||
[24.751562] Key type .fscrypt registered
|
||||
[24.754370] __kasan_report.cold.8+0x76/0xb2
|
||||
[24.754388] ? __kmemleak_do_cleanup+0x166/0x180
|
||||
[24.754407] kasan_report+0xe/0x20
|
||||
[24.778543] __kmemleak_do_cleanup+0x166/0x180
|
||||
[24.780795] process_one_work+0x919/0x17d0
|
||||
[24.782929] ? pwq_dec_nr_in_flight+0x320/0x320
|
||||
[24.785092] worker_thread+0x87/0xb40
|
||||
[24.786948] ? __kthread_parkme+0xc3/0x190
|
||||
[24.789217] ? process_one_work+0x17d0/0x17d0
|
||||
[24.791414] kthread+0x333/0x3f0
|
||||
[24.793031] ? kthread_create_worker_on_cpu+0xc0/0xc0
|
||||
[24.795473] ret_from_fork+0x3a/0x50
|
||||
[24.797303]
|
||||
[24.798091] The buggy address belongs to the variable:
|
||||
[24.800634] mem_pool_free_count+0x10/0x40
|
||||
[24.802656]
|
||||
[24.803434] Memory state around the buggy address:
|
||||
[24.805793] ffffffff88746b80: 04 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
|
||||
[24.809177] ffffffff88746c00: 00 fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa
|
||||
[24.812407] >ffffffff88746c80: 04 fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa
|
||||
[24.815638] ^
|
||||
[24.817372] ffffffff88746d00: 00 00 fa fa fa fa fa fa 00 00 00 00 00 00 00 00
|
||||
[24.820740] ffffffff88746d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||
[24.824021] ==================================================================
|
||||
|
||||
Fixes: c5665868183f ("mm: kmemleak: use the memory pool for early allocations")
|
||||
Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
|
||||
---
|
||||
mm/kmemleak.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
|
||||
index e362dc3d2028..0c3dfb8eef67 100644
|
||||
--- a/mm/kmemleak.c
|
||||
+++ b/mm/kmemleak.c
|
||||
@@ -1958,6 +1958,11 @@ void __init kmemleak_init(void)
|
||||
*/
|
||||
static int __init kmemleak_late_init(void)
|
||||
{
|
||||
+ if (!kmemleak_skip_disable) {
|
||||
+ kmemleak_disable();
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
kmemleak_initialized = 1;
|
||||
|
||||
debugfs_create_file("kmemleak", 0644, NULL, NULL, &kmemleak_fops);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
202
0001-platform-x86-thinkpad_acpi-lap-or-desk-mode-interfac.patch
Normal file
202
0001-platform-x86-thinkpad_acpi-lap-or-desk-mode-interfac.patch
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
From acf7f4a59114471c3964f118564fe8e7a6f34bb8 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Pearson <markpearson@lenovo.com>
|
||||
Date: Thu, 2 Jul 2020 21:23:53 -0400
|
||||
Subject: [PATCH] platform/x86: thinkpad_acpi: lap or desk mode interface
|
||||
|
||||
Newer Lenovo Thinkpad platforms have support to identify whether the
|
||||
system is on-lap or not using an ACPI DYTC event from the firmware.
|
||||
|
||||
This patch provides the ability to retrieve the current mode via sysfs
|
||||
entrypoints and will be used by userspace for thermal mode and WWAN
|
||||
functionality
|
||||
|
||||
Co-developed-by: Nitin Joshi <njoshi1@lenovo.com>
|
||||
Signed-off-by: Nitin Joshi <njoshi1@lenovo.com>
|
||||
Reviewed-by: Sugumaran <slacshiminar@lenovo.com>
|
||||
Reviewed-by: Bastien Nocera <bnocera@redhat.com>
|
||||
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
|
||||
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
---
|
||||
.../admin-guide/laptops/thinkpad-acpi.rst | 15 +++
|
||||
drivers/platform/x86/thinkpad_acpi.c | 111 +++++++++++++++++-
|
||||
2 files changed, 124 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Documentation/admin-guide/laptops/thinkpad-acpi.rst b/Documentation/admin-guide/laptops/thinkpad-acpi.rst
|
||||
index 822907dcc845..99066aa8d97b 100644
|
||||
--- a/Documentation/admin-guide/laptops/thinkpad-acpi.rst
|
||||
+++ b/Documentation/admin-guide/laptops/thinkpad-acpi.rst
|
||||
@@ -50,6 +50,7 @@ detailed description):
|
||||
- WAN enable and disable
|
||||
- UWB enable and disable
|
||||
- LCD Shadow (PrivacyGuard) enable and disable
|
||||
+ - Lap mode sensor
|
||||
|
||||
A compatibility table by model and feature is maintained on the web
|
||||
site, http://ibm-acpi.sf.net/. I appreciate any success or failure
|
||||
@@ -1432,6 +1433,20 @@ The first command ensures the best viewing angle and the latter one turns
|
||||
on the feature, restricting the viewing angles.
|
||||
|
||||
|
||||
+DYTC Lapmode sensor
|
||||
+------------------
|
||||
+
|
||||
+sysfs: dytc_lapmode
|
||||
+
|
||||
+Newer thinkpads and mobile workstations have the ability to determine if
|
||||
+the device is in deskmode or lapmode. This feature is used by user space
|
||||
+to decide if WWAN transmission can be increased to maximum power and is
|
||||
+also useful for understanding the different thermal modes available as
|
||||
+they differ between desk and lap mode.
|
||||
+
|
||||
+The property is read-only. If the platform doesn't have support the sysfs
|
||||
+class is not created.
|
||||
+
|
||||
EXPERIMENTAL: UWB
|
||||
-----------------
|
||||
|
||||
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
|
||||
index 0f6fceda5fc0..7fee3c1c2418 100644
|
||||
--- a/drivers/platform/x86/thinkpad_acpi.c
|
||||
+++ b/drivers/platform/x86/thinkpad_acpi.c
|
||||
@@ -4030,8 +4030,8 @@ static bool hotkey_notify_6xxx(const u32 hkey,
|
||||
return true;
|
||||
case TP_HKEY_EV_THM_CSM_COMPLETED:
|
||||
pr_debug("EC reports: Thermal Control Command set completed (DYTC)\n");
|
||||
- /* recommended action: do nothing, we don't have
|
||||
- * Lenovo ATM information */
|
||||
+ /* Thermal event - pass on to event handler */
|
||||
+ tpacpi_driver_event(hkey);
|
||||
return true;
|
||||
case TP_HKEY_EV_THM_TRANSFM_CHANGED:
|
||||
pr_debug("EC reports: Thermal Transformation changed (GMTS)\n");
|
||||
@@ -9803,6 +9803,105 @@ static struct ibm_struct lcdshadow_driver_data = {
|
||||
.write = lcdshadow_write,
|
||||
};
|
||||
|
||||
+/*************************************************************************
|
||||
+ * DYTC subdriver, for the Lenovo lapmode feature
|
||||
+ */
|
||||
+
|
||||
+#define DYTC_CMD_GET 2 /* To get current IC function and mode */
|
||||
+#define DYTC_GET_LAPMODE_BIT 17 /* Set when in lapmode */
|
||||
+
|
||||
+static bool dytc_lapmode;
|
||||
+
|
||||
+static void dytc_lapmode_notify_change(void)
|
||||
+{
|
||||
+ sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, "dytc_lapmode");
|
||||
+}
|
||||
+
|
||||
+static int dytc_command(int command, int *output)
|
||||
+{
|
||||
+ acpi_handle dytc_handle;
|
||||
+
|
||||
+ if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "DYTC", &dytc_handle))) {
|
||||
+ /* Platform doesn't support DYTC */
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+ if (!acpi_evalf(dytc_handle, output, NULL, "dd", command))
|
||||
+ return -EIO;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dytc_lapmode_get(bool *state)
|
||||
+{
|
||||
+ int output, err;
|
||||
+
|
||||
+ err = dytc_command(DYTC_CMD_GET, &output);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+ *state = output & BIT(DYTC_GET_LAPMODE_BIT) ? true : false;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void dytc_lapmode_refresh(void)
|
||||
+{
|
||||
+ bool new_state;
|
||||
+ int err;
|
||||
+
|
||||
+ err = dytc_lapmode_get(&new_state);
|
||||
+ if (err || (new_state == dytc_lapmode))
|
||||
+ return;
|
||||
+
|
||||
+ dytc_lapmode = new_state;
|
||||
+ dytc_lapmode_notify_change();
|
||||
+}
|
||||
+
|
||||
+/* sysfs lapmode entry */
|
||||
+static ssize_t dytc_lapmode_show(struct device *dev,
|
||||
+ struct device_attribute *attr,
|
||||
+ char *buf)
|
||||
+{
|
||||
+ return snprintf(buf, PAGE_SIZE, "%d\n", dytc_lapmode);
|
||||
+}
|
||||
+
|
||||
+static DEVICE_ATTR_RO(dytc_lapmode);
|
||||
+
|
||||
+static struct attribute *dytc_attributes[] = {
|
||||
+ &dev_attr_dytc_lapmode.attr,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static const struct attribute_group dytc_attr_group = {
|
||||
+ .attrs = dytc_attributes,
|
||||
+};
|
||||
+
|
||||
+static int tpacpi_dytc_init(struct ibm_init_struct *iibm)
|
||||
+{
|
||||
+ int err;
|
||||
+
|
||||
+ err = dytc_lapmode_get(&dytc_lapmode);
|
||||
+ /* If support isn't available (ENODEV) then don't return an error
|
||||
+ * but just don't create the sysfs group
|
||||
+ */
|
||||
+ if (err == -ENODEV)
|
||||
+ return 0;
|
||||
+ /* For all other errors we can flag the failure */
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ /* Platform supports this feature - create the group */
|
||||
+ err = sysfs_create_group(&tpacpi_pdev->dev.kobj, &dytc_attr_group);
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
+static void dytc_exit(void)
|
||||
+{
|
||||
+ sysfs_remove_group(&tpacpi_pdev->dev.kobj, &dytc_attr_group);
|
||||
+}
|
||||
+
|
||||
+static struct ibm_struct dytc_driver_data = {
|
||||
+ .name = "dytc",
|
||||
+ .exit = dytc_exit,
|
||||
+};
|
||||
+
|
||||
/****************************************************************************
|
||||
****************************************************************************
|
||||
*
|
||||
@@ -9850,6 +9949,10 @@ static void tpacpi_driver_event(const unsigned int hkey_event)
|
||||
|
||||
mutex_unlock(&kbdlight_mutex);
|
||||
}
|
||||
+
|
||||
+ if (hkey_event == TP_HKEY_EV_THM_CSM_COMPLETED)
|
||||
+ dytc_lapmode_refresh();
|
||||
+
|
||||
}
|
||||
|
||||
static void hotkey_driver_event(const unsigned int scancode)
|
||||
@@ -10288,6 +10391,10 @@ static struct ibm_init_struct ibms_init[] __initdata = {
|
||||
.init = tpacpi_lcdshadow_init,
|
||||
.data = &lcdshadow_driver_data,
|
||||
},
|
||||
+ {
|
||||
+ .init = tpacpi_dytc_init,
|
||||
+ .data = &dytc_driver_data,
|
||||
+ },
|
||||
};
|
||||
|
||||
static int __init set_ibm_param(const char *val, const struct kernel_param *kp)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Cline <jcline@redhat.com>
|
||||
Date: Wed, 30 Oct 2019 14:37:49 +0000
|
||||
Subject: [PATCH] s390: Lock down the kernel when the IPL secure flag is set
|
||||
|
||||
Automatically lock down the kernel to LOCKDOWN_CONFIDENTIALITY_MAX if
|
||||
the IPL secure flag is set.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Suggested-by: Philipp Rudo <prudo@redhat.com>
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
arch/s390/include/asm/ipl.h | 1 +
|
||||
arch/s390/kernel/ipl.c | 5 +++++
|
||||
arch/s390/kernel/setup.c | 4 ++++
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/arch/s390/include/asm/ipl.h b/arch/s390/include/asm/ipl.h
|
||||
index 7d5cfdda5277..be66ee5d0437 100644
|
||||
--- a/arch/s390/include/asm/ipl.h
|
||||
+++ b/arch/s390/include/asm/ipl.h
|
||||
@@ -120,6 +120,7 @@ int ipl_report_add_component(struct ipl_report *report, struct kexec_buf *kbuf,
|
||||
unsigned char flags, unsigned short cert);
|
||||
int ipl_report_add_certificate(struct ipl_report *report, void *key,
|
||||
unsigned long addr, unsigned long len);
|
||||
+bool ipl_get_secureboot(void);
|
||||
|
||||
/*
|
||||
* DIAG 308 support
|
||||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
|
||||
index 90a2a17239b0..be3b72c53656 100644
|
||||
--- a/arch/s390/kernel/ipl.c
|
||||
+++ b/arch/s390/kernel/ipl.c
|
||||
@@ -2110,3 +2110,8 @@ int ipl_report_free(struct ipl_report *report)
|
||||
}
|
||||
|
||||
#endif
|
||||
+
|
||||
+bool ipl_get_secureboot(void)
|
||||
+{
|
||||
+ return !!ipl_secure_flag;
|
||||
+}
|
||||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
|
||||
index 07aa15ba43b3..307abb2d82d7 100644
|
||||
--- a/arch/s390/kernel/setup.c
|
||||
+++ b/arch/s390/kernel/setup.c
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <linux/memory.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/start_kernel.h>
|
||||
+#include <linux/security.h>
|
||||
|
||||
#include <asm/boot_data.h>
|
||||
#include <asm/ipl.h>
|
||||
@@ -1086,6 +1087,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
log_component_list();
|
||||
|
||||
+ if (ipl_get_secureboot())
|
||||
+ security_lock_kernel_down("Secure IPL mode", LOCKDOWN_INTEGRITY_MAX);
|
||||
+
|
||||
/* Have one command line that is parsed and saved in /proc/cmdline */
|
||||
/* boot_command_line has been already set up in early.c */
|
||||
*cmdline_p = boot_command_line;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
70
0001-scsi-smartpqi-add-inspur-advantech-ids.patch
Normal file
70
0001-scsi-smartpqi-add-inspur-advantech-ids.patch
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Don Brace <dbrace@redhat.com>
|
||||
Date: Mon, 16 Jul 2018 19:20:41 -0400
|
||||
Subject: [PATCH] scsi: smartpqi: add inspur advantech ids
|
||||
|
||||
Message-id: <1531768843-2544-4-git-send-email-dbrace@redhat.com>
|
||||
Patchwork-id: 224988
|
||||
O-Subject: [RHEL 8.0 e-stor V2 PATCH 3/5] scsi: smartpqi: add inspur advantech ids
|
||||
Bugzilla: 1503736
|
||||
RH-Acked-by: Ewan Milne <emilne@redhat.com>
|
||||
RH-Acked-by: Tomas Henzl <thenzl@redhat.com>
|
||||
|
||||
From: Kevin Barnett <kevin.barnett@microsemi.com>
|
||||
|
||||
Add support for these new device IDs:
|
||||
|
||||
Advantech MIC-8312BridgeB
|
||||
INSPUR PM8204-2GB
|
||||
INSPUR PM8204-4GB
|
||||
INSPUR PM8222-SHBA
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
|
||||
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com>
|
||||
Signed-off-by: Don Brace <don.brace@microsemi.com>
|
||||
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|
||||
(cherry picked from commit 9f8d05fa98442de78d1ab30235b0cc656ed7aff0)
|
||||
Signed-off-by: Don Brace <dbrace@redhat.com>
|
||||
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
||||
---
|
||||
drivers/scsi/smartpqi/smartpqi_init.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
|
||||
index cd157f11eb22..c5dc6cf57a71 100644
|
||||
--- a/drivers/scsi/smartpqi/smartpqi_init.c
|
||||
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
|
||||
@@ -8247,6 +8247,18 @@ static const struct pci_device_id pqi_pci_id_table[] = {
|
||||
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
0x19e5, 0xd22c)
|
||||
},
|
||||
+ {
|
||||
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
+ 0x1bd4, 0x004a)
|
||||
+ },
|
||||
+ {
|
||||
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
+ 0x1bd4, 0x004b)
|
||||
+ },
|
||||
+ {
|
||||
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
+ 0x1bd4, 0x004c)
|
||||
+ },
|
||||
{
|
||||
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
PCI_VENDOR_ID_ADAPTEC2, 0x0110)
|
||||
@@ -8383,6 +8395,10 @@ static const struct pci_device_id pqi_pci_id_table[] = {
|
||||
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
PCI_VENDOR_ID_ADVANTECH, 0x8312)
|
||||
},
|
||||
+ {
|
||||
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
+ PCI_VENDOR_ID_ADVANTECH, 0x8312)
|
||||
+ },
|
||||
{
|
||||
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
|
||||
PCI_VENDOR_ID_DELL, 0x1fe0)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
103
0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch
Normal file
103
0001-security-lockdown-expose-a-hook-to-lock-the-kernel-d.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Cline <jcline@redhat.com>
|
||||
Date: Mon, 30 Sep 2019 21:22:47 +0000
|
||||
Subject: [PATCH] security: lockdown: expose a hook to lock the kernel down
|
||||
|
||||
In order to automatically lock down kernels running on UEFI machines
|
||||
booted in Secure Boot mode, expose the lock_kernel_down() hook.
|
||||
|
||||
Upstream Status: RHEL only
|
||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||
---
|
||||
include/linux/lsm_hook_defs.h | 2 ++
|
||||
include/linux/lsm_hooks.h | 6 ++++++
|
||||
include/linux/security.h | 5 +++++
|
||||
security/lockdown/lockdown.c | 1 +
|
||||
security/security.c | 6 ++++++
|
||||
5 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
|
||||
index af998f93d256..3c33f00cd4d6 100644
|
||||
--- a/include/linux/lsm_hook_defs.h
|
||||
+++ b/include/linux/lsm_hook_defs.h
|
||||
@@ -383,6 +383,8 @@ LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free_security, struct bpf_prog_aux *aux)
|
||||
#endif /* CONFIG_BPF_SYSCALL */
|
||||
|
||||
LSM_HOOK(int, 0, locked_down, enum lockdown_reason what)
|
||||
+LSM_HOOK(int, 0, lock_kernel_down, const char *where, enum lockdown_reason level)
|
||||
+
|
||||
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
LSM_HOOK(int, 0, perf_event_open, struct perf_event_attr *attr, int type)
|
||||
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
|
||||
index 95b7c1d32062..dbacbb1fc129 100644
|
||||
--- a/include/linux/lsm_hooks.h
|
||||
+++ b/include/linux/lsm_hooks.h
|
||||
@@ -1507,6 +1507,12 @@
|
||||
*
|
||||
* @what: kernel feature being accessed
|
||||
*
|
||||
+ * @lock_kernel_down
|
||||
+ * Put the kernel into lock-down mode.
|
||||
+ *
|
||||
+ * @where: Where the lock-down is originating from (e.g. command line option)
|
||||
+ * @level: The lock-down level (can only increase)
|
||||
+ *
|
||||
* Security hooks for perf events
|
||||
*
|
||||
* @perf_event_open:
|
||||
diff --git a/include/linux/security.h b/include/linux/security.h
|
||||
index 0a0a03b36a3b..26869f44416b 100644
|
||||
--- a/include/linux/security.h
|
||||
+++ b/include/linux/security.h
|
||||
@@ -451,6 +451,7 @@ int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen);
|
||||
int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen);
|
||||
int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen);
|
||||
int security_locked_down(enum lockdown_reason what);
|
||||
+int security_lock_kernel_down(const char *where, enum lockdown_reason level);
|
||||
#else /* CONFIG_SECURITY */
|
||||
|
||||
static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data)
|
||||
@@ -1291,6 +1292,10 @@ static inline int security_locked_down(enum lockdown_reason what)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
+static inline int security_lock_kernel_down(const char *where, enum lockdown_reason level)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
#endif /* CONFIG_SECURITY */
|
||||
|
||||
#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)
|
||||
diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c
|
||||
index 87cbdc64d272..18555cf18da7 100644
|
||||
--- a/security/lockdown/lockdown.c
|
||||
+++ b/security/lockdown/lockdown.c
|
||||
@@ -73,6 +73,7 @@ static int lockdown_is_locked_down(enum lockdown_reason what)
|
||||
|
||||
static struct security_hook_list lockdown_hooks[] __lsm_ro_after_init = {
|
||||
LSM_HOOK_INIT(locked_down, lockdown_is_locked_down),
|
||||
+ LSM_HOOK_INIT(lock_kernel_down, lock_kernel_down),
|
||||
};
|
||||
|
||||
static int __init lockdown_lsm_init(void)
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index 70a7ad357bc6..23e16e773bc2 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -2516,6 +2516,12 @@ int security_locked_down(enum lockdown_reason what)
|
||||
}
|
||||
EXPORT_SYMBOL(security_locked_down);
|
||||
|
||||
+int security_lock_kernel_down(const char *where, enum lockdown_reason level)
|
||||
+{
|
||||
+ return call_int_hook(lock_kernel_down, 0, where, level);
|
||||
+}
|
||||
+EXPORT_SYMBOL(security_lock_kernel_down);
|
||||
+
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
int security_perf_event_open(struct perf_event_attr *attr, int type)
|
||||
{
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Lebon <jlebon@redhat.com>
|
||||
Date: Thu, 28 May 2020 10:39:40 -0400
|
||||
Subject: [PATCH] selinux: allow reading labels before policy is loaded
|
||||
|
||||
This patch does for `getxattr` what commit 3e3e24b42043 ("selinux: allow
|
||||
labeling before policy is loaded") did for `setxattr`; it allows
|
||||
querying the current SELinux label on disk before the policy is loaded.
|
||||
|
||||
One of the motivations described in that commit message also drives this
|
||||
patch: for Fedora CoreOS (and eventually RHEL CoreOS), we want to be
|
||||
able to move the root filesystem for example, from xfs to ext4 on RAID,
|
||||
on first boot, at initrd time.[1]
|
||||
|
||||
Because such an operation works at the filesystem level, we need to be
|
||||
able to read the SELinux labels first from the original root, and apply
|
||||
them to the files of the new root. The previous commit enabled the
|
||||
second part of this process; this commit enables the first part.
|
||||
|
||||
[1] https://github.com/coreos/fedora-coreos-tracker/issues/94
|
||||
|
||||
Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
|
||||
Signed-off-by: Jonathan Lebon <jlebon@redhat.com>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/hooks.c | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index efa6108b1ce9..ca901025802a 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -3332,7 +3332,12 @@ static int selinux_inode_getsecurity(struct inode *inode, const char *name, void
|
||||
char *context = NULL;
|
||||
struct inode_security_struct *isec;
|
||||
|
||||
- if (strcmp(name, XATTR_SELINUX_SUFFIX))
|
||||
+ /*
|
||||
+ * If we're not initialized yet, then we can't validate contexts, so
|
||||
+ * just let vfs_getxattr fall back to using the on-disk xattr.
|
||||
+ */
|
||||
+ if (!selinux_initialized(&selinux_state) ||
|
||||
+ strcmp(name, XATTR_SELINUX_SUFFIX))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
/*
|
||||
--
|
||||
2.26.2
|
||||
|
||||
53
0001-update-phy-on-pine64-a64-devices.patch
Normal file
53
0001-update-phy-on-pine64-a64-devices.patch
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
From bb421e23b49e39c117a31f7c07df83cddd0d96dc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Mon, 26 Oct 2020 17:01:57 +0000
|
||||
Subject: [PATCH 1/2] update phy on pine64 a64 devices
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts | 2 +-
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 2 +-
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts
|
||||
index b26181cf9095..01728a4c5309 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-plus.dts
|
||||
@@ -13,7 +13,7 @@ / {
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-txid";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
index 2165f238af13..9741fb5caa6f 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
|
||||
@@ -81,7 +81,7 @@ &ehci1 {
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rmii_pins>;
|
||||
- phy-mode = "rmii";
|
||||
+ phy-mode = "rmii-id";
|
||||
phy-handle = <&ext_rmii_phy1>;
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
index 2f6ea9f3f6a2..079b10641ccd 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
|
||||
@@ -79,7 +79,7 @@ &ehci1 {
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 May 2020 11:05:40 +0200
|
||||
Subject: [PATCH] virt: vbox: Add a few new vmmdev request types to the
|
||||
userspace whitelist
|
||||
|
||||
Upstream VirtualBox has defined and is using a few new request types for
|
||||
vmmdev requests passed through /dev/vboxguest to the hypervisor.
|
||||
|
||||
Add the defines for these to vbox_vmmdev_types.h and add add them to the
|
||||
whitelists of vmmdev requests which userspace is allowed to make.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1789545
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Upstream Status: https://lore.kernel.org/lkml/20200520195440.38759-1-hdegoede@redhat.com/
|
||||
---
|
||||
drivers/virt/vboxguest/vboxguest_core.c | 2 ++
|
||||
include/uapi/linux/vbox_vmmdev_types.h | 3 +++
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
index 4f1addaa3f6f..ffd76b949276 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
@@ -1299,7 +1299,9 @@ static int vbg_req_allowed(struct vbg_dev *gdev, struct vbg_session *session,
|
||||
case VMMDEVREQ_VIDEO_ACCEL_ENABLE:
|
||||
case VMMDEVREQ_VIDEO_ACCEL_FLUSH:
|
||||
case VMMDEVREQ_VIDEO_SET_VISIBLE_REGION:
|
||||
+ case VMMDEVREQ_VIDEO_UPDATE_MONITOR_POSITIONS:
|
||||
case VMMDEVREQ_GET_DISPLAY_CHANGE_REQEX:
|
||||
+ case VMMDEVREQ_GET_DISPLAY_CHANGE_REQ_MULTI:
|
||||
case VMMDEVREQ_GET_SEAMLESS_CHANGE_REQ:
|
||||
case VMMDEVREQ_GET_VRDPCHANGE_REQ:
|
||||
case VMMDEVREQ_LOG_STRING:
|
||||
diff --git a/include/uapi/linux/vbox_vmmdev_types.h b/include/uapi/linux/vbox_vmmdev_types.h
|
||||
index c27289fd619a..f8a8d6b3c521 100644
|
||||
--- a/include/uapi/linux/vbox_vmmdev_types.h
|
||||
+++ b/include/uapi/linux/vbox_vmmdev_types.h
|
||||
@@ -63,6 +63,7 @@ enum vmmdev_request_type {
|
||||
VMMDEVREQ_SET_GUEST_CAPABILITIES = 56,
|
||||
VMMDEVREQ_VIDEMODE_SUPPORTED2 = 57, /* since version 3.2.0 */
|
||||
VMMDEVREQ_GET_DISPLAY_CHANGE_REQEX = 80, /* since version 4.2.4 */
|
||||
+ VMMDEVREQ_GET_DISPLAY_CHANGE_REQ_MULTI = 81,
|
||||
VMMDEVREQ_HGCM_CONNECT = 60,
|
||||
VMMDEVREQ_HGCM_DISCONNECT = 61,
|
||||
VMMDEVREQ_HGCM_CALL32 = 62,
|
||||
@@ -92,6 +93,8 @@ enum vmmdev_request_type {
|
||||
VMMDEVREQ_WRITE_COREDUMP = 218,
|
||||
VMMDEVREQ_GUEST_HEARTBEAT = 219,
|
||||
VMMDEVREQ_HEARTBEAT_CONFIGURE = 220,
|
||||
+ VMMDEVREQ_NT_BUG_CHECK = 221,
|
||||
+ VMMDEVREQ_VIDEO_UPDATE_MONITOR_POSITIONS = 222,
|
||||
/* Ensure the enum is a 32 bit data-type */
|
||||
VMMDEVREQ_SIZEHACK = 0x7fffffff
|
||||
};
|
||||
--
|
||||
2.26.2
|
||||
|
||||
320
0001-virt-vbox-Add-support-for-the-new-VBG_IOCTL_ACQUIRE_.patch
Normal file
320
0001-virt-vbox-Add-support-for-the-new-VBG_IOCTL_ACQUIRE_.patch
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 May 2020 18:04:30 +0200
|
||||
Subject: [PATCH] virt: vbox: Add support for the new
|
||||
VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl
|
||||
|
||||
Add support for the new VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl, this
|
||||
is necessary for automatic resizing of the guest resolution to match the
|
||||
VM-window size to work with the new VMSVGA virtual GPU which is now the
|
||||
new default in VirtualBox.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1789545
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Upstream Status: https://lore.kernel.org/lkml/20200520195440.38759-1-hdegoede@redhat.com/
|
||||
---
|
||||
drivers/virt/vboxguest/vboxguest_core.c | 163 +++++++++++++++++++++++-
|
||||
drivers/virt/vboxguest/vboxguest_core.h | 14 ++
|
||||
include/uapi/linux/vboxguest.h | 24 ++++
|
||||
3 files changed, 200 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
index 15b3cb618c6e..4f1addaa3f6f 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
@@ -679,7 +679,7 @@ static int vbg_set_host_capabilities(struct vbg_dev *gdev,
|
||||
|
||||
WARN_ON(!mutex_is_locked(&gdev->session_mutex));
|
||||
|
||||
- caps = gdev->set_guest_caps_tracker.mask;
|
||||
+ caps = gdev->acquired_guest_caps | gdev->set_guest_caps_tracker.mask;
|
||||
|
||||
if (gdev->guest_caps_host == caps)
|
||||
return 0;
|
||||
@@ -703,6 +703,113 @@ static int vbg_set_host_capabilities(struct vbg_dev *gdev,
|
||||
return vbg_status_code_to_errno(rc);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Acquire (get exclusive access) guest capabilities for a session.
|
||||
+ * Takes the session mutex.
|
||||
+ * Return: 0 or negative errno value.
|
||||
+ * @gdev: The Guest extension device.
|
||||
+ * @session: The session.
|
||||
+ * @flags: Flags (VBGL_IOC_AGC_FLAGS_XXX).
|
||||
+ * @or_mask: The capabilities to add.
|
||||
+ * @not_mask: The capabilities to remove.
|
||||
+ * @session_termination: Set if we're called by the session cleanup code.
|
||||
+ * This tweaks the error handling so we perform
|
||||
+ * proper session cleanup even if the host
|
||||
+ * misbehaves.
|
||||
+ */
|
||||
+static int vbg_acquire_session_capabilities(struct vbg_dev *gdev,
|
||||
+ struct vbg_session *session,
|
||||
+ u32 or_mask, u32 not_mask,
|
||||
+ u32 flags, bool session_termination)
|
||||
+{
|
||||
+ unsigned long irqflags;
|
||||
+ bool wakeup = false;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ mutex_lock(&gdev->session_mutex);
|
||||
+
|
||||
+ if (gdev->set_guest_caps_tracker.mask & or_mask) {
|
||||
+ vbg_err("%s error: cannot acquire caps which are currently set\n",
|
||||
+ __func__);
|
||||
+ ret = -EINVAL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Mark any caps in the or_mask as now being in acquire-mode. Note
|
||||
+ * once caps are in acquire_mode they always stay in this mode.
|
||||
+ * This impacts event handling, so we take the event-lock.
|
||||
+ */
|
||||
+ spin_lock_irqsave(&gdev->event_spinlock, irqflags);
|
||||
+ gdev->acquire_mode_guest_caps |= or_mask;
|
||||
+ spin_unlock_irqrestore(&gdev->event_spinlock, irqflags);
|
||||
+
|
||||
+ /* If we only have to switch the caps to acquire mode, we're done. */
|
||||
+ if (flags & VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE)
|
||||
+ goto out;
|
||||
+
|
||||
+ not_mask &= ~or_mask; /* or_mask takes priority over not_mask */
|
||||
+ not_mask &= session->acquired_guest_caps;
|
||||
+ or_mask &= ~session->acquired_guest_caps;
|
||||
+
|
||||
+ if (or_mask == 0 && not_mask == 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ if (gdev->acquired_guest_caps & or_mask) {
|
||||
+ ret = -EBUSY;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ gdev->acquired_guest_caps |= or_mask;
|
||||
+ gdev->acquired_guest_caps &= ~not_mask;
|
||||
+ /* session->acquired_guest_caps impacts event handling, take the lock */
|
||||
+ spin_lock_irqsave(&gdev->event_spinlock, irqflags);
|
||||
+ session->acquired_guest_caps |= or_mask;
|
||||
+ session->acquired_guest_caps &= ~not_mask;
|
||||
+ spin_unlock_irqrestore(&gdev->event_spinlock, irqflags);
|
||||
+
|
||||
+ ret = vbg_set_host_capabilities(gdev, session, session_termination);
|
||||
+ /* Roll back on failure, unless it's session termination time. */
|
||||
+ if (ret < 0 && !session_termination) {
|
||||
+ gdev->acquired_guest_caps &= ~or_mask;
|
||||
+ gdev->acquired_guest_caps |= not_mask;
|
||||
+ spin_lock_irqsave(&gdev->event_spinlock, irqflags);
|
||||
+ session->acquired_guest_caps &= ~or_mask;
|
||||
+ session->acquired_guest_caps |= not_mask;
|
||||
+ spin_unlock_irqrestore(&gdev->event_spinlock, irqflags);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * If we added a capability, check if that means some other thread in
|
||||
+ * our session should be unblocked because there are events pending
|
||||
+ * (the result of vbg_get_allowed_event_mask_for_session() may change).
|
||||
+ *
|
||||
+ * HACK ALERT! When the seamless support capability is added we generate
|
||||
+ * a seamless change event so that the ring-3 client can sync with
|
||||
+ * the seamless state.
|
||||
+ */
|
||||
+ if (ret == 0 && or_mask != 0) {
|
||||
+ spin_lock_irqsave(&gdev->event_spinlock, irqflags);
|
||||
+
|
||||
+ if (or_mask & VMMDEV_GUEST_SUPPORTS_SEAMLESS)
|
||||
+ gdev->pending_events |=
|
||||
+ VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
|
||||
+
|
||||
+ if (gdev->pending_events)
|
||||
+ wakeup = true;
|
||||
+
|
||||
+ spin_unlock_irqrestore(&gdev->event_spinlock, irqflags);
|
||||
+
|
||||
+ if (wakeup)
|
||||
+ wake_up(&gdev->event_wq);
|
||||
+ }
|
||||
+
|
||||
+out:
|
||||
+ mutex_unlock(&gdev->session_mutex);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Sets the guest capabilities for a session. Takes the session spinlock.
|
||||
* Return: 0 or negative errno value.
|
||||
@@ -725,6 +832,13 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
|
||||
mutex_lock(&gdev->session_mutex);
|
||||
|
||||
+ if (gdev->acquire_mode_guest_caps & or_mask) {
|
||||
+ vbg_err("%s error: cannot set caps which are in acquire_mode\n",
|
||||
+ __func__);
|
||||
+ ret = -EBUSY;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
/* Apply the changes to the session mask. */
|
||||
previous = session->set_guest_caps;
|
||||
session->set_guest_caps |= or_mask;
|
||||
@@ -962,6 +1076,7 @@ void vbg_core_close_session(struct vbg_session *session)
|
||||
struct vbg_dev *gdev = session->gdev;
|
||||
int i, rc;
|
||||
|
||||
+ vbg_acquire_session_capabilities(gdev, session, 0, U32_MAX, 0, true);
|
||||
vbg_set_session_capabilities(gdev, session, 0, U32_MAX, true);
|
||||
vbg_set_session_event_filter(gdev, session, 0, U32_MAX, true);
|
||||
|
||||
@@ -1019,6 +1134,25 @@ static int vbg_ioctl_driver_version_info(
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* Must be called with the event_lock held */
|
||||
+static u32 vbg_get_allowed_event_mask_for_session(struct vbg_dev *gdev,
|
||||
+ struct vbg_session *session)
|
||||
+{
|
||||
+ u32 acquire_mode_caps = gdev->acquire_mode_guest_caps;
|
||||
+ u32 session_acquired_caps = session->acquired_guest_caps;
|
||||
+ u32 allowed_events = VMMDEV_EVENT_VALID_EVENT_MASK;
|
||||
+
|
||||
+ if ((acquire_mode_caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS) &&
|
||||
+ !(session_acquired_caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS))
|
||||
+ allowed_events &= ~VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST;
|
||||
+
|
||||
+ if ((acquire_mode_caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS) &&
|
||||
+ !(session_acquired_caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS))
|
||||
+ allowed_events &= ~VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
|
||||
+
|
||||
+ return allowed_events;
|
||||
+}
|
||||
+
|
||||
static bool vbg_wait_event_cond(struct vbg_dev *gdev,
|
||||
struct vbg_session *session,
|
||||
u32 event_mask)
|
||||
@@ -1030,6 +1164,7 @@ static bool vbg_wait_event_cond(struct vbg_dev *gdev,
|
||||
spin_lock_irqsave(&gdev->event_spinlock, flags);
|
||||
|
||||
events = gdev->pending_events & event_mask;
|
||||
+ events &= vbg_get_allowed_event_mask_for_session(gdev, session);
|
||||
wakeup = events || session->cancel_waiters;
|
||||
|
||||
spin_unlock_irqrestore(&gdev->event_spinlock, flags);
|
||||
@@ -1044,6 +1179,7 @@ static u32 vbg_consume_events_locked(struct vbg_dev *gdev,
|
||||
{
|
||||
u32 events = gdev->pending_events & event_mask;
|
||||
|
||||
+ events &= vbg_get_allowed_event_mask_for_session(gdev, session);
|
||||
gdev->pending_events &= ~events;
|
||||
return events;
|
||||
}
|
||||
@@ -1445,6 +1581,29 @@ static int vbg_ioctl_change_filter_mask(struct vbg_dev *gdev,
|
||||
false);
|
||||
}
|
||||
|
||||
+static int vbg_ioctl_acquire_guest_capabilities(struct vbg_dev *gdev,
|
||||
+ struct vbg_session *session,
|
||||
+ struct vbg_ioctl_acquire_guest_caps *caps)
|
||||
+{
|
||||
+ u32 flags, or_mask, not_mask;
|
||||
+
|
||||
+ if (vbg_ioctl_chk(&caps->hdr, sizeof(caps->u.in), 0))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ flags = caps->u.in.flags;
|
||||
+ or_mask = caps->u.in.or_mask;
|
||||
+ not_mask = caps->u.in.not_mask;
|
||||
+
|
||||
+ if (flags & ~VBGL_IOC_AGC_FLAGS_VALID_MASK)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if ((or_mask | not_mask) & ~VMMDEV_GUEST_CAPABILITIES_MASK)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return vbg_acquire_session_capabilities(gdev, session, or_mask,
|
||||
+ not_mask, flags, false);
|
||||
+}
|
||||
+
|
||||
static int vbg_ioctl_change_guest_capabilities(struct vbg_dev *gdev,
|
||||
struct vbg_session *session, struct vbg_ioctl_set_guest_caps *caps)
|
||||
{
|
||||
@@ -1554,6 +1713,8 @@ int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data)
|
||||
return vbg_ioctl_interrupt_all_wait_events(gdev, session, data);
|
||||
case VBG_IOCTL_CHANGE_FILTER_MASK:
|
||||
return vbg_ioctl_change_filter_mask(gdev, session, data);
|
||||
+ case VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES:
|
||||
+ return vbg_ioctl_acquire_guest_capabilities(gdev, session, data);
|
||||
case VBG_IOCTL_CHANGE_GUEST_CAPABILITIES:
|
||||
return vbg_ioctl_change_guest_capabilities(gdev, session, data);
|
||||
case VBG_IOCTL_CHECK_BALLOON:
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.h b/drivers/virt/vboxguest/vboxguest_core.h
|
||||
index dc745a033164..ab4bf64e2cec 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.h
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.h
|
||||
@@ -117,6 +117,15 @@ struct vbg_dev {
|
||||
*/
|
||||
u32 event_filter_host;
|
||||
|
||||
+ /**
|
||||
+ * Guest capabilities which have been switched to acquire_mode.
|
||||
+ */
|
||||
+ u32 acquire_mode_guest_caps;
|
||||
+ /**
|
||||
+ * Guest capabilities acquired by vbg_acquire_session_capabilities().
|
||||
+ * Only one session can acquire a capability at a time.
|
||||
+ */
|
||||
+ u32 acquired_guest_caps;
|
||||
/**
|
||||
* Usage counters for guest capabilities requested through
|
||||
* vbg_set_session_capabilities(). Indexed by capability bit
|
||||
@@ -164,6 +173,11 @@ struct vbg_session {
|
||||
* host filter. Protected by vbg_gdev.session_mutex.
|
||||
*/
|
||||
u32 event_filter;
|
||||
+ /**
|
||||
+ * Guest capabilities acquired by vbg_acquire_session_capabilities().
|
||||
+ * Only one session can acquire a capability at a time.
|
||||
+ */
|
||||
+ u32 acquired_guest_caps;
|
||||
/**
|
||||
* Guest capabilities set through vbg_set_session_capabilities().
|
||||
* A capability claimed by any guest session will be reported to the
|
||||
diff --git a/include/uapi/linux/vboxguest.h b/include/uapi/linux/vboxguest.h
|
||||
index f79d7abe27db..15125f6ec60d 100644
|
||||
--- a/include/uapi/linux/vboxguest.h
|
||||
+++ b/include/uapi/linux/vboxguest.h
|
||||
@@ -257,6 +257,30 @@ VMMDEV_ASSERT_SIZE(vbg_ioctl_change_filter, 24 + 8);
|
||||
_IOWR('V', 12, struct vbg_ioctl_change_filter)
|
||||
|
||||
|
||||
+/** VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES data structure. */
|
||||
+struct vbg_ioctl_acquire_guest_caps {
|
||||
+ /** The header. */
|
||||
+ struct vbg_ioctl_hdr hdr;
|
||||
+ union {
|
||||
+ struct {
|
||||
+ /** Flags (VBGL_IOC_AGC_FLAGS_XXX). */
|
||||
+ __u32 flags;
|
||||
+ /** Capabilities to set (VMMDEV_GUEST_SUPPORTS_XXX). */
|
||||
+ __u32 or_mask;
|
||||
+ /** Capabilities to drop (VMMDEV_GUEST_SUPPORTS_XXX). */
|
||||
+ __u32 not_mask;
|
||||
+ } in;
|
||||
+ } u;
|
||||
+};
|
||||
+VMMDEV_ASSERT_SIZE(vbg_ioctl_acquire_guest_caps, 24 + 12);
|
||||
+
|
||||
+#define VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE 0x00000001
|
||||
+#define VBGL_IOC_AGC_FLAGS_VALID_MASK 0x00000001
|
||||
+
|
||||
+#define VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES \
|
||||
+ _IOWR('V', 13, struct vbg_ioctl_acquire_guest_caps)
|
||||
+
|
||||
+
|
||||
/** VBG_IOCTL_CHANGE_GUEST_CAPABILITIES data structure. */
|
||||
struct vbg_ioctl_set_guest_caps {
|
||||
/** The header. */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
130
0001-virt-vbox-Add-vbg_set_host_capabilities-helper-funct.patch
Normal file
130
0001-virt-vbox-Add-vbg_set_host_capabilities-helper-funct.patch
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 May 2020 15:30:29 +0200
|
||||
Subject: [PATCH] virt: vbox: Add vbg_set_host_capabilities() helper function
|
||||
|
||||
Add vbg_set_host_capabilities() helper function, this is a preparation
|
||||
patch for adding support for the VBGL_IOCTL_GUEST_CAPS_ACQUIRE ioctl.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Upstream Status: https://lore.kernel.org/lkml/20200520195440.38759-1-hdegoede@redhat.com/
|
||||
---
|
||||
drivers/virt/vboxguest/vboxguest_core.c | 79 ++++++++++++++-----------
|
||||
1 file changed, 46 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
index aee5eff229f2..15b3cb618c6e 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
@@ -661,6 +661,48 @@ static int vbg_reset_host_capabilities(struct vbg_dev *gdev)
|
||||
return vbg_status_code_to_errno(rc);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Set guest capabilities on the host.
|
||||
+ * Must be called with gdev->session_mutex hold.
|
||||
+ * Return: 0 or negative errno value.
|
||||
+ * @gdev: The Guest extension device.
|
||||
+ * @session: The session.
|
||||
+ * @session_termination: Set if we're called by the session cleanup code.
|
||||
+ */
|
||||
+static int vbg_set_host_capabilities(struct vbg_dev *gdev,
|
||||
+ struct vbg_session *session,
|
||||
+ bool session_termination)
|
||||
+{
|
||||
+ struct vmmdev_mask *req;
|
||||
+ u32 caps;
|
||||
+ int rc;
|
||||
+
|
||||
+ WARN_ON(!mutex_is_locked(&gdev->session_mutex));
|
||||
+
|
||||
+ caps = gdev->set_guest_caps_tracker.mask;
|
||||
+
|
||||
+ if (gdev->guest_caps_host == caps)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* On termination the requestor is the kernel, as we're cleaning up. */
|
||||
+ req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES,
|
||||
+ session_termination ? VBG_KERNEL_REQUEST :
|
||||
+ session->requestor);
|
||||
+ if (!req) {
|
||||
+ gdev->guest_caps_host = U32_MAX;
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ req->or_mask = caps;
|
||||
+ req->not_mask = ~caps;
|
||||
+ rc = vbg_req_perform(gdev, req);
|
||||
+ vbg_req_free(req, sizeof(*req));
|
||||
+
|
||||
+ gdev->guest_caps_host = (rc >= 0) ? caps : U32_MAX;
|
||||
+
|
||||
+ return vbg_status_code_to_errno(rc);
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* Sets the guest capabilities for a session. Takes the session spinlock.
|
||||
* Return: 0 or negative errno value.
|
||||
@@ -678,23 +720,8 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
u32 or_mask, u32 not_mask,
|
||||
bool session_termination)
|
||||
{
|
||||
- struct vmmdev_mask *req;
|
||||
u32 changed, previous;
|
||||
- int rc, ret = 0;
|
||||
-
|
||||
- /*
|
||||
- * Allocate a request buffer before taking the spinlock, when
|
||||
- * the session is being terminated the requestor is the kernel,
|
||||
- * as we're cleaning up.
|
||||
- */
|
||||
- req = vbg_req_alloc(sizeof(*req), VMMDEVREQ_SET_GUEST_CAPABILITIES,
|
||||
- session_termination ? VBG_KERNEL_REQUEST :
|
||||
- session->requestor);
|
||||
- if (!req) {
|
||||
- if (!session_termination)
|
||||
- return -ENOMEM;
|
||||
- /* Ignore allocation failure, we must do session cleanup. */
|
||||
- }
|
||||
+ int ret = 0;
|
||||
|
||||
mutex_lock(&gdev->session_mutex);
|
||||
|
||||
@@ -709,23 +736,10 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
goto out;
|
||||
|
||||
vbg_track_bit_usage(&gdev->set_guest_caps_tracker, changed, previous);
|
||||
- or_mask = gdev->set_guest_caps_tracker.mask;
|
||||
-
|
||||
- if (gdev->guest_caps_host == or_mask || !req)
|
||||
- goto out;
|
||||
-
|
||||
- gdev->guest_caps_host = or_mask;
|
||||
- req->or_mask = or_mask;
|
||||
- req->not_mask = ~or_mask;
|
||||
- rc = vbg_req_perform(gdev, req);
|
||||
- if (rc < 0) {
|
||||
- ret = vbg_status_code_to_errno(rc);
|
||||
-
|
||||
- /* Failed, roll back (unless it's session termination time). */
|
||||
- gdev->guest_caps_host = U32_MAX;
|
||||
- if (session_termination)
|
||||
- goto out;
|
||||
|
||||
+ ret = vbg_set_host_capabilities(gdev, session, session_termination);
|
||||
+ /* Roll back on failure, unless it's session termination time. */
|
||||
+ if (ret < 0 && !session_termination) {
|
||||
vbg_track_bit_usage(&gdev->set_guest_caps_tracker, changed,
|
||||
session->set_guest_caps);
|
||||
session->set_guest_caps = previous;
|
||||
@@ -733,7 +747,6 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
|
||||
out:
|
||||
mutex_unlock(&gdev->session_mutex);
|
||||
- vbg_req_free(req, sizeof(*req));
|
||||
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
30
0001-virt-vbox-Log-unknown-ioctl-requests-as-error.patch
Normal file
30
0001-virt-vbox-Log-unknown-ioctl-requests-as-error.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 May 2020 11:24:43 +0200
|
||||
Subject: [PATCH] virt: vbox: Log unknown ioctl requests as error
|
||||
|
||||
Every now and then upstream adds new ioctls without notifying us,
|
||||
log unknown ioctl requests as an error to catch these.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Upstream Status: https://lore.kernel.org/lkml/20200520195440.38759-1-hdegoede@redhat.com/
|
||||
---
|
||||
drivers/virt/vboxguest/vboxguest_core.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
index ffd76b949276..e0e343d0ba93 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
@@ -1739,7 +1739,7 @@ int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data)
|
||||
return vbg_ioctl_log(data);
|
||||
}
|
||||
|
||||
- vbg_debug("VGDrvCommonIoCtl: Unknown req %#08x\n", req);
|
||||
+ vbg_err("Userspace made an unknown ioctl req %#08x\n", req);
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
103
0001-virt-vbox-Rename-guest_caps-struct-members-to-set_gu.patch
Normal file
103
0001-virt-vbox-Rename-guest_caps-struct-members-to-set_gu.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Hans de Goede <hdegoede@redhat.com>
|
||||
Date: Tue, 19 May 2020 14:33:13 +0200
|
||||
Subject: [PATCH] virt: vbox: Rename guest_caps struct members to
|
||||
set_guest_caps
|
||||
|
||||
Rename guest_caps[_tracker] struct members to set_guest_caps[_tracker]
|
||||
this is a preparation patch for adding support for the
|
||||
VBGL_IOCTL_GUEST_CAPS_ACQUIRE ioctl.
|
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||
Upstream Status: https://lore.kernel.org/lkml/20200520195440.38759-1-hdegoede@redhat.com/
|
||||
---
|
||||
drivers/virt/vboxguest/vboxguest_core.c | 20 ++++++++++----------
|
||||
drivers/virt/vboxguest/vboxguest_core.h | 9 +++++----
|
||||
2 files changed, 15 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
index 18ebd7a6af98..aee5eff229f2 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.c
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.c
|
||||
@@ -699,17 +699,17 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
mutex_lock(&gdev->session_mutex);
|
||||
|
||||
/* Apply the changes to the session mask. */
|
||||
- previous = session->guest_caps;
|
||||
- session->guest_caps |= or_mask;
|
||||
- session->guest_caps &= ~not_mask;
|
||||
+ previous = session->set_guest_caps;
|
||||
+ session->set_guest_caps |= or_mask;
|
||||
+ session->set_guest_caps &= ~not_mask;
|
||||
|
||||
/* If anything actually changed, update the global usage counters. */
|
||||
- changed = previous ^ session->guest_caps;
|
||||
+ changed = previous ^ session->set_guest_caps;
|
||||
if (!changed)
|
||||
goto out;
|
||||
|
||||
- vbg_track_bit_usage(&gdev->guest_caps_tracker, changed, previous);
|
||||
- or_mask = gdev->guest_caps_tracker.mask;
|
||||
+ vbg_track_bit_usage(&gdev->set_guest_caps_tracker, changed, previous);
|
||||
+ or_mask = gdev->set_guest_caps_tracker.mask;
|
||||
|
||||
if (gdev->guest_caps_host == or_mask || !req)
|
||||
goto out;
|
||||
@@ -726,9 +726,9 @@ static int vbg_set_session_capabilities(struct vbg_dev *gdev,
|
||||
if (session_termination)
|
||||
goto out;
|
||||
|
||||
- vbg_track_bit_usage(&gdev->guest_caps_tracker, changed,
|
||||
- session->guest_caps);
|
||||
- session->guest_caps = previous;
|
||||
+ vbg_track_bit_usage(&gdev->set_guest_caps_tracker, changed,
|
||||
+ session->set_guest_caps);
|
||||
+ session->set_guest_caps = previous;
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -1452,7 +1452,7 @@ static int vbg_ioctl_change_guest_capabilities(struct vbg_dev *gdev,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- caps->u.out.session_caps = session->guest_caps;
|
||||
+ caps->u.out.session_caps = session->set_guest_caps;
|
||||
caps->u.out.global_caps = gdev->guest_caps_host;
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/virt/vboxguest/vboxguest_core.h b/drivers/virt/vboxguest/vboxguest_core.h
|
||||
index 77c3a9c8255d..dc745a033164 100644
|
||||
--- a/drivers/virt/vboxguest/vboxguest_core.h
|
||||
+++ b/drivers/virt/vboxguest/vboxguest_core.h
|
||||
@@ -118,11 +118,12 @@ struct vbg_dev {
|
||||
u32 event_filter_host;
|
||||
|
||||
/**
|
||||
- * Usage counters for guest capabilities. Indexed by capability bit
|
||||
+ * Usage counters for guest capabilities requested through
|
||||
+ * vbg_set_session_capabilities(). Indexed by capability bit
|
||||
* number, one count per session using a capability.
|
||||
* Protected by session_mutex.
|
||||
*/
|
||||
- struct vbg_bit_usage_tracker guest_caps_tracker;
|
||||
+ struct vbg_bit_usage_tracker set_guest_caps_tracker;
|
||||
/**
|
||||
* The guest capabilities last reported to the host (or UINT32_MAX).
|
||||
* Protected by session_mutex.
|
||||
@@ -164,11 +165,11 @@ struct vbg_session {
|
||||
*/
|
||||
u32 event_filter;
|
||||
/**
|
||||
- * Guest capabilities for this session.
|
||||
+ * Guest capabilities set through vbg_set_session_capabilities().
|
||||
* A capability claimed by any guest session will be reported to the
|
||||
* host. Protected by vbg_gdev.session_mutex.
|
||||
*/
|
||||
- u32 guest_caps;
|
||||
+ u32 set_guest_caps;
|
||||
/** VMMDEV_REQUESTOR_* flags */
|
||||
u32 requestor;
|
||||
/** Set on CANCEL_ALL_WAITEVENTS, protected by vbg_devevent_spinlock. */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
161
0001-xen-events-avoid-removing-an-event-channel-while-han.patch
Normal file
161
0001-xen-events-avoid-removing-an-event-channel-while-han.patch
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
From 073d0552ead5bfc7a3a9c01de590e924f11b5dd2 Mon Sep 17 00:00:00 2001
|
||||
From: Juergen Gross <jgross@suse.com>
|
||||
Date: Mon, 7 Sep 2020 15:47:27 +0200
|
||||
Subject: [PATCH] xen/events: avoid removing an event channel while handling it
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Today it can happen that an event channel is being removed from the
|
||||
system while the event handling loop is active. This can lead to a
|
||||
race resulting in crashes or WARN() splats when trying to access the
|
||||
irq_info structure related to the event channel.
|
||||
|
||||
Fix this problem by using a rwlock taken as reader in the event
|
||||
handling loop and as writer when deallocating the irq_info structure.
|
||||
|
||||
As the observed problem was a NULL dereference in evtchn_from_irq()
|
||||
make this function more robust against races by testing the irq_info
|
||||
pointer to be not NULL before dereferencing it.
|
||||
|
||||
And finally make all accesses to evtchn_to_irq[row][col] atomic ones
|
||||
in order to avoid seeing partial updates of an array element in irq
|
||||
handling. Note that irq handling can be entered only for event channels
|
||||
which have been valid before, so any not populated row isn't a problem
|
||||
in this regard, as rows are only ever added and never removed.
|
||||
|
||||
This is XSA-331.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
|
||||
Reported-by: Jinoh Kang <luke1337@theori.io>
|
||||
Signed-off-by: Juergen Gross <jgross@suse.com>
|
||||
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
|
||||
Reviewed-by: Wei Liu <wl@xen.org>
|
||||
---
|
||||
drivers/xen/events/events_base.c | 41 ++++++++++++++++++++++++++++----
|
||||
1 file changed, 36 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
|
||||
index 6f02c18fa65c..407741ece084 100644
|
||||
--- a/drivers/xen/events/events_base.c
|
||||
+++ b/drivers/xen/events/events_base.c
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/irqnr.h>
|
||||
#include <linux/pci.h>
|
||||
+#include <linux/spinlock.h>
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
#include <asm/desc.h>
|
||||
@@ -71,6 +72,23 @@ const struct evtchn_ops *evtchn_ops;
|
||||
*/
|
||||
static DEFINE_MUTEX(irq_mapping_update_lock);
|
||||
|
||||
+/*
|
||||
+ * Lock protecting event handling loop against removing event channels.
|
||||
+ * Adding of event channels is no issue as the associated IRQ becomes active
|
||||
+ * only after everything is setup (before request_[threaded_]irq() the handler
|
||||
+ * can't be entered for an event, as the event channel will be unmasked only
|
||||
+ * then).
|
||||
+ */
|
||||
+static DEFINE_RWLOCK(evtchn_rwlock);
|
||||
+
|
||||
+/*
|
||||
+ * Lock hierarchy:
|
||||
+ *
|
||||
+ * irq_mapping_update_lock
|
||||
+ * evtchn_rwlock
|
||||
+ * IRQ-desc lock
|
||||
+ */
|
||||
+
|
||||
static LIST_HEAD(xen_irq_list_head);
|
||||
|
||||
/* IRQ <-> VIRQ mapping. */
|
||||
@@ -105,7 +123,7 @@ static void clear_evtchn_to_irq_row(unsigned row)
|
||||
unsigned col;
|
||||
|
||||
for (col = 0; col < EVTCHN_PER_ROW; col++)
|
||||
- evtchn_to_irq[row][col] = -1;
|
||||
+ WRITE_ONCE(evtchn_to_irq[row][col], -1);
|
||||
}
|
||||
|
||||
static void clear_evtchn_to_irq_all(void)
|
||||
@@ -142,7 +160,7 @@ static int set_evtchn_to_irq(evtchn_port_t evtchn, unsigned int irq)
|
||||
clear_evtchn_to_irq_row(row);
|
||||
}
|
||||
|
||||
- evtchn_to_irq[row][col] = irq;
|
||||
+ WRITE_ONCE(evtchn_to_irq[row][col], irq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -152,7 +170,7 @@ int get_evtchn_to_irq(evtchn_port_t evtchn)
|
||||
return -1;
|
||||
if (evtchn_to_irq[EVTCHN_ROW(evtchn)] == NULL)
|
||||
return -1;
|
||||
- return evtchn_to_irq[EVTCHN_ROW(evtchn)][EVTCHN_COL(evtchn)];
|
||||
+ return READ_ONCE(evtchn_to_irq[EVTCHN_ROW(evtchn)][EVTCHN_COL(evtchn)]);
|
||||
}
|
||||
|
||||
/* Get info for IRQ */
|
||||
@@ -261,10 +279,14 @@ static void xen_irq_info_cleanup(struct irq_info *info)
|
||||
*/
|
||||
evtchn_port_t evtchn_from_irq(unsigned irq)
|
||||
{
|
||||
- if (WARN(irq >= nr_irqs, "Invalid irq %d!\n", irq))
|
||||
+ const struct irq_info *info = NULL;
|
||||
+
|
||||
+ if (likely(irq < nr_irqs))
|
||||
+ info = info_for_irq(irq);
|
||||
+ if (!info)
|
||||
return 0;
|
||||
|
||||
- return info_for_irq(irq)->evtchn;
|
||||
+ return info->evtchn;
|
||||
}
|
||||
|
||||
unsigned int irq_from_evtchn(evtchn_port_t evtchn)
|
||||
@@ -440,16 +462,21 @@ static int __must_check xen_allocate_irq_gsi(unsigned gsi)
|
||||
static void xen_free_irq(unsigned irq)
|
||||
{
|
||||
struct irq_info *info = info_for_irq(irq);
|
||||
+ unsigned long flags;
|
||||
|
||||
if (WARN_ON(!info))
|
||||
return;
|
||||
|
||||
+ write_lock_irqsave(&evtchn_rwlock, flags);
|
||||
+
|
||||
list_del(&info->list);
|
||||
|
||||
set_info_for_irq(irq, NULL);
|
||||
|
||||
WARN_ON(info->refcnt > 0);
|
||||
|
||||
+ write_unlock_irqrestore(&evtchn_rwlock, flags);
|
||||
+
|
||||
kfree(info);
|
||||
|
||||
/* Legacy IRQ descriptors are managed by the arch. */
|
||||
@@ -1233,6 +1260,8 @@ static void __xen_evtchn_do_upcall(void)
|
||||
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+ read_lock(&evtchn_rwlock);
|
||||
+
|
||||
do {
|
||||
vcpu_info->evtchn_upcall_pending = 0;
|
||||
|
||||
@@ -1243,6 +1272,8 @@ static void __xen_evtchn_do_upcall(void)
|
||||
virt_rmb(); /* Hypervisor can set upcall pending. */
|
||||
|
||||
} while (vcpu_info->evtchn_upcall_pending);
|
||||
+
|
||||
+ read_unlock(&evtchn_rwlock);
|
||||
}
|
||||
|
||||
void xen_evtchn_do_upcall(struct pt_regs *regs)
|
||||
--
|
||||
2.28.0
|
||||
|
||||
101
0002-arm64-tegra-Re-order-PCIe-aperture-mappings-to-suppo.patch
Normal file
101
0002-arm64-tegra-Re-order-PCIe-aperture-mappings-to-suppo.patch
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
From 6acf1ba7596a051d6ff4092d22bf9c4ce210d9f5 Mon Sep 17 00:00:00 2001
|
||||
From: Vidya Sagar <vidyas@nvidia.com>
|
||||
Date: Sat, 11 Jan 2020 00:44:59 +0530
|
||||
Subject: [PATCH 2/2] arm64: tegra: Re-order PCIe aperture mappings to support
|
||||
ACPI boot
|
||||
|
||||
Re-order Tegra194's PCIe aperture mappings to have IO window moved to
|
||||
64-bit aperture and have the entire 32-bit aperture used for accessing
|
||||
the configuration space. This makes it to use the entire 32MB of the 32-bit
|
||||
aperture for ECAM purpose while booting through ACPI.
|
||||
|
||||
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
|
||||
---
|
||||
arch/arm64/boot/dts/nvidia/tegra194.dtsi | 36 ++++++++++++------------
|
||||
1 file changed, 18 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
|
||||
index 4bc187a4eacdb..2b378fa06d19e 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
|
||||
@@ -1404,9 +1404,9 @@ pcie@14100000 {
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
- ranges = <0x81000000 0x0 0x30100000 0x0 0x30100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
- 0xc3000000 0x12 0x00000000 0x12 0x00000000 0x0 0x30000000 /* prefetchable memory (768MB) */
|
||||
- 0x82000000 0x0 0x40000000 0x12 0x30000000 0x0 0x10000000>; /* non-prefetchable memory (256MB) */
|
||||
+ ranges = <0xc3000000 0x12 0x00000000 0x12 0x00000000 0x0 0x30000000 /* prefetchable memory (768MB) */
|
||||
+ 0x82000000 0x00 0x40000000 0x12 0x30000000 0x0 0x0fff0000 /* non-prefetchable memory (256MB - 64KB) */
|
||||
+ 0x81000000 0x00 0x00000000 0x12 0x3fff0000 0x0 0x00010000>; /* downstream I/O (64KB) */
|
||||
};
|
||||
|
||||
pcie@14120000 {
|
||||
@@ -1449,9 +1449,9 @@ pcie@14120000 {
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
- ranges = <0x81000000 0x0 0x32100000 0x0 0x32100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
- 0xc3000000 0x12 0x40000000 0x12 0x40000000 0x0 0x30000000 /* prefetchable memory (768MB) */
|
||||
- 0x82000000 0x0 0x40000000 0x12 0x70000000 0x0 0x10000000>; /* non-prefetchable memory (256MB) */
|
||||
+ ranges = <0xc3000000 0x12 0x40000000 0x12 0x40000000 0x0 0x30000000 /* prefetchable memory (768MB) */
|
||||
+ 0x82000000 0x00 0x40000000 0x12 0x70000000 0x0 0x0fff0000 /* non-prefetchable memory (256MB - 64KB) */
|
||||
+ 0x81000000 0x00 0x00000000 0x12 0x7fff0000 0x0 0x00010000>; /* downstream I/O (64KB) */
|
||||
};
|
||||
|
||||
pcie@14140000 {
|
||||
@@ -1494,9 +1494,9 @@ pcie@14140000 {
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
- ranges = <0x81000000 0x0 0x34100000 0x0 0x34100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
- 0xc3000000 0x12 0x80000000 0x12 0x80000000 0x0 0x30000000 /* prefetchable memory (768MB) */
|
||||
- 0x82000000 0x0 0x40000000 0x12 0xb0000000 0x0 0x10000000>; /* non-prefetchable memory (256MB) */
|
||||
+ ranges = <0xc3000000 0x12 0x80000000 0x12 0x80000000 0x0 0x30000000 /* prefetchable memory (768MB) */
|
||||
+ 0x82000000 0x00 0x40000000 0x12 0xb0000000 0x0 0x0fff0000 /* non-prefetchable memory (256MB - 64KB) */
|
||||
+ 0x81000000 0x00 0x00000000 0x12 0xbfff0000 0x0 0x00010000>; /* downstream I/O (64KB) */
|
||||
};
|
||||
|
||||
pcie@14160000 {
|
||||
@@ -1539,9 +1539,9 @@ pcie@14160000 {
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
- ranges = <0x81000000 0x0 0x36100000 0x0 0x36100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
- 0xc3000000 0x14 0x00000000 0x14 0x00000000 0x3 0x40000000 /* prefetchable memory (13GB) */
|
||||
- 0x82000000 0x0 0x40000000 0x17 0x40000000 0x0 0xc0000000>; /* non-prefetchable memory (3GB) */
|
||||
+ ranges = <0xc3000000 0x14 0x00000000 0x14 0x00000000 0x3 0x40000000 /* prefetchable memory (13GB) */
|
||||
+ 0x82000000 0x00 0x40000000 0x17 0x40000000 0x0 0xbfff0000 /* non-prefetchable memory (3GB - 64KB) */
|
||||
+ 0x81000000 0x00 0x00000000 0x17 0xffff0000 0x0 0x00010000>; /* downstream I/O (64KB) */
|
||||
};
|
||||
|
||||
pcie@14180000 {
|
||||
@@ -1584,9 +1584,9 @@ pcie@14180000 {
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
- ranges = <0x81000000 0x0 0x38100000 0x0 0x38100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
- 0xc3000000 0x18 0x00000000 0x18 0x00000000 0x3 0x40000000 /* prefetchable memory (13GB) */
|
||||
- 0x82000000 0x0 0x40000000 0x1b 0x40000000 0x0 0xc0000000>; /* non-prefetchable memory (3GB) */
|
||||
+ ranges = <0xc3000000 0x18 0x00000000 0x18 0x00000000 0x3 0x40000000 /* prefetchable memory (13GB) */
|
||||
+ 0x82000000 0x00 0x40000000 0x1b 0x40000000 0x0 0xbfff0000 /* non-prefetchable memory (3GB - 64KB) */
|
||||
+ 0x81000000 0x00 0x00000000 0x1b 0xffff0000 0x0 0x00010000>; /* downstream I/O (64KB) */
|
||||
};
|
||||
|
||||
pcie@141a0000 {
|
||||
@@ -1633,9 +1633,9 @@ pcie@141a0000 {
|
||||
nvidia,aspm-l0s-entrance-latency-us = <3>;
|
||||
|
||||
bus-range = <0x0 0xff>;
|
||||
- ranges = <0x81000000 0x0 0x3a100000 0x0 0x3a100000 0x0 0x00100000 /* downstream I/O (1MB) */
|
||||
- 0xc3000000 0x1c 0x00000000 0x1c 0x00000000 0x3 0x40000000 /* prefetchable memory (13GB) */
|
||||
- 0x82000000 0x0 0x40000000 0x1f 0x40000000 0x0 0xc0000000>; /* non-prefetchable memory (3GB) */
|
||||
+ ranges = <0xc3000000 0x1c 0x00000000 0x1c 0x00000000 0x3 0x40000000 /* prefetchable memory (13GB) */
|
||||
+ 0x82000000 0x00 0x40000000 0x1f 0x40000000 0x0 0xbfff0000 /* non-prefetchable memory (3GB - 64KB) */
|
||||
+ 0x81000000 0x00 0x00000000 0x1f 0xffff0000 0x0 0x00010000>; /* downstream I/O (64KB) */
|
||||
};
|
||||
|
||||
pcie_ep@14160000 {
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
From patchwork Sun Oct 25 14:01:44 2020
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Adam Sampson <ats@offog.org>
|
||||
X-Patchwork-Id: 11855267
|
||||
Return-Path:
|
||||
<SRS0=8R9C=EA=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
|
||||
DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,
|
||||
MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,
|
||||
USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id D1D99C388F7
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Sun, 25 Oct 2020 14:04:02 +0000 (UTC)
|
||||
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.kernel.org (Postfix) with ESMTPS id 539B92225E
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Sun, 25 Oct 2020 14:04:02 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=lists.infradead.org
|
||||
header.i=@lists.infradead.org header.b="pKL4zMU1"
|
||||
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 539B92225E
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dmarc=fail (p=none dis=none) header.from=offog.org
|
||||
Authentication-Results: mail.kernel.org;
|
||||
spf=none
|
||||
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
|
||||
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
|
||||
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
|
||||
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
|
||||
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
|
||||
bh=Smw7tRUwTAlV9zXVX1uVl3+PN3QebXDyiZrExxBSCPU=; b=pKL4zMU1LMKGyGrnNBuRIJVlPn
|
||||
yMf8/tMv8w7BT/mMtZkxY22WUlN4IpqNLAx1mdiIa5VUVbVpdsXYWYdSWaUvJe24nyJi8NycxIoO8
|
||||
168UTytxMlzI5F18yr9bXZ79rSRW+/P0zQbb+OQPMPbJPNb1RusFtve8WGNCkqlOWUOpiVQqPFPJ9
|
||||
hGhOsDJhXjep7y7HNpu7+UBYvZInmOOrAS079WoEc1jX4u6zDXt0ox24r0Fcc8wnVpsWpGxPhb0xZ
|
||||
uZtguJOo2ItQdeT/6OfafjzV15qXfPGK+148ny4vyOvgHNvJX88R6RBIxqUdvQzoh10GTlb76K45i
|
||||
Gfx5ufkA==;
|
||||
Received: from localhost ([::1] helo=merlin.infradead.org)
|
||||
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kWgb2-0000uB-6w; Sun, 25 Oct 2020 14:02:08 +0000
|
||||
Received: from a-painless.mh.aa.net.uk ([2001:8b0:0:30::51]
|
||||
helo=alt.a-painless.mh.aa.net.uk)
|
||||
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kWgaz-0000tq-Kq
|
||||
for linux-arm-kernel@lists.infradead.org; Sun, 25 Oct 2020 14:02:06 +0000
|
||||
Received: from cartman.offog.org ([2001:8b0:83b:b53f::a])
|
||||
by a-painless.mh.aa.net.uk with esmtps
|
||||
(TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92)
|
||||
(envelope-from <ats@offog.org>)
|
||||
id 1kWgay-0001oV-R0; Sun, 25 Oct 2020 14:02:04 +0000
|
||||
Received: from ats by cartman.offog.org with local (Exim 4.94)
|
||||
(envelope-from <ats@offog.org>)
|
||||
id 1kWgao-0007UQ-4s; Sun, 25 Oct 2020 14:01:54 +0000
|
||||
From: Adam Sampson <ats@offog.org>
|
||||
To: linux-sunxi@googlegroups.com, devicetree@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Subject: [PATCH] ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on
|
||||
PHY
|
||||
Date: Sun, 25 Oct 2020 14:01:44 +0000
|
||||
Message-Id: <20201025140144.28693-1-ats@offog.org>
|
||||
X-Mailer: git-send-email 2.29.1
|
||||
MIME-Version: 1.0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20201025_100205_812453_7FAF68C8
|
||||
X-CRM114-Status: GOOD ( 13.85 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.29
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: Adam Sampson <ats@offog.org>
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
|
||||
The RX/TX delays for the Ethernet PHY on the Linksprite pcDuino 3 Nano
|
||||
are configured in hardware, using resistors that are populated to pull
|
||||
the RTL8211E's RXDLY/TXDLY pins low or high as needed.
|
||||
|
||||
phy-mode should be set to rgmii-id to reflect this. Previously it was
|
||||
set to rgmii, which used to work but now results in the delays being
|
||||
disabled again as a result of the bugfix in commit bbc4d71d6354 ("net:
|
||||
phy: realtek: fix rtl8211e rx/tx delay config").
|
||||
|
||||
Tested on two pcDuino 3 Nano boards purchased in 2015. Without this fix,
|
||||
Ethernet works unreliably on one board and doesn't work at all on the
|
||||
other.
|
||||
|
||||
Fixes: 061035d456c9 ("ARM: dts: sun7i: Add dts file for pcDuino 3 Nano board")
|
||||
Signed-off-by: Adam Sampson <ats@offog.org>
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
---
|
||||
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
|
||||
index fce2f7fcd084..bf38c66c1815 100644
|
||||
--- a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
|
||||
+++ b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
- * Copyright 2015 Adam Sampson <ats@offog.org>
|
||||
+ * Copyright 2015-2020 Adam Sampson <ats@offog.org>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
@@ -115,7 +115,7 @@ &gmac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_rgmii_pins>;
|
||||
phy-handle = <&phy1>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
122
ARM-dts-sun8i-r40-bananapi-m2-ultra-Fix-ethernet-node.patch
Normal file
122
ARM-dts-sun8i-r40-bananapi-m2-ultra-Fix-ethernet-node.patch
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
From patchwork Sun Oct 25 08:19:49 2020
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?=
|
||||
<jernej.skrabec@siol.net>
|
||||
X-Patchwork-Id: 11855181
|
||||
Return-Path:
|
||||
<SRS0=8R9C=EA=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
|
||||
DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,
|
||||
MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,
|
||||
USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id B6AE3C388F7
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Sun, 25 Oct 2020 08:16:10 +0000 (UTC)
|
||||
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.kernel.org (Postfix) with ESMTPS id 4237B22202
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Sun, 25 Oct 2020 08:16:10 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=lists.infradead.org
|
||||
header.i=@lists.infradead.org header.b="aQsCF8Xs"
|
||||
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4237B22202
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dmarc=fail (p=none dis=none) header.from=siol.net
|
||||
Authentication-Results: mail.kernel.org;
|
||||
spf=none
|
||||
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
|
||||
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
|
||||
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
|
||||
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
|
||||
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
|
||||
bh=OVfJGYUKDO8EDgWuqz0sWx0VmV2S5JECcAK3tuelNEg=; b=aQsCF8XsLEVFht8Uw49dbRkjUb
|
||||
l0/cqvHPmMU+u1YDBGKvcHh84au6Ycu0Yj9KpXz1xyyZWpw3J8kumzmmHbIf1PdmBIQgJHKVu2lJB
|
||||
DrsvuVRLcfl4PiJk/s26XVtl0otfluZWdH0lyPc9ZbOOeAQOrgVFTWdgOmv3UPOjLS5hT0jFnrRx2
|
||||
nMmHSImA04dLm7r0sDICCwVxYte3PcLFdPKOl/InrqErMZfVhNRXg39QBEHPhfjXebMpFYdxi25xP
|
||||
AX7Ki+J4I5Tln9McKb/VFPFmfxkImZH3cE+PQSwLSWgOniF2onxFBKZdZvqWM7CtGe4PNF1WMebvy
|
||||
88mZj4WA==;
|
||||
Received: from localhost ([::1] helo=merlin.infradead.org)
|
||||
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kWbAd-0001fY-U8; Sun, 25 Oct 2020 08:14:31 +0000
|
||||
Received: from mailoutvs12.siol.net ([185.57.226.203] helo=mail.siol.net)
|
||||
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kWbAW-0001eg-7I
|
||||
for linux-arm-kernel@lists.infradead.org; Sun, 25 Oct 2020 08:14:25 +0000
|
||||
Received: from localhost (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTP id 3296D529E39;
|
||||
Sun, 25 Oct 2020 09:14:22 +0100 (CET)
|
||||
X-Virus-Scanned: amavisd-new at psrvmta09.zcs-production.pri
|
||||
Received: from mail.siol.net ([127.0.0.1])
|
||||
by localhost (psrvmta09.zcs-production.pri [127.0.0.1]) (amavisd-new,
|
||||
port 10032)
|
||||
with ESMTP id aIRB7Go1sYw4; Sun, 25 Oct 2020 09:14:22 +0100 (CET)
|
||||
Received: from mail.siol.net (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTPS id E682152A0BE;
|
||||
Sun, 25 Oct 2020 09:14:21 +0100 (CET)
|
||||
Received: from kista.localdomain (cpe1-5-97.cable.triera.net [213.161.5.97])
|
||||
(Authenticated sender: 031275009)
|
||||
by mail.siol.net (Postfix) with ESMTPSA id A68F0529E39;
|
||||
Sun, 25 Oct 2020 09:14:21 +0100 (CET)
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
To: mripard@kernel.org,
|
||||
wens@csie.org
|
||||
Subject: [PATCH] ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node
|
||||
Date: Sun, 25 Oct 2020 09:19:49 +0100
|
||||
Message-Id: <20201025081949.783443-1-jernej.skrabec@siol.net>
|
||||
X-Mailer: git-send-email 2.29.1
|
||||
MIME-Version: 1.0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20201025_041424_405883_C92DFA93
|
||||
X-CRM114-Status: GOOD ( 11.20 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.29
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com,
|
||||
robh+dt@kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
|
||||
Ethernet PHY on BananaPi M2 Ultra provides RX and TX delays. Fix
|
||||
ethernet node to reflect that fact.
|
||||
|
||||
Fixes: c36fd5a48bd2 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable GMAC ethernet controller")
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
|
||||
index 2fc62ef0cb3e..a6a1087a0c9b 100644
|
||||
--- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
|
||||
+++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts
|
||||
@@ -129,7 +129,7 @@ &gmac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&gmac_rgmii_pins>;
|
||||
phy-handle = <&phy1>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
phy-supply = <®_dc1sw>;
|
||||
status = "okay";
|
||||
};
|
||||
305
CVE-2020-16119-DCCP-CCID-structure-use-after-free.patch
Normal file
305
CVE-2020-16119-DCCP-CCID-structure-use-after-free.patch
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
From MAILER-DAEMON Wed Oct 14 16:34:37 2020
|
||||
From: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
|
||||
To: netdev@vger.kernel.org
|
||||
Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Thadeu Lima de Souza Cascardo <cascardo@canonical.com>, "Gustavo A. R. Silva" <gustavoars@kernel.org>, "Alexander A. Klimov" <grandmaster@al2klimov.de>, Kees Cook <keescook@chromium.org>, Eric Dumazet <edumazet@google.com>, Alexey Kodanev <alexey.kodanev@oracle.com>, dccp@vger.kernel.org, linux-kernel@vger.kernel.org
|
||||
Subject: [PATCH 1/2] dccp: ccid: move timers to struct dccp_sock
|
||||
Date: Tue, 13 Oct 2020 19:18:48 +0200
|
||||
Message-Id: <20201013171849.236025-2-kleber.souza@canonical.com>
|
||||
In-Reply-To: <20201013171849.236025-1-kleber.souza@canonical.com>
|
||||
References: <20201013171849.236025-1-kleber.souza@canonical.com>
|
||||
List-ID: <linux-kernel.vger.kernel.org>
|
||||
X-Mailing-List: linux-kernel@vger.kernel.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
|
||||
|
||||
When dccps_hc_tx_ccid is freed, ccid timers may still trigger. The reason
|
||||
del_timer_sync can't be used is because this relies on keeping a reference
|
||||
to struct sock. But as we keep a pointer to dccps_hc_tx_ccid and free that
|
||||
during disconnect, the timer should really belong to struct dccp_sock.
|
||||
|
||||
This addresses CVE-2020-16119.
|
||||
|
||||
Fixes: 839a6094140a (net: dccp: Convert timers to use timer_setup())
|
||||
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
|
||||
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
|
||||
Acked-bd: Richard Sailer <richard_siegfried@systemli.org>
|
||||
---
|
||||
include/linux/dccp.h | 2 ++
|
||||
net/dccp/ccids/ccid2.c | 32 +++++++++++++++++++-------------
|
||||
net/dccp/ccids/ccid3.c | 30 ++++++++++++++++++++----------
|
||||
3 files changed, 41 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
|
||||
index 07e547c02fd8..504afa1a4be6 100644
|
||||
--- a/include/linux/dccp.h
|
||||
+++ b/include/linux/dccp.h
|
||||
@@ -259,6 +259,7 @@ struct dccp_ackvec;
|
||||
* @dccps_sync_scheduled - flag which signals "send out-of-band message soon"
|
||||
* @dccps_xmitlet - tasklet scheduled by the TX CCID to dequeue data packets
|
||||
* @dccps_xmit_timer - used by the TX CCID to delay sending (rate-based pacing)
|
||||
+ * @dccps_ccid_timer - used by the CCIDs
|
||||
* @dccps_syn_rtt - RTT sample from Request/Response exchange (in usecs)
|
||||
*/
|
||||
struct dccp_sock {
|
||||
@@ -303,6 +304,7 @@ struct dccp_sock {
|
||||
__u8 dccps_sync_scheduled:1;
|
||||
struct tasklet_struct dccps_xmitlet;
|
||||
struct timer_list dccps_xmit_timer;
|
||||
+ struct timer_list dccps_ccid_timer;
|
||||
};
|
||||
|
||||
static inline struct dccp_sock *dccp_sk(const struct sock *sk)
|
||||
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
|
||||
index 3da1f77bd039..dbca1f1e2449 100644
|
||||
--- a/net/dccp/ccids/ccid2.c
|
||||
+++ b/net/dccp/ccids/ccid2.c
|
||||
@@ -126,21 +126,26 @@ static void dccp_tasklet_schedule(struct sock *sk)
|
||||
|
||||
static void ccid2_hc_tx_rto_expire(struct timer_list *t)
|
||||
{
|
||||
- struct ccid2_hc_tx_sock *hc = from_timer(hc, t, tx_rtotimer);
|
||||
- struct sock *sk = hc->sk;
|
||||
- const bool sender_was_blocked = ccid2_cwnd_network_limited(hc);
|
||||
+ struct dccp_sock *dp = from_timer(dp, t, dccps_ccid_timer);
|
||||
+ struct sock *sk = (struct sock *)dp;
|
||||
+ struct ccid2_hc_tx_sock *hc;
|
||||
+ bool sender_was_blocked;
|
||||
|
||||
bh_lock_sock(sk);
|
||||
+
|
||||
+ if (inet_sk_state_load(sk) == DCCP_CLOSED)
|
||||
+ goto out;
|
||||
+
|
||||
+ hc = ccid_priv(dp->dccps_hc_tx_ccid);
|
||||
+ sender_was_blocked = ccid2_cwnd_network_limited(hc);
|
||||
+
|
||||
if (sock_owned_by_user(sk)) {
|
||||
- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + HZ / 5);
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + HZ / 5);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ccid2_pr_debug("RTO_EXPIRE\n");
|
||||
|
||||
- if (sk->sk_state == DCCP_CLOSED)
|
||||
- goto out;
|
||||
-
|
||||
/* back-off timer */
|
||||
hc->tx_rto <<= 1;
|
||||
if (hc->tx_rto > DCCP_RTO_MAX)
|
||||
@@ -166,7 +171,7 @@ static void ccid2_hc_tx_rto_expire(struct timer_list *t)
|
||||
if (sender_was_blocked)
|
||||
dccp_tasklet_schedule(sk);
|
||||
/* restart backed-off timer */
|
||||
- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto);
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + hc->tx_rto);
|
||||
out:
|
||||
bh_unlock_sock(sk);
|
||||
sock_put(sk);
|
||||
@@ -330,7 +335,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, unsigned int len)
|
||||
}
|
||||
#endif
|
||||
|
||||
- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto);
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + hc->tx_rto);
|
||||
|
||||
#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
|
||||
do {
|
||||
@@ -700,9 +705,9 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
/* restart RTO timer if not all outstanding data has been acked */
|
||||
if (hc->tx_pipe == 0)
|
||||
- sk_stop_timer(sk, &hc->tx_rtotimer);
|
||||
+ sk_stop_timer(sk, &dp->dccps_ccid_timer);
|
||||
else
|
||||
- sk_reset_timer(sk, &hc->tx_rtotimer, jiffies + hc->tx_rto);
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer, jiffies + hc->tx_rto);
|
||||
done:
|
||||
/* check if incoming Acks allow pending packets to be sent */
|
||||
if (sender_was_blocked && !ccid2_cwnd_network_limited(hc))
|
||||
@@ -737,17 +742,18 @@ static int ccid2_hc_tx_init(struct ccid *ccid, struct sock *sk)
|
||||
hc->tx_last_cong = hc->tx_lsndtime = hc->tx_cwnd_stamp = ccid2_jiffies32;
|
||||
hc->tx_cwnd_used = 0;
|
||||
hc->sk = sk;
|
||||
- timer_setup(&hc->tx_rtotimer, ccid2_hc_tx_rto_expire, 0);
|
||||
+ timer_setup(&dp->dccps_ccid_timer, ccid2_hc_tx_rto_expire, 0);
|
||||
INIT_LIST_HEAD(&hc->tx_av_chunks);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ccid2_hc_tx_exit(struct sock *sk)
|
||||
{
|
||||
+ struct dccp_sock *dp = dccp_sk(sk);
|
||||
struct ccid2_hc_tx_sock *hc = ccid2_hc_tx_sk(sk);
|
||||
int i;
|
||||
|
||||
- sk_stop_timer(sk, &hc->tx_rtotimer);
|
||||
+ sk_stop_timer(sk, &dp->dccps_ccid_timer);
|
||||
|
||||
for (i = 0; i < hc->tx_seqbufc; i++)
|
||||
kfree(hc->tx_seqbuf[i]);
|
||||
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
|
||||
index b9ee1a4a8955..685f4d046c0d 100644
|
||||
--- a/net/dccp/ccids/ccid3.c
|
||||
+++ b/net/dccp/ccids/ccid3.c
|
||||
@@ -184,17 +184,24 @@ static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hc,
|
||||
|
||||
static void ccid3_hc_tx_no_feedback_timer(struct timer_list *t)
|
||||
{
|
||||
- struct ccid3_hc_tx_sock *hc = from_timer(hc, t, tx_no_feedback_timer);
|
||||
- struct sock *sk = hc->sk;
|
||||
+ struct dccp_sock *dp = from_timer(dp, t, dccps_ccid_timer);
|
||||
+ struct ccid3_hc_tx_sock *hc;
|
||||
+ struct sock *sk = (struct sock *)dp;
|
||||
unsigned long t_nfb = USEC_PER_SEC / 5;
|
||||
|
||||
bh_lock_sock(sk);
|
||||
+
|
||||
+ if (inet_sk_state_load(sk) == DCCP_CLOSED)
|
||||
+ goto out;
|
||||
+
|
||||
if (sock_owned_by_user(sk)) {
|
||||
/* Try again later. */
|
||||
/* XXX: set some sensible MIB */
|
||||
goto restart_timer;
|
||||
}
|
||||
|
||||
+ hc = ccid_priv(dp->dccps_hc_tx_ccid);
|
||||
+
|
||||
ccid3_pr_debug("%s(%p, state=%s) - entry\n", dccp_role(sk), sk,
|
||||
ccid3_tx_state_name(hc->tx_state));
|
||||
|
||||
@@ -250,8 +257,8 @@ static void ccid3_hc_tx_no_feedback_timer(struct timer_list *t)
|
||||
t_nfb = max(hc->tx_t_rto, 2 * hc->tx_t_ipi);
|
||||
|
||||
restart_timer:
|
||||
- sk_reset_timer(sk, &hc->tx_no_feedback_timer,
|
||||
- jiffies + usecs_to_jiffies(t_nfb));
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer,
|
||||
+ jiffies + usecs_to_jiffies(t_nfb));
|
||||
out:
|
||||
bh_unlock_sock(sk);
|
||||
sock_put(sk);
|
||||
@@ -280,7 +287,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
|
||||
return -EBADMSG;
|
||||
|
||||
if (hc->tx_state == TFRC_SSTATE_NO_SENT) {
|
||||
- sk_reset_timer(sk, &hc->tx_no_feedback_timer, (jiffies +
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer, (jiffies +
|
||||
usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
|
||||
hc->tx_last_win_count = 0;
|
||||
hc->tx_t_last_win_count = now;
|
||||
@@ -354,6 +361,7 @@ static void ccid3_hc_tx_packet_sent(struct sock *sk, unsigned int len)
|
||||
static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
|
||||
+ struct dccp_sock *dp = dccp_sk(sk);
|
||||
struct tfrc_tx_hist_entry *acked;
|
||||
ktime_t now;
|
||||
unsigned long t_nfb;
|
||||
@@ -420,7 +428,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
||||
(unsigned int)(hc->tx_x >> 6));
|
||||
|
||||
/* unschedule no feedback timer */
|
||||
- sk_stop_timer(sk, &hc->tx_no_feedback_timer);
|
||||
+ sk_stop_timer(sk, &dp->dccps_ccid_timer);
|
||||
|
||||
/*
|
||||
* As we have calculated new ipi, delta, t_nom it is possible
|
||||
@@ -445,8 +453,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
|
||||
"expire in %lu jiffies (%luus)\n",
|
||||
dccp_role(sk), sk, usecs_to_jiffies(t_nfb), t_nfb);
|
||||
|
||||
- sk_reset_timer(sk, &hc->tx_no_feedback_timer,
|
||||
- jiffies + usecs_to_jiffies(t_nfb));
|
||||
+ sk_reset_timer(sk, &dp->dccps_ccid_timer,
|
||||
+ jiffies + usecs_to_jiffies(t_nfb));
|
||||
}
|
||||
|
||||
static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type,
|
||||
@@ -488,21 +496,23 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type,
|
||||
|
||||
static int ccid3_hc_tx_init(struct ccid *ccid, struct sock *sk)
|
||||
{
|
||||
+ struct dccp_sock *dp = dccp_sk(sk);
|
||||
struct ccid3_hc_tx_sock *hc = ccid_priv(ccid);
|
||||
|
||||
hc->tx_state = TFRC_SSTATE_NO_SENT;
|
||||
hc->tx_hist = NULL;
|
||||
hc->sk = sk;
|
||||
- timer_setup(&hc->tx_no_feedback_timer,
|
||||
+ timer_setup(&dp->dccps_ccid_timer,
|
||||
ccid3_hc_tx_no_feedback_timer, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ccid3_hc_tx_exit(struct sock *sk)
|
||||
{
|
||||
+ struct dccp_sock *dp = dccp_sk(sk);
|
||||
struct ccid3_hc_tx_sock *hc = ccid3_hc_tx_sk(sk);
|
||||
|
||||
- sk_stop_timer(sk, &hc->tx_no_feedback_timer);
|
||||
+ sk_stop_timer(sk, &dp->dccps_ccid_timer);
|
||||
tfrc_tx_hist_purge(&hc->tx_hist);
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
From MAILER-DAEMON Wed Oct 14 16:34:37 2020
|
||||
From: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
|
||||
To: netdev@vger.kernel.org
|
||||
Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Thadeu Lima de Souza Cascardo <cascardo@canonical.com>, "Gustavo A. R. Silva" <gustavoars@kernel.org>, "Alexander A. Klimov" <grandmaster@al2klimov.de>, Kees Cook <keescook@chromium.org>, Eric Dumazet <edumazet@google.com>, Alexey Kodanev <alexey.kodanev@oracle.com>, dccp@vger.kernel.org, linux-kernel@vger.kernel.org
|
||||
Subject: [PATCH 2/2] Revert "dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect()"
|
||||
Date: Tue, 13 Oct 2020 19:18:49 +0200
|
||||
Message-Id: <20201013171849.236025-3-kleber.souza@canonical.com>
|
||||
In-Reply-To: <20201013171849.236025-1-kleber.souza@canonical.com>
|
||||
References: <20201013171849.236025-1-kleber.souza@canonical.com>
|
||||
List-ID: <linux-kernel.vger.kernel.org>
|
||||
X-Mailing-List: linux-kernel@vger.kernel.org
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
|
||||
From: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
|
||||
|
||||
This reverts commit 2677d20677314101293e6da0094ede7b5526d2b1.
|
||||
|
||||
This fixes an issue that after disconnect, dccps_hc_tx_ccid will still be
|
||||
kept, allowing the socket to be reused as a listener socket, and the cloned
|
||||
socket will free its dccps_hc_tx_ccid, leading to a later use after free,
|
||||
when the listener socket is closed.
|
||||
|
||||
This addresses CVE-2020-16119.
|
||||
|
||||
Fixes: 2677d2067731 (dccp: don't free ccid2_hc_tx_sock struct in dccp_disconnect())
|
||||
Reported-by: Hadar Manor
|
||||
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
|
||||
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
|
||||
Acked-by: Richard Sailer <richard_siegfried@systemli.org>
|
||||
---
|
||||
net/dccp/proto.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
|
||||
index 6d705d90c614..359e848dba6c 100644
|
||||
--- a/net/dccp/proto.c
|
||||
+++ b/net/dccp/proto.c
|
||||
@@ -279,7 +279,9 @@ int dccp_disconnect(struct sock *sk, int flags)
|
||||
|
||||
dccp_clear_xmit_timers(sk);
|
||||
ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
|
||||
+ ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
|
||||
dp->dccps_hc_rx_ccid = NULL;
|
||||
+ dp->dccps_hc_tx_ccid = NULL;
|
||||
|
||||
__skb_queue_purge(&sk->sk_receive_queue);
|
||||
__skb_queue_purge(&sk->sk_write_queue);
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
||||
50
Makefile
Normal file
50
Makefile
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Makefile for source rpm: kernel
|
||||
SPECFILE := kernel.spec
|
||||
|
||||
# we only check the .sign signatures
|
||||
UPSTREAM_CHECKS = sign
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
%:
|
||||
@echo "Try fedpkg $@ or something like that"
|
||||
@exit 1
|
||||
|
||||
prep: config-files
|
||||
fedpkg -v prep
|
||||
|
||||
noarch:
|
||||
fedpkg -v local --arch=noarch
|
||||
|
||||
# 'make local' also needs to build the noarch firmware package
|
||||
local:
|
||||
fedpkg -v local
|
||||
|
||||
extremedebug:
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_PAGEALLOC is not set/CONFIG_DEBUG_PAGEALLOC=y/' config-nodebug
|
||||
|
||||
config-files:
|
||||
@./build_configs.sh
|
||||
|
||||
debug:
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
|
||||
@rpmdev-bumpspec -c "Reenable debugging options." kernel.spec
|
||||
|
||||
release:
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
|
||||
@rpmdev-bumpspec -c "Disable debugging options." kernel.spec
|
||||
|
||||
nodebuginfo:
|
||||
@perl -pi -e 's/^%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 1\}/%define with_debuginfo %\{\?_without_debuginfo: 0\} %\{\?\!_without_debuginfo: 0\}/' kernel.spec
|
||||
|
||||
nodebug: release
|
||||
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
|
||||
|
||||
ifeq ($(MAKECMDGOALS),me a sandwich)
|
||||
.PHONY: me a sandwich
|
||||
me a:
|
||||
@:
|
||||
|
||||
sandwich:
|
||||
@[ `id -u` -ne 0 ] && echo "What? Make it yourself." || echo Okay.
|
||||
endif
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
RHEL_MAJOR = 10
|
||||
RHEL_MINOR = 99
|
||||
|
||||
#
|
||||
# RHEL_RELEASE
|
||||
# -------------
|
||||
#
|
||||
# Represents build number in 'release' part of RPM's name-version-release.
|
||||
# name is <package_name>, e.g. kernel
|
||||
# version is upstream kernel version this kernel is based on, e.g. 4.18.0
|
||||
# release is <RHEL_RELEASE>.<dist_tag>[<buildid>], e.g. 100.el8
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
RHEL_RELEASE = 38
|
||||
|
||||
#
|
||||
# RHEL_REBASE_NUM
|
||||
# ----------------
|
||||
#
|
||||
# Used in RPM version string for Gemini kernels, which dont use upstream
|
||||
# VERSION/PATCHLEVEL/SUBLEVEL. The number represents rebase number for
|
||||
# current MAJOR release.
|
||||
#
|
||||
# Use this spot to avoid future merge conflicts.
|
||||
# Do not trim this comment.
|
||||
RHEL_REBASE_NUM = 1
|
||||
|
||||
|
||||
#
|
||||
# ZSTREAM
|
||||
# -------
|
||||
#
|
||||
# This variable controls whether we use zstream numbering or not for the
|
||||
# package release. The zstream release keeps the build number of the last
|
||||
# build done for ystream for the Beta milestone, and increments a second
|
||||
# number for each build. The third number is used for branched builds
|
||||
# (eg.: for builds with security fixes or hot fixes done outside of the
|
||||
# batch release process).
|
||||
#
|
||||
# For example, with ZSTREAM unset or set to "no", all builds will contain
|
||||
# a release with only the build number, eg.: kernel-<kernel version>-X.el*,
|
||||
# where X is the build number. With ZSTREAM set to "yes", we will have
|
||||
# builds with kernel-<kernel version>-X.Y.Z.el*, where X is the last
|
||||
# RHEL_RELEASE number before ZSTREAM flag was set to yes, Y will now be the
|
||||
# build number and Z will always be 1 except if you're doing a branched build
|
||||
# (when you give RHDISTGIT_BRANCH on the command line, in which case the Z
|
||||
# number will be incremented instead of the Y).
|
||||
#
|
||||
ZSTREAM ?= no
|
||||
|
||||
#
|
||||
# Automotive
|
||||
# ----------
|
||||
#
|
||||
# Represents the major and minor release used by automotive.
|
||||
# Primarily this is used to to identify the build target when
|
||||
# building the automotive kernel package.
|
||||
AUTOMOTIVE_MAJOR = 2
|
||||
AUTOMOTIVE_MINOR = 99
|
||||
76
PatchList.txt
Normal file
76
PatchList.txt
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# This file contains patches that we intend to carry for longer than
|
||||
# "Should show up in a stable release soonish"
|
||||
# Some of these may eventually drop out
|
||||
|
||||
kbuild-AFTER_LINK.patch
|
||||
|
||||
arm64-avoid-needing-console-to-enable-serial-console.patch
|
||||
|
||||
geekbox-v4-device-tree-support.patch
|
||||
|
||||
Initial-AllWinner-A64-and-PINE64-support.patch
|
||||
|
||||
arm64-pcie-quirks-xgene.patch
|
||||
|
||||
usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch
|
||||
|
||||
ARM-tegra-usb-no-reset.patch
|
||||
|
||||
bcm283x-upstream-fixes.patch
|
||||
|
||||
lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
|
||||
|
||||
input-kill-stupid-messages.patch
|
||||
|
||||
die-floppy-die.patch
|
||||
|
||||
no-pcspkr-modalias.patch
|
||||
|
||||
silence-fbcon-logo.patch
|
||||
|
||||
Kbuild-Add-an-option-to-enable-GCC-VTA.patch
|
||||
|
||||
crash-driver.patch
|
||||
|
||||
#Secure boot patches
|
||||
Add-secure_modules-call.patch
|
||||
PCI-Lock-down-BAR-access-when-module-security-is-ena.patch
|
||||
x86-Lock-down-IO-port-access-when-module-security-is.patch
|
||||
ACPI-Limit-access-to-custom_method.patch
|
||||
asus-wmi-Restrict-debugfs-interface-when-module-load.patch
|
||||
Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch
|
||||
acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch
|
||||
kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch
|
||||
x86-Restrict-MSR-access-when-module-loading-is-restr.patch
|
||||
Add-option-to-automatically-enforce-module-signature.patch
|
||||
efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch
|
||||
efi-Add-EFI_SECURE_BOOT-bit.patch
|
||||
hibernate-Disable-in-a-signed-modules-environment.patch
|
||||
Add-EFI-signature-data-types.patch
|
||||
Add-an-EFI-signature-blob-parser-and-key-loader.patch
|
||||
KEYS-Add-a-system-blacklist-keyring.patch
|
||||
MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
|
||||
MODSIGN-Support-not-importing-certs-from-db.patch
|
||||
Add-sysrq-option-to-disable-secure-boot-mode.patch
|
||||
kexec-uefi-copy-secure_boot-flag-in-boot-params.patch
|
||||
|
||||
drm-i915-hush-check-crtc-state.patch
|
||||
|
||||
disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
lis3-improve-handling-of-null-rate.patch
|
||||
|
||||
scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
|
||||
|
||||
criu-no-expert.patch
|
||||
|
||||
ath9k-rx-dma-stop-check.patch
|
||||
|
||||
xen-pciback-Don-t-disable-PCI_COMMAND-on-PCI-device-.patch
|
||||
|
||||
Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
|
||||
|
||||
firmware-Drop-WARN-from-usermodehelper_read_trylock-.patch
|
||||
|
||||
drm-i915-turn-off-wc-mmaps.patch
|
||||
|
||||
|
|
@ -1,474 +0,0 @@
|
|||
https://gitlab.com/cki-project/kernel-ark/-/commit/831ff9bcd8e9eab864062470a3250beb1e1ec924
|
||||
831ff9bcd8e9eab864062470a3250beb1e1ec924 rust: Add -fdiagnostics-show-context to bindgen_skip_c_flags
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/fe3e9e24af806d756edbda922103b1fa95d9b89b
|
||||
fe3e9e24af806d756edbda922103b1fa95d9b89b Revert "Removing Obsolete hba pci-ids from rhel8"
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c4a0a995da9df8732f688d09db5252173277589d
|
||||
c4a0a995da9df8732f688d09db5252173277589d rh_messages.h: add missing lpfc devices
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0ad9a88c3263fa8fa39437f69472588917255c99
|
||||
0ad9a88c3263fa8fa39437f69472588917255c99 kernel: extend rh_waived to cope better with the CVE mitigations case
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cf18c49636f2583c85831f909699034026325242
|
||||
cf18c49636f2583c85831f909699034026325242 rh_messages.h: add missing aacraid device
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/26ca931184edb2c3c7f7c1951f53fa3333d9c90e
|
||||
26ca931184edb2c3c7f7c1951f53fa3333d9c90e rh_messages.h: update unmaintained drivers
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c1c1a1b7059900f4b9b657f5189285a287160e11
|
||||
c1c1a1b7059900f4b9b657f5189285a287160e11 arm64: add early lockdown for secure boot
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a613ae52a8d9378e6fa70f697b3ce0acee220491
|
||||
a613ae52a8d9378e6fa70f697b3ce0acee220491 efi: pass secure boot mode to kernel proper
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f869258b6b654d316e84325e46e431da4dfd04e7
|
||||
f869258b6b654d316e84325e46e431da4dfd04e7 selftests/bpf: Remove ksyms_weak_lskel test
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/8b69219fe6a11766cf1a2e07dc94e56448b47824
|
||||
8b69219fe6a11766cf1a2e07dc94e56448b47824 Simplify include Makefile.rhelver
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c2621ac616e25a9a04fbcb8af0c1f8b2bdd8c099
|
||||
c2621ac616e25a9a04fbcb8af0c1f8b2bdd8c099 redhat: make ENABLE_WERROR also enable OBJTOOL_WERROR
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d28cbdeb89fe565e10fb4be8d8378153e86611f6
|
||||
d28cbdeb89fe565e10fb4be8d8378153e86611f6 main.c: fix initcall blacklisted
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b71ab57c8db44881edc32a124ddc2ebe536b6a4c
|
||||
b71ab57c8db44881edc32a124ddc2ebe536b6a4c arch/x86/kernel/setup.c: fix rh_check_supported
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c4ea2384863e54e0c5582b3508518e659581ce69
|
||||
c4ea2384863e54e0c5582b3508518e659581ce69 efi,lockdown: fix kernel lockdown on Secure Boot
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/60b2ddeb0986e1c43a98b44a4ab414a7e2744701
|
||||
60b2ddeb0986e1c43a98b44a4ab414a7e2744701 Revert "nvme: Return BLK_STS_TARGET if the DNR bit is set"
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/860632dd288c7aa7807959a79af9159482510cd1
|
||||
860632dd288c7aa7807959a79af9159482510cd1 Revert "nvme: allow local retry and proper failover for REQ_FAILFAST_TRANSPORT"
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/aaef2c3ee081c8980bb60fd4b7a6ed9e187d9048
|
||||
aaef2c3ee081c8980bb60fd4b7a6ed9e187d9048 Revert "nvme: decouple basic ANA log page re-read support from native multipathing"
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5cd4353dae0ee79d13f57b7ccee85cd0bcbe4b4f
|
||||
5cd4353dae0ee79d13f57b7ccee85cd0bcbe4b4f Revert "nvme: nvme_mpath_init remove multipath check"
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/656a0565ffe54f99ac1390a68c5ee7050ab6fb25
|
||||
656a0565ffe54f99ac1390a68c5ee7050ab6fb25 redhat: automotive: define CONFIG_RH_AUTOMOTIVE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f1025d6236c72b4fbd03940b6fa2178f2a84f418
|
||||
f1025d6236c72b4fbd03940b6fa2178f2a84f418 redhat: fix modules.order target
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6e0fa997052c92d6085a50083e75dedc0160443f
|
||||
6e0fa997052c92d6085a50083e75dedc0160443f [redhat] rh_messages.h: driver and device updates
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d8822fd0573e9f254f097c1743078e4e74ac70f5
|
||||
d8822fd0573e9f254f097c1743078e4e74ac70f5 crypto: rng - Fix extrng EFAULT handling
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c224e4b6a61af08574bb0565755ed609bf08cacb
|
||||
c224e4b6a61af08574bb0565755ed609bf08cacb crypto: sig - Disable signing
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/39417e970be7f6bc63f34d5ed5511f7e629802c2
|
||||
39417e970be7f6bc63f34d5ed5511f7e629802c2 crypto: rng - Ensure stdrng is tested before user-space starts
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/52be246b6342ed5b1486729fd5c5893b10549a92
|
||||
52be246b6342ed5b1486729fd5c5893b10549a92 [redhat] rh_messages.h: Mark BlueField-4 as disabled
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2c9e64af9fa1f8599ce05877441afcac8ac91b04
|
||||
2c9e64af9fa1f8599ce05877441afcac8ac91b04 Update the RHEL_DIFFERENCES help string
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/beef34cb1efc34b7fbee35535c66915995d12ed1
|
||||
beef34cb1efc34b7fbee35535c66915995d12ed1 redhat: include resolve_btfids in kernel-devel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/1a1426b7a8df854c78385dd8ce8b74e9ee641477
|
||||
1a1426b7a8df854c78385dd8ce8b74e9ee641477 redhat: workaround CKI cross compilation for scripts
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2c83d6cfffe1f891bf024df81be6cd41c2073ad9
|
||||
2c83d6cfffe1f891bf024df81be6cd41c2073ad9 crypto: akcipher - Disable signing and decryption
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/af93553b8d335ccf5dd4f90ab9419e497aa36a80
|
||||
af93553b8d335ccf5dd4f90ab9419e497aa36a80 crypto: dh - implement FIPS PCT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f0540d9d32978dff227cbb930193e8dc2557b23b
|
||||
f0540d9d32978dff227cbb930193e8dc2557b23b crypto: ecdh - disallow plain "ecdh" usage in FIPS mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/243ef89ad354eea332d7bfb23fd4cf259240de91
|
||||
243ef89ad354eea332d7bfb23fd4cf259240de91 crypto: seqiv - flag instantiations as FIPS compliant
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6a23cbc588e9b9f7b2bc7250c6c6903d4d904eb1
|
||||
6a23cbc588e9b9f7b2bc7250c6c6903d4d904eb1 [kernel] bpf: set default value for bpf_jit_harden
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/bb84b630a172d0204c8d243c57a6a1d2eae7843c
|
||||
bb84b630a172d0204c8d243c57a6a1d2eae7843c not upstream: Disable vdso getrandom when FIPS is enabled
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b643998c61552fb5615268e7e529999d64d54175
|
||||
b643998c61552fb5615268e7e529999d64d54175 Add support to rh_waived cmdline boot parameter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a1e04b6f3580382a902256c7bf8b395b9a1be47f
|
||||
a1e04b6f3580382a902256c7bf8b395b9a1be47f rh_flags: fix failed when register_sysctl_sz rh_flags_table to kernel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/03cf1862c6221ee2a6de9a5ab25adaec6460b62e
|
||||
03cf1862c6221ee2a6de9a5ab25adaec6460b62e [redhat] rh_flags: constify the ctl_table argument of proc_handler
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e2708e55f9151652da80e388b4bf88c649288c0f
|
||||
e2708e55f9151652da80e388b4bf88c649288c0f redhat: rh_flags: declare proper static methods when !CONFIG_RHEL_DIFFERENCES
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6f593811cc1e5664f45fe2d09916eada1187e992
|
||||
6f593811cc1e5664f45fe2d09916eada1187e992 redhat: make bnx2xx drivers unmaintained in rhel-10
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5db8220bd67c719a20c1269233585b40f48837da
|
||||
5db8220bd67c719a20c1269233585b40f48837da rh_flags: Rename rh_features to rh_flags
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/19ca502a0087eed65a014c6271f9bfc207d8d7eb
|
||||
19ca502a0087eed65a014c6271f9bfc207d8d7eb kernel: rh_features: fix reading empty feature list from /proc
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ba24639032f00b47748a6f39a4eb33950df015c2
|
||||
ba24639032f00b47748a6f39a4eb33950df015c2 rh_features: move rh_features entry to sys/kernel
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/883e43fe6a0da0d9ad90e7c997a95f11bab9b888
|
||||
883e43fe6a0da0d9ad90e7c997a95f11bab9b888 rh_features: convert to atomic allocation
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c8daa2e832df14ee9174435a357b2ae0994a3ef3
|
||||
c8daa2e832df14ee9174435a357b2ae0994a3ef3 add rh_features to /proc
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4f33dbbe3ec578d49e12c07421b913bf480fccef
|
||||
4f33dbbe3ec578d49e12c07421b913bf480fccef add support for rh_features
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/53a5900b05260b81f13eb3b9d6a9419429f310ab
|
||||
53a5900b05260b81f13eb3b9d6a9419429f310ab [redhat] PCI: Fix pci_rh_check_status() call semantics
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/aeb9a237a0ec39b7bde89d8bb040cd5b267f6802
|
||||
aeb9a237a0ec39b7bde89d8bb040cd5b267f6802 scsi: sd: condition probe_type under RHEL_DIFFERENCES
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/159e72af8b1631b720f4a7e0012fa624764cecde
|
||||
159e72af8b1631b720f4a7e0012fa624764cecde scsi: sd: remove unused sd_probe_types
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d8c04860eb7bf29617ca1754f1076fd9f5992e77
|
||||
d8c04860eb7bf29617ca1754f1076fd9f5992e77 [redhat] rh_messages.h: mark mlx5 on Bluefield-3 as unmaintained
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/496c64b4afece4ab525467a6be71ffe60d0c564f
|
||||
496c64b4afece4ab525467a6be71ffe60d0c564f [redhat] rh_messages.h: initial driver and device lists
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5cf456aaba6f5c9406421c04c65d43b2c71f5927
|
||||
5cf456aaba6f5c9406421c04c65d43b2c71f5927 arch/x86: Fix XSAVE check for x86_64-v2 check
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/252bf9586fca6e57a51966c0294a9a0cb33ff4f5
|
||||
252bf9586fca6e57a51966c0294a9a0cb33ff4f5 arch/x86/kernel/setup.c: fixup rh_check_supported
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/30faf17591afbd4230d590355351044294ad43d2
|
||||
30faf17591afbd4230d590355351044294ad43d2 lsm: update security_lock_kernel_down
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e88ee9e2e869e7259faa5bf3ff6689becabb53cb
|
||||
e88ee9e2e869e7259faa5bf3ff6689becabb53cb arch/x86: mark x86_64-v1 and x86_64-v2 processors as deprecated
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/26ebc304df38a49ce7cc69b4bdf220298cff2460
|
||||
26ebc304df38a49ce7cc69b4bdf220298cff2460 redhat: kABI: add missing RH_KABI_SIZE_ALIGN_CHECKS Kconfig option
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/8c71392703448be8e8217592dd46ea1cc8b157e1
|
||||
8c71392703448be8e8217592dd46ea1cc8b157e1 redhat: rh_kabi: introduce RH_KABI_EXCLUDE_WITH_SIZE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d42afcb843fcc87e59ba39b5574c18d89fd07a91
|
||||
d42afcb843fcc87e59ba39b5574c18d89fd07a91 redhat: rh_kabi: move semicolon inside __RH_KABI_CHECK_SIZE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/95a56955f9ba6ef1e1dd2d99d8f98254da274267
|
||||
95a56955f9ba6ef1e1dd2d99d8f98254da274267 random: replace import_single_range() with import_ubuf()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/92d6612578b79fd3a09e10504ed71209ba43c271
|
||||
92d6612578b79fd3a09e10504ed71209ba43c271 ext4: Mark mounting fs-verity filesystems as tech-preview
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5c51745b8aec113ff0605ab833c3e472d99c55c8
|
||||
5c51745b8aec113ff0605ab833c3e472d99c55c8 erofs: Add tech preview markers at mount
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6d687c70a7eda10eac0ddc6eedeaccc30eef5349
|
||||
6d687c70a7eda10eac0ddc6eedeaccc30eef5349 kernel/rh_messages.c: Mark functions as possibly unused
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/dfb09b1d833cad815ea2f5cb69505010de260c40
|
||||
dfb09b1d833cad815ea2f5cb69505010de260c40 crypto: rng - Override drivers/char/random in FIPS mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ddbe3667f2462817f3f936141fff08604dde1564
|
||||
ddbe3667f2462817f3f936141fff08604dde1564 random: Add hook to override device reads and getrandom(2)
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/92525a9129d85fa6400c9e653379862a67cb43b2
|
||||
92525a9129d85fa6400c9e653379862a67cb43b2 [redhat] kernel/rh_messages.c: move hardware tables to rh_messages.h
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/eacd81fdaf31d456a82c553735faf64c8efad2eb
|
||||
eacd81fdaf31d456a82c553735faf64c8efad2eb [redhat] kernel/rh_messages.c: Wire up new calls
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/32af8640a651c642ee5706dda0cf35ff508bcdcb
|
||||
32af8640a651c642ee5706dda0cf35ff508bcdcb [redhat] drivers/pci: Update rh_messages.c
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/db366977f9e13f903cc9b7f22936b581594a7731
|
||||
db366977f9e13f903cc9b7f22936b581594a7731 [redhat] drivers/pci: Remove RHEL-only pci_hw_*() functions
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/402504ff66e5d118b514253df5d55f8413e2e167
|
||||
402504ff66e5d118b514253df5d55f8413e2e167 scsi: sd: Add "probe_type" module parameter to allow synchronous probing
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5e96a345c6fb24e282ce1769223c1a339d0dbe94
|
||||
5e96a345c6fb24e282ce1769223c1a339d0dbe94 Revert "Remove EXPERT from ARCH_FORCE_MAX_ORDER for aarch64"
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ce943989ae8cb2b8e0b4699c148584d3cd18ec9b
|
||||
ce943989ae8cb2b8e0b4699c148584d3cd18ec9b kernel/rh_messages.c: Another gcc12 warning on redundant NULL test
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c0624b3913d8c3f262e20910a2f2c4d2f99ce61f
|
||||
c0624b3913d8c3f262e20910a2f2c4d2f99ce61f Enable IO_URING for RHEL
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/861f2d38d82cfb374799ec517f18cc021701068e
|
||||
861f2d38d82cfb374799ec517f18cc021701068e Remove EXPERT from ARCH_FORCE_MAX_ORDER for aarch64
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e02ec93117d6eea21e80baf69e6f9848cf1a9774
|
||||
e02ec93117d6eea21e80baf69e6f9848cf1a9774 redhat: version two of Makefile.rhelver tweaks
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/964e830b4fae678dec5b8b93dcd402c73fdf2912
|
||||
964e830b4fae678dec5b8b93dcd402c73fdf2912 redhat: adapt to upstream Makefile change
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/60a4025a3b1cdec1c7bbdabf1e30278f615bb493
|
||||
60a4025a3b1cdec1c7bbdabf1e30278f615bb493 kernel/rh_messages.c: gcc12 warning on redundant NULL test
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a5c9e3c6e3dcda60b5f753d1bae86a686f3ac087
|
||||
a5c9e3c6e3dcda60b5f753d1bae86a686f3ac087 Change acpi_bus_get_acpi_device to acpi_get_acpi_dev
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/092e751fe418623c5ad04e77fa6c993d48d96533
|
||||
092e751fe418623c5ad04e77fa6c993d48d96533 ARK: Remove code marking devices unmaintained
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c27fa327fb3de69773568d211fd2f8f13a72e342
|
||||
c27fa327fb3de69773568d211fd2f8f13a72e342 rh_message: Fix function name
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c9b07fd3a141ad0283d7eaadf5a06aec9af2b8c9
|
||||
c9b07fd3a141ad0283d7eaadf5a06aec9af2b8c9 Add Partner Supported taint flag to kAFS
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6b0e3a47ec436527a736c0e7159b41624d176dd9
|
||||
6b0e3a47ec436527a736c0e7159b41624d176dd9 Add Partner Supported taint flag
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/3a4e2ad92c430d2f584f56ca686bc75a469d06c0
|
||||
3a4e2ad92c430d2f584f56ca686bc75a469d06c0 kabi: Add kABI macros for enum type
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/04fbd46f834f3a012ca9d5bef91db377a3dbaed0
|
||||
04fbd46f834f3a012ca9d5bef91db377a3dbaed0 kabi: expand and clarify documentation of aux structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cf8df8ef88e094ebb049a7e1e6fec069aaf54faa
|
||||
cf8df8ef88e094ebb049a7e1e6fec069aaf54faa kabi: introduce RH_KABI_USE_AUX_PTR
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/31779ca0c6c9aab28184a42ac3f17ac219b37b2b
|
||||
31779ca0c6c9aab28184a42ac3f17ac219b37b2b kabi: rename RH_KABI_SIZE_AND_EXTEND to AUX
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2e12a05d339ed936b9cd59f420b161d70b4a130a
|
||||
2e12a05d339ed936b9cd59f420b161d70b4a130a kabi: more consistent _RH_KABI_SIZE_AND_EXTEND
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b83556eebdc2efdc2d2c22610b7cd7c5cafb2bae
|
||||
b83556eebdc2efdc2d2c22610b7cd7c5cafb2bae kabi: use fixed field name for extended part
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4c9a3b306a34ed7017e35b0de26b2d98e1a04373
|
||||
4c9a3b306a34ed7017e35b0de26b2d98e1a04373 kabi: fix dereference in RH_KABI_CHECK_EXT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a961660df0a73bcf2dcd8cb8855c2f5d5ded0ae9
|
||||
a961660df0a73bcf2dcd8cb8855c2f5d5ded0ae9 kabi: fix RH_KABI_SET_SIZE macro
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/9f9ef5e8b4694fa7fb6a8f941fb741121fe5aab3
|
||||
9f9ef5e8b4694fa7fb6a8f941fb741121fe5aab3 kabi: expand and clarify documentation
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/308d17beeaa6cb4a514f77319b636c9a2c15f5eb
|
||||
308d17beeaa6cb4a514f77319b636c9a2c15f5eb kabi: make RH_KABI_USE replace any number of reserved fields
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f3d12dffffeee8d6692be46044b9fc8448901692
|
||||
f3d12dffffeee8d6692be46044b9fc8448901692 kabi: rename RH_KABI_USE2 to RH_KABI_USE_SPLIT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/520e726b4e78101e73fa3d77cdcbc21d204a75a9
|
||||
520e726b4e78101e73fa3d77cdcbc21d204a75a9 kabi: change RH_KABI_REPLACE2 to RH_KABI_REPLACE_SPLIT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7160868bd40d04e6d1a80f55d1bf9bb62ede0ba3
|
||||
7160868bd40d04e6d1a80f55d1bf9bb62ede0ba3 kabi: change RH_KABI_REPLACE_UNSAFE to RH_KABI_BROKEN_REPLACE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0b83063cf6c57dc20a80c35396fa425ec1963d53
|
||||
0b83063cf6c57dc20a80c35396fa425ec1963d53 kabi: introduce RH_KABI_ADD_MODIFIER
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/d276c2393792e3eec80a73a4fe964f9ec11145a7
|
||||
d276c2393792e3eec80a73a4fe964f9ec11145a7 kabi: Include kconfig.h
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/28c30de9c771ff91994c9f0a42bdcc260fa97c2d
|
||||
28c30de9c771ff91994c9f0a42bdcc260fa97c2d kabi: macros for intentional kABI breakage
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/9b671c725ac69c47874321e5636e6541bb6d219d
|
||||
9b671c725ac69c47874321e5636e6541bb6d219d kabi: fix the note about terminating semicolon
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/6443eef17fb53f62886ecce519b6e12dd310e7f5
|
||||
6443eef17fb53f62886ecce519b6e12dd310e7f5 kabi: introduce RH_KABI_HIDE_INCLUDE and RH_KABI_FAKE_INCLUDE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/47746fc3837b476ec265e2a0c2aaa86de0d3994e
|
||||
47746fc3837b476ec265e2a0c2aaa86de0d3994e pci.h: Fix static include
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/67ce66385c6b619356c4030e6163c4fb18a50427
|
||||
67ce66385c6b619356c4030e6163c4fb18a50427 drivers/pci/pci-driver.c: Fix if/ifdef typo
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0dfd7feeadc964ef2a9d118218b54831381c8d7a
|
||||
0dfd7feeadc964ef2a9d118218b54831381c8d7a kernel/rh_taint.c: Update to new messaging
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/35e5ee153637e59c9297c9cc8ba7f3960277ffc2
|
||||
35e5ee153637e59c9297c9cc8ba7f3960277ffc2 redhat: Add mark_driver_deprecated()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ff7aa8cae4c7e3e7bbc1bb5612efc2157c81fa7d
|
||||
ff7aa8cae4c7e3e7bbc1bb5612efc2157c81fa7d RHEL: disable io_uring support
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/517351ed810bf2707e7fdb2ab22029aeb594db59
|
||||
517351ed810bf2707e7fdb2ab22029aeb594db59 bpf: Fix unprivileged_bpf_disabled setup
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/48fe2e5f40c901e92d1f8c62bc97f58af4b0906a
|
||||
48fe2e5f40c901e92d1f8c62bc97f58af4b0906a nvme: nvme_mpath_init remove multipath check
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/1c9bd09f303e2c9d2c67fdc46604d94e00cbf67c
|
||||
1c9bd09f303e2c9d2c67fdc46604d94e00cbf67c wireguard: disable in FIPS mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/57872981891fe8f3f7205daa4b78c8c0d676b171
|
||||
57872981891fe8f3f7205daa4b78c8c0d676b171 nvme: decouple basic ANA log page re-read support from native multipathing
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0561f5953431ff471193611cd73af65dd394c8cd
|
||||
0561f5953431ff471193611cd73af65dd394c8cd nvme: allow local retry and proper failover for REQ_FAILFAST_TRANSPORT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f801483d711fa5f83a0f9d4c479eeba702d1d477
|
||||
f801483d711fa5f83a0f9d4c479eeba702d1d477 nvme: Return BLK_STS_TARGET if the DNR bit is set
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4f2bc09956ad4829d139e9d69b86ba8b9ebc66e2
|
||||
4f2bc09956ad4829d139e9d69b86ba8b9ebc66e2 REDHAT: coresight: etm4x: Disable coresight on HPE Apollo 70
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/65a21d545cc43328ea00fdbd62e7b45f375adce8
|
||||
65a21d545cc43328ea00fdbd62e7b45f375adce8 redhat: remove remaining references of CONFIG_RH_DISABLE_DEPRECATED
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/1c1b5380b0b56d3be978997b128f84aeb9906656
|
||||
1c1b5380b0b56d3be978997b128f84aeb9906656 arch/x86: Remove vendor specific CPU ID checks
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f7c032c856ba6379a77b76179d0352929d6039ec
|
||||
f7c032c856ba6379a77b76179d0352929d6039ec redhat: Replace hardware.redhat.com link in Unsupported message
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/9a6eb49603959cf0aab0198e13946eaee07801c3
|
||||
9a6eb49603959cf0aab0198e13946eaee07801c3 x86: Fix compile issues with rh_check_supported()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/8a605436efddfa7dbc6e007b2881fa81f17968a5
|
||||
8a605436efddfa7dbc6e007b2881fa81f17968a5 KEYS: Make use of platform keyring for module signature verify
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c7c191f662438423a23592db42838ff550c2bdda
|
||||
c7c191f662438423a23592db42838ff550c2bdda Input: rmi4 - remove the need for artificial IRQ in case of HID
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4ae139284600cd6fef133ce7a981485ea73381ab
|
||||
4ae139284600cd6fef133ce7a981485ea73381ab ARM: tegra: usb no reset
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/8156e2102f753bbe0f0dd222a5f232e7f3d99883
|
||||
8156e2102f753bbe0f0dd222a5f232e7f3d99883 arm: make CONFIG_HIGHPTE optional without CONFIG_EXPERT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/823e733a88ddd21c735288dd3b08348e79872b91
|
||||
823e733a88ddd21c735288dd3b08348e79872b91 redhat: rh_kabi: deduplication friendly structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/61d2a751fe1b1305684d6c1899f26fa9e38ac0a9
|
||||
61d2a751fe1b1305684d6c1899f26fa9e38ac0a9 redhat: rh_kabi add a comment with warning about RH_KABI_EXCLUDE usage
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7d09cb3ea3dd2f3cda5a6a31be429f259106ca61
|
||||
7d09cb3ea3dd2f3cda5a6a31be429f259106ca61 redhat: rh_kabi: introduce RH_KABI_EXTEND_WITH_SIZE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c0c51c6f123df02948e11680d9b90324593ba547
|
||||
c0c51c6f123df02948e11680d9b90324593ba547 redhat: rh_kabi: Indirect EXTEND macros so nesting of other macros will resolve.
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/96b20c70b39cd28efcec2336417cb0db9ff7853c
|
||||
96b20c70b39cd28efcec2336417cb0db9ff7853c redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference operator
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/198030a81d85dbac8f4030e69d3d376327433487
|
||||
198030a81d85dbac8f4030e69d3d376327433487 redhat: rh_kabi: Add macros to size and extend structs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/695af00ed9e393abe88d9ee4de3702c15ded186d
|
||||
695af00ed9e393abe88d9ee4de3702c15ded186d Removing Obsolete hba pci-ids from rhel8
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/736038bd8039d1543468c1dc8925f20929645804
|
||||
736038bd8039d1543468c1dc8925f20929645804 mptsas: pci-id table changes
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/83cdf2924bdcc90c433a58129b4501e10b1295dc
|
||||
83cdf2924bdcc90c433a58129b4501e10b1295dc mptspi: pci-id table changes
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0b634d81ed7f0730e13d720508dbaa6ab94e54d2
|
||||
0b634d81ed7f0730e13d720508dbaa6ab94e54d2 qla2xxx: Remove PCI IDs of deprecated adapter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/0d11491f9e7fe0c8c301db3256cb47c66ae8450f
|
||||
0d11491f9e7fe0c8c301db3256cb47c66ae8450f hpsa: remove old cciss-based smartarray pci ids
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/75f69a4f7b8f9d38c5efb0231186ed8726e526f2
|
||||
75f69a4f7b8f9d38c5efb0231186ed8726e526f2 kernel: add SUPPORT_REMOVED kernel taint
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/50081b0865239d853d77bc71e54d13fad8bac9f0
|
||||
50081b0865239d853d77bc71e54d13fad8bac9f0 Rename RH_DISABLE_DEPRECATED to RHEL_DIFFERENCES
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/dc84f3cc1b19a0524e58a382c382f34081dc6c35
|
||||
dc84f3cc1b19a0524e58a382c382f34081dc6c35 s390: Lock down the kernel when the IPL secure flag is set
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/cb55378c04d6516f303e98061ec7ddd6563429a8
|
||||
cb55378c04d6516f303e98061ec7ddd6563429a8 efi: Lock down the kernel if booted in secure boot mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/9b06e1f07c3cc9e1d0533b8615426d4d5d9e4ebb
|
||||
9b06e1f07c3cc9e1d0533b8615426d4d5d9e4ebb efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/db249925c6802b38d910927e4d032af1e00bee56
|
||||
db249925c6802b38d910927e4d032af1e00bee56 security: lockdown: expose a hook to lock the kernel down
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f9604bcd305aba2a94e713ee758a51143687ae9f
|
||||
f9604bcd305aba2a94e713ee758a51143687ae9f Make get_cert_list() use efi_status_to_str() to print error messages.
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/b75eb3e922c93d78d4190a759f5725e856d35439
|
||||
b75eb3e922c93d78d4190a759f5725e856d35439 Add efi_status_to_str() and rework efi_status_to_err().
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/2f80042d6b8199fceadf3623243402066e0cd4ea
|
||||
2f80042d6b8199fceadf3623243402066e0cd4ea Add support for deprecating processors
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/5a3b4f5754788e42db8ed550b359382b600f2b08
|
||||
5a3b4f5754788e42db8ed550b359382b600f2b08 arm: aarch64: Drop the EXPERT setting from ARM64_FORCE_52BIT
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/36cd5d0a0aa0a3be8ac385ca8991563c9e58227f
|
||||
36cd5d0a0aa0a3be8ac385ca8991563c9e58227f iommu/arm-smmu: workaround DMA mode issues
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ca34010e072550c8d5ea57f9436bab254c3521cc
|
||||
ca34010e072550c8d5ea57f9436bab254c3521cc rh_kabi: introduce RH_KABI_EXCLUDE
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/26054e2c4e2253fe955a351971dc6b931cb68961
|
||||
26054e2c4e2253fe955a351971dc6b931cb68961 ipmi: do not configure ipmi for HPE m400
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/9cb0f734492a21a7e506d7145caf143ccd927b2a
|
||||
9cb0f734492a21a7e506d7145caf143ccd927b2a kABI: Add generic kABI macros to use for kABI workarounds
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/4960e5ee4a0e9bb28e512eb35cfa633ac4552049
|
||||
4960e5ee4a0e9bb28e512eb35cfa633ac4552049 add pci_hw_vendor_status()
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/291c4e2878431fd6937c5b9248babe8ec8d4233e
|
||||
291c4e2878431fd6937c5b9248babe8ec8d4233e ahci: thunderx2: Fix for errata that affects stop engine
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/996869cc0b3e78cb9182a4ebced2c46ee2774935
|
||||
996869cc0b3e78cb9182a4ebced2c46ee2774935 Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/c1c7a887998ab12c5a1180c4bca3b41c31fe4aa6
|
||||
c1c7a887998ab12c5a1180c4bca3b41c31fe4aa6 bpf: set unprivileged_bpf_disabled to 1 by default, add a boot parameter
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e40c9d10474d1a5b5f7f01175a72ba4a3c7f5e8e
|
||||
e40c9d10474d1a5b5f7f01175a72ba4a3c7f5e8e add Red Hat-specific taint flags
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/f23f446b724fbb79c1e09a278fcb427fc29c0c05
|
||||
f23f446b724fbb79c1e09a278fcb427fc29c0c05 tags.sh: Ignore redhat/rpm
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a68aa65a20fba1908a7326e5321ce8bc39a9ae14
|
||||
a68aa65a20fba1908a7326e5321ce8bc39a9ae14 put RHEL info into generated headers
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/80937f1973d73fccdc75db4026fbed7cba16f489
|
||||
80937f1973d73fccdc75db4026fbed7cba16f489 aarch64: acpi scan: Fix regression related to X-Gene UARTs
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/3362fd10fe075b48ff8af023da5643bc9477a4c6
|
||||
3362fd10fe075b48ff8af023da5643bc9477a4c6 ACPI / irq: Workaround firmware issue on X-Gene based m400
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/ffc66b174954abecfb360dcc3b98c3139ef12d96
|
||||
ffc66b174954abecfb360dcc3b98c3139ef12d96 modules: add rhelversion MODULE_INFO tag
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/7e469c23b8f648d79e8a0e82ee41cda0e50b2f19
|
||||
7e469c23b8f648d79e8a0e82ee41cda0e50b2f19 ACPI: APEI: arm64: Ignore broken HPE moonshot APEI support
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/a0f49117d038de2d4db4940f5f039addb2f7231d
|
||||
a0f49117d038de2d4db4940f5f039addb2f7231d Add Red Hat tainting
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/fa67c16e780ed355f9847da90e8055ad1175c238
|
||||
fa67c16e780ed355f9847da90e8055ad1175c238 Introduce CONFIG_RH_DISABLE_DEPRECATED
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/e7e1371803470a7840dc61da628cb912834ec149
|
||||
e7e1371803470a7840dc61da628cb912834ec149 Pull the RHEL version defines out of the Makefile
|
||||
|
||||
https://gitlab.com/cki-project/kernel-ark/-/commit/84d1d3e3d0c2c7ed1f571c8495bad3b4d97cfa8e
|
||||
84d1d3e3d0c2c7ed1f571c8495bad3b4d97cfa8e [initial commit] Add Red Hat variables in the top level makefile
|
||||
|
||||
25
README.rst
25
README.rst
|
|
@ -1,25 +0,0 @@
|
|||
===================
|
||||
The Kernel dist-git
|
||||
===================
|
||||
|
||||
The kernel is maintained in a `source tree`_ rather than directly in dist-git.
|
||||
The specfile is maintained as a `template`_ in the source tree along with a set
|
||||
of build scripts to generate configurations, (S)RPMs, and to populate the
|
||||
dist-git repository.
|
||||
|
||||
The `documentation`_ for the source tree covers how to contribute and maintain
|
||||
the tree.
|
||||
|
||||
If you're looking for the downstream patch set it's available in the source
|
||||
tree with "git log master..ark-patches" or
|
||||
`online`_.
|
||||
|
||||
Each release in dist-git is tagged in the source repository so you can easily
|
||||
check out the source tree for a build. The tags are in the format
|
||||
name-version-release, but note release doesn't contain the dist tag since the
|
||||
source can be built in different build roots (Fedora, CentOS, etc.)
|
||||
|
||||
.. _source tree: https://gitlab.com/cki-project/kernel-ark.git
|
||||
.. _template: https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template
|
||||
.. _documentation: https://gitlab.com/cki-project/kernel-ark/-/wikis/home
|
||||
.. _online: https://gitlab.com/cki-project/kernel-ark/-/commits/ark-patches
|
||||
78
README.txt
Normal file
78
README.txt
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
Kernel package tips & tricks.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The kernel is one of the more complicated packages in the distro, and
|
||||
for the newcomer, some of the voodoo in the spec file can be somewhat scary.
|
||||
This file attempts to document some of the magic.
|
||||
|
||||
|
||||
Speeding up make prep
|
||||
---------------------
|
||||
The kernel is nearly 500MB of source code, and as such, 'make prep'
|
||||
takes a while. The spec file employs some trickery so that repeated
|
||||
invocations of make prep don't take as long. Ordinarily the %prep
|
||||
phase of a package will delete the tree it is about to untar/patch.
|
||||
The kernel %prep keeps around an unpatched version of the tree,
|
||||
and makes a symlink tree clone of that clean tree and than applies
|
||||
the patches listed in the spec to the symlink tree.
|
||||
This makes a huge difference if you're doing multiple make preps a day.
|
||||
As an added bonus, doing a diff between the clean tree and the symlink
|
||||
tree is slightly faster than it would be doing two proper copies of the tree.
|
||||
|
||||
|
||||
Build logs.
|
||||
-----------
|
||||
There's a convenience helper script in scripts/grab-logs.sh
|
||||
that will grab the build logs from koji for the kernel version reported
|
||||
by make verrel
|
||||
|
||||
|
||||
Config hierarchy.
|
||||
-----------------
|
||||
Instead of having to maintain a config file for every arch variant we build on,
|
||||
the kernel spec uses a nested system of configs. Each option CONFIG_FOO is
|
||||
represented by a single file named CONFIG_FOO which contains the state (=y, =m,
|
||||
=n). These options are collected in the folder base-generic. Architecture
|
||||
specific options are set in nested folders. An option set in a nested folder
|
||||
will override the same option set in one of the higher levels.
|
||||
|
||||
The individual CONFIG_FOO files only exist in the pkg-git repository. The RPM
|
||||
contains kernel-foo.config files which are the result of combining all the
|
||||
CONFIG_FOO files. The files are combined by running build_configs.sh. This
|
||||
script _must_ be run each time one of the options is changed.
|
||||
|
||||
Example flow:
|
||||
|
||||
# Enable the option CONFIG_ABC123 as a module for all arches
|
||||
echo "CONFIG_ABC123=m" > configs/base-generic/CONFIG_ABC1234
|
||||
# enable the option CONFIG_XYZ321 for only x86
|
||||
echo "# CONFIG_XYZ321 is not set" > configs/base-generic/CONFIG_XYZ321
|
||||
echo "CONFIG_XYZ321=m" > configs/base-generic/x86/CONFIG_XYZ321
|
||||
# regenerate the combined config files
|
||||
./build_configs.sh
|
||||
|
||||
The file config_generation gives a listing of what folders go into each
|
||||
config file generated.
|
||||
|
||||
Debug options.
|
||||
--------------
|
||||
This is a little complicated, as the purpose & meaning of this changes
|
||||
depending on where we are in the release cycle.
|
||||
If we are building for a current stable release, 'make release' has
|
||||
typically been run already, which sets up the following..
|
||||
- Two builds occur, a 'kernel' and a 'kernel-debug' flavor.
|
||||
- kernel-debug will get various heavyweight debugging options like
|
||||
lockdep etc turned on.
|
||||
|
||||
If we are building for rawhide, 'make debug' has been run, which changes
|
||||
the status quo to:
|
||||
- We only build one kernel 'kernel'
|
||||
- The debug options are always turned on.
|
||||
This is done to increase coverage testing, as not many people actually
|
||||
run kernel-debug.
|
||||
|
||||
The debug options are managed in a separate heierarchy under base-debug. This
|
||||
works in a similar manner to base-generic. More deeply nested folders, again,
|
||||
override options. The file config_generation gives a listing of what folders
|
||||
go into each config file generated.
|
||||
10
TODO
Normal file
10
TODO
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Config TODOs:
|
||||
* review & disable a bunch of the I2C, RTC, DVB, SOUND options.
|
||||
|
||||
Spec file TODOs:
|
||||
|
||||
* modules-extra: Do a few more things to make it a bit more robust.
|
||||
- Allow for comments in the mod-extra.list file.
|
||||
- Don't fail the build if a module is listed but not built (maybe).
|
||||
- See if it can be tied into Kconfig instead of module names.
|
||||
|
||||
1385
arm-sun8i-realtek-phy-fixes.patch
Normal file
1385
arm-sun8i-realtek-phy-fixes.patch
Normal file
File diff suppressed because it is too large
Load diff
122
arm64-dts-allwinner-a64-OrangePi-Win-Fix-ethernet-node.patch
Normal file
122
arm64-dts-allwinner-a64-OrangePi-Win-Fix-ethernet-node.patch
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
From patchwork Thu Oct 22 18:58:39 2020
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?=
|
||||
<jernej.skrabec@siol.net>
|
||||
X-Patchwork-Id: 11851815
|
||||
Return-Path:
|
||||
<SRS0=FtUi=D5=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
|
||||
DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,
|
||||
MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,
|
||||
USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 49923C4363A
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Thu, 22 Oct 2020 18:54:57 +0000 (UTC)
|
||||
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.kernel.org (Postfix) with ESMTPS id BE42824630
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Thu, 22 Oct 2020 18:54:56 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=lists.infradead.org
|
||||
header.i=@lists.infradead.org header.b="MwGMWls5"
|
||||
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE42824630
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dmarc=fail (p=none dis=none) header.from=siol.net
|
||||
Authentication-Results: mail.kernel.org;
|
||||
spf=none
|
||||
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
|
||||
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
|
||||
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
|
||||
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
|
||||
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
|
||||
bh=qw218/k563L/SgvRNrMcHuGAohVj+G+njRSUxTbH4/Y=; b=MwGMWls5lB6ROxeraw8NFhva87
|
||||
YclCqRbQf+4ALNGb51xUAobhmcRTMH8XN28wcc+cyGlR5v7vxgiiNdTbv1vehjJbQXoeZBexYeBfo
|
||||
Cz7p7c9v/iMpOj3EEnV7lvZjjScYq9K9eNA6LUfpe8hHTGaZR9o1Jabq7SoDK53cc9bOqa7KuWrTK
|
||||
eAkzQIt/0knwigxs/j0BjfhNkW6CCJwypTEWGy1hmrPmclEbgEx0CsvX6qFShyY//T7fn2LtIuSRh
|
||||
Z5GL2jc1VfMLRCzJKt8Nut7dq9NRPDaemSH5rZUo4U+/TbbTHZpcSTMxaJmHLyqGkX2mi4/WVEleF
|
||||
aU2kJPNA==;
|
||||
Received: from localhost ([::1] helo=merlin.infradead.org)
|
||||
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kVfiG-0001Av-7F; Thu, 22 Oct 2020 18:53:24 +0000
|
||||
Received: from mailoutvs7.siol.net ([185.57.226.198] helo=mail.siol.net)
|
||||
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kVfiD-00019b-Hk
|
||||
for linux-arm-kernel@lists.infradead.org; Thu, 22 Oct 2020 18:53:22 +0000
|
||||
Received: from localhost (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTP id A66DD528530;
|
||||
Thu, 22 Oct 2020 20:53:17 +0200 (CEST)
|
||||
X-Virus-Scanned: amavisd-new at psrvmta10.zcs-production.pri
|
||||
Received: from mail.siol.net ([127.0.0.1])
|
||||
by localhost (psrvmta10.zcs-production.pri [127.0.0.1]) (amavisd-new,
|
||||
port 10032)
|
||||
with ESMTP id ivWpOrxbe1hZ; Thu, 22 Oct 2020 20:53:17 +0200 (CEST)
|
||||
Received: from mail.siol.net (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTPS id 5ADFE528565;
|
||||
Thu, 22 Oct 2020 20:53:17 +0200 (CEST)
|
||||
Received: from kista.localdomain (cpe1-5-97.cable.triera.net [213.161.5.97])
|
||||
(Authenticated sender: 031275009)
|
||||
by mail.siol.net (Postfix) with ESMTPSA id A9CFB528530;
|
||||
Thu, 22 Oct 2020 20:53:15 +0200 (CEST)
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
To: mripard@kernel.org,
|
||||
wens@csie.org
|
||||
Subject: [PATCH] arm64: dts: allwinner: a64: OrangePi Win: Fix ethernet node
|
||||
Date: Thu, 22 Oct 2020 20:58:39 +0200
|
||||
Message-Id: <20201022185839.2779245-1-jernej.skrabec@siol.net>
|
||||
X-Mailer: git-send-email 2.29.0
|
||||
MIME-Version: 1.0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20201022_145321_724045_AE21B375
|
||||
X-CRM114-Status: GOOD ( 11.21 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.29
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com,
|
||||
robh+dt@kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
|
||||
RX/TX delay on OrangePi Win board is set on PHY. Reflect that in
|
||||
ethernet node.
|
||||
|
||||
Fixes: 93d6a27cfcc0 ("arm64: dts: allwinner: a64: Orange Pi Win: Add Ethernet node")
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
|
||||
index d894ec5fa8a1..70e31743f0ba 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
|
||||
@@ -120,7 +120,7 @@ &ehci1 {
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii_pins>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
status = "okay";
|
||||
122
arm64-dts-allwinner-h5-OrangePi-PC2-Fix-ethernet-node.patch
Normal file
122
arm64-dts-allwinner-h5-OrangePi-PC2-Fix-ethernet-node.patch
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
From patchwork Fri Oct 23 18:48:58 2020
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?=
|
||||
<jernej.skrabec@siol.net>
|
||||
X-Patchwork-Id: 11854423
|
||||
Return-Path:
|
||||
<SRS0=LoId=D6=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
|
||||
DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,
|
||||
MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,
|
||||
USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 1D6FCC55178
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Fri, 23 Oct 2020 18:45:31 +0000 (UTC)
|
||||
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.kernel.org (Postfix) with ESMTPS id 9531820882
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Fri, 23 Oct 2020 18:45:30 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=lists.infradead.org
|
||||
header.i=@lists.infradead.org header.b="wAWD/7i6"
|
||||
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9531820882
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dmarc=fail (p=none dis=none) header.from=siol.net
|
||||
Authentication-Results: mail.kernel.org;
|
||||
spf=none
|
||||
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
|
||||
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
|
||||
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
|
||||
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
|
||||
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
|
||||
bh=m06Ef3z67s1OKeS6vZi5U49+kjyVHbPq652p5RSY8mw=; b=wAWD/7i6V6QQknGeu4aP+whAUL
|
||||
x+z9xyIqngbq6nK4751GTRCn1anrtUOgwa69I01dBHGS3T2eEubbswHl7oaGbxDaExz+CVi4cNZPu
|
||||
lnsvfpHGiuhlTSaehcEvP4mmL+nr6RuZR65moYl2NGuTdO7KVH9BEjw1hLXZSCojWHoSZGDWKiUob
|
||||
3Z9qYd+scPoCh0OWUG8DNmx3o/7paRsyC7+6aKWIrGKCjjfcldGG8DLOQacJFZUK5jvdXHtBxNpBU
|
||||
+lTNQzxYTXc/8UEz0j7B+NE8vnFR8zkiyixd6Z8U/XbRc9cOWKjGaSYnH9RHdTL1c4caLfmpAgCEC
|
||||
Ce+Bw/5Q==;
|
||||
Received: from localhost ([::1] helo=merlin.infradead.org)
|
||||
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kW22O-0002CR-V4; Fri, 23 Oct 2020 18:43:40 +0000
|
||||
Received: from mailoutvs25.siol.net ([185.57.226.216] helo=mail.siol.net)
|
||||
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kW22K-00023f-Rr
|
||||
for linux-arm-kernel@lists.infradead.org; Fri, 23 Oct 2020 18:43:38 +0000
|
||||
Received: from localhost (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTP id 72D2C52828D;
|
||||
Fri, 23 Oct 2020 20:43:34 +0200 (CEST)
|
||||
X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri
|
||||
Received: from mail.siol.net ([127.0.0.1])
|
||||
by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new,
|
||||
port 10032)
|
||||
with ESMTP id TVbMFK320epr; Fri, 23 Oct 2020 20:43:34 +0200 (CEST)
|
||||
Received: from mail.siol.net (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTPS id 2F71D5282BB;
|
||||
Fri, 23 Oct 2020 20:43:34 +0200 (CEST)
|
||||
Received: from kista.localdomain (cpe1-5-97.cable.triera.net [213.161.5.97])
|
||||
(Authenticated sender: 031275009)
|
||||
by mail.siol.net (Postfix) with ESMTPSA id 91F0A52828D;
|
||||
Fri, 23 Oct 2020 20:43:33 +0200 (CEST)
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
To: mripard@kernel.org,
|
||||
wens@csie.org
|
||||
Subject: [PATCH] arm64: dts: allwinner: h5: OrangePi PC2: Fix ethernet node
|
||||
Date: Fri, 23 Oct 2020 20:48:58 +0200
|
||||
Message-Id: <20201023184858.3272918-1-jernej.skrabec@siol.net>
|
||||
X-Mailer: git-send-email 2.29.0
|
||||
MIME-Version: 1.0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20201023_144337_054453_04C86957
|
||||
X-CRM114-Status: GOOD ( 10.84 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.29
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com,
|
||||
robh+dt@kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
|
||||
RX and TX delay are provided by ethernet PHY. Reflect that in ethernet
|
||||
node.
|
||||
|
||||
Fixes: 44a94c7ef989 ("arm64: dts: allwinner: H5: Restore EMAC changes")
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
index 7d7aad18f078..8bf2db9dcbda 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
|
||||
@@ -123,7 +123,7 @@ &emac {
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
145
arm64-dts-allwinner-h5-OrangePi-Prime-Fix-ethernet-node.patch
Normal file
145
arm64-dts-allwinner-h5-OrangePi-Prime-Fix-ethernet-node.patch
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
From patchwork Wed Oct 28 11:58:17 2020
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Nenad Peric <nperic@gmail.com>
|
||||
X-Patchwork-Id: 11862711
|
||||
Return-Path:
|
||||
<SRS0=AM15=ED=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,
|
||||
DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,
|
||||
FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,
|
||||
SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT
|
||||
autolearn=ham autolearn_force=no version=3.4.0
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id F41EBC4363A
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Wed, 28 Oct 2020 12:00:20 +0000 (UTC)
|
||||
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.kernel.org (Postfix) with ESMTPS id 595FD246DD
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Wed, 28 Oct 2020 12:00:20 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=lists.infradead.org
|
||||
header.i=@lists.infradead.org header.b="DqpmXmwL";
|
||||
dkim=fail reason="signature verification failed" (2048-bit key)
|
||||
header.d=gmail.com header.i=@gmail.com header.b="uWoqSVv7"
|
||||
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 595FD246DD
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dmarc=fail (p=none dis=none) header.from=gmail.com
|
||||
Authentication-Results: mail.kernel.org;
|
||||
spf=none
|
||||
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
|
||||
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
|
||||
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
|
||||
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
|
||||
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
|
||||
bh=iM3IMk6QdBKQv1Dkn6VfsoTDd+paWW6N4SwFo4W/pT4=; b=DqpmXmwLqnlvs85L9x+K5eSfiz
|
||||
GN+E05H0DMF5+zVOP8gpXahEpMhg887f5sEvbNMLlYIh1BouAijiz8nS1noh/UC2rU7ozned7uJr0
|
||||
mpD/7Of1OZL6brTPOJhrBPDGlUqchkrOdGTf0VxbGUDhCtvw5FdvoWWuzquj79JyvSZa/H++CkbcR
|
||||
74W9DixoNvOZfs1v73N2NSlegmqLDWzTRd66zMqeroN+xYHDOUxHT+Us2GyVh+NALSdRi5j5k5/p0
|
||||
OPrQ1NhT566jHS2BIEusfdUO1EwskEuqpvuTzQ+n5rLr+bb+YrOMoUGwJD3hW3XrOjmvOp0QRYT4y
|
||||
PpA6tS3Q==;
|
||||
Received: from localhost ([::1] helo=merlin.infradead.org)
|
||||
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kXk6L-0004MI-Ms; Wed, 28 Oct 2020 11:58:49 +0000
|
||||
Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643])
|
||||
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kXk6I-0004Ky-6g
|
||||
for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2020 11:58:47 +0000
|
||||
Received: by mail-ej1-x643.google.com with SMTP id s15so6783728ejf.8
|
||||
for <linux-arm-kernel@lists.infradead.org>;
|
||||
Wed, 28 Oct 2020 04:58:41 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
|
||||
h=from:to:cc:subject:date:message-id:mime-version
|
||||
:content-transfer-encoding;
|
||||
bh=blRKpHWKYllsC3fZsoBdHMYqC0YSHlFEixMlCc4fF1w=;
|
||||
b=uWoqSVv7/sXCFBs4uRVc7ZJnrRrLnXRL/+OZi80QKKTgvbfwumMUj5KjiHEfCDwRTT
|
||||
4l77Y7QqHNGwxkvw+86NlgbOJIbEGK4exb73CcG7bxXiIhUe0N903Cdh3FQo3A0tl3q2
|
||||
VVSy51o6KCEFVvO6WPGI4jxOMAYccyYb5zEX6DU9nVjW78QVsyJC3woh3PIjNjhr0gi7
|
||||
zA6Fm+EE9Jqof6qEe3uaZElg1mUFZEfpLNHtDSERMYtGr66mYG8lcT8onl0aY8Ew4dz/
|
||||
2ChThQ8iNbHXpa+VJlmskDf+WUndSWm2VHt4ifMPz4XZVW8mfQK3LdkpOO3eHP+1+v9D
|
||||
bUgw==
|
||||
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
d=1e100.net; s=20161025;
|
||||
h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
|
||||
:content-transfer-encoding;
|
||||
bh=blRKpHWKYllsC3fZsoBdHMYqC0YSHlFEixMlCc4fF1w=;
|
||||
b=hcuII+cyYhy8NEgTGUVf1GusA61FKRDd5S51ziFO8yqmI5ZdmGcKRcE4XkA6MARqT/
|
||||
p6/yBHuLVLBQPsG/E2eFHnOxgHwmJJmnuDcEXyDibj5CH8vVabKPmQV8g9u2OEv74Ufj
|
||||
kSq2G5ZusReaIPfB/Jvku/zM7npReCYZRfoY+b1WbfTbIkKX7hKqBJfRH6oHfFfsUYCx
|
||||
jmtUyxX/iQ+zxA7QyGtpPNFQ01FngfkP8RiQOn9j8HlniGdHePpx38xZVwIk2Xw7cZTt
|
||||
WMlSTduDbqferQ4kvVHhS45swesUf0j17cl8/ulI2gsIypm+BXpMVT1EbNo1cLX6938G
|
||||
BZ4g==
|
||||
X-Gm-Message-State: AOAM533DIdRxZEJdUOkrAMKw6EuWX0vUxXnqmbiqmy7O/RXzqjgvJ39e
|
||||
PumNgB/8sggQCFj5Ra/GWBk=
|
||||
X-Google-Smtp-Source:
|
||||
ABdhPJz86BOoINx8fEi+KX53QXqf+HoCczR0skh70fOJrBPW6LQi7RmJY8byNi8zXcJRJpwKsL5dUw==
|
||||
X-Received: by 2002:a17:906:3689:: with SMTP id
|
||||
a9mr7090398ejc.403.1603886320892;
|
||||
Wed, 28 Oct 2020 04:58:40 -0700 (PDT)
|
||||
Received: from localhost.localdomain ([87.116.178.171])
|
||||
by smtp.googlemail.com with ESMTPSA id f13sm2817210ejf.42.2020.10.28.04.58.39
|
||||
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
|
||||
Wed, 28 Oct 2020 04:58:40 -0700 (PDT)
|
||||
From: Nenad Peric <nperic@gmail.com>
|
||||
To: mripard@kernel.org,
|
||||
wens@csie.org,
|
||||
jernej.skrabec@siol.net
|
||||
Subject: [PATCH] arm64: dts: allwinner: h5: OrangePi Prime: Fix ethernet node
|
||||
Date: Wed, 28 Oct 2020 12:58:17 +0100
|
||||
Message-Id: <20201028115817.68113-1-nperic@gmail.com>
|
||||
X-Mailer: git-send-email 2.29.1
|
||||
MIME-Version: 1.0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20201028_075846_256245_4AB671AE
|
||||
X-CRM114-Status: GOOD ( 13.60 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.29
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-sunxi@googlegroups.com, robh+dt@kernel.org,
|
||||
Nenad Peric <nperic@gmail.com>, linux-arm-kernel@lists.infradead.org
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
|
||||
RX and TX delay are provided by ethernet PHY. Reflect that in ethernet
|
||||
node.
|
||||
|
||||
Fixes: 44a94c7ef989 ("arm64: dts: allwinner: H5: Restore EMAC changes")
|
||||
Signed-off-by: Nenad Peric <nperic@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
|
||||
index cb44bfa5981f..33ab44072e6d 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-prime.dts
|
||||
@@ -124,7 +124,7 @@ &emac {
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
125
arm64-dts-allwinner-h6-Pine-H64-Fix-ethernet-node.patch
Normal file
125
arm64-dts-allwinner-h6-Pine-H64-Fix-ethernet-node.patch
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
From patchwork Fri Oct 23 19:49:02 2020
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?=
|
||||
<jernej.skrabec@siol.net>
|
||||
X-Patchwork-Id: 11854475
|
||||
Return-Path:
|
||||
<SRS0=LoId=D6=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org>
|
||||
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
|
||||
aws-us-west-2-korg-lkml-1.web.codeaurora.org
|
||||
X-Spam-Level:
|
||||
X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH,
|
||||
DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,
|
||||
MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,
|
||||
USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0
|
||||
Received: from mail.kernel.org (mail.kernel.org [198.145.29.99])
|
||||
by smtp.lore.kernel.org (Postfix) with ESMTP id 63302C388F9
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Fri, 23 Oct 2020 19:46:07 +0000 (UTC)
|
||||
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
|
||||
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
|
||||
(No client certificate requested)
|
||||
by mail.kernel.org (Postfix) with ESMTPS id CEC072192A
|
||||
for <linux-arm-kernel@archiver.kernel.org>;
|
||||
Fri, 23 Oct 2020 19:46:06 +0000 (UTC)
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dkim=pass (2048-bit key) header.d=lists.infradead.org
|
||||
header.i=@lists.infradead.org header.b="RmcUbgOY"
|
||||
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEC072192A
|
||||
Authentication-Results: mail.kernel.org;
|
||||
dmarc=fail (p=none dis=none) header.from=siol.net
|
||||
Authentication-Results: mail.kernel.org;
|
||||
spf=none
|
||||
smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
|
||||
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
|
||||
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
|
||||
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
|
||||
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
|
||||
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
|
||||
bh=hLIZ2EP9nRbAti/wOrMDo1OIucNmHPYmeTz9hC5PCnA=; b=RmcUbgOYDKWjn2s7pGDpTPSI3x
|
||||
NuaDIYVWecJeYRkyIuo17CVfM2stKi4Z2NgNQifJYES97ZiPYblSPwx8eg5L8R896LrleIrASB1tG
|
||||
fqNpALWJk2GUtdXzkVIf1KlBlEuNBalgVfd7eIKKmXDbJI8cV3i37nnYQ/1rlYiMU3U6jtVqNd847
|
||||
0D3CMcyW2AKeG2+xCXrf+KeIytwkQDz51Wq/SkpZUJIEicBzg++3/yzKB9ZAf1v4le8V5SndXYoOL
|
||||
MN5fti8tO6Ox0KBvfzl7IfPOM4whPwduDXDUYhnWvBw4q7UHqsaIylAT18U1u7i+j127WKNb3oChK
|
||||
g1kLDIng==;
|
||||
Received: from localhost ([::1] helo=merlin.infradead.org)
|
||||
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kW2yv-000840-7O; Fri, 23 Oct 2020 19:44:09 +0000
|
||||
Received: from mailoutvs25.siol.net ([185.57.226.216] helo=mail.siol.net)
|
||||
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
|
||||
id 1kW2yT-0007t0-4y
|
||||
for linux-arm-kernel@lists.infradead.org; Fri, 23 Oct 2020 19:43:42 +0000
|
||||
Received: from localhost (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTP id 126DA528120;
|
||||
Fri, 23 Oct 2020 21:43:36 +0200 (CEST)
|
||||
X-Virus-Scanned: amavisd-new at psrvmta11.zcs-production.pri
|
||||
Received: from mail.siol.net ([127.0.0.1])
|
||||
by localhost (psrvmta11.zcs-production.pri [127.0.0.1]) (amavisd-new,
|
||||
port 10032)
|
||||
with ESMTP id rEXZf2IX2IaY; Fri, 23 Oct 2020 21:43:35 +0200 (CEST)
|
||||
Received: from mail.siol.net (localhost [127.0.0.1])
|
||||
by mail.siol.net (Postfix) with ESMTPS id C4F7052818E;
|
||||
Fri, 23 Oct 2020 21:43:35 +0200 (CEST)
|
||||
Received: from kista.localdomain (cpe1-5-97.cable.triera.net [213.161.5.97])
|
||||
(Authenticated sender: 031275009)
|
||||
by mail.siol.net (Postfix) with ESMTPSA id 52CA9528176;
|
||||
Fri, 23 Oct 2020 21:43:35 +0200 (CEST)
|
||||
From: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
To: mripard@kernel.org,
|
||||
wens@csie.org
|
||||
Subject: [PATCH] arm64: dts: allwinner: h6: Pine H64: Fix ethernet node
|
||||
Date: Fri, 23 Oct 2020 21:49:02 +0200
|
||||
Message-Id: <20201023194902.368239-1-jernej.skrabec@siol.net>
|
||||
X-Mailer: git-send-email 2.29.0
|
||||
MIME-Version: 1.0
|
||||
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
|
||||
X-CRM114-CacheID: sfid-20201023_154341_497396_834DE64F
|
||||
X-CRM114-Status: GOOD ( 11.24 )
|
||||
X-BeenThere: linux-arm-kernel@lists.infradead.org
|
||||
X-Mailman-Version: 2.1.29
|
||||
Precedence: list
|
||||
List-Id: <linux-arm-kernel.lists.infradead.org>
|
||||
List-Unsubscribe:
|
||||
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
|
||||
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
|
||||
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
|
||||
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
|
||||
List-Subscribe:
|
||||
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
|
||||
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
|
||||
Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com,
|
||||
robh+dt@kernel.org, linux-kernel@vger.kernel.org,
|
||||
linux-arm-kernel@lists.infradead.org
|
||||
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
|
||||
Errors-To:
|
||||
linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org
|
||||
|
||||
Ethernet PHY provides RX and TX delay on both models, A and B. Although
|
||||
schematic for model A suggests only TX delay, network never worked with
|
||||
such configuration.
|
||||
|
||||
Fix ethernet node to reflect PHY delays.
|
||||
|
||||
Fixes: 729e1ffcf47e ("arm64: allwinner: h6: add support for the Ethernet on Pine H64")
|
||||
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
|
||||
---
|
||||
arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
|
||||
index af85b2074867..961732c52aa0 100644
|
||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
|
||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
|
||||
@@ -100,7 +100,7 @@ &ehci3 {
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ext_rgmii_pins>;
|
||||
- phy-mode = "rgmii";
|
||||
+ phy-mode = "rgmii-id";
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
allwinner,rx-delay-ps = <200>;
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
From a58d581e212b3acbc65e56384e6bc60bb109f29a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Fri, 7 Aug 2020 15:51:42 +0100
|
||||
Subject: [PATCH] arm64: tegra: Use valid PWM period for VDD_GPU on Tegra210
|
||||
|
||||
From: Thierry Reding <treding@nvidia.com>
|
||||
|
||||
The PWM on Tegra210 can run at a maximum frequency of 48 MHz and cannot
|
||||
reach the minimum period is 5334 ns. The currently configured period of
|
||||
4880 ns is not within the valid range, so set it to 8000 ns. This value
|
||||
was taken from the downstream DTS files and seems to work fine.
|
||||
|
||||
Signed-off-by: Thierry Reding <treding@nvidia.com>
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
|
||||
index cc6ed45a2b485..e2e984a75f601 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi
|
||||
@@ -346,7 +346,7 @@ regulators {
|
||||
vdd_gpu: regulator@100 {
|
||||
compatible = "pwm-regulator";
|
||||
reg = <100>;
|
||||
- pwms = <&pwm 1 4880>;
|
||||
+ pwms = <&pwm 1 8000>;
|
||||
regulator-name = "VDD_GPU";
|
||||
regulator-min-microvolt = <710000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
|
||||
index 9bc52fdb393c8..ebaac57853138 100644
|
||||
--- a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
|
||||
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
|
||||
@@ -789,7 +789,7 @@ vdd_cpu: regulator@5 {
|
||||
vdd_gpu: regulator@6 {
|
||||
compatible = "pwm-regulator";
|
||||
reg = <6>;
|
||||
- pwms = <&pwm 1 4880>;
|
||||
+ pwms = <&pwm 1 8000>;
|
||||
regulator-name = "VDD_GPU";
|
||||
regulator-min-microvolt = <710000>;
|
||||
regulator-max-microvolt = <1320000>;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
1
build_configs.sh
Symbolic link
1
build_configs.sh
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
configs/build_configs.sh
|
||||
166
check-kabi
Executable file → Normal file
166
check-kabi
Executable file → Normal file
|
|
@ -1,166 +0,0 @@
|
|||
#!/usr/bin/python3
|
||||
#
|
||||
# check-kabi - Red Hat kABI reference checking tool
|
||||
#
|
||||
# We use this script to check against reference Module.kabi files.
|
||||
#
|
||||
# Author: Jon Masters <jcm@redhat.com>
|
||||
# Copyright (C) 2007-2009 Red Hat, Inc.
|
||||
#
|
||||
# This software may be freely redistributed under the terms of the GNU
|
||||
# General Public License (GPL).
|
||||
|
||||
# Changelog:
|
||||
#
|
||||
# 2018/06/01 - Update for python3 by Petr Oros.
|
||||
# 2009/08/15 - Updated for use in RHEL6.
|
||||
# 2007/06/13 - Initial rewrite in python by Jon Masters.
|
||||
|
||||
__author__ = "Jon Masters <jcm@redhat.com>"
|
||||
__version__ = "2.0"
|
||||
__date__ = "2009/08/15"
|
||||
__copyright__ = "Copyright (C) 2007-2009 Red Hat, Inc"
|
||||
__license__ = "GPL"
|
||||
|
||||
import getopt
|
||||
import string
|
||||
import sys
|
||||
|
||||
true = 1
|
||||
false = 0
|
||||
|
||||
|
||||
def load_symvers(symvers, filename):
|
||||
"""Load a Module.symvers file."""
|
||||
|
||||
symvers_file = open(filename, "r")
|
||||
|
||||
while true:
|
||||
in_line = symvers_file.readline()
|
||||
if in_line == "":
|
||||
break
|
||||
if in_line == "\n":
|
||||
continue
|
||||
checksum, symbol, directory, type, *ns = in_line.split()
|
||||
ns = ns[0] if ns else None
|
||||
|
||||
symvers[symbol] = in_line[0:-1]
|
||||
|
||||
|
||||
def load_kabi(kabi, filename):
|
||||
"""Load a Module.kabi file."""
|
||||
|
||||
kabi_file = open(filename, "r")
|
||||
|
||||
while true:
|
||||
in_line = kabi_file.readline()
|
||||
if in_line == "":
|
||||
break
|
||||
if in_line == "\n":
|
||||
continue
|
||||
checksum, symbol, directory, type, *ns = in_line.split()
|
||||
ns = ns[0] if ns else None
|
||||
|
||||
kabi[symbol] = in_line[0:-1]
|
||||
|
||||
|
||||
def check_kabi(symvers, kabi):
|
||||
"""Check Module.kabi and Module.symvers files."""
|
||||
|
||||
fail = 0
|
||||
warn = 0
|
||||
changed_symbols = []
|
||||
moved_symbols = []
|
||||
ns_symbols = []
|
||||
|
||||
for symbol in kabi:
|
||||
abi_hash, abi_sym, abi_dir, abi_type, *abi_ns = kabi[symbol].split()
|
||||
abi_ns = abi_ns[0] if abi_ns else None
|
||||
if symbol in symvers:
|
||||
sym_hash, sym_sym, sym_dir, sym_type, *sym_ns = symvers[symbol].split()
|
||||
sym_ns = sym_ns[0] if sym_ns else None
|
||||
if abi_hash != sym_hash:
|
||||
fail = 1
|
||||
changed_symbols.append(symbol)
|
||||
|
||||
if abi_dir != sym_dir:
|
||||
warn = 1
|
||||
moved_symbols.append(symbol)
|
||||
|
||||
if abi_ns != sym_ns:
|
||||
warn = 1
|
||||
ns_symbols.append(symbol)
|
||||
else:
|
||||
fail = 1
|
||||
changed_symbols.append(symbol)
|
||||
|
||||
if fail:
|
||||
print("*** ERROR - ABI BREAKAGE WAS DETECTED ***")
|
||||
print("")
|
||||
print("The following symbols have been changed (this will cause an ABI breakage):")
|
||||
print("")
|
||||
for symbol in changed_symbols:
|
||||
print(symbol)
|
||||
print("")
|
||||
|
||||
if warn:
|
||||
print("*** WARNING - ABI SYMBOLS MOVED ***")
|
||||
if moved_symbols:
|
||||
print("")
|
||||
print("The following symbols moved (typically caused by moving a symbol from being")
|
||||
print("provided by the kernel vmlinux out to a loadable module):")
|
||||
print("")
|
||||
for symbol in moved_symbols:
|
||||
print(symbol)
|
||||
print("")
|
||||
if ns_symbols:
|
||||
print("")
|
||||
print("The following symbols changed symbol namespaces:")
|
||||
print("")
|
||||
for symbol in ns_symbols:
|
||||
print(symbol)
|
||||
print("")
|
||||
|
||||
"""Halt the build, if we got errors and/or warnings. In either case,
|
||||
double-checkig is required to avoid introducing / concealing
|
||||
KABI inconsistencies."""
|
||||
if fail or warn:
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def usage():
|
||||
print("""
|
||||
check-kabi: check Module.kabi and Module.symvers files.
|
||||
|
||||
check-kabi [ -k Module.kabi ] [ -s Module.symvers ]
|
||||
|
||||
""")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
symvers_file = ""
|
||||
kabi_file = ""
|
||||
|
||||
opts, args = getopt.getopt(sys.argv[1:], 'hk:s:')
|
||||
|
||||
for o, v in opts:
|
||||
if o == "-s":
|
||||
symvers_file = v
|
||||
if o == "-h":
|
||||
usage()
|
||||
sys.exit(0)
|
||||
if o == "-k":
|
||||
kabi_file = v
|
||||
|
||||
if (symvers_file == "") or (kabi_file == ""):
|
||||
usage()
|
||||
sys.exit(1)
|
||||
|
||||
symvers = {}
|
||||
kabi = {}
|
||||
|
||||
load_symvers(symvers, symvers_file)
|
||||
load_kabi(kabi, kabi_file)
|
||||
check_kabi(symvers, kabi)
|
||||
22
check_configs.awk
Executable file
22
check_configs.awk
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/awk -f
|
||||
|
||||
/is not set/ {
|
||||
split ($0, a, "#");
|
||||
split(a[2], b);
|
||||
if (NR==FNR) {
|
||||
configs[b[1]]="is not set";
|
||||
} else {
|
||||
if (configs[b[1]] != "" && configs[b[1]] != "is not set")
|
||||
print "Found # "b[1] " is not set, after generation, had " b[1] " " configs[b[1]] " in Fedora tree";
|
||||
}
|
||||
}
|
||||
|
||||
/=/ {
|
||||
split ($0, a, "=");
|
||||
if (NR==FNR) {
|
||||
configs[a[1]]=a[2];
|
||||
} else {
|
||||
if (configs[a[1]] != "" && configs[a[1]] != a[2])
|
||||
print "Found "a[1]"="configs[a[1]]" after generation, had " a[1]"="a[2]" in Fedora tree";
|
||||
}
|
||||
}
|
||||
1
config_generation
Symbolic link
1
config_generation
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
configs/config_generation
|
||||
159
configs/build_configs.sh
Executable file
159
configs/build_configs.sh
Executable file
|
|
@ -0,0 +1,159 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This script merges together the hierarchy of CONFIG_* files under generic
|
||||
# and debug to form the necessary $PACKAGE_NAME<version>-<arch>-<variant>.config
|
||||
# files for building RHEL kernels, based on the contents of a control file
|
||||
|
||||
PACKAGE_NAME="${1:-kernel}" # defines the package name used
|
||||
KVERREL="${2:-}"
|
||||
SUBARCH="${3:-}" # defines a specific arch
|
||||
SCRIPT="$(readlink -f $0)"
|
||||
OUTPUT_DIR="$PWD"
|
||||
SCRIPT_DIR="$(dirname $SCRIPT)"
|
||||
|
||||
LANG=en_US.UTF-8
|
||||
|
||||
# to handle this script being a symlink
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
set errexit
|
||||
set nounset
|
||||
|
||||
cleanup()
|
||||
{
|
||||
rm -f config-*
|
||||
}
|
||||
|
||||
die()
|
||||
{
|
||||
echo "$1"
|
||||
cleanup
|
||||
exit 1
|
||||
}
|
||||
|
||||
function combine_config_layer()
|
||||
{
|
||||
dir=$1
|
||||
file="config-$(echo $dir | sed -e 's|/|-|g')"
|
||||
|
||||
if [ $(ls $dir/ | grep -c "^CONFIG_") -eq 0 ]; then
|
||||
touch $file
|
||||
return
|
||||
fi
|
||||
|
||||
cat $dir/CONFIG_* > $file
|
||||
}
|
||||
|
||||
function merge_configs()
|
||||
{
|
||||
archvar=$1
|
||||
arch=$(echo "$archvar" | cut -f1 -d"-")
|
||||
configs=$2
|
||||
order=$3
|
||||
flavor=$4
|
||||
|
||||
name=$OUTPUT_DIR/$PACKAGE_NAME-$archvar-$flavor.config
|
||||
echo -n "Building $name ... "
|
||||
touch config-merging config-merged
|
||||
|
||||
# apply based on order
|
||||
skip_if_missing=""
|
||||
for o in $order
|
||||
do
|
||||
for config in $(echo $configs | sed -e 's/:/ /g')
|
||||
do
|
||||
cfile="config-$o-$config"
|
||||
|
||||
test -n "$skip_if_missing" && test ! -e $cfile && continue
|
||||
|
||||
perl merge.pl $cfile config-merging > config-merged
|
||||
if [ ! $? -eq 0 ]; then
|
||||
die "Failed to merge $cfile"
|
||||
fi
|
||||
mv config-merged config-merging
|
||||
done
|
||||
|
||||
# first configs in $order is baseline, all files should be
|
||||
# there. second pass is overrides and can be missing.
|
||||
skip_if_missing="1"
|
||||
done
|
||||
if [ "x$arch" == "xaarch64" ]; then
|
||||
echo "# arm64" > $name
|
||||
elif [ "x$arch" == "xppc64le" ]; then
|
||||
echo "# powerpc" > $name
|
||||
elif [ "x$arch" == "xs390x" ]; then
|
||||
echo "# s390" > $name
|
||||
elif [ "x$arch" == "xarmv7hl" ]; then
|
||||
echo "# arm" > $name
|
||||
elif [ "x$arch" == "xi686" ]; then
|
||||
echo "# i386" > $name
|
||||
else
|
||||
echo "# $arch" > $name
|
||||
fi
|
||||
sort config-merging >> $name
|
||||
rm -f config-merged config-merging
|
||||
echo "done"
|
||||
}
|
||||
|
||||
function build_flavor()
|
||||
{
|
||||
flavor=$1
|
||||
control_file="priority".$flavor
|
||||
while read line
|
||||
do
|
||||
if [ $(echo "$line" | grep -c "^#") -ne 0 ]; then
|
||||
continue
|
||||
elif [ $(echo "$line" | grep -c "^$") -ne 0 ]; then
|
||||
continue
|
||||
elif [ $(echo "$line" | grep -c "^EMPTY") -ne 0 ]; then
|
||||
empty=$(echo "$line" | cut -f2 -d"=")
|
||||
for a in $empty
|
||||
do
|
||||
echo "# EMPTY" > $OUTPUT_DIR/$PACKAGE_NAME-$a-$flavor.config
|
||||
|
||||
done
|
||||
elif [ $(echo "$line" | grep -c "^ORDER") -ne 0 ]; then
|
||||
order=$(echo "$line" | cut -f2 -d"=")
|
||||
for o in $order
|
||||
do
|
||||
glist=$(find $o -type d)
|
||||
for d in $glist
|
||||
do
|
||||
combine_config_layer $d
|
||||
done
|
||||
done
|
||||
else
|
||||
arch=$(echo "$line" | cut -f1 -d"=")
|
||||
configs=$(echo "$line" | cut -f2 -d"=")
|
||||
|
||||
if [ -n "$SUBARCH" ]; then
|
||||
case $arch in
|
||||
$SUBARCH*)
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
esac
|
||||
fi
|
||||
|
||||
merge_configs $arch $configs "$order" $flavor
|
||||
fi
|
||||
done < $control_file
|
||||
}
|
||||
|
||||
while read line
|
||||
do
|
||||
build_flavor $line
|
||||
done < flavors
|
||||
|
||||
# A passed in kernel version implies copy to final location
|
||||
# otherwise defer to another script
|
||||
if test -n "$KVERREL"
|
||||
then
|
||||
for i in kernel-*.config
|
||||
do
|
||||
NEW="$(echo $i | sed "s/$PACKAGE_NAME-$SUBARCH/$PACKAGE_NAME-$KVERREL-$SUBARCH/")"
|
||||
mv $i $NEW
|
||||
done
|
||||
fi
|
||||
|
||||
cleanup
|
||||
1
configs/fedora/debug/CONFIG_ACPI_DEBUG
Normal file
1
configs/fedora/debug/CONFIG_ACPI_DEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ACPI_DEBUG=y
|
||||
1
configs/fedora/debug/CONFIG_ARM_PTDUMP_DEBUGFS
Normal file
1
configs/fedora/debug/CONFIG_ARM_PTDUMP_DEBUGFS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ARM_PTDUMP_DEBUGFS=y
|
||||
1
configs/fedora/debug/CONFIG_ATH_DEBUG
Normal file
1
configs/fedora/debug/CONFIG_ATH_DEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ATH_DEBUG=y
|
||||
1
configs/fedora/debug/CONFIG_B43LEGACY_DEBUG
Normal file
1
configs/fedora/debug/CONFIG_B43LEGACY_DEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_B43LEGACY_DEBUG=y
|
||||
1
configs/fedora/debug/CONFIG_B43_DEBUG
Normal file
1
configs/fedora/debug/CONFIG_B43_DEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_B43_DEBUG=y
|
||||
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION=y
|
||||
1
configs/fedora/debug/CONFIG_BPF_KPROBE_OVERRIDE
Normal file
1
configs/fedora/debug/CONFIG_BPF_KPROBE_OVERRIDE
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BPF_KPROBE_OVERRIDE=y
|
||||
1
configs/fedora/debug/CONFIG_BTRFS_ASSERT
Normal file
1
configs/fedora/debug/CONFIG_BTRFS_ASSERT
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BTRFS_ASSERT=y
|
||||
1
configs/fedora/debug/CONFIG_CAN_DEBUG_DEVICES
Normal file
1
configs/fedora/debug/CONFIG_CAN_DEBUG_DEVICES
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_CAN_DEBUG_DEVICES=y
|
||||
1
configs/fedora/debug/CONFIG_CARL9170_DEBUGFS
Normal file
1
configs/fedora/debug/CONFIG_CARL9170_DEBUGFS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_CARL9170_DEBUGFS=y
|
||||
1
configs/fedora/debug/CONFIG_CEPH_LIB_PRETTYDEBUG
Normal file
1
configs/fedora/debug/CONFIG_CEPH_LIB_PRETTYDEBUG
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_CEPH_LIB_PRETTYDEBUG=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_ATOMIC_SLEEP
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_ATOMIC_SLEEP
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_ATOMIC_SLEEP=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_CREDENTIALS
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_CREDENTIALS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_CREDENTIALS=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_FORCE_WEAK_PER_CPU
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_FORCE_WEAK_PER_CPU
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_KMEMLEAK
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_KMEMLEAK
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_KMEMLEAK=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=4096
|
||||
1
configs/fedora/debug/CONFIG_DEBUG_LOCK_ALLOC
Normal file
1
configs/fedora/debug/CONFIG_DEBUG_LOCK_ALLOC
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_DEBUG_LOCK_ALLOC=y
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue