Linux v5.8.4 rebase
Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
This commit is contained in:
parent
13d534d28a
commit
d5f320566e
600 changed files with 11657 additions and 3368 deletions
|
|
@ -48,7 +48,7 @@ Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
|||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
|
||||
index 822402480f7d..3f87d8602560 100644
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Patch for disconnect issues with storage attached to a
|
|||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||
index fc748c731832..7d35e12de70f 100644
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Signed-off-by: Peter Jones <pjones@redhat.com>
|
|||
2 files changed, 96 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
|
||||
index 4e3055238f31..36ca9e2943ce 100644
|
||||
index fdd1db025dbf..8ef7d1df09dd 100644
|
||||
--- a/drivers/firmware/efi/efi.c
|
||||
+++ b/drivers/firmware/efi/efi.c
|
||||
@@ -31,6 +31,7 @@
|
||||
|
|
@ -26,7 +26,7 @@ index 4e3055238f31..36ca9e2943ce 100644
|
|||
|
||||
#include <asm/early_ioremap.h>
|
||||
|
||||
@@ -828,40 +829,101 @@ int efi_mem_type(unsigned long phys_addr)
|
||||
@@ -831,40 +832,101 @@ int efi_mem_type(unsigned long phys_addr)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -160,10 +160,10 @@ index 4e3055238f31..36ca9e2943ce 100644
|
|||
|
||||
static DEFINE_SPINLOCK(efi_mem_reserve_persistent_lock);
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 9430d01c0c3d..51503bf118ab 100644
|
||||
index 05c47f857383..2e2f9f608f68 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -42,6 +42,8 @@
|
||||
@@ -43,6 +43,8 @@
|
||||
#define EFI_ABORTED (21 | (1UL << (BITS_PER_LONG-1)))
|
||||
#define EFI_SECURITY_VIOLATION (26 | (1UL << (BITS_PER_LONG-1)))
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ index 9430d01c0c3d..51503bf118ab 100644
|
|||
typedef unsigned long efi_status_t;
|
||||
typedef u8 efi_bool_t;
|
||||
typedef u16 efi_char16_t; /* UNICODE character */
|
||||
@@ -825,6 +827,7 @@ static inline bool efi_rt_services_supported(unsigned int mask)
|
||||
@@ -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);
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 7f37a6d0658a..c88ee0e8ce6e 100644
|
||||
index 2e0700a451e5..77e7e749d7e5 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -1126,6 +1126,7 @@ config XEN
|
||||
@@ -1133,6 +1133,7 @@ config XEN
|
||||
config FORCE_MAX_ZONEORDER
|
||||
int
|
||||
default "14" if (ARM64_64K_PAGES && TRANSPARENT_HUGEPAGE)
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ Subject: [PATCH] Drop that for now
|
|||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 3d65d1153aac..0e2fb7fe2675 100644
|
||||
index 37cfb39d77af..c65a263990ae 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -479,7 +479,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
|
||||
@@ -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 \
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
From 92c547f35f4852908f40c2861d9b9d10e0c5099b Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Sun, 28 Jun 2020 16:48:50 +0100
|
||||
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.
|
||||
|
|
@ -15,25 +15,20 @@ 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>
|
||||
Reported-by: kbuild test robot <lkp@intel.com>
|
||||
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
|
||||
---
|
||||
V3:
|
||||
* Removed MCFG address hardcoding in pci_mcfg.c file
|
||||
* Started using 'dbi_base' for accessing root port's own config space
|
||||
* and using 'config_base' for accessing config space of downstream hierarchy
|
||||
|
||||
V2:
|
||||
* Fixed build issues reported by kbuild test bot
|
||||
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 +
|
||||
4 files changed, 111 insertions(+), 1 deletion(-)
|
||||
5 files changed, 117 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index 6b347d9920cc2..7071814081736 100644
|
||||
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[] = {
|
||||
|
|
@ -50,8 +45,44 @@ index 6b347d9920cc2..7071814081736 100644
|
|||
#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 8a637cfcf6e99..76a6c52b8500e 100644
|
||||
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
|
||||
|
|
@ -60,16 +91,16 @@ index 8a637cfcf6e99..76a6c52b8500e 100644
|
|||
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
|
||||
|
||||
# The following drivers are for devices that use the generic ACPI
|
||||
@@ -33,4 +32,5 @@ obj-$(CONFIG_PCIE_UNIPHIER) += pcie-uniphier.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 ae30a2fd3716a..571b39c5cac63 100644
|
||||
index 92b77f7d83546..7b3d581795197 100644
|
||||
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
|
||||
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
|
||||
@@ -22,6 +22,8 @@
|
||||
|
|
@ -169,7 +200,7 @@ index ae30a2fd3716a..571b39c5cac63 100644
|
|||
+ return (void __iomem *)(pcie->config_base + where);
|
||||
+}
|
||||
+
|
||||
+struct pci_ecam_ops tegra194_pcie_ops = {
|
||||
+const struct pci_ecam_ops tegra194_pcie_ops = {
|
||||
+ .bus_shift = 20,
|
||||
+ .init = tegra194_acpi_init,
|
||||
+ .pci_ops = {
|
||||
|
|
@ -185,7 +216,7 @@ index ae30a2fd3716a..571b39c5cac63 100644
|
|||
static inline struct tegra_pcie_dw *to_tegra_pcie(struct dw_pcie *pci)
|
||||
{
|
||||
return container_of(pci, struct tegra_pcie_dw, pci);
|
||||
@@ -2406,3 +2505,6 @@ MODULE_DEVICE_TABLE(of, tegra_pcie_dw_of_match);
|
||||
@@ -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");
|
||||
|
|
@ -193,17 +224,17 @@ index ae30a2fd3716a..571b39c5cac63 100644
|
|||
+#endif /* CONFIG_PCIE_TEGRA194 */
|
||||
+
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index a73164c85e78b..6156140dcbb65 100644
|
||||
index 1af5cb02ef7f9..3fb16ada505a0 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -57,6 +57,7 @@ extern struct pci_ecam_ops pci_thunder_ecam_ops; /* Cavium ThunderX 1.x */
|
||||
extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops; /* APM X-Gene PCIe v1 */
|
||||
extern struct pci_ecam_ops xgene_v2_pcie_ecam_ops; /* APM X-Gene PCIe v2.x */
|
||||
extern struct pci_ecam_ops al_pcie_ops; /* Amazon Annapurna Labs PCIe */
|
||||
+extern struct pci_ecam_ops tegra194_pcie_ops; /* Tegra194 PCIe */
|
||||
@@ -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
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_COMMON
|
||||
#if IS_ENABLED(CONFIG_PCI_HOST_COMMON)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Tue, 10 Mar 2020 13:52:41 +0100
|
||||
Subject: [PATCH] PCI: brcmstb: Wait for Raspberry Pi's firmware when present
|
||||
|
||||
xHCI's PCI fixup, run at the end of pcie-brcmstb's probe, depends on
|
||||
RPi4's VideoCore firmware interface to be up and running. It's possible
|
||||
for both initializations to race, so make sure it's available prior to
|
||||
starting.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/pci/controller/pcie-brcmstb.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
|
||||
index 6d79d14527a6..aee84679a997 100644
|
||||
--- a/drivers/pci/controller/pcie-brcmstb.c
|
||||
+++ b/drivers/pci/controller/pcie-brcmstb.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
#include "../pci.h"
|
||||
|
||||
/* BRCM_PCIE_CAP_REGS - Offset for the mandatory capability config regs */
|
||||
@@ -917,11 +919,24 @@ static int brcm_pcie_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node, *msi_np;
|
||||
struct pci_host_bridge *bridge;
|
||||
+ struct device_node *fw_np;
|
||||
struct brcm_pcie *pcie;
|
||||
struct pci_bus *child;
|
||||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
+ /*
|
||||
+ * We have to wait for the Raspberry Pi's firmware interface to be up
|
||||
+ * as some PCI fixups depend on it.
|
||||
+ */
|
||||
+ fw_np = of_find_compatible_node(NULL, NULL,
|
||||
+ "raspberrypi,bcm2835-firmware");
|
||||
+ if (fw_np && !rpi_firmware_get(fw_np)) {
|
||||
+ of_node_put(fw_np);
|
||||
+ return -EPROBE_DEFER;
|
||||
+ }
|
||||
+ of_node_put(fw_np);
|
||||
+
|
||||
bridge = devm_pci_alloc_host_bridge(&pdev->dev, sizeof(*pcie));
|
||||
if (!bridge)
|
||||
return -ENOMEM;
|
||||
--
|
||||
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
|
||||
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Tue, 10 Mar 2020 13:52:42 +0100
|
||||
Subject: [PATCH] USB: pci-quirks: Add Raspberry Pi 4 quirk
|
||||
|
||||
On the Raspberry Pi 4, after a PCI reset, VL805's firmware may either be
|
||||
loaded directly from an EEPROM or, if not present, by the SoC's
|
||||
VideCore. Inform VideCore that VL805 was just reset.
|
||||
|
||||
Also, as this creates a dependency between XHCI_PCI and VideoCore's
|
||||
firmware interface, reflect that on the firmware interface Kconfg.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
---
|
||||
drivers/firmware/Kconfig | 1 +
|
||||
drivers/usb/host/pci-quirks.c | 16 ++++++++++++++++
|
||||
2 files changed, 17 insertions(+)
|
||||
|
||||
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
|
||||
index 8007d4aa76dc..7ca346d3d337 100644
|
||||
--- a/drivers/firmware/Kconfig
|
||||
+++ b/drivers/firmware/Kconfig
|
||||
@@ -180,6 +180,7 @@ config ISCSI_IBFT
|
||||
config RASPBERRYPI_FIRMWARE
|
||||
tristate "Raspberry Pi Firmware Driver"
|
||||
depends on BCM2835_MBOX
|
||||
+ default XHCI_PCI
|
||||
help
|
||||
This option enables support for communicating with the firmware on the
|
||||
Raspberry Pi.
|
||||
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
|
||||
index beb2efa71341..0dc34668bb2a 100644
|
||||
--- a/drivers/usb/host/pci-quirks.c
|
||||
+++ b/drivers/usb/host/pci-quirks.c
|
||||
@@ -16,6 +16,9 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/dmi.h>
|
||||
+
|
||||
+#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
+
|
||||
#include "pci-quirks.h"
|
||||
#include "xhci-ext-caps.h"
|
||||
|
||||
@@ -1243,11 +1246,24 @@ static void quirk_usb_handoff_xhci(struct pci_dev *pdev)
|
||||
|
||||
static void quirk_usb_early_handoff(struct pci_dev *pdev)
|
||||
{
|
||||
+ int ret;
|
||||
+
|
||||
/* Skip Netlogic mips SoC's internal PCI USB controller.
|
||||
* This device does not need/support EHCI/OHCI handoff
|
||||
*/
|
||||
if (pdev->vendor == 0x184e) /* vendor Netlogic */
|
||||
return;
|
||||
+
|
||||
+ if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) {
|
||||
+ ret = rpi_firmware_init_vl805(pdev);
|
||||
+ if (ret) {
|
||||
+ /* Firmware might be outdated, or something failed */
|
||||
+ dev_warn(&pdev->dev,
|
||||
+ "Failed to load VL805's firmware: %d. Will continue to attempt to work, but bad things might happen. You should fix this...\n",
|
||||
+ ret);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
|
||||
pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
|
||||
pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -36,10 +36,10 @@ Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
|||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||
index ca9ed5774eb1..bd0cee4236b0 100644
|
||||
index 2ea61abd5830..abb314891f5b 100644
|
||||
--- a/drivers/pci/quirks.c
|
||||
+++ b/drivers/pci/quirks.c
|
||||
@@ -4183,6 +4183,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
|
||||
@@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
|
|||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
|
||||
index 6d3448895382..221255007dc8 100644
|
||||
index 8777faced51a..2e60d792005f 100644
|
||||
--- a/drivers/acpi/scan.c
|
||||
+++ b/drivers/acpi/scan.c
|
||||
@@ -1563,6 +1563,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||
@@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zou Wei <zou_wei@huawei.com>
|
||||
Date: Tue, 21 Apr 2020 20:37:31 +0800
|
||||
Subject: [PATCH] acr: Use kmemdup instead of kmalloc and memcpy
|
||||
|
||||
Fixes coccicheck warning:
|
||||
|
||||
drivers/gpu/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:103:23-30: WARNING opportunity for kmemdup
|
||||
drivers/gpu/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:113:22-29: WARNING opportunity for kmemdup
|
||||
|
||||
Fixes: 22dcda45a3d1 ("drivers/gpu/drm/nouveau/acr: implement new subdev to replace "secure boot"")
|
||||
Reported-by: Hulk Robot <hulkci@huawei.com>
|
||||
Signed-off-by: Zou Wei <zou_wei@huawei.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c | 12 ++++--------
|
||||
1 file changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
|
||||
index aecce2dac558..667fa016496e 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c
|
||||
@@ -100,25 +100,21 @@ nvkm_acr_hsfw_load_image(struct nvkm_acr *acr, const char *name, int ver,
|
||||
hsfw->data_size = lhdr->data_size;
|
||||
|
||||
hsfw->sig.prod.size = fwhdr->sig_prod_size;
|
||||
- hsfw->sig.prod.data = kmalloc(hsfw->sig.prod.size, GFP_KERNEL);
|
||||
+ hsfw->sig.prod.data = kmemdup(fw->data + fwhdr->sig_prod_offset + sig,
|
||||
+ hsfw->sig.prod.size, GFP_KERNEL);
|
||||
if (!hsfw->sig.prod.data) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
- memcpy(hsfw->sig.prod.data, fw->data + fwhdr->sig_prod_offset + sig,
|
||||
- hsfw->sig.prod.size);
|
||||
-
|
||||
hsfw->sig.dbg.size = fwhdr->sig_dbg_size;
|
||||
- hsfw->sig.dbg.data = kmalloc(hsfw->sig.dbg.size, GFP_KERNEL);
|
||||
+ hsfw->sig.dbg.data = kmemdup(fw->data + fwhdr->sig_dbg_offset + sig,
|
||||
+ hsfw->sig.dbg.size, GFP_KERNEL);
|
||||
if (!hsfw->sig.dbg.data) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
- memcpy(hsfw->sig.dbg.data, fw->data + fwhdr->sig_dbg_offset + sig,
|
||||
- hsfw->sig.dbg.size);
|
||||
-
|
||||
hsfw->sig.patch_loc = loc;
|
||||
done:
|
||||
nvkm_firmware_put(fw);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -21,10 +21,10 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 5d513f461957..7f37a6d0658a 100644
|
||||
index 66dc41fd49f2..2e0700a451e5 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -858,7 +858,7 @@ endchoice
|
||||
@@ -861,7 +861,7 @@ endchoice
|
||||
|
||||
config ARM64_FORCE_52BIT
|
||||
bool "Force 52-bit virtual addresses for userspace"
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ Signed-off-by: Jon Masters <jcm@redhat.com>
|
|||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
|
||||
index c77c93c485a0..f808c4e0727f 100644
|
||||
index 2ac74904a3ce..f0094424f76a 100644
|
||||
--- a/arch/arm/Kconfig
|
||||
+++ b/arch/arm/Kconfig
|
||||
@@ -1543,9 +1543,9 @@ config HIGHMEM
|
||||
@@ -1549,9 +1549,9 @@ config HIGHMEM
|
||||
If unsure, say n.
|
||||
|
||||
config HIGHPTE
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
From 786358ed986e4788b992d98e1d3b198a4e01a9d5 Mon Sep 17 00:00:00 2001
|
||||
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 13/13] arm64: dts: sun50i-a64-pinephone: Add touchscreen
|
||||
support
|
||||
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.
|
||||
|
|
@ -13,13 +12,13 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 85a7aa5efd326..2d5694446d176 100644
|
||||
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>;
|
||||
|
|
@ -41,7 +40,7 @@ index 85a7aa5efd326..2d5694446d176 100644
|
|||
+
|
||||
&i2c1 {
|
||||
status = "okay";
|
||||
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 3ac5eb0c8bc2da9e81e04fc6106a79b476ec9219 Mon Sep 17 00:00:00 2001
|
||||
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 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD support on
|
||||
Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: Enable LCD support on
|
||||
PinePhone
|
||||
|
||||
PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for
|
||||
|
|
@ -21,7 +21,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 06a775c41664b..3e99a87e9ce52 100644
|
||||
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 @@ / {
|
||||
|
|
@ -48,13 +48,13 @@ index 06a775c41664b..3e99a87e9ce52 100644
|
|||
+ 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 cefda145c3c9d..85a7aa5efd326 100644
|
||||
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>;
|
||||
|
|
@ -68,7 +68,7 @@ index cefda145c3c9d..85a7aa5efd326 100644
|
|||
@@ -84,6 +91,30 @@ &dai {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
+&de {
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
|
@ -99,14 +99,14 @@ index cefda145c3c9d..85a7aa5efd326 100644
|
|||
@@ -188,6 +219,10 @@ &r_pio {
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
+&r_pwm {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&r_rsb {
|
||||
status = "okay";
|
||||
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Ian King <colin.king@canonical.com>
|
||||
Date: Sat, 29 Feb 2020 00:53:07 +0000
|
||||
Subject: [PATCH] core/memory: remove redundant assignments to variable ret
|
||||
|
||||
The variable ret is being initialized with a value that is never
|
||||
read and it is being updated later with a new value. The initialization
|
||||
is redundant and can be removed.
|
||||
|
||||
Addresses-Coverity: ("Unused value")
|
||||
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/core/memory.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/memory.c b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
|
||||
index 4cc186262d34..38130ef272d6 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/core/memory.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/core/memory.c
|
||||
@@ -140,7 +140,7 @@ nvkm_memory_new(struct nvkm_device *device, enum nvkm_memory_target target,
|
||||
{
|
||||
struct nvkm_instmem *imem = device->imem;
|
||||
struct nvkm_memory *memory;
|
||||
- int ret = -ENOSYS;
|
||||
+ int ret;
|
||||
|
||||
if (unlikely(target != NVKM_MEM_TARGET_INST || !imem))
|
||||
return -ENOSYS;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
Date: Tue, 28 Apr 2020 18:54:03 +0200
|
||||
Subject: [PATCH] device: detect if changing endianness failed
|
||||
|
||||
v2: relax the checks a little
|
||||
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
.../gpu/drm/nouveau/nvkm/engine/device/base.c | 26 +++++++++++++++----
|
||||
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
index 37589f36546d..c732074bf790 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
@@ -2924,6 +2924,20 @@ nvkm_device_del(struct nvkm_device **pdevice)
|
||||
}
|
||||
}
|
||||
|
||||
+static inline bool
|
||||
+nvkm_device_endianness(void __iomem *pri)
|
||||
+{
|
||||
+ u32 boot1 = ioread32_native(pri + 0x000004) & 0x01000001;
|
||||
+#ifdef __BIG_ENDIAN
|
||||
+ if (!boot1)
|
||||
+ return false;
|
||||
+#else
|
||||
+ if (boot1)
|
||||
+ return false;
|
||||
+#endif
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
int
|
||||
nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
const struct nvkm_device_quirk *quirk,
|
||||
@@ -2973,13 +2987,15 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
/* identify the chipset, and determine classes of subdev/engines */
|
||||
if (detect) {
|
||||
/* switch mmio to cpu's native endianness */
|
||||
-#ifndef __BIG_ENDIAN
|
||||
- if (ioread32_native(map + 0x000004) != 0x00000000) {
|
||||
-#else
|
||||
- if (ioread32_native(map + 0x000004) == 0x00000000) {
|
||||
-#endif
|
||||
+ if (!nvkm_device_endianness(map)) {
|
||||
iowrite32_native(0x01000001, map + 0x000004);
|
||||
ioread32_native(map);
|
||||
+ if (!nvkm_device_endianness(map)) {
|
||||
+ nvdev_error(device,
|
||||
+ "GPU not supported on big-endian\n");
|
||||
+ ret = -ENOSYS;
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* read boot0 and strapping information */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
Date: Tue, 28 Apr 2020 18:54:04 +0200
|
||||
Subject: [PATCH] device: detect vGPUs
|
||||
|
||||
Using ENODEV as this prevents probe failed errors in dmesg.
|
||||
|
||||
v2: move check further down
|
||||
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 15 ++++++++++++---
|
||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
index c732074bf790..f977dddcd809 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
@@ -2948,7 +2948,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
{
|
||||
struct nvkm_subdev *subdev;
|
||||
u64 mmio_base, mmio_size;
|
||||
- u32 boot0, strap;
|
||||
+ u32 boot0, boot1, strap;
|
||||
void __iomem *map = NULL;
|
||||
int ret = -EEXIST, i;
|
||||
unsigned chipset;
|
||||
@@ -2998,9 +2998,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
}
|
||||
}
|
||||
|
||||
- /* read boot0 and strapping information */
|
||||
boot0 = ioread32_native(map + 0x000000);
|
||||
- strap = ioread32_native(map + 0x101000);
|
||||
|
||||
/* chipset can be overridden for devel/testing purposes */
|
||||
chipset = nvkm_longopt(device->cfgopt, "NvChipset", 0);
|
||||
@@ -3158,6 +3156,17 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
nvdev_info(device, "NVIDIA %s (%08x)\n",
|
||||
device->chip->name, boot0);
|
||||
|
||||
+ /* vGPU detection */
|
||||
+ boot1 = ioread32_native(map + 0x000004);
|
||||
+ if (device->card_type >= TU100 && (boot1 & 0x00030000)) {
|
||||
+ nvdev_info(device, "vGPUs are not supported\n");
|
||||
+ ret = -ENODEV;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ /* read strapping information */
|
||||
+ strap = ioread32_native(map + 0x101000);
|
||||
+
|
||||
/* determine frequency of timing crystal */
|
||||
if ( device->card_type <= NV_10 || device->chipset < 0x17 ||
|
||||
(device->chipset >= 0x20 && device->chipset < 0x25))
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
Date: Tue, 28 Apr 2020 18:54:02 +0200
|
||||
Subject: [PATCH] device: rework mmio mapping code to get rid of second map
|
||||
|
||||
Fixes warnings on GPUs with smaller a smaller mmio region like vGPUs.
|
||||
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
.../gpu/drm/nouveau/nvkm/engine/device/base.c | 27 ++++++++++---------
|
||||
1 file changed, 15 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
index 8ebbe1656008..37589f36546d 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
@@ -2935,7 +2935,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
struct nvkm_subdev *subdev;
|
||||
u64 mmio_base, mmio_size;
|
||||
u32 boot0, strap;
|
||||
- void __iomem *map;
|
||||
+ void __iomem *map = NULL;
|
||||
int ret = -EEXIST, i;
|
||||
unsigned chipset;
|
||||
|
||||
@@ -2961,12 +2961,17 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
mmio_base = device->func->resource_addr(device, 0);
|
||||
mmio_size = device->func->resource_size(device, 0);
|
||||
|
||||
- /* identify the chipset, and determine classes of subdev/engines */
|
||||
- if (detect) {
|
||||
- map = ioremap(mmio_base, 0x102000);
|
||||
- if (ret = -ENOMEM, map == NULL)
|
||||
+ if (detect || mmio) {
|
||||
+ map = ioremap(mmio_base, mmio_size);
|
||||
+ if (map == NULL) {
|
||||
+ nvdev_error(device, "unable to map PRI\n");
|
||||
+ ret = -ENOMEM;
|
||||
goto done;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+ /* identify the chipset, and determine classes of subdev/engines */
|
||||
+ if (detect) {
|
||||
/* switch mmio to cpu's native endianness */
|
||||
#ifndef __BIG_ENDIAN
|
||||
if (ioread32_native(map + 0x000004) != 0x00000000) {
|
||||
@@ -2980,7 +2985,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
/* read boot0 and strapping information */
|
||||
boot0 = ioread32_native(map + 0x000000);
|
||||
strap = ioread32_native(map + 0x101000);
|
||||
- iounmap(map);
|
||||
|
||||
/* chipset can be overridden for devel/testing purposes */
|
||||
chipset = nvkm_longopt(device->cfgopt, "NvChipset", 0);
|
||||
@@ -3159,12 +3163,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
device->name = device->chip->name;
|
||||
|
||||
if (mmio) {
|
||||
- device->pri = ioremap(mmio_base, mmio_size);
|
||||
- if (!device->pri) {
|
||||
- nvdev_error(device, "unable to map PRI\n");
|
||||
- ret = -ENOMEM;
|
||||
- goto done;
|
||||
- }
|
||||
+ device->pri = map;
|
||||
}
|
||||
|
||||
mutex_init(&device->mutex);
|
||||
@@ -3254,6 +3253,10 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
|
||||
ret = 0;
|
||||
done:
|
||||
+ if (map && (!mmio || ret)) {
|
||||
+ device->pri = NULL;
|
||||
+ iounmap(map);
|
||||
+ }
|
||||
mutex_unlock(&nv_devices_mutex);
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Thu, 30 Apr 2020 14:08:53 +1000
|
||||
Subject: [PATCH] device: use regular PRI accessors in chipset detection
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
.../gpu/drm/nouveau/nvkm/engine/device/base.c | 31 ++++++++-----------
|
||||
1 file changed, 13 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
index f977dddcd809..5b90c2a1bf3d 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
|
||||
@@ -2925,9 +2925,9 @@ nvkm_device_del(struct nvkm_device **pdevice)
|
||||
}
|
||||
|
||||
static inline bool
|
||||
-nvkm_device_endianness(void __iomem *pri)
|
||||
+nvkm_device_endianness(struct nvkm_device *device)
|
||||
{
|
||||
- u32 boot1 = ioread32_native(pri + 0x000004) & 0x01000001;
|
||||
+ u32 boot1 = nvkm_rd32(device, 0x000004) & 0x01000001;
|
||||
#ifdef __BIG_ENDIAN
|
||||
if (!boot1)
|
||||
return false;
|
||||
@@ -2949,7 +2949,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
struct nvkm_subdev *subdev;
|
||||
u64 mmio_base, mmio_size;
|
||||
u32 boot0, boot1, strap;
|
||||
- void __iomem *map = NULL;
|
||||
int ret = -EEXIST, i;
|
||||
unsigned chipset;
|
||||
|
||||
@@ -2976,8 +2975,8 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
mmio_size = device->func->resource_size(device, 0);
|
||||
|
||||
if (detect || mmio) {
|
||||
- map = ioremap(mmio_base, mmio_size);
|
||||
- if (map == NULL) {
|
||||
+ device->pri = ioremap(mmio_base, mmio_size);
|
||||
+ if (device->pri == NULL) {
|
||||
nvdev_error(device, "unable to map PRI\n");
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
@@ -2987,10 +2986,10 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
/* identify the chipset, and determine classes of subdev/engines */
|
||||
if (detect) {
|
||||
/* switch mmio to cpu's native endianness */
|
||||
- if (!nvkm_device_endianness(map)) {
|
||||
- iowrite32_native(0x01000001, map + 0x000004);
|
||||
- ioread32_native(map);
|
||||
- if (!nvkm_device_endianness(map)) {
|
||||
+ if (!nvkm_device_endianness(device)) {
|
||||
+ nvkm_wr32(device, 0x000004, 0x01000001);
|
||||
+ nvkm_rd32(device, 0x000000);
|
||||
+ if (!nvkm_device_endianness(device)) {
|
||||
nvdev_error(device,
|
||||
"GPU not supported on big-endian\n");
|
||||
ret = -ENOSYS;
|
||||
@@ -2998,7 +2997,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
}
|
||||
}
|
||||
|
||||
- boot0 = ioread32_native(map + 0x000000);
|
||||
+ boot0 = nvkm_rd32(device, 0x000000);
|
||||
|
||||
/* chipset can be overridden for devel/testing purposes */
|
||||
chipset = nvkm_longopt(device->cfgopt, "NvChipset", 0);
|
||||
@@ -3157,7 +3156,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
device->chip->name, boot0);
|
||||
|
||||
/* vGPU detection */
|
||||
- boot1 = ioread32_native(map + 0x000004);
|
||||
+ boot1 = nvkm_rd32(device, 0x0000004);
|
||||
if (device->card_type >= TU100 && (boot1 & 0x00030000)) {
|
||||
nvdev_info(device, "vGPUs are not supported\n");
|
||||
ret = -ENODEV;
|
||||
@@ -3165,7 +3164,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
}
|
||||
|
||||
/* read strapping information */
|
||||
- strap = ioread32_native(map + 0x101000);
|
||||
+ strap = nvkm_rd32(device, 0x101000);
|
||||
|
||||
/* determine frequency of timing crystal */
|
||||
if ( device->card_type <= NV_10 || device->chipset < 0x17 ||
|
||||
@@ -3187,10 +3186,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
if (!device->name)
|
||||
device->name = device->chip->name;
|
||||
|
||||
- if (mmio) {
|
||||
- device->pri = map;
|
||||
- }
|
||||
-
|
||||
mutex_init(&device->mutex);
|
||||
|
||||
for (i = 0; i < NVKM_SUBDEV_NR; i++) {
|
||||
@@ -3278,9 +3273,9 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
||||
|
||||
ret = 0;
|
||||
done:
|
||||
- if (map && (!mmio || ret)) {
|
||||
+ if (device->pri && (!mmio || ret)) {
|
||||
+ iounmap(device->pri);
|
||||
device->pri = NULL;
|
||||
- iounmap(map);
|
||||
}
|
||||
mutex_unlock(&nv_devices_mutex);
|
||||
return ret;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Thu, 13 Feb 2020 09:39:34 +1000
|
||||
Subject: [PATCH] disp/gv100-: expose capabilities class
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/include/nvif/class.h | 2 +
|
||||
.../gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 2 +
|
||||
.../drm/nouveau/nvkm/engine/disp/capsgv100.c | 60 +++++++++++++++++++
|
||||
.../drm/nouveau/nvkm/engine/disp/rootgv100.c | 1 +
|
||||
.../drm/nouveau/nvkm/engine/disp/rootnv50.h | 3 +
|
||||
.../drm/nouveau/nvkm/engine/disp/roottu102.c | 1 +
|
||||
6 files changed, 69 insertions(+)
|
||||
create mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/include/nvif/class.h b/drivers/gpu/drm/nouveau/include/nvif/class.h
|
||||
index 30659747ffe8..2c79beb41126 100644
|
||||
--- a/drivers/gpu/drm/nouveau/include/nvif/class.h
|
||||
+++ b/drivers/gpu/drm/nouveau/include/nvif/class.h
|
||||
@@ -89,6 +89,8 @@
|
||||
#define GV100_DISP /* cl5070.h */ 0x0000c370
|
||||
#define TU102_DISP /* cl5070.h */ 0x0000c570
|
||||
|
||||
+#define GV100_DISP_CAPS 0x0000c373
|
||||
+
|
||||
#define NV31_MPEG 0x00003174
|
||||
#define G82_MPEG 0x00008274
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
|
||||
index 0d584d0da59c..f7af648e0c17 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
|
||||
@@ -74,6 +74,8 @@ nvkm-y += nvkm/engine/disp/rootgp102.o
|
||||
nvkm-y += nvkm/engine/disp/rootgv100.o
|
||||
nvkm-y += nvkm/engine/disp/roottu102.o
|
||||
|
||||
+nvkm-y += nvkm/engine/disp/capsgv100.o
|
||||
+
|
||||
nvkm-y += nvkm/engine/disp/channv50.o
|
||||
nvkm-y += nvkm/engine/disp/changf119.o
|
||||
nvkm-y += nvkm/engine/disp/changv100.o
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c
|
||||
new file mode 100644
|
||||
index 000000000000..5026e530f4bb
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/capsgv100.c
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ * Copyright 2020 Red Hat Inc.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the "Software"),
|
||||
+ * to deal in the Software without restriction, including without limitation
|
||||
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
+ * and/or sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+#define gv100_disp_caps(p) container_of((p), struct gv100_disp_caps, object)
|
||||
+#include "rootnv50.h"
|
||||
+
|
||||
+struct gv100_disp_caps {
|
||||
+ struct nvkm_object object;
|
||||
+ struct nv50_disp *disp;
|
||||
+};
|
||||
+
|
||||
+static int
|
||||
+gv100_disp_caps_map(struct nvkm_object *object, void *argv, u32 argc,
|
||||
+ enum nvkm_object_map *type, u64 *addr, u64 *size)
|
||||
+{
|
||||
+ struct gv100_disp_caps *caps = gv100_disp_caps(object);
|
||||
+ struct nvkm_device *device = caps->disp->base.engine.subdev.device;
|
||||
+ *type = NVKM_OBJECT_MAP_IO;
|
||||
+ *addr = 0x640000 + device->func->resource_addr(device, 0);
|
||||
+ *size = 0x1000;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct nvkm_object_func
|
||||
+gv100_disp_caps = {
|
||||
+ .map = gv100_disp_caps_map,
|
||||
+};
|
||||
+
|
||||
+int
|
||||
+gv100_disp_caps_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
|
||||
+ struct nv50_disp *disp, struct nvkm_object **pobject)
|
||||
+{
|
||||
+ struct gv100_disp_caps *caps;
|
||||
+
|
||||
+ if (!(caps = kzalloc(sizeof(*caps), GFP_KERNEL)))
|
||||
+ return -ENOMEM;
|
||||
+ *pobject = &caps->object;
|
||||
+
|
||||
+ nvkm_object_ctor(&gv100_disp_caps, oclass, &caps->object);
|
||||
+ caps->disp = disp;
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgv100.c
|
||||
index 9c658d632d37..47efb48d769a 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgv100.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootgv100.c
|
||||
@@ -27,6 +27,7 @@
|
||||
static const struct nv50_disp_root_func
|
||||
gv100_disp_root = {
|
||||
.user = {
|
||||
+ {{-1,-1,GV100_DISP_CAPS }, gv100_disp_caps_new },
|
||||
{{0,0,GV100_DISP_CURSOR }, gv100_disp_curs_new },
|
||||
{{0,0,GV100_DISP_WINDOW_IMM_CHANNEL_DMA}, gv100_disp_wimm_new },
|
||||
{{0,0,GV100_DISP_CORE_CHANNEL_DMA }, gv100_disp_core_new },
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
|
||||
index a1f942793f98..7070f5408d92 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.h
|
||||
@@ -24,6 +24,9 @@ int nv50_disp_root_new_(const struct nv50_disp_root_func *, struct nvkm_disp *,
|
||||
const struct nvkm_oclass *, void *data, u32 size,
|
||||
struct nvkm_object **);
|
||||
|
||||
+int gv100_disp_caps_new(const struct nvkm_oclass *, void *, u32,
|
||||
+ struct nv50_disp *, struct nvkm_object **);
|
||||
+
|
||||
extern const struct nvkm_disp_oclass nv50_disp_root_oclass;
|
||||
extern const struct nvkm_disp_oclass g84_disp_root_oclass;
|
||||
extern const struct nvkm_disp_oclass g94_disp_root_oclass;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/roottu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/roottu102.c
|
||||
index 579a5d02308a..d8719d38b98a 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/roottu102.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/roottu102.c
|
||||
@@ -27,6 +27,7 @@
|
||||
static const struct nv50_disp_root_func
|
||||
tu102_disp_root = {
|
||||
.user = {
|
||||
+ {{-1,-1,GV100_DISP_CAPS }, gv100_disp_caps_new },
|
||||
{{0,0,TU102_DISP_CURSOR }, gv100_disp_curs_new },
|
||||
{{0,0,TU102_DISP_WINDOW_IMM_CHANNEL_DMA}, gv100_disp_wimm_new },
|
||||
{{0,0,TU102_DISP_CORE_CHANNEL_DMA }, gv100_disp_core_new },
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 6 May 2020 14:40:56 +1000
|
||||
Subject: [PATCH] disp/hda/gf119-: add HAL for programming device entry in SF
|
||||
|
||||
Register has moved on GV100.
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 11 +++++++++--
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 ++
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 1 +
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c | 1 +
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 1 +
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 1 +
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c | 1 +
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c | 1 +
|
||||
8 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
index 1080ba6ecd64..8a0ec7db5145 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
@@ -23,6 +23,14 @@
|
||||
*/
|
||||
#include "ior.h"
|
||||
|
||||
+void
|
||||
+gf119_hda_device_entry(struct nvkm_ior *ior, int head)
|
||||
+{
|
||||
+ struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
+ const u32 hoff = 0x800 * head;
|
||||
+ nvkm_mask(device, 0x616548 + hoff, 0x00000070, 0x00000000);
|
||||
+}
|
||||
+
|
||||
void
|
||||
gf119_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
|
||||
{
|
||||
@@ -41,11 +49,10 @@ void
|
||||
gf119_hda_hpd(struct nvkm_ior *ior, int head, bool present)
|
||||
{
|
||||
struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
- const u32 hoff = 0x800 * head;
|
||||
u32 data = 0x80000000;
|
||||
u32 mask = 0x80000001;
|
||||
if (present) {
|
||||
- nvkm_mask(device, 0x616548 + hoff, 0x00000070, 0x00000000);
|
||||
+ ior->func->hda.device_entry(ior, head);
|
||||
data |= 0x00000001;
|
||||
} else {
|
||||
mask |= 0x00000002;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
index c60acf71831e..eb1155e47ecd 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
@@ -88,6 +88,7 @@ struct nvkm_ior_func {
|
||||
struct {
|
||||
void (*hpd)(struct nvkm_ior *, int head, bool present);
|
||||
void (*eld)(struct nvkm_ior *, int head, u8 *data, u8 size);
|
||||
+ void (*device_entry)(struct nvkm_ior *, int head);
|
||||
} hda;
|
||||
};
|
||||
|
||||
@@ -162,6 +163,7 @@ void gt215_hda_eld(struct nvkm_ior *, int, u8 *, u8);
|
||||
|
||||
void gf119_hda_hpd(struct nvkm_ior *, int, bool);
|
||||
void gf119_hda_eld(struct nvkm_ior *, int, u8 *, u8);
|
||||
+void gf119_hda_device_entry(struct nvkm_ior *, int);
|
||||
|
||||
#define IOR_MSG(i,l,f,a...) do { \
|
||||
struct nvkm_ior *_ior = (i); \
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
|
||||
index 456a5a143522..3b3643fb1019 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
|
||||
@@ -177,6 +177,7 @@ gf119_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
+ .device_entry = gf119_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c
|
||||
index b94090edaebf..0c0925680790 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgk104.c
|
||||
@@ -43,6 +43,7 @@ gk104_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
+ .device_entry = gf119_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c
|
||||
index e6965dec09c9..38045c92197f 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c
|
||||
@@ -57,6 +57,7 @@ gm107_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
+ .device_entry = gf119_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c
|
||||
index 384f82652bec..cf2075db742a 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c
|
||||
@@ -115,6 +115,7 @@ gm200_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
+ .device_entry = gf119_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
|
||||
index b0597ff9a714..565cfbc65550 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
|
||||
@@ -103,6 +103,7 @@ gv100_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
+ .device_entry = gf119_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
|
||||
index 4d5f3791ea7b..b16ecea098c7 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
|
||||
@@ -88,6 +88,7 @@ tu102_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
+ .device_entry = gf119_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 6 May 2020 14:40:58 +1000
|
||||
Subject: [PATCH] disp/hda/gf119-: select HDA device entry based on bound head
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
index 8a0ec7db5145..19d2d58344e4 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
@@ -28,14 +28,14 @@ gf119_hda_device_entry(struct nvkm_ior *ior, int head)
|
||||
{
|
||||
struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
const u32 hoff = 0x800 * head;
|
||||
- nvkm_mask(device, 0x616548 + hoff, 0x00000070, 0x00000000);
|
||||
+ nvkm_mask(device, 0x616548 + hoff, 0x00000070, head << 4);
|
||||
}
|
||||
|
||||
void
|
||||
gf119_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
|
||||
{
|
||||
struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
- const u32 soff = 0x030 * ior->id;
|
||||
+ const u32 soff = 0x030 * ior->id + (head * 0x04);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
@@ -49,6 +49,7 @@ void
|
||||
gf119_hda_hpd(struct nvkm_ior *ior, int head, bool present)
|
||||
{
|
||||
struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
+ const u32 soff = 0x030 * ior->id + (head * 0x04);
|
||||
u32 data = 0x80000000;
|
||||
u32 mask = 0x80000001;
|
||||
if (present) {
|
||||
@@ -57,5 +58,5 @@ gf119_hda_hpd(struct nvkm_ior *ior, int head, bool present)
|
||||
} else {
|
||||
mask |= 0x00000002;
|
||||
}
|
||||
- nvkm_mask(device, 0x10ec10 + ior->id * 0x030, mask, data);
|
||||
+ nvkm_mask(device, 0x10ec10 + soff, mask, data);
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 6 May 2020 14:40:52 +1000
|
||||
Subject: [PATCH] disp/hda/gt215-: pass head to nvkm_ior.hda.eld()
|
||||
|
||||
We're going to use the bound head to select HDA device entry.
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 2 +-
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 2 +-
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 6 +++---
|
||||
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 2 +-
|
||||
4 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
index 0fa0ec0a1de0..1080ba6ecd64 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ior.h"
|
||||
|
||||
void
|
||||
-gf119_hda_eld(struct nvkm_ior *ior, u8 *data, u8 size)
|
||||
+gf119_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
|
||||
{
|
||||
struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
const u32 soff = 0x030 * ior->id;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
|
||||
index 4509d2ba880e..0d1b81fe1093 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "ior.h"
|
||||
|
||||
void
|
||||
-gt215_hda_eld(struct nvkm_ior *ior, u8 *data, u8 size)
|
||||
+gt215_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
|
||||
{
|
||||
struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
const u32 soff = ior->id * 0x800;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
index 009d3a8b7a50..c60acf71831e 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
@@ -87,7 +87,7 @@ struct nvkm_ior_func {
|
||||
|
||||
struct {
|
||||
void (*hpd)(struct nvkm_ior *, int head, bool present);
|
||||
- void (*eld)(struct nvkm_ior *, u8 *data, u8 size);
|
||||
+ void (*eld)(struct nvkm_ior *, int head, u8 *data, u8 size);
|
||||
} hda;
|
||||
};
|
||||
|
||||
@@ -158,10 +158,10 @@ void gv100_hdmi_ctrl(struct nvkm_ior *, int, bool, u8, u8, u8 *, u8 , u8 *, u8);
|
||||
void gm200_hdmi_scdc(struct nvkm_ior *, int, u8);
|
||||
|
||||
void gt215_hda_hpd(struct nvkm_ior *, int, bool);
|
||||
-void gt215_hda_eld(struct nvkm_ior *, u8 *, u8);
|
||||
+void gt215_hda_eld(struct nvkm_ior *, int, u8 *, u8);
|
||||
|
||||
void gf119_hda_hpd(struct nvkm_ior *, int, bool);
|
||||
-void gf119_hda_eld(struct nvkm_ior *, u8 *, u8);
|
||||
+void gf119_hda_eld(struct nvkm_ior *, int, u8 *, u8);
|
||||
|
||||
#define IOR_MSG(i,l,f,a...) do { \
|
||||
struct nvkm_ior *_ior = (i); \
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
|
||||
index 5f758948d6e1..a7672ef17d3b 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
|
||||
@@ -155,7 +155,7 @@ nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
|
||||
if (outp->info.type == DCB_OUTPUT_DP)
|
||||
ior->func->dp.audio(ior, hidx, true);
|
||||
ior->func->hda.hpd(ior, hidx, true);
|
||||
- ior->func->hda.eld(ior, data, size);
|
||||
+ ior->func->hda.eld(ior, hidx, data, size);
|
||||
} else {
|
||||
if (outp->info.type == DCB_OUTPUT_DP)
|
||||
ior->func->dp.audio(ior, hidx, false);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 6 May 2020 14:41:01 +1000
|
||||
Subject: [PATCH] disp/hda/gv100-: NV_PDISP_SF_AUDIO_CNTRL0 register moved
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
.../gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 +
|
||||
.../drm/nouveau/nvkm/engine/disp/hdagv100.c | 30 +++++++++++++++++++
|
||||
.../gpu/drm/nouveau/nvkm/engine/disp/ior.h | 2 ++
|
||||
.../drm/nouveau/nvkm/engine/disp/sorgv100.c | 2 +-
|
||||
.../drm/nouveau/nvkm/engine/disp/sortu102.c | 2 +-
|
||||
5 files changed, 35 insertions(+), 2 deletions(-)
|
||||
create mode 100644 drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
|
||||
index f7af648e0c17..571687ba85b8 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild
|
||||
@@ -47,6 +47,7 @@ nvkm-y += nvkm/engine/disp/dp.o
|
||||
|
||||
nvkm-y += nvkm/engine/disp/hdagt215.o
|
||||
nvkm-y += nvkm/engine/disp/hdagf119.o
|
||||
+nvkm-y += nvkm/engine/disp/hdagv100.o
|
||||
|
||||
nvkm-y += nvkm/engine/disp/hdmi.o
|
||||
nvkm-y += nvkm/engine/disp/hdmig84.o
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c
|
||||
new file mode 100644
|
||||
index 000000000000..57d374ecfeef
|
||||
--- /dev/null
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagv100.c
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright 2020 Red Hat Inc.
|
||||
+ *
|
||||
+ * Permission is hereby granted, free of charge, to any person obtaining a
|
||||
+ * copy of this software and associated documentation files (the "Software"),
|
||||
+ * to deal in the Software without restriction, including without limitation
|
||||
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
+ * and/or sell copies of the Software, and to permit persons to whom the
|
||||
+ * Software is furnished to do so, subject to the following conditions:
|
||||
+ *
|
||||
+ * The above copyright notice and this permission notice shall be included in
|
||||
+ * all copies or substantial portions of the Software.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
+ * OTHER DEALINGS IN THE SOFTWARE.
|
||||
+ */
|
||||
+#include "ior.h"
|
||||
+
|
||||
+void
|
||||
+gv100_hda_device_entry(struct nvkm_ior *ior, int head)
|
||||
+{
|
||||
+ struct nvkm_device *device = ior->disp->engine.subdev.device;
|
||||
+ const u32 hoff = 0x800 * head;
|
||||
+ nvkm_mask(device, 0x616528 + hoff, 0x00000070, head << 4);
|
||||
+}
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
index eb1155e47ecd..c1d7a36e4d3c 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
|
||||
@@ -165,6 +165,8 @@ void gf119_hda_hpd(struct nvkm_ior *, int, bool);
|
||||
void gf119_hda_eld(struct nvkm_ior *, int, u8 *, u8);
|
||||
void gf119_hda_device_entry(struct nvkm_ior *, int);
|
||||
|
||||
+void gv100_hda_device_entry(struct nvkm_ior *, int);
|
||||
+
|
||||
#define IOR_MSG(i,l,f,a...) do { \
|
||||
struct nvkm_ior *_ior = (i); \
|
||||
nvkm_##l(&_ior->disp->engine.subdev, "%s: "f"\n", _ior->name, ##a); \
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
|
||||
index 565cfbc65550..d11a0dff10c6 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgv100.c
|
||||
@@ -103,7 +103,7 @@ gv100_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
- .device_entry = gf119_hda_device_entry,
|
||||
+ .device_entry = gv100_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
|
||||
index b16ecea098c7..fa6d74251237 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/sortu102.c
|
||||
@@ -88,7 +88,7 @@ tu102_sor = {
|
||||
.hda = {
|
||||
.hpd = gf119_hda_hpd,
|
||||
.eld = gf119_hda_eld,
|
||||
- .device_entry = gf119_hda_device_entry,
|
||||
+ .device_entry = gv100_hda_device_entry,
|
||||
},
|
||||
};
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Skeggs <bskeggs@redhat.com>
|
||||
Date: Wed, 6 May 2020 14:40:45 +1000
|
||||
Subject: [PATCH] disp/nv50-: increase timeout on pio channel free() polling
|
||||
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/dispnv50/curs507a.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/curs507a.c b/drivers/gpu/drm/nouveau/dispnv50/curs507a.c
|
||||
index 8c5cf096f69b..658a200ab616 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/curs507a.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/curs507a.c
|
||||
@@ -32,7 +32,7 @@
|
||||
bool
|
||||
curs507a_space(struct nv50_wndw *wndw)
|
||||
{
|
||||
- nvif_msec(&nouveau_drm(wndw->plane.dev)->client.device, 2,
|
||||
+ nvif_msec(&nouveau_drm(wndw->plane.dev)->client.device, 100,
|
||||
if (nvif_rd32(&wndw->wimm.base.user, 0x0008) >= 4)
|
||||
return true;
|
||||
);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Date: Thu, 23 Apr 2020 14:23:58 +0800
|
||||
Subject: [PATCH] drm: Use generic helper to check _PR3 presence
|
||||
|
||||
Replace nouveau_pr3_present() in favor of a more generic one,
|
||||
pci_pr3_present().
|
||||
|
||||
Also the presence of upstream bridge _PR3 doesn't need to go hand in
|
||||
hand with device's _DSM, so check _PR3 before _DSM.
|
||||
|
||||
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_acpi.c | 44 ++++++--------------------
|
||||
1 file changed, 10 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
|
||||
index fe3a10255c36..b84dff1b0f28 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
|
||||
@@ -212,37 +212,6 @@ static const struct vga_switcheroo_handler nouveau_dsm_handler = {
|
||||
.get_client_id = nouveau_dsm_get_client_id,
|
||||
};
|
||||
|
||||
-/*
|
||||
- * Firmware supporting Windows 8 or later do not use _DSM to put the device into
|
||||
- * D3cold, they instead rely on disabling power resources on the parent.
|
||||
- */
|
||||
-static bool nouveau_pr3_present(struct pci_dev *pdev)
|
||||
-{
|
||||
- struct pci_dev *parent_pdev = pci_upstream_bridge(pdev);
|
||||
- struct acpi_device *parent_adev;
|
||||
-
|
||||
- if (!parent_pdev)
|
||||
- return false;
|
||||
-
|
||||
- if (!parent_pdev->bridge_d3) {
|
||||
- /*
|
||||
- * Parent PCI bridge is currently not power managed.
|
||||
- * Since userspace can change these afterwards to be on
|
||||
- * the safe side we stick with _DSM and prevent usage of
|
||||
- * _PR3 from the bridge.
|
||||
- */
|
||||
- pci_d3cold_disable(pdev);
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- parent_adev = ACPI_COMPANION(&parent_pdev->dev);
|
||||
- if (!parent_adev)
|
||||
- return false;
|
||||
-
|
||||
- return parent_adev->power.flags.power_resources &&
|
||||
- acpi_has_method(parent_adev->handle, "_PR3");
|
||||
-}
|
||||
-
|
||||
static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out,
|
||||
bool *has_mux, bool *has_opt,
|
||||
bool *has_opt_flags, bool *has_pr3)
|
||||
@@ -250,6 +219,16 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
|
||||
acpi_handle dhandle;
|
||||
bool supports_mux;
|
||||
int optimus_funcs;
|
||||
+ struct pci_dev *parent_pdev;
|
||||
+
|
||||
+ *has_pr3 = false;
|
||||
+ parent_pdev = pci_upstream_bridge(pdev);
|
||||
+ if (parent_pdev) {
|
||||
+ if (parent_pdev->bridge_d3)
|
||||
+ *has_pr3 = pci_pr3_present(parent_pdev);
|
||||
+ else
|
||||
+ pci_d3cold_disable(pdev);
|
||||
+ }
|
||||
|
||||
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||
if (!dhandle)
|
||||
@@ -270,7 +249,6 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
|
||||
*has_mux = supports_mux;
|
||||
*has_opt = !!optimus_funcs;
|
||||
*has_opt_flags = optimus_funcs & (1 << NOUVEAU_DSM_OPTIMUS_FLAGS);
|
||||
- *has_pr3 = false;
|
||||
|
||||
if (optimus_funcs) {
|
||||
uint32_t result;
|
||||
@@ -280,8 +258,6 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
|
||||
(result & OPTIMUS_ENABLED) ? "enabled" : "disabled",
|
||||
(result & OPTIMUS_DYNAMIC_PWR_CAP) ? "dynamic power, " : "",
|
||||
(result & OPTIMUS_HDA_CODEC_MASK) ? "hda bios codec supported" : "");
|
||||
-
|
||||
- *has_pr3 = nouveau_pr3_present(pdev);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
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
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From d2fb5b980f071d542ca912dac5a0e27c49de7e2d Mon Sep 17 00:00:00 2001
|
||||
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 09/13] drm/panel: st7703: Add support for Xingbangda XBD599
|
||||
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.
|
||||
|
|
@ -13,7 +13,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 cdbf7dfb4dd48..33611419059a9 100644
|
||||
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 @@
|
||||
|
|
@ -31,7 +31,7 @@ index cdbf7dfb4dd48..33611419059a9 100644
|
|||
#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);
|
||||
|
|
@ -41,7 +41,7 @@ index cdbf7dfb4dd48..33611419059a9 100644
|
|||
@@ -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; \
|
||||
|
|
@ -239,7 +239,7 @@ index cdbf7dfb4dd48..33611419059a9 100644
|
|||
{
|
||||
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 },
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
From f290f11b42df0d9d42679b93bb6a488f9e12e00d Mon Sep 17 00:00:00 2001
|
||||
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 11/13] drm/panel: st7703: Assert reset prior to powering down
|
||||
the regulators
|
||||
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.
|
||||
|
|
@ -13,13 +13,13 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 e771281eb5472..92930e1275592 100644
|
||||
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);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 7c9c58114d277e570f667ac670ef28725e51814e Mon Sep 17 00:00:00 2001
|
||||
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 10/13] drm/panel: st7703: Enter sleep after display off
|
||||
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.
|
||||
|
|
@ -12,7 +12,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 33611419059a9..e771281eb5472 100644
|
||||
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)
|
||||
|
|
@ -25,7 +25,7 @@ index 33611419059a9..e771281eb5472 100644
|
|||
+ 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)
|
||||
|
|
@ -34,7 +34,7 @@ index 33611419059a9..e771281eb5472 100644
|
|||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
|
||||
static int st7703_unprepare(struct drm_panel *panel)
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From b93e129534a0556a03a343f95e622ae9c3893854 Mon Sep 17 00:00:00 2001
|
||||
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 07/13] drm/panel: st7703: Move code specific to jh057n closer
|
||||
Subject: [PATCH] drm/panel: st7703: Move code specific to jh057n closer
|
||||
together
|
||||
|
||||
It's better than having it spread around the driver.
|
||||
|
|
@ -12,13 +12,13 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 08cbc316266c1..d03aab10cfef1 100644
|
||||
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,
|
||||
|
|
@ -50,7 +50,7 @@ index 08cbc316266c1..d03aab10cfef1 100644
|
|||
@@ -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,
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
From 5e9a6f49f8056963a4b8d2408f0c0f211cdab799 Mon Sep 17 00:00:00 2001
|
||||
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 08/13] drm/panel: st7703: Move generic part of init sequence
|
||||
to enable callback
|
||||
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
|
||||
|
|
@ -14,7 +14,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 d03aab10cfef1..cdbf7dfb4dd48 100644
|
||||
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)
|
||||
|
|
@ -23,7 +23,7 @@ index d03aab10cfef1..cdbf7dfb4dd48 100644
|
|||
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)
|
||||
|
|
@ -42,23 +42,23 @@ index d03aab10cfef1..cdbf7dfb4dd48 100644
|
|||
- 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);
|
||||
|
|
@ -78,7 +78,7 @@ index d03aab10cfef1..cdbf7dfb4dd48 100644
|
|||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
From 19802e031428f7cf967259fdf8794a971164a44a Mon Sep 17 00:00:00 2001
|
||||
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 06/13] drm/panel: st7703: Prepare for supporting multiple
|
||||
panels
|
||||
Subject: [PATCH] drm/panel: st7703: Prepare for supporting multiple panels
|
||||
|
||||
Parametrize the driver so that it can support more panels based
|
||||
on st7703 controller.
|
||||
|
|
@ -13,7 +12,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 511af659f273b..08cbc316266c1 100644
|
||||
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 @@
|
||||
|
|
@ -22,11 +21,11 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
#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;
|
||||
+};
|
||||
|
|
@ -38,12 +37,12 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
+ 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) {
|
||||
|
|
@ -52,7 +51,7 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
@@ -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,
|
||||
|
|
@ -61,7 +60,7 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
@@ -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,
|
||||
|
|
@ -76,7 +75,7 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
{
|
||||
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) {
|
||||
|
|
@ -87,13 +86,13 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
+ 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 |
|
||||
|
|
@ -101,23 +100,23 @@ index 511af659f273b..08cbc316266c1 100644
|
|||
+ 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 },
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
From 6fad8493b27ade51f37d88acc7ce6fd7dbc9da69 Mon Sep 17 00:00:00 2001
|
||||
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 05/13] drm/panel: st7703: Rename functions from jh057n prefix
|
||||
to st7703
|
||||
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
|
||||
|
|
@ -14,7 +14,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 38ff742bc1209..511af659f273b 100644
|
||||
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 @@
|
||||
|
|
@ -30,16 +30,16 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
@@ -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;
|
||||
|
|
@ -48,19 +48,19 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
@@ -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)
|
||||
{
|
||||
|
|
@ -69,53 +69,53 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
@@ -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)
|
||||
|
|
@ -123,12 +123,12 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
- 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,
|
||||
|
|
@ -142,34 +142,34 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
+ .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)
|
||||
{
|
||||
|
|
@ -177,60 +177,60 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
- 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" },
|
||||
|
|
@ -238,7 +238,7 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
};
|
||||
-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,
|
||||
|
|
@ -255,7 +255,7 @@ index 38ff742bc1209..511af659f273b 100644
|
|||
};
|
||||
-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");
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
From 12146093602e0dedb7ee431224fc4a58d40697f8 Mon Sep 17 00:00:00 2001
|
||||
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 03/13] dt-bindings: panel: Add compatible for Xingbangda
|
||||
XBD599 panel
|
||||
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
|
||||
|
|
@ -16,11 +16,11 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
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 f97c48550741c..4d43a1b36d7c7 100644
|
||||
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
|
||||
|
|
@ -29,7 +29,7 @@ index f97c48550741c..4d43a1b36d7c7 100644
|
|||
+ - rocktech,jh057n00900
|
||||
+ # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel
|
||||
+ - xingbangda,xbd599
|
||||
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
--
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
From 789d3f52a1cf675ba68c3578fe2b259bc44caba2 Mon Sep 17 00:00:00 2001
|
||||
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 02/13] dt-bindings: panel: Convert rocktech, jh057n00900 to
|
||||
yaml
|
||||
Subject: [PATCH] dt-bindings: panel: Convert rocktech, jh057n00900 to yaml
|
||||
|
||||
Convert Rocktech MIPI DSI panel driver from txt to yaml bindings.
|
||||
|
||||
|
|
@ -16,7 +15,7 @@ Signed-off-by: Ondrej Jirman <megous@megous.com>
|
|||
|
||||
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 a372c5d846956..0000000000000
|
||||
index a372c5d84695..000000000000
|
||||
--- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt
|
||||
+++ /dev/null
|
||||
@@ -1,23 +0,0 @@
|
||||
|
|
@ -45,7 +44,7 @@ index a372c5d846956..0000000000000
|
|||
- };
|
||||
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 0000000000000..f97c48550741c
|
||||
index 000000000000..f97c48550741
|
||||
--- /dev/null
|
||||
+++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml
|
||||
@@ -0,0 +1,66 @@
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 025eb2eb927d2c3020882ea0ed3af28d65321763 Mon Sep 17 00:00:00 2001
|
||||
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 01/13] dt-bindings: vendor-prefixes: Add Xingbangda
|
||||
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.
|
||||
|
|
@ -16,10 +16,10 @@ Acked-by: Rob Herring <robh@kernel.org>
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
index d3891386d6710..a558ef87ee5b0 100644
|
||||
index 9aeab66be85f..740b116b179f 100644
|
||||
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
@@ -1121,6 +1121,8 @@ patternProperties:
|
||||
@@ -1157,6 +1157,8 @@ patternProperties:
|
||||
description: Xiaomi Technology Co., Ltd.
|
||||
"^xillybus,.*":
|
||||
description: Xillybus Ltd.
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
|
|||
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 735bf25952fc..15f6c0a4dc63 100644
|
||||
index 489bb5b59475..26bb39b62956 100644
|
||||
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
|
||||
@@ -1243,9 +1243,9 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
|
||||
@@ -1245,9 +1245,9 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
|
||||
ew32(H2ME, mac_reg);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
create mode 100644 drivers/firmware/efi/secureboot.c
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index e39ec0f88d28..08e9f5fc26a8 100644
|
||||
index a1b8cb9a2579..28d43754aeb6 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1250,19 +1250,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
@@ -1256,19 +1256,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
/* Allocate bigger log buffer */
|
||||
setup_log_buf(1);
|
||||
|
||||
|
|
@ -107,10 +107,10 @@ index 000000000000..de0a3714a5d4
|
|||
+ }
|
||||
+}
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 51503bf118ab..b35e693f20f3 100644
|
||||
index 2e2f9f608f68..6f5b3b019d3e 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -778,6 +778,14 @@ extern int __init efi_setup_pcdp_console(char *);
|
||||
@@ -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? */
|
||||
|
|
@ -125,7 +125,7 @@ index 51503bf118ab..b35e693f20f3 100644
|
|||
|
||||
#ifdef CONFIG_EFI
|
||||
/*
|
||||
@@ -789,6 +797,8 @@ static inline bool efi_enabled(int feature)
|
||||
@@ -792,6 +800,8 @@ static inline bool efi_enabled(int feature)
|
||||
}
|
||||
extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ index 51503bf118ab..b35e693f20f3 100644
|
|||
bool __pure __efi_soft_reserve_enabled(void);
|
||||
|
||||
static inline bool __pure efi_soft_reserve_enabled(void)
|
||||
@@ -815,6 +825,8 @@ efi_capsule_pending(int *reset_type)
|
||||
@@ -818,6 +828,8 @@ efi_capsule_pending(int *reset_type)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ index 51503bf118ab..b35e693f20f3 100644
|
|||
static inline bool efi_soft_reserve_enabled(void)
|
||||
{
|
||||
return false;
|
||||
@@ -1086,12 +1098,6 @@ static inline bool efi_runtime_disabled(void) { return true; }
|
||||
@@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
2 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index 08e9f5fc26a8..b6f5510f3d91 100644
|
||||
index 28d43754aeb6..19d57bfc12f9 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -18,6 +18,7 @@
|
||||
|
|
@ -29,7 +29,7 @@ index 08e9f5fc26a8..b6f5510f3d91 100644
|
|||
#include <linux/usb/xhci-dbgp.h>
|
||||
|
||||
#include <uapi/linux/mount.h>
|
||||
@@ -1099,6 +1100,13 @@ void __init setup_arch(char **cmdline_p)
|
||||
@@ -1105,6 +1106,13 @@ void __init setup_arch(char **cmdline_p)
|
||||
if (efi_enabled(EFI_BOOT))
|
||||
efi_init();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,110 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Tue, 10 Mar 2020 13:52:40 +0100
|
||||
Subject: [PATCH] firmware: raspberrypi: Introduce vl805 init routine
|
||||
|
||||
On the Raspberry Pi 4, after a PCI reset, VL805's firmware may either be
|
||||
loaded directly from an EEPROM or, if not present, by the SoC's
|
||||
VideCore. The function informs VideCore that VL805 was just reset, or
|
||||
requests for a probe defer.
|
||||
|
||||
Based on Tim Gover's downstream implementation.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
drivers/firmware/raspberrypi.c | 38 ++++++++++++++++++++++
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 7 ++++
|
||||
2 files changed, 45 insertions(+)
|
||||
|
||||
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
|
||||
index da26a584dca0..cbb495aff6a0 100644
|
||||
--- a/drivers/firmware/raspberrypi.c
|
||||
+++ b/drivers/firmware/raspberrypi.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/pci.h>
|
||||
#include <soc/bcm2835/raspberrypi-firmware.h>
|
||||
|
||||
#define MBOX_MSG(chan, data28) (((data28) & ~0xf) | ((chan) & 0xf))
|
||||
@@ -286,6 +287,43 @@ struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rpi_firmware_get);
|
||||
|
||||
+/*
|
||||
+ * On the Raspberry Pi 4, after a PCI reset, VL805's firmware may either be
|
||||
+ * loaded directly from an EEPROM or, if not present, by the SoC's VideCore.
|
||||
+ * Inform VideCore that VL805 was just reset, or defer xhci's probe if not yet
|
||||
+ * joinable trough the mailbox interface.
|
||||
+ */
|
||||
+int rpi_firmware_init_vl805(struct pci_dev *pdev)
|
||||
+{
|
||||
+ struct device_node *fw_np;
|
||||
+ struct rpi_firmware *fw;
|
||||
+ u32 dev_addr;
|
||||
+ int ret;
|
||||
+
|
||||
+ fw_np = of_find_compatible_node(NULL, NULL,
|
||||
+ "raspberrypi,bcm2835-firmware");
|
||||
+ if (!fw_np)
|
||||
+ return 0;
|
||||
+
|
||||
+ fw = rpi_firmware_get(fw_np);
|
||||
+ of_node_put(fw_np);
|
||||
+ if (!fw)
|
||||
+ return -EPROBE_DEFER;
|
||||
+
|
||||
+ dev_addr = pdev->bus->number << 20 | PCI_SLOT(pdev->devfn) << 15 |
|
||||
+ PCI_FUNC(pdev->devfn) << 12;
|
||||
+
|
||||
+ ret = rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_XHCI_RESET,
|
||||
+ &dev_addr, sizeof(dev_addr));
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ dev_dbg(&pdev->dev, "loaded Raspberry Pi's VL805 firmware\n");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL_GPL(rpi_firmware_init_vl805);
|
||||
+
|
||||
static const struct of_device_id rpi_firmware_of_match[] = {
|
||||
{ .compatible = "raspberrypi,bcm2835-firmware", },
|
||||
{},
|
||||
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
index cc9cdbc66403..3025aca3c358 100644
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/of_device.h>
|
||||
|
||||
struct rpi_firmware;
|
||||
+struct pci_dev;
|
||||
|
||||
enum rpi_firmware_property_status {
|
||||
RPI_FIRMWARE_STATUS_REQUEST = 0,
|
||||
@@ -141,6 +142,7 @@ int rpi_firmware_property(struct rpi_firmware *fw,
|
||||
int rpi_firmware_property_list(struct rpi_firmware *fw,
|
||||
void *data, size_t tag_size);
|
||||
struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node);
|
||||
+int rpi_firmware_init_vl805(struct pci_dev *pdev);
|
||||
#else
|
||||
static inline int rpi_firmware_property(struct rpi_firmware *fw, u32 tag,
|
||||
void *data, size_t len)
|
||||
@@ -158,6 +160,11 @@ static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
+
|
||||
+static inline int rpi_firmware_init_vl805(struct pci_dev *pdev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
#endif
|
||||
|
||||
#endif /* __SOC_RASPBERRY_FIRMWARE_H__ */
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ Signed-off-by: Laura Abbott <labbott@redhat.com>
|
|||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
|
||||
index 03d6a26687bc..86981f228c90 100644
|
||||
index b6858adc4f17..4c2da9f17514 100644
|
||||
--- a/drivers/iommu/iommu.c
|
||||
+++ b/drivers/iommu/iommu.c
|
||||
@@ -7,6 +7,7 @@
|
||||
|
|
@ -68,7 +68,7 @@ index 03d6a26687bc..86981f228c90 100644
|
|||
#include <linux/kernel.h>
|
||||
#include <linux/bug.h>
|
||||
#include <linux/types.h>
|
||||
@@ -2664,3 +2665,24 @@ int iommu_sva_get_pasid(struct iommu_sva *handle)
|
||||
@@ -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);
|
||||
|
|
|
|||
|
|
@ -84,10 +84,10 @@ index bbf7029e224b..cf7faa970dd6 100644
|
|||
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 c48d8f086382..0fc980a87ed0 100644
|
||||
index e1b22fe0916c..894eda427214 100644
|
||||
--- a/drivers/char/ipmi/ipmi_msghandler.c
|
||||
+++ b/drivers/char/ipmi/ipmi_msghandler.c
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <linux/uuid.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
|
@ -95,7 +95,7 @@ index c48d8f086382..0fc980a87ed0 100644
|
|||
|
||||
#define IPMI_DRIVER_VERSION "39.2"
|
||||
|
||||
@@ -5154,8 +5155,21 @@ static int __init ipmi_init_msghandler_mod(void)
|
||||
@@ -5155,8 +5156,21 @@ static int __init ipmi_init_msghandler_mod(void)
|
||||
{
|
||||
int rv;
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
2 files changed, 25 insertions(+)
|
||||
|
||||
diff --git a/Documentation/admin-guide/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst
|
||||
index ac7e131d2935..3b3bf30e537d 100644
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lyude Paul <lyude@redhat.com>
|
||||
Date: Mon, 11 May 2020 18:41:25 -0400
|
||||
Subject: [PATCH] kms/gv100-: Add support for interlaced modes
|
||||
|
||||
We advertise being able to set interlaced modes, so let's actually make
|
||||
sure to do that. Otherwise, we'll end up hanging the display engine due
|
||||
to trying to set a mode with timings adjusted for interlacing without
|
||||
telling the hardware it's actually an interlaced mode.
|
||||
|
||||
Signed-off-by: Lyude Paul <lyude@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/dispnv50/headc37d.c | 5 +++--
|
||||
drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 5 +++--
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
|
||||
index 00011ce109a6..4a9a32b89f74 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc37d.c
|
||||
@@ -168,14 +168,15 @@ headc37d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
|
||||
struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
|
||||
struct nv50_head_mode *m = &asyh->mode;
|
||||
u32 *push;
|
||||
- if ((push = evo_wait(core, 12))) {
|
||||
+ if ((push = evo_wait(core, 13))) {
|
||||
evo_mthd(push, 0x2064 + (head->base.index * 0x400), 5);
|
||||
evo_data(push, (m->v.active << 16) | m->h.active );
|
||||
evo_data(push, (m->v.synce << 16) | m->h.synce );
|
||||
evo_data(push, (m->v.blanke << 16) | m->h.blanke );
|
||||
evo_data(push, (m->v.blanks << 16) | m->h.blanks );
|
||||
evo_data(push, (m->v.blank2e << 16) | m->v.blank2s);
|
||||
- evo_mthd(push, 0x200c + (head->base.index * 0x400), 1);
|
||||
+ evo_mthd(push, 0x2008 + (head->base.index * 0x400), 2);
|
||||
+ evo_data(push, m->interlace);
|
||||
evo_data(push, m->clock * 1000);
|
||||
evo_mthd(push, 0x2028 + (head->base.index * 0x400), 1);
|
||||
evo_data(push, m->clock * 1000);
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
|
||||
index 938d910a1b1e..859131a8bc3c 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c
|
||||
@@ -173,14 +173,15 @@ headc57d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
|
||||
struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
|
||||
struct nv50_head_mode *m = &asyh->mode;
|
||||
u32 *push;
|
||||
- if ((push = evo_wait(core, 12))) {
|
||||
+ if ((push = evo_wait(core, 13))) {
|
||||
evo_mthd(push, 0x2064 + (head->base.index * 0x400), 5);
|
||||
evo_data(push, (m->v.active << 16) | m->h.active );
|
||||
evo_data(push, (m->v.synce << 16) | m->h.synce );
|
||||
evo_data(push, (m->v.blanke << 16) | m->h.blanke );
|
||||
evo_data(push, (m->v.blanks << 16) | m->h.blanks );
|
||||
evo_data(push, (m->v.blank2e << 16) | m->v.blank2s);
|
||||
- evo_mthd(push, 0x200c + (head->base.index * 0x400), 1);
|
||||
+ evo_mthd(push, 0x2008 + (head->base.index * 0x400), 2);
|
||||
+ evo_data(push, m->interlace);
|
||||
evo_data(push, m->clock * 1000);
|
||||
evo_mthd(push, 0x2028 + (head->base.index * 0x400), 1);
|
||||
evo_data(push, m->clock * 1000);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lyude Paul <lyude@redhat.com>
|
||||
Date: Mon, 11 May 2020 18:41:23 -0400
|
||||
Subject: [PATCH] kms/nv50-: Initialize core channel in
|
||||
nouveau_display_create()
|
||||
|
||||
We'll need the core channel initialized and ready by the time that we
|
||||
start creating modesetting objects, so that we can call the
|
||||
NV507D_GET_CAPABILITIES method to make the hardware expose it's
|
||||
modesetting capabilities for later probing.
|
||||
|
||||
So, when loading the driver prepare the core channel from within
|
||||
nouveau_display_create(). Everywhere else, we initialize the core
|
||||
channel during resume.
|
||||
|
||||
Signed-off-by: Lyude Paul <lyude@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
index 2625ed84fc44..2afd56b9887d 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
@@ -2373,7 +2373,8 @@ nv50_display_init(struct drm_device *dev, bool resume, bool runtime)
|
||||
struct drm_encoder *encoder;
|
||||
struct drm_plane *plane;
|
||||
|
||||
- core->func->init(core);
|
||||
+ if (resume || runtime)
|
||||
+ core->func->init(core);
|
||||
|
||||
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
||||
if (encoder->encoder_type != DRM_MODE_ENCODER_DPMST) {
|
||||
@@ -2460,6 +2461,8 @@ nv50_display_create(struct drm_device *dev)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
+ disp->core->func->init(disp->core);
|
||||
+
|
||||
/* create crtc objects to represent the hw heads */
|
||||
if (disp->disp->object.oclass >= GV100_DISP)
|
||||
crtcs = nvif_rd32(&device->object, 0x610060) & 0xff;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lyude Paul <lyude@redhat.com>
|
||||
Date: Mon, 11 May 2020 18:41:26 -0400
|
||||
Subject: [PATCH] kms/nv50-: Move 8BPC limit for MST into nv50_mstc_get_modes()
|
||||
|
||||
This just limits the BPC for MST connectors to a maximum of 8 from
|
||||
nv50_mstc_get_modes(), instead of doing so during
|
||||
nv50_msto_atomic_check(). This doesn't introduce any functional changes
|
||||
yet (other then userspace now lying about the max bpc, but we can't
|
||||
support that yet anyway so meh). But, we'll need this in a moment so
|
||||
that we can share mode validation between SST and MST which will fix
|
||||
some real world issues.
|
||||
|
||||
Signed-off-by: Lyude Paul <lyude@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/dispnv50/disp.c | 25 ++++++++++++++-----------
|
||||
1 file changed, 14 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
index 1db4f20b8697..e92e7bf49780 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
@@ -908,15 +908,9 @@ nv50_msto_atomic_check(struct drm_encoder *encoder,
|
||||
if (!state->duplicated) {
|
||||
const int clock = crtc_state->adjusted_mode.clock;
|
||||
|
||||
- /*
|
||||
- * XXX: Since we don't use HDR in userspace quite yet, limit
|
||||
- * the bpc to 8 to save bandwidth on the topology. In the
|
||||
- * future, we'll want to properly fix this by dynamically
|
||||
- * selecting the highest possible bpc that would fit in the
|
||||
- * topology
|
||||
- */
|
||||
- asyh->or.bpc = min(connector->display_info.bpc, 8U);
|
||||
- asyh->dp.pbn = drm_dp_calc_pbn_mode(clock, asyh->or.bpc * 3, false);
|
||||
+ asyh->or.bpc = connector->display_info.bpc;
|
||||
+ asyh->dp.pbn = drm_dp_calc_pbn_mode(clock, asyh->or.bpc * 3,
|
||||
+ false);
|
||||
}
|
||||
|
||||
slots = drm_dp_atomic_find_vcpi_slots(state, &mstm->mgr, mstc->port,
|
||||
@@ -1076,8 +1070,17 @@ nv50_mstc_get_modes(struct drm_connector *connector)
|
||||
if (mstc->edid)
|
||||
ret = drm_add_edid_modes(&mstc->connector, mstc->edid);
|
||||
|
||||
- if (!mstc->connector.display_info.bpc)
|
||||
- mstc->connector.display_info.bpc = 8;
|
||||
+ /*
|
||||
+ * XXX: Since we don't use HDR in userspace quite yet, limit the bpc
|
||||
+ * to 8 to save bandwidth on the topology. In the future, we'll want
|
||||
+ * to properly fix this by dynamically selecting the highest possible
|
||||
+ * bpc that would fit in the topology
|
||||
+ */
|
||||
+ if (connector->display_info.bpc)
|
||||
+ connector->display_info.bpc =
|
||||
+ clamp(connector->display_info.bpc, 6U, 8U);
|
||||
+ else
|
||||
+ connector->display_info.bpc = 8;
|
||||
|
||||
if (mstc->native)
|
||||
drm_mode_destroy(mstc->connector.dev, mstc->native);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,439 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lyude Paul <lyude@redhat.com>
|
||||
Date: Mon, 11 May 2020 18:41:24 -0400
|
||||
Subject: [PATCH] kms/nv50-: Probe SOR and PIOR caps for DP interlacing support
|
||||
|
||||
Right now, we make the mistake of allowing interlacing on all
|
||||
connectors. Nvidia hardware does not always support interlacing with DP
|
||||
though, so we need to make sure that we don't allow interlaced modes to
|
||||
be set in such situations as otherwise we'll end up accidentally hanging
|
||||
the display HW.
|
||||
|
||||
This fixes some hangs with Turing, which would be caused by attempting
|
||||
to set an interlaced mode on hardware that doesn't support it. This
|
||||
patch likely fixes other hardware hanging in the same way as well.
|
||||
|
||||
Note that we say we probe PIOR caps, but they don't actually have any
|
||||
interlacing caps. So, the get_caps() function for PIORs just sets
|
||||
interlacing support to true.
|
||||
|
||||
Changes since v1:
|
||||
* Actually probe caps correctly this time, both on EVO and NVDisplay.
|
||||
Changes since v2:
|
||||
* Fix probing for < GF119
|
||||
* Use vfunc table, in prep for adding more caps in the future.
|
||||
|
||||
Signed-off-by: Lyude Paul <lyude@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/dispnv50/core.h | 7 ++++++
|
||||
drivers/gpu/drm/nouveau/dispnv50/core507d.c | 15 ++++++++++++
|
||||
drivers/gpu/drm/nouveau/dispnv50/core827d.c | 1 +
|
||||
drivers/gpu/drm/nouveau/dispnv50/core907d.c | 1 +
|
||||
drivers/gpu/drm/nouveau/dispnv50/core917d.c | 1 +
|
||||
drivers/gpu/drm/nouveau/dispnv50/corec37d.c | 26 +++++++++++++++++++++
|
||||
drivers/gpu/drm/nouveau/dispnv50/corec57d.c | 1 +
|
||||
drivers/gpu/drm/nouveau/dispnv50/disp.c | 19 +++++++++++++--
|
||||
drivers/gpu/drm/nouveau/dispnv50/disp.h | 1 +
|
||||
drivers/gpu/drm/nouveau/dispnv50/pior507d.c | 8 +++++++
|
||||
drivers/gpu/drm/nouveau/dispnv50/sor507d.c | 7 ++++++
|
||||
drivers/gpu/drm/nouveau/dispnv50/sor907d.c | 11 +++++++++
|
||||
drivers/gpu/drm/nouveau/dispnv50/sorc37d.c | 9 +++++++
|
||||
drivers/gpu/drm/nouveau/nouveau_connector.c | 10 +++++++-
|
||||
drivers/gpu/drm/nouveau/nouveau_encoder.h | 4 ++++
|
||||
15 files changed, 118 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core.h b/drivers/gpu/drm/nouveau/dispnv50/core.h
|
||||
index ff94f3f6f264..99157dc94d23 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/core.h
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/core.h
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __NV50_KMS_CORE_H__
|
||||
#include "disp.h"
|
||||
#include "atom.h"
|
||||
+#include <nouveau_encoder.h>
|
||||
|
||||
struct nv50_core {
|
||||
const struct nv50_core_func *func;
|
||||
@@ -15,6 +16,7 @@ void nv50_core_del(struct nv50_core **);
|
||||
struct nv50_core_func {
|
||||
void (*init)(struct nv50_core *);
|
||||
void (*ntfy_init)(struct nouveau_bo *, u32 offset);
|
||||
+ int (*caps_init)(struct nouveau_drm *, struct nv50_disp *);
|
||||
int (*ntfy_wait_done)(struct nouveau_bo *, u32 offset,
|
||||
struct nvif_device *);
|
||||
void (*update)(struct nv50_core *, u32 *interlock, bool ntfy);
|
||||
@@ -27,6 +29,9 @@ struct nv50_core_func {
|
||||
const struct nv50_outp_func {
|
||||
void (*ctrl)(struct nv50_core *, int or, u32 ctrl,
|
||||
struct nv50_head_atom *);
|
||||
+ /* XXX: Only used by SORs and PIORs for now */
|
||||
+ void (*get_caps)(struct nv50_disp *,
|
||||
+ struct nouveau_encoder *, int or);
|
||||
} *dac, *pior, *sor;
|
||||
};
|
||||
|
||||
@@ -35,6 +40,7 @@ int core507d_new_(const struct nv50_core_func *, struct nouveau_drm *, s32,
|
||||
struct nv50_core **);
|
||||
void core507d_init(struct nv50_core *);
|
||||
void core507d_ntfy_init(struct nouveau_bo *, u32);
|
||||
+int core507d_caps_init(struct nouveau_drm *, struct nv50_disp *);
|
||||
int core507d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *);
|
||||
void core507d_update(struct nv50_core *, u32 *, bool);
|
||||
|
||||
@@ -51,6 +57,7 @@ extern const struct nv50_outp_func sor907d;
|
||||
int core917d_new(struct nouveau_drm *, s32, struct nv50_core **);
|
||||
|
||||
int corec37d_new(struct nouveau_drm *, s32, struct nv50_core **);
|
||||
+int corec37d_caps_init(struct nouveau_drm *, struct nv50_disp *);
|
||||
int corec37d_ntfy_wait_done(struct nouveau_bo *, u32, struct nvif_device *);
|
||||
void corec37d_update(struct nv50_core *, u32 *, bool);
|
||||
void corec37d_wndw_owner(struct nv50_core *);
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core507d.c b/drivers/gpu/drm/nouveau/dispnv50/core507d.c
|
||||
index c5152c39c684..e341f572c269 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/core507d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/core507d.c
|
||||
@@ -62,6 +62,20 @@ core507d_ntfy_init(struct nouveau_bo *bo, u32 offset)
|
||||
nouveau_bo_wr32(bo, offset / 4, 0x00000000);
|
||||
}
|
||||
|
||||
+int
|
||||
+core507d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp)
|
||||
+{
|
||||
+ u32 *push = evo_wait(&disp->core->chan, 2);
|
||||
+
|
||||
+ if (push) {
|
||||
+ evo_mthd(push, 0x008c, 1);
|
||||
+ evo_data(push, 0x0);
|
||||
+ evo_kick(push, &disp->core->chan);
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
void
|
||||
core507d_init(struct nv50_core *core)
|
||||
{
|
||||
@@ -77,6 +91,7 @@ static const struct nv50_core_func
|
||||
core507d = {
|
||||
.init = core507d_init,
|
||||
.ntfy_init = core507d_ntfy_init,
|
||||
+ .caps_init = core507d_caps_init,
|
||||
.ntfy_wait_done = core507d_ntfy_wait_done,
|
||||
.update = core507d_update,
|
||||
.head = &head507d,
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core827d.c b/drivers/gpu/drm/nouveau/dispnv50/core827d.c
|
||||
index 6123a068f836..2e0c1c536afe 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/core827d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/core827d.c
|
||||
@@ -26,6 +26,7 @@ static const struct nv50_core_func
|
||||
core827d = {
|
||||
.init = core507d_init,
|
||||
.ntfy_init = core507d_ntfy_init,
|
||||
+ .caps_init = core507d_caps_init,
|
||||
.ntfy_wait_done = core507d_ntfy_wait_done,
|
||||
.update = core507d_update,
|
||||
.head = &head827d,
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core907d.c b/drivers/gpu/drm/nouveau/dispnv50/core907d.c
|
||||
index ef822f813435..271629832629 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/core907d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/core907d.c
|
||||
@@ -26,6 +26,7 @@ static const struct nv50_core_func
|
||||
core907d = {
|
||||
.init = core507d_init,
|
||||
.ntfy_init = core507d_ntfy_init,
|
||||
+ .caps_init = core507d_caps_init,
|
||||
.ntfy_wait_done = core507d_ntfy_wait_done,
|
||||
.update = core507d_update,
|
||||
.head = &head907d,
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/core917d.c b/drivers/gpu/drm/nouveau/dispnv50/core917d.c
|
||||
index 392338df5bfd..5cc072d4c30f 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/core917d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/core917d.c
|
||||
@@ -26,6 +26,7 @@ static const struct nv50_core_func
|
||||
core917d = {
|
||||
.init = core507d_init,
|
||||
.ntfy_init = core507d_ntfy_init,
|
||||
+ .caps_init = core507d_caps_init,
|
||||
.ntfy_wait_done = core507d_ntfy_wait_done,
|
||||
.update = core507d_update,
|
||||
.head = &head917d,
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/corec37d.c b/drivers/gpu/drm/nouveau/dispnv50/corec37d.c
|
||||
index c03cb987856b..e0c8811fb8e4 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/corec37d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/corec37d.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "core.h"
|
||||
#include "head.h"
|
||||
|
||||
+#include <nvif/class.h>
|
||||
#include <nouveau_bo.h>
|
||||
|
||||
#include <nvif/timer.h>
|
||||
@@ -87,6 +88,30 @@ corec37d_ntfy_init(struct nouveau_bo *bo, u32 offset)
|
||||
nouveau_bo_wr32(bo, offset / 4 + 3, 0x00000000);
|
||||
}
|
||||
|
||||
+int corec37d_caps_init(struct nouveau_drm *drm, struct nv50_disp *disp)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = nvif_object_init(&disp->disp->object, 0, GV100_DISP_CAPS,
|
||||
+ NULL, 0, &disp->caps);
|
||||
+ if (ret) {
|
||||
+ NV_ERROR(drm,
|
||||
+ "Failed to init notifier caps region: %d\n",
|
||||
+ ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = nvif_object_map(&disp->caps, NULL, 0);
|
||||
+ if (ret) {
|
||||
+ NV_ERROR(drm,
|
||||
+ "Failed to map notifier caps region: %d\n",
|
||||
+ ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
corec37d_init(struct nv50_core *core)
|
||||
{
|
||||
@@ -111,6 +136,7 @@ static const struct nv50_core_func
|
||||
corec37d = {
|
||||
.init = corec37d_init,
|
||||
.ntfy_init = corec37d_ntfy_init,
|
||||
+ .caps_init = corec37d_caps_init,
|
||||
.ntfy_wait_done = corec37d_ntfy_wait_done,
|
||||
.update = corec37d_update,
|
||||
.wndw.owner = corec37d_wndw_owner,
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/corec57d.c b/drivers/gpu/drm/nouveau/dispnv50/corec57d.c
|
||||
index 147adcd60937..10ba9e9e4ae6 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/corec57d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/corec57d.c
|
||||
@@ -46,6 +46,7 @@ static const struct nv50_core_func
|
||||
corec57d = {
|
||||
.init = corec57d_init,
|
||||
.ntfy_init = corec37d_ntfy_init,
|
||||
+ .caps_init = corec37d_caps_init,
|
||||
.ntfy_wait_done = corec37d_ntfy_wait_done,
|
||||
.update = corec37d_update,
|
||||
.wndw.owner = corec37d_wndw_owner,
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
index 2afd56b9887d..1db4f20b8697 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
@@ -1663,6 +1663,7 @@ nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
||||
struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
|
||||
struct nouveau_encoder *nv_encoder;
|
||||
struct drm_encoder *encoder;
|
||||
+ struct nv50_disp *disp = nv50_disp(connector->dev);
|
||||
int type, ret;
|
||||
|
||||
switch (dcbe->type) {
|
||||
@@ -1689,10 +1690,12 @@ nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
||||
|
||||
drm_connector_attach_encoder(connector, encoder);
|
||||
|
||||
+ disp->core->func->sor->get_caps(disp, nv_encoder, ffs(dcbe->or) - 1);
|
||||
+
|
||||
if (dcbe->type == DCB_OUTPUT_DP) {
|
||||
- struct nv50_disp *disp = nv50_disp(encoder->dev);
|
||||
struct nvkm_i2c_aux *aux =
|
||||
nvkm_i2c_aux_find(i2c, dcbe->i2c_index);
|
||||
+
|
||||
if (aux) {
|
||||
if (disp->disp->object.oclass < GF110_DISP) {
|
||||
/* HW has no support for address-only
|
||||
@@ -1805,7 +1808,9 @@ nv50_pior_func = {
|
||||
static int
|
||||
nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
||||
{
|
||||
- struct nouveau_drm *drm = nouveau_drm(connector->dev);
|
||||
+ struct drm_device *dev = connector->dev;
|
||||
+ struct nouveau_drm *drm = nouveau_drm(dev);
|
||||
+ struct nv50_disp *disp = nv50_disp(dev);
|
||||
struct nvkm_i2c *i2c = nvxx_i2c(&drm->client.device);
|
||||
struct nvkm_i2c_bus *bus = NULL;
|
||||
struct nvkm_i2c_aux *aux = NULL;
|
||||
@@ -1844,6 +1849,9 @@ nv50_pior_create(struct drm_connector *connector, struct dcb_output *dcbe)
|
||||
drm_encoder_helper_add(encoder, &nv50_pior_help);
|
||||
|
||||
drm_connector_attach_encoder(connector, encoder);
|
||||
+
|
||||
+ disp->core->func->pior->get_caps(disp, nv_encoder, ffs(dcbe->or) - 1);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2401,6 +2409,8 @@ nv50_display_destroy(struct drm_device *dev)
|
||||
|
||||
nv50_audio_component_fini(nouveau_drm(dev));
|
||||
|
||||
+ nvif_object_unmap(&disp->caps);
|
||||
+ nvif_object_fini(&disp->caps);
|
||||
nv50_core_del(&disp->core);
|
||||
|
||||
nouveau_bo_unmap(disp->sync);
|
||||
@@ -2462,6 +2472,11 @@ nv50_display_create(struct drm_device *dev)
|
||||
goto out;
|
||||
|
||||
disp->core->func->init(disp->core);
|
||||
+ if (disp->core->func->caps_init) {
|
||||
+ ret = disp->core->func->caps_init(drm, disp);
|
||||
+ if (ret)
|
||||
+ goto out;
|
||||
+ }
|
||||
|
||||
/* create crtc objects to represent the hw heads */
|
||||
if (disp->disp->object.oclass >= GV100_DISP)
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h
|
||||
index d54fe00ac3a3..89c3b38c32a5 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.h
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h
|
||||
@@ -9,6 +9,7 @@ struct nv50_msto;
|
||||
struct nv50_disp {
|
||||
struct nvif_disp *disp;
|
||||
struct nv50_core *core;
|
||||
+ struct nvif_object caps;
|
||||
|
||||
#define NV50_DISP_SYNC(c, o) ((c) * 0x040 + (o))
|
||||
#define NV50_DISP_CORE_NTFY NV50_DISP_SYNC(0 , 0x00)
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/pior507d.c b/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
|
||||
index d2bac6a341dc..45d8ce7d2c28 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/pior507d.c
|
||||
@@ -38,7 +38,15 @@ pior507d_ctrl(struct nv50_core *core, int or, u32 ctrl,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+pior507d_get_caps(struct nv50_disp *disp, struct nouveau_encoder *outp,
|
||||
+ int or)
|
||||
+{
|
||||
+ outp->caps.dp_interlace = true;
|
||||
+}
|
||||
+
|
||||
const struct nv50_outp_func
|
||||
pior507d = {
|
||||
.ctrl = pior507d_ctrl,
|
||||
+ .get_caps = pior507d_get_caps,
|
||||
};
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/sor507d.c b/drivers/gpu/drm/nouveau/dispnv50/sor507d.c
|
||||
index 5222fe6a9b21..9a59fa7da00d 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/sor507d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/sor507d.c
|
||||
@@ -38,7 +38,14 @@ sor507d_ctrl(struct nv50_core *core, int or, u32 ctrl,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+sor507d_get_caps(struct nv50_disp *core, struct nouveau_encoder *outp, int or)
|
||||
+{
|
||||
+ outp->caps.dp_interlace = true;
|
||||
+}
|
||||
+
|
||||
const struct nv50_outp_func
|
||||
sor507d = {
|
||||
.ctrl = sor507d_ctrl,
|
||||
+ .get_caps = sor507d_get_caps,
|
||||
};
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/sor907d.c b/drivers/gpu/drm/nouveau/dispnv50/sor907d.c
|
||||
index b0314ec11fb3..9577ccf1c809 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/sor907d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/sor907d.c
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
#include "core.h"
|
||||
|
||||
+#include <nouveau_bo.h>
|
||||
#include <nvif/class.h>
|
||||
|
||||
static void
|
||||
@@ -35,7 +36,17 @@ sor907d_ctrl(struct nv50_core *core, int or, u32 ctrl,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+sor907d_get_caps(struct nv50_disp *disp, struct nouveau_encoder *outp, int or)
|
||||
+{
|
||||
+ const int off = or * 2;
|
||||
+ u32 tmp = nouveau_bo_rd32(disp->sync, 0x000014 + off);
|
||||
+
|
||||
+ outp->caps.dp_interlace = !!(tmp & 0x04000000);
|
||||
+}
|
||||
+
|
||||
const struct nv50_outp_func
|
||||
sor907d = {
|
||||
.ctrl = sor907d_ctrl,
|
||||
+ .get_caps = sor907d_get_caps,
|
||||
};
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/sorc37d.c b/drivers/gpu/drm/nouveau/dispnv50/sorc37d.c
|
||||
index dff059241c5d..c86ca955fdcd 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/sorc37d.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/sorc37d.c
|
||||
@@ -33,7 +33,16 @@ sorc37d_ctrl(struct nv50_core *core, int or, u32 ctrl,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+sorc37d_get_caps(struct nv50_disp *disp, struct nouveau_encoder *outp, int or)
|
||||
+{
|
||||
+ u32 tmp = nvif_rd32(&disp->caps, 0x000144 + (or * 8));
|
||||
+
|
||||
+ outp->caps.dp_interlace = !!(tmp & 0x04000000);
|
||||
+}
|
||||
+
|
||||
const struct nv50_outp_func
|
||||
sorc37d = {
|
||||
.ctrl = sorc37d_ctrl,
|
||||
+ .get_caps = sorc37d_get_caps,
|
||||
};
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
index 9a9a7f5003d3..6dae00da5d7e 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
@@ -509,7 +509,11 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
|
||||
nv_connector->detected_encoder = nv_encoder;
|
||||
|
||||
if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_TESLA) {
|
||||
- connector->interlace_allowed = true;
|
||||
+ if (nv_encoder->dcb->type == DCB_OUTPUT_DP)
|
||||
+ connector->interlace_allowed =
|
||||
+ nv_encoder->caps.dp_interlace;
|
||||
+ else
|
||||
+ connector->interlace_allowed = true;
|
||||
connector->doublescan_allowed = true;
|
||||
} else
|
||||
if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
|
||||
@@ -1060,6 +1064,10 @@ nouveau_connector_mode_valid(struct drm_connector *connector,
|
||||
case DCB_OUTPUT_TV:
|
||||
return get_slave_funcs(encoder)->mode_valid(encoder, mode);
|
||||
case DCB_OUTPUT_DP:
|
||||
+ if (mode->flags & DRM_MODE_FLAG_INTERLACE &&
|
||||
+ !nv_encoder->caps.dp_interlace)
|
||||
+ return MODE_NO_INTERLACE;
|
||||
+
|
||||
max_clock = nv_encoder->dp.link_nr;
|
||||
max_clock *= nv_encoder->dp.link_bw;
|
||||
clock = clock * (connector->display_info.bpc * 3) / 10;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_encoder.h b/drivers/gpu/drm/nouveau/nouveau_encoder.h
|
||||
index 3517f920bf89..3217f587eceb 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_encoder.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_encoder.h
|
||||
@@ -66,6 +66,10 @@ struct nouveau_encoder {
|
||||
} dp;
|
||||
};
|
||||
|
||||
+ struct {
|
||||
+ bool dp_interlace : 1;
|
||||
+ } caps;
|
||||
+
|
||||
void (*enc_save)(struct drm_encoder *encoder);
|
||||
void (*enc_restore)(struct drm_encoder *encoder);
|
||||
void (*update)(struct nouveau_encoder *, u8 head,
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,209 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lyude Paul <lyude@redhat.com>
|
||||
Date: Mon, 11 May 2020 18:41:27 -0400
|
||||
Subject: [PATCH] kms/nv50-: Share DP SST mode_valid() handling with MST
|
||||
|
||||
Currently, the nv50_mstc_mode_valid() function is happy to take any and
|
||||
all modes, even the ones we can't actually support sometimes like
|
||||
interlaced modes.
|
||||
|
||||
Luckily, the only difference between the mode validation that needs to
|
||||
be performed for MST vs. SST is that eventually we'll need to check the
|
||||
minimum PBN against the MSTB's full PBN capabilities (remember-we don't
|
||||
care about the current bw state here). Otherwise, all of the other code
|
||||
can be shared.
|
||||
|
||||
So, we move all of the common mode validation in
|
||||
nouveau_connector_mode_valid() into a separate helper,
|
||||
nv50_dp_mode_valid(), and use that from both nv50_mstc_mode_valid() and
|
||||
nouveau_connector_mode_valid(). Note that we allow for returning the
|
||||
calculated clock that nv50_dp_mode_valid() came up with, since we'll
|
||||
eventually want to use that for PBN calculation in
|
||||
nv50_mstc_mode_valid().
|
||||
|
||||
Signed-off-by: Lyude Paul <lyude@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/dispnv50/disp.c | 9 +++-
|
||||
drivers/gpu/drm/nouveau/nouveau_connector.c | 46 ++++++++++++---------
|
||||
drivers/gpu/drm/nouveau/nouveau_connector.h | 5 +++
|
||||
drivers/gpu/drm/nouveau/nouveau_dp.c | 31 ++++++++++++++
|
||||
drivers/gpu/drm/nouveau/nouveau_encoder.h | 4 ++
|
||||
5 files changed, 75 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
index e92e7bf49780..d5d69532f3c5 100644
|
||||
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
|
||||
@@ -1056,7 +1056,14 @@ static enum drm_mode_status
|
||||
nv50_mstc_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
- return MODE_OK;
|
||||
+ struct nv50_mstc *mstc = nv50_mstc(connector);
|
||||
+ struct nouveau_encoder *outp = mstc->mstm->outp;
|
||||
+
|
||||
+ /* TODO: calculate the PBN from the dotclock and validate against the
|
||||
+ * MSTB's max possible PBN
|
||||
+ */
|
||||
+
|
||||
+ return nv50_dp_mode_valid(connector, outp, mode, NULL);
|
||||
}
|
||||
|
||||
static int
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
index 6dae00da5d7e..1b383ae0248f 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "nouveau_reg.h"
|
||||
#include "nouveau_drv.h"
|
||||
#include "dispnv04/hw.h"
|
||||
+#include "dispnv50/disp.h"
|
||||
#include "nouveau_acpi.h"
|
||||
|
||||
#include "nouveau_display.h"
|
||||
@@ -1033,6 +1034,29 @@ get_tmds_link_bandwidth(struct drm_connector *connector)
|
||||
return 112000 * duallink_scale;
|
||||
}
|
||||
|
||||
+enum drm_mode_status
|
||||
+nouveau_conn_mode_clock_valid(const struct drm_display_mode *mode,
|
||||
+ const unsigned min_clock,
|
||||
+ const unsigned max_clock,
|
||||
+ unsigned int *clock_out)
|
||||
+{
|
||||
+ unsigned int clock = mode->clock;
|
||||
+
|
||||
+ if ((mode->flags & DRM_MODE_FLAG_3D_MASK) ==
|
||||
+ DRM_MODE_FLAG_3D_FRAME_PACKING)
|
||||
+ clock *= 2;
|
||||
+
|
||||
+ if (clock < min_clock)
|
||||
+ return MODE_CLOCK_LOW;
|
||||
+ if (clock > max_clock)
|
||||
+ return MODE_CLOCK_HIGH;
|
||||
+
|
||||
+ if (clock_out)
|
||||
+ *clock_out = clock;
|
||||
+
|
||||
+ return MODE_OK;
|
||||
+}
|
||||
+
|
||||
static enum drm_mode_status
|
||||
nouveau_connector_mode_valid(struct drm_connector *connector,
|
||||
struct drm_display_mode *mode)
|
||||
@@ -1041,7 +1065,6 @@ nouveau_connector_mode_valid(struct drm_connector *connector,
|
||||
struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
|
||||
struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
|
||||
unsigned min_clock = 25000, max_clock = min_clock;
|
||||
- unsigned clock = mode->clock;
|
||||
|
||||
switch (nv_encoder->dcb->type) {
|
||||
case DCB_OUTPUT_LVDS:
|
||||
@@ -1064,29 +1087,14 @@ nouveau_connector_mode_valid(struct drm_connector *connector,
|
||||
case DCB_OUTPUT_TV:
|
||||
return get_slave_funcs(encoder)->mode_valid(encoder, mode);
|
||||
case DCB_OUTPUT_DP:
|
||||
- if (mode->flags & DRM_MODE_FLAG_INTERLACE &&
|
||||
- !nv_encoder->caps.dp_interlace)
|
||||
- return MODE_NO_INTERLACE;
|
||||
-
|
||||
- max_clock = nv_encoder->dp.link_nr;
|
||||
- max_clock *= nv_encoder->dp.link_bw;
|
||||
- clock = clock * (connector->display_info.bpc * 3) / 10;
|
||||
- break;
|
||||
+ return nv50_dp_mode_valid(connector, nv_encoder, mode, NULL);
|
||||
default:
|
||||
BUG();
|
||||
return MODE_BAD;
|
||||
}
|
||||
|
||||
- if ((mode->flags & DRM_MODE_FLAG_3D_MASK) == DRM_MODE_FLAG_3D_FRAME_PACKING)
|
||||
- clock *= 2;
|
||||
-
|
||||
- if (clock < min_clock)
|
||||
- return MODE_CLOCK_LOW;
|
||||
-
|
||||
- if (clock > max_clock)
|
||||
- return MODE_CLOCK_HIGH;
|
||||
-
|
||||
- return MODE_OK;
|
||||
+ return nouveau_conn_mode_clock_valid(mode, min_clock, max_clock,
|
||||
+ NULL);
|
||||
}
|
||||
|
||||
static struct drm_encoder *
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
|
||||
index de84fb4708c7..9e062c7adec8 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_connector.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
|
||||
@@ -195,6 +195,11 @@ int nouveau_conn_atomic_get_property(struct drm_connector *,
|
||||
const struct drm_connector_state *,
|
||||
struct drm_property *, u64 *);
|
||||
struct drm_display_mode *nouveau_conn_native_mode(struct drm_connector *);
|
||||
+enum drm_mode_status
|
||||
+nouveau_conn_mode_clock_valid(const struct drm_display_mode *,
|
||||
+ const unsigned min_clock,
|
||||
+ const unsigned max_clock,
|
||||
+ unsigned *clock);
|
||||
|
||||
#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT
|
||||
extern int nouveau_backlight_init(struct drm_connector *);
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c
|
||||
index 2674f1587457..8a0f7994e1ae 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_dp.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_dp.c
|
||||
@@ -98,3 +98,34 @@ nouveau_dp_detect(struct nouveau_encoder *nv_encoder)
|
||||
return NOUVEAU_DP_SST;
|
||||
return ret;
|
||||
}
|
||||
+
|
||||
+/* TODO:
|
||||
+ * - Use the minimum possible BPC here, once we add support for the max bpc
|
||||
+ * property.
|
||||
+ * - Validate the mode against downstream port caps (see
|
||||
+ * drm_dp_downstream_max_clock())
|
||||
+ * - Validate against the DP caps advertised by the GPU (we don't check these
|
||||
+ * yet)
|
||||
+ */
|
||||
+enum drm_mode_status
|
||||
+nv50_dp_mode_valid(struct drm_connector *connector,
|
||||
+ struct nouveau_encoder *outp,
|
||||
+ const struct drm_display_mode *mode,
|
||||
+ unsigned *out_clock)
|
||||
+{
|
||||
+ const unsigned min_clock = 25000;
|
||||
+ unsigned max_clock, clock;
|
||||
+ enum drm_mode_status ret;
|
||||
+
|
||||
+ if (mode->flags & DRM_MODE_FLAG_INTERLACE && !outp->caps.dp_interlace)
|
||||
+ return MODE_NO_INTERLACE;
|
||||
+
|
||||
+ max_clock = outp->dp.link_nr * outp->dp.link_bw;
|
||||
+ clock = mode->clock * (connector->display_info.bpc * 3) / 10;
|
||||
+
|
||||
+ ret = nouveau_conn_mode_clock_valid(mode, min_clock, max_clock,
|
||||
+ &clock);
|
||||
+ if (out_clock)
|
||||
+ *out_clock = clock;
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_encoder.h b/drivers/gpu/drm/nouveau/nouveau_encoder.h
|
||||
index 3217f587eceb..de51733b0476 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_encoder.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_encoder.h
|
||||
@@ -104,6 +104,10 @@ enum nouveau_dp_status {
|
||||
};
|
||||
|
||||
int nouveau_dp_detect(struct nouveau_encoder *);
|
||||
+enum drm_mode_status nv50_dp_mode_valid(struct drm_connector *,
|
||||
+ struct nouveau_encoder *,
|
||||
+ const struct drm_display_mode *,
|
||||
+ unsigned *clock);
|
||||
|
||||
struct nouveau_connector *
|
||||
nouveau_encoder_connector_get(struct nouveau_encoder *encoder);
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zheng Bin <zhengbin13@huawei.com>
|
||||
Date: Fri, 24 Apr 2020 15:36:01 +0800
|
||||
Subject: [PATCH] mmu: Remove unneeded semicolon
|
||||
|
||||
Fixes coccicheck warning:
|
||||
|
||||
drivers/gpu/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon
|
||||
drivers/gpu/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon
|
||||
|
||||
Reported-by: Hulk Robot <hulkci@huawei.com>
|
||||
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +-
|
||||
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
|
||||
index 41640e0584ac..199f94e15c5f 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
|
||||
@@ -580,7 +580,7 @@ nvkm_vmm_iter(struct nvkm_vmm *vmm, const struct nvkm_vmm_page *page,
|
||||
it.pte[it.lvl]++;
|
||||
}
|
||||
}
|
||||
- };
|
||||
+ }
|
||||
|
||||
nvkm_vmm_flush(&it);
|
||||
return ~0ULL;
|
||||
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
|
||||
index 5e55ecbd8005..d3f8f916d0db 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
|
||||
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
|
||||
@@ -304,7 +304,7 @@ int tu102_vmm_new(struct nvkm_mmu *, bool, u64, u64, void *, u32,
|
||||
FILL(VMM, PT, PTEI, _ptes, MAP, _addr); \
|
||||
PTEI += _ptes; \
|
||||
PTEN -= _ptes; \
|
||||
- }; \
|
||||
+ } \
|
||||
nvkm_done((PT)->memory); \
|
||||
} while(0)
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Leo Yan <leo.yan@linaro.org>
|
||||
Date: Tue, 5 May 2020 21:36:42 +0800
|
||||
Subject: [PATCH] perf cs-etm: Move defined of traceid_list
|
||||
|
||||
The variable 'traceid_list' is defined in the header file cs-etm.h,
|
||||
if multiple C files include cs-etm.h the compiler might complaint for
|
||||
multiple definition of 'traceid_list'.
|
||||
|
||||
To fix multiple definition error, move the definition of 'traceid_list'
|
||||
into cs-etm.c.
|
||||
|
||||
Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
|
||||
Reported-by: Thomas Backlund <tmb@mageia.org>
|
||||
Signed-off-by: Leo Yan <leo.yan@linaro.org>
|
||||
Tested-by: Thomas Backlund <tmb@mageia.org>
|
||||
Tested-by: Mike Leach <mike.leach@linaro.org>
|
||||
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
|
||||
Reviewed-by: Mike Leach <mike.leach@linaro.org>
|
||||
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
|
||||
Upstream Status: https://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org/
|
||||
---
|
||||
tools/perf/util/cs-etm.c | 3 +++
|
||||
tools/perf/util/cs-etm.h | 3 ---
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
|
||||
index 62d2f9b9ce1b..381d9708e9bd 100644
|
||||
--- a/tools/perf/util/cs-etm.c
|
||||
+++ b/tools/perf/util/cs-etm.c
|
||||
@@ -94,6 +94,9 @@ struct cs_etm_queue {
|
||||
struct cs_etm_traceid_queue **traceid_queues;
|
||||
};
|
||||
|
||||
+/* RB tree for quick conversion between traceID and metadata pointers */
|
||||
+static struct intlist *traceid_list;
|
||||
+
|
||||
static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
|
||||
static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
|
||||
static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
|
||||
diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
|
||||
index 650ecc2a6349..4ad925d6d799 100644
|
||||
--- a/tools/perf/util/cs-etm.h
|
||||
+++ b/tools/perf/util/cs-etm.h
|
||||
@@ -114,9 +114,6 @@ enum cs_etm_isa {
|
||||
CS_ETM_ISA_T32,
|
||||
};
|
||||
|
||||
-/* RB tree for quick conversion between traceID and metadata pointers */
|
||||
-struct intlist *traceid_list;
|
||||
-
|
||||
struct cs_etm_queue;
|
||||
|
||||
struct cs_etm_packet {
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
From 14232c6e788cb1f7b96dbd08b077f90923324b24 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Hofhansl <larsh@apache.org>
|
||||
Date: Thu, 23 Apr 2020 14:57:09 -0700
|
||||
Subject: [PATCH] platform/x86: thinkpad_acpi: Add support for dual fan control
|
||||
|
||||
This adds dual fan control for the following models:
|
||||
P50, P51, P52, P70, P71, P72, P1 gen1, P2 gen2, X1E gen1 and X1E gen2.
|
||||
|
||||
Both fans are controlled together as if they were a single fan.
|
||||
|
||||
Tested on an X1 Extreme Gen1, an X1 Extreme Gen2, and a P50.
|
||||
|
||||
The patch is defensive, it adds only specific supported machines, and falls
|
||||
back to the old behavior if both fans cannot be controlled.
|
||||
|
||||
Background:
|
||||
I tested the BIOS default behavior on my X1E gen2 and both fans are always
|
||||
changed together. So rather than adding controls for each fan, this controls
|
||||
both fans together as the BIOS would do.
|
||||
|
||||
This was inspired by a discussion on dual fan support for the thinkfan tool
|
||||
(see link below). All BIOS IDs are taken from there. The X1E gen2 ID is
|
||||
verified on my machine.
|
||||
|
||||
Thanks to GitHub users voidworker and civic9 for the earlier patches and
|
||||
BIOS IDs, and to users peter-stoll and sassman for testing the patch on
|
||||
their machines.
|
||||
|
||||
BugLink: https://github.com/vmatare/thinkfan/issues/58
|
||||
Signed-off-by: Lars Hofhansl <larsh@apache.org>
|
||||
[andy: massaged commit message to capitalize ID and convert to BugLink]
|
||||
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
||||
---
|
||||
drivers/platform/x86/thinkpad_acpi.c | 43 ++++++++++++++++++++++++----
|
||||
1 file changed, 37 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
|
||||
index 8eaadbaf8ffa..83b4a83da967 100644
|
||||
--- a/drivers/platform/x86/thinkpad_acpi.c
|
||||
+++ b/drivers/platform/x86/thinkpad_acpi.c
|
||||
@@ -318,6 +318,7 @@ static struct {
|
||||
u32 uwb:1;
|
||||
u32 fan_ctrl_status_undef:1;
|
||||
u32 second_fan:1;
|
||||
+ u32 second_fan_ctl:1;
|
||||
u32 beep_needs_two_args:1;
|
||||
u32 mixer_no_level_control:1;
|
||||
u32 battery_force_primary:1;
|
||||
@@ -8324,11 +8325,19 @@ static int fan_set_level(int level)
|
||||
|
||||
switch (fan_control_access_mode) {
|
||||
case TPACPI_FAN_WR_ACPI_SFAN:
|
||||
- if (level >= 0 && level <= 7) {
|
||||
- if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", level))
|
||||
- return -EIO;
|
||||
- } else
|
||||
+ if ((level < 0) || (level > 7))
|
||||
return -EINVAL;
|
||||
+
|
||||
+ if (tp_features.second_fan_ctl) {
|
||||
+ if (!fan_select_fan2() ||
|
||||
+ !acpi_evalf(sfan_handle, NULL, NULL, "vd", level)) {
|
||||
+ pr_warn("Couldn't set 2nd fan level, disabling support\n");
|
||||
+ tp_features.second_fan_ctl = 0;
|
||||
+ }
|
||||
+ fan_select_fan1();
|
||||
+ }
|
||||
+ if (!acpi_evalf(sfan_handle, NULL, NULL, "vd", level))
|
||||
+ return -EIO;
|
||||
break;
|
||||
|
||||
case TPACPI_FAN_WR_ACPI_FANS:
|
||||
@@ -8345,6 +8354,15 @@ static int fan_set_level(int level)
|
||||
else if (level & TP_EC_FAN_AUTO)
|
||||
level |= 4; /* safety min speed 4 */
|
||||
|
||||
+ if (tp_features.second_fan_ctl) {
|
||||
+ if (!fan_select_fan2() ||
|
||||
+ !acpi_ec_write(fan_status_offset, level)) {
|
||||
+ pr_warn("Couldn't set 2nd fan level, disabling support\n");
|
||||
+ tp_features.second_fan_ctl = 0;
|
||||
+ }
|
||||
+ fan_select_fan1();
|
||||
+
|
||||
+ }
|
||||
if (!acpi_ec_write(fan_status_offset, level))
|
||||
return -EIO;
|
||||
else
|
||||
@@ -8763,6 +8781,7 @@ static const struct attribute_group fan_attr_group = {
|
||||
|
||||
#define TPACPI_FAN_Q1 0x0001 /* Unitialized HFSP */
|
||||
#define TPACPI_FAN_2FAN 0x0002 /* EC 0x31 bit 0 selects fan2 */
|
||||
+#define TPACPI_FAN_2CTL 0x0004 /* selects fan2 control */
|
||||
|
||||
static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
|
||||
TPACPI_QEC_IBM('1', 'Y', TPACPI_FAN_Q1),
|
||||
@@ -8771,6 +8790,13 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
|
||||
TPACPI_QEC_IBM('7', '0', TPACPI_FAN_Q1),
|
||||
TPACPI_QEC_LNV('7', 'M', TPACPI_FAN_2FAN),
|
||||
TPACPI_Q_LNV('N', '1', TPACPI_FAN_2FAN),
|
||||
+ TPACPI_Q_LNV3('N', '1', 'D', TPACPI_FAN_2CTL), /* P70 */
|
||||
+ TPACPI_Q_LNV3('N', '1', 'E', TPACPI_FAN_2CTL), /* P50 */
|
||||
+ TPACPI_Q_LNV3('N', '1', 'T', TPACPI_FAN_2CTL), /* P71 */
|
||||
+ TPACPI_Q_LNV3('N', '1', 'U', TPACPI_FAN_2CTL), /* P51 */
|
||||
+ TPACPI_Q_LNV3('N', '2', 'C', TPACPI_FAN_2CTL), /* P52 / P72 */
|
||||
+ TPACPI_Q_LNV3('N', '2', 'E', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (1st gen) */
|
||||
+ TPACPI_Q_LNV3('N', '2', 'O', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (2nd gen) */
|
||||
};
|
||||
|
||||
static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
@@ -8788,6 +8814,7 @@ static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
fan_watchdog_maxinterval = 0;
|
||||
tp_features.fan_ctrl_status_undef = 0;
|
||||
tp_features.second_fan = 0;
|
||||
+ tp_features.second_fan_ctl = 0;
|
||||
fan_control_desired_level = 7;
|
||||
|
||||
if (tpacpi_is_ibm()) {
|
||||
@@ -8812,8 +8839,12 @@ static int __init fan_init(struct ibm_init_struct *iibm)
|
||||
fan_quirk1_setup();
|
||||
if (quirks & TPACPI_FAN_2FAN) {
|
||||
tp_features.second_fan = 1;
|
||||
- dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_FAN,
|
||||
- "secondary fan support enabled\n");
|
||||
+ pr_info("secondary fan support enabled\n");
|
||||
+ }
|
||||
+ if (quirks & TPACPI_FAN_2CTL) {
|
||||
+ tp_features.second_fan = 1;
|
||||
+ tp_features.second_fan_ctl = 1;
|
||||
+ pr_info("secondary fan control enabled\n");
|
||||
}
|
||||
} else {
|
||||
pr_err("ThinkPad ACPI EC access misbehaving, fan status and control unavailable\n");
|
||||
--
|
||||
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
|
||||
|
||||
|
|
@ -16,10 +16,10 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
3 files changed, 10 insertions(+)
|
||||
|
||||
diff --git a/arch/s390/include/asm/ipl.h b/arch/s390/include/asm/ipl.h
|
||||
index b63bd66404b8..3482d9602e68 100644
|
||||
index 7d5cfdda5277..be66ee5d0437 100644
|
||||
--- a/arch/s390/include/asm/ipl.h
|
||||
+++ b/arch/s390/include/asm/ipl.h
|
||||
@@ -109,6 +109,7 @@ int ipl_report_add_component(struct ipl_report *report, struct kexec_buf *kbuf,
|
||||
@@ -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);
|
||||
|
|
@ -28,10 +28,10 @@ index b63bd66404b8..3482d9602e68 100644
|
|||
/*
|
||||
* DIAG 308 support
|
||||
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
|
||||
index 4a71061974fd..9baf0b570c3d 100644
|
||||
index 90a2a17239b0..be3b72c53656 100644
|
||||
--- a/arch/s390/kernel/ipl.c
|
||||
+++ b/arch/s390/kernel/ipl.c
|
||||
@@ -1901,3 +1901,8 @@ int ipl_report_free(struct ipl_report *report)
|
||||
@@ -2110,3 +2110,8 @@ int ipl_report_free(struct ipl_report *report)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -41,7 +41,7 @@ index 4a71061974fd..9baf0b570c3d 100644
|
|||
+ return !!ipl_secure_flag;
|
||||
+}
|
||||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
|
||||
index 36445dd40fdb..b338a050c5aa 100644
|
||||
index 07aa15ba43b3..307abb2d82d7 100644
|
||||
--- a/arch/s390/kernel/setup.c
|
||||
+++ b/arch/s390/kernel/setup.c
|
||||
@@ -49,6 +49,7 @@
|
||||
|
|
@ -52,7 +52,7 @@ index 36445dd40fdb..b338a050c5aa 100644
|
|||
|
||||
#include <asm/boot_data.h>
|
||||
#include <asm/ipl.h>
|
||||
@@ -1093,6 +1094,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
@@ -1086,6 +1087,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
log_component_list();
|
||||
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|||
5 files changed, 20 insertions(+)
|
||||
|
||||
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
|
||||
index 5616b2567aa7..bc5caab1413b 100644
|
||||
index af998f93d256..3c33f00cd4d6 100644
|
||||
--- a/include/linux/lsm_hook_defs.h
|
||||
+++ b/include/linux/lsm_hook_defs.h
|
||||
@@ -371,6 +371,8 @@ LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free_security, struct bpf_prog_aux *aux)
|
||||
@@ -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)
|
||||
|
|
@ -30,10 +30,10 @@ index 5616b2567aa7..bc5caab1413b 100644
|
|||
#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 988ca0df7824..4ed37b95417c 100644
|
||||
index 95b7c1d32062..dbacbb1fc129 100644
|
||||
--- a/include/linux/lsm_hooks.h
|
||||
+++ b/include/linux/lsm_hooks.h
|
||||
@@ -1476,6 +1476,12 @@
|
||||
@@ -1507,6 +1507,12 @@
|
||||
*
|
||||
* @what: kernel feature being accessed
|
||||
*
|
||||
|
|
@ -47,10 +47,10 @@ index 988ca0df7824..4ed37b95417c 100644
|
|||
*
|
||||
* @perf_event_open:
|
||||
diff --git a/include/linux/security.h b/include/linux/security.h
|
||||
index a8d9310472df..381305889d89 100644
|
||||
index 0a0a03b36a3b..26869f44416b 100644
|
||||
--- a/include/linux/security.h
|
||||
+++ b/include/linux/security.h
|
||||
@@ -446,6 +446,7 @@ int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen);
|
||||
@@ -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);
|
||||
|
|
@ -58,7 +58,7 @@ index a8d9310472df..381305889d89 100644
|
|||
#else /* CONFIG_SECURITY */
|
||||
|
||||
static inline int call_blocking_lsm_notifier(enum lsm_event event, void *data)
|
||||
@@ -1273,6 +1274,10 @@ static inline int security_locked_down(enum lockdown_reason what)
|
||||
@@ -1291,6 +1292,10 @@ static inline int security_locked_down(enum lockdown_reason what)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -68,9 +68,9 @@ index a8d9310472df..381305889d89 100644
|
|||
+}
|
||||
#endif /* CONFIG_SECURITY */
|
||||
|
||||
#ifdef CONFIG_SECURITY_NETWORK
|
||||
#if defined(CONFIG_SECURITY) && defined(CONFIG_WATCH_QUEUE)
|
||||
diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c
|
||||
index 5a952617a0eb..61cc3cdc4d25 100644
|
||||
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)
|
||||
|
|
@ -82,10 +82,10 @@ index 5a952617a0eb..61cc3cdc4d25 100644
|
|||
|
||||
static int __init lockdown_lsm_init(void)
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index 51de970fbb1e..48d05f8067f2 100644
|
||||
index 70a7ad357bc6..23e16e773bc2 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -2468,6 +2468,12 @@ int security_locked_down(enum lockdown_reason what)
|
||||
@@ -2516,6 +2516,12 @@ int security_locked_down(enum lockdown_reason what)
|
||||
}
|
||||
EXPORT_SYMBOL(security_locked_down);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
From c8e222616c7e98305bdc861db3ccac520bc29921 Mon Sep 17 00:00:00 2001
|
||||
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: selinux: allow reading labels before policy is loaded
|
||||
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
|
||||
|
|
@ -33,7 +33,7 @@ index efa6108b1ce9..ca901025802a 100644
|
|||
@@ -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
|
||||
|
|
@ -42,7 +42,8 @@ index efa6108b1ce9..ca901025802a 100644
|
|||
+ if (!selinux_initialized(&selinux_state) ||
|
||||
+ strcmp(name, XATTR_SELINUX_SUFFIX))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
|
||||
/*
|
||||
--
|
||||
cgit 1.2.3-1.el7
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Date: Tue, 10 Mar 2020 13:52:39 +0100
|
||||
Subject: [PATCH] soc: bcm2835: Sync xHCI reset firmware property with
|
||||
downstream
|
||||
|
||||
The property is needed in order to trigger VL805's firmware load. Note
|
||||
that there is a gap between the property introduced and the previous
|
||||
one. This is also the case downstream.
|
||||
|
||||
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
||||
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
|
||||
---
|
||||
include/soc/bcm2835/raspberrypi-firmware.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
index 7800e12ee042..cc9cdbc66403 100644
|
||||
--- a/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
|
||||
@@ -90,7 +90,7 @@ enum rpi_firmware_property_tag {
|
||||
RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045,
|
||||
RPI_FIRMWARE_GET_POE_HAT_VAL = 0x00030049,
|
||||
RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00030050,
|
||||
-
|
||||
+ RPI_FIRMWARE_NOTIFY_XHCI_RESET = 0x00030058,
|
||||
|
||||
/* Dispmanx TAGS */
|
||||
RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
From 2c36867719d93db8d7f365310587578ab980762c Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Wed, 15 Apr 2020 21:24:48 +0200
|
||||
Subject: [PATCH] usb: fusb302: Convert to use GPIO descriptors
|
||||
|
||||
This converts the FUSB302 driver to use GPIO descriptors.
|
||||
The conversion to descriptors per se is pretty straight-forward.
|
||||
|
||||
In the process I discovered that:
|
||||
|
||||
1. The driver uses a completely undocumented device tree binding
|
||||
for the interrupt GPIO line, "fcs,int_n". Ooops.
|
||||
|
||||
2. The undocumented binding, presumably since it has not seen
|
||||
review, is just "fcs,int_n", lacking the compulsory "-gpios"
|
||||
suffix and also something that is not a good name because
|
||||
the "_n" implies the line is inverted which is something we
|
||||
handle with flags in the device tree. Ooops.
|
||||
|
||||
3. Possibly the driver should not be requesting the line as a
|
||||
GPIO and request the corresponding interrupt line by open
|
||||
coding, the GPIO chip is very likely doubleing as an IRQ
|
||||
controller and can probably provide an interrupt directly
|
||||
for this line with interrupts-extended = <&gpio0 ...>;
|
||||
|
||||
4. Possibly the IRQ should just be tagged on the I2C client node
|
||||
in the device tree like apparently ACPI does, as it overrides
|
||||
this IRQ with client->irq if that exists.
|
||||
|
||||
But now it is too late to do much about that and as I can see
|
||||
this is used like this in the Pinebook which is a shipping product
|
||||
so let'a just contain the mess and move on.
|
||||
|
||||
The property currently appears in:
|
||||
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
|
||||
|
||||
Create a quirk in the GPIO OF library to allow this property
|
||||
specifically to be specified without the "-gpios" suffix, we have
|
||||
other such bindings already.
|
||||
|
||||
Cc: Tobias Schramm <t.schramm@manjaro.org>
|
||||
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
|
||||
Cc: Yueyao Zhu <yueyao@google.com>
|
||||
Cc: Guenter Roeck <linux@roeck-us.net>
|
||||
Cc: devicetree@vger.kernel.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
Link: https://lore.kernel.org/r/20200415192448.305257-1-linus.walleij@linaro.org
|
||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
---
|
||||
drivers/gpio/gpiolib-of.c | 21 +++++++++++++++++++++
|
||||
drivers/usb/typec/tcpm/fusb302.c | 32 +++++++++-----------------------
|
||||
2 files changed, 30 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
|
||||
index ccc449df3792a..20c2c428168e4 100644
|
||||
--- a/drivers/gpio/gpiolib-of.c
|
||||
+++ b/drivers/gpio/gpiolib-of.c
|
||||
@@ -460,6 +460,24 @@ static struct gpio_desc *of_find_arizona_gpio(struct device *dev,
|
||||
return of_get_named_gpiod_flags(dev->of_node, con_id, 0, of_flags);
|
||||
}
|
||||
|
||||
+static struct gpio_desc *of_find_usb_gpio(struct device *dev,
|
||||
+ const char *con_id,
|
||||
+ enum of_gpio_flags *of_flags)
|
||||
+{
|
||||
+ /*
|
||||
+ * Currently this USB quirk is only for the Fairchild FUSB302 host which is using
|
||||
+ * an undocumented DT GPIO line named "fcs,int_n" without the compulsory "-gpios"
|
||||
+ * suffix.
|
||||
+ */
|
||||
+ if (!IS_ENABLED(CONFIG_TYPEC_FUSB302))
|
||||
+ return ERR_PTR(-ENOENT);
|
||||
+
|
||||
+ if (!con_id || strcmp(con_id, "fcs,int_n"))
|
||||
+ return ERR_PTR(-ENOENT);
|
||||
+
|
||||
+ return of_get_named_gpiod_flags(dev->of_node, con_id, 0, of_flags);
|
||||
+}
|
||||
+
|
||||
struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
||||
unsigned int idx, unsigned long *flags)
|
||||
{
|
||||
@@ -504,6 +522,9 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
||||
if (PTR_ERR(desc) == -ENOENT)
|
||||
desc = of_find_arizona_gpio(dev, con_id, &of_flags);
|
||||
|
||||
+ if (PTR_ERR(desc) == -ENOENT)
|
||||
+ desc = of_find_usb_gpio(dev, con_id, &of_flags);
|
||||
+
|
||||
if (IS_ERR(desc))
|
||||
return desc;
|
||||
|
||||
diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c
|
||||
index b498960ff72b5..b28facece43c4 100644
|
||||
--- a/drivers/usb/typec/tcpm/fusb302.c
|
||||
+++ b/drivers/usb/typec/tcpm/fusb302.c
|
||||
@@ -9,14 +9,13 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/extcon.h>
|
||||
-#include <linux/gpio.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of_device.h>
|
||||
-#include <linux/of_gpio.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
@@ -83,7 +82,7 @@ struct fusb302_chip {
|
||||
struct work_struct irq_work;
|
||||
bool irq_suspended;
|
||||
bool irq_while_suspended;
|
||||
- int gpio_int_n;
|
||||
+ struct gpio_desc *gpio_int_n;
|
||||
int gpio_int_n_irq;
|
||||
struct extcon_dev *extcon;
|
||||
|
||||
@@ -1618,30 +1617,17 @@ static void fusb302_irq_work(struct work_struct *work)
|
||||
|
||||
static int init_gpio(struct fusb302_chip *chip)
|
||||
{
|
||||
- struct device_node *node;
|
||||
+ struct device *dev = chip->dev;
|
||||
int ret = 0;
|
||||
|
||||
- node = chip->dev->of_node;
|
||||
- chip->gpio_int_n = of_get_named_gpio(node, "fcs,int_n", 0);
|
||||
- if (!gpio_is_valid(chip->gpio_int_n)) {
|
||||
- ret = chip->gpio_int_n;
|
||||
- dev_err(chip->dev, "cannot get named GPIO Int_N, ret=%d", ret);
|
||||
- return ret;
|
||||
- }
|
||||
- ret = devm_gpio_request(chip->dev, chip->gpio_int_n, "fcs,int_n");
|
||||
- if (ret < 0) {
|
||||
- dev_err(chip->dev, "cannot request GPIO Int_N, ret=%d", ret);
|
||||
- return ret;
|
||||
- }
|
||||
- ret = gpio_direction_input(chip->gpio_int_n);
|
||||
- if (ret < 0) {
|
||||
- dev_err(chip->dev,
|
||||
- "cannot set GPIO Int_N to input, ret=%d", ret);
|
||||
- return ret;
|
||||
+ chip->gpio_int_n = devm_gpiod_get(dev, "fcs,int_n", GPIOD_IN);
|
||||
+ if (IS_ERR(chip->gpio_int_n)) {
|
||||
+ dev_err(dev, "failed to request gpio_int_n\n");
|
||||
+ return PTR_ERR(chip->gpio_int_n);
|
||||
}
|
||||
- ret = gpio_to_irq(chip->gpio_int_n);
|
||||
+ ret = gpiod_to_irq(chip->gpio_int_n);
|
||||
if (ret < 0) {
|
||||
- dev_err(chip->dev,
|
||||
+ dev_err(dev,
|
||||
"cannot request IRQ for GPIO Int_N, ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
||||
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
|
||||
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
From e82044df3332199c63904d86b4b1ad0963a6f8e0 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Jirman <megous@megous.com>
|
||||
Date: Fri, 26 Jun 2020 02:55:52 +0200
|
||||
Subject: [PATCH 04/13] 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 +-
|
||||
...-jh057n00900.c => panel-sitronix-st7703.c} | 0
|
||||
3 files changed, 14 insertions(+), 14 deletions(-)
|
||||
rename drivers/gpu/drm/panel/{panel-rocktech-jh057n00900.c => panel-sitronix-st7703.c} (100%)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
|
||||
index a1723c1b5fbf8..7cf1f160fdd51 100644
|
||||
--- a/drivers/gpu/drm/panel/Kconfig
|
||||
+++ b/drivers/gpu/drm/panel/Kconfig
|
||||
@@ -262,19 +262,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
|
||||
@@ -374,6 +361,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 96a883cd66305..0519fdf0710d5 100644
|
||||
--- a/drivers/gpu/drm/panel/Makefile
|
||||
+++ b/drivers/gpu/drm/panel/Makefile
|
||||
@@ -25,7 +25,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
|
||||
@@ -39,6 +38,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-sitronix-st7703.c
|
||||
similarity index 100%
|
||||
rename from drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
|
||||
rename to drivers/gpu/drm/panel/panel-sitronix-st7703.c
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
@ -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
configs/fedora/debug/CONFIG_BTRFS_ASSERT
Normal file
1
configs/fedora/debug/CONFIG_BTRFS_ASSERT
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_BTRFS_ASSERT=y
|
||||
24
configs/fedora/debug/CONFIG_DEBUG_VM_PGTABLE
Normal file
24
configs/fedora/debug/CONFIG_DEBUG_VM_PGTABLE
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# CONFIG_DEBUG_VM_PGTABLE:
|
||||
#
|
||||
# This option provides a debug method which can be used to test
|
||||
# architecture page table helper functions on various platforms in
|
||||
# verifying if they comply with expected generic MM semantics. This
|
||||
# will help architecture code in making sure that any changes or
|
||||
# new additions of these helpers still conform to expected
|
||||
# semantics of the generic MM. Platforms will have to opt in for
|
||||
# this through ARCH_HAS_DEBUG_VM_PGTABLE.
|
||||
#
|
||||
# If unsure, say N.
|
||||
#
|
||||
# Symbol: DEBUG_VM_PGTABLE [=y]
|
||||
# Type : bool
|
||||
# Defined at lib/Kconfig.debug:702
|
||||
# Prompt: Debug arch page table for semantics compliance
|
||||
# Depends on: MMU [=y] && ARCH_HAS_DEBUG_VM_PGTABLE [=y]
|
||||
# Location:
|
||||
# -> Kernel hacking
|
||||
# -> Memory Debugging
|
||||
#
|
||||
#
|
||||
#
|
||||
CONFIG_DEBUG_VM_PGTABLE=y
|
||||
|
|
@ -1 +1 @@
|
|||
# CONFIG_DMADEVICES_DEBUG is not set
|
||||
CONFIG_DMADEVICES_DEBUG=y
|
||||
|
|
|
|||
1
configs/fedora/debug/CONFIG_KASAN_VMALLOC
Normal file
1
configs/fedora/debug/CONFIG_KASAN_VMALLOC
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_KASAN_VMALLOC=y
|
||||
1
configs/fedora/debug/CONFIG_KPROBE_EVENT_GEN_TEST
Normal file
1
configs/fedora/debug/CONFIG_KPROBE_EVENT_GEN_TEST
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_KPROBE_EVENT_GEN_TEST=m
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_MMIOTRACE=y
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_PROVE_RCU=y
|
||||
1
configs/fedora/debug/CONFIG_PTDUMP_DEBUGFS
Normal file
1
configs/fedora/debug/CONFIG_PTDUMP_DEBUGFS
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_PTDUMP_DEBUGFS=y
|
||||
1
configs/fedora/debug/CONFIG_SND_CTL_VALIDATION
Normal file
1
configs/fedora/debug/CONFIG_SND_CTL_VALIDATION
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_SND_CTL_VALIDATION=y
|
||||
1
configs/fedora/debug/CONFIG_SND_SOC_SOF_DEBUG_PROBES
Normal file
1
configs/fedora/debug/CONFIG_SND_SOC_SOF_DEBUG_PROBES
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_SND_SOC_SOF_DEBUG_PROBES=y
|
||||
1
configs/fedora/debug/CONFIG_SND_SOC_SOF_HDA_PROBES
Normal file
1
configs/fedora/debug/CONFIG_SND_SOC_SOF_HDA_PROBES
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_SND_SOC_SOF_HDA_PROBES=y
|
||||
1
configs/fedora/debug/CONFIG_SYNTH_EVENT_GEN_TEST
Normal file
1
configs/fedora/debug/CONFIG_SYNTH_EVENT_GEN_TEST
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_SYNTH_EVENT_GEN_TEST=m
|
||||
1
configs/fedora/debug/CONFIG_TEST_MIN_HEAP
Normal file
1
configs/fedora/debug/CONFIG_TEST_MIN_HEAP
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_TEST_MIN_HEAP=m
|
||||
|
|
@ -1 +0,0 @@
|
|||
CONFIG_TRACE_EVENT_INJECT=y
|
||||
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ARM64_FORCE_52BIT=y
|
||||
0
configs/fedora/debug/arm/aarch64/README
Normal file
0
configs/fedora/debug/arm/aarch64/README
Normal file
0
configs/fedora/debug/arm/armv7/README
Normal file
0
configs/fedora/debug/arm/armv7/README
Normal file
0
configs/fedora/debug/powerpc/README
Normal file
0
configs/fedora/debug/powerpc/README
Normal file
0
configs/fedora/debug/s390x/README
Normal file
0
configs/fedora/debug/s390x/README
Normal file
26
configs/fedora/generic/CONFIG_AD9467
Normal file
26
configs/fedora/generic/CONFIG_AD9467
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# CONFIG_AD9467:
|
||||
#
|
||||
# Say yes here to build support for Analog Devices:
|
||||
# * AD9467 16-Bit, 200 MSPS/250 MSPS Analog-to-Digital Converter
|
||||
#
|
||||
# The driver requires the assistance of the AXI ADC IP core to operate,
|
||||
# since SPI is used for configuration only, while data has to be
|
||||
# streamed into memory via DMA.
|
||||
#
|
||||
# To compile this driver as a module, choose M here: the module will be
|
||||
# called ad9467.
|
||||
#
|
||||
# Symbol: AD9467 [=n]
|
||||
# Type : tristate
|
||||
# Defined at drivers/iio/adc/Kconfig:249
|
||||
# Prompt: Analog Devices AD9467 High Speed ADC driver
|
||||
# Depends on: IIO [=m] && SPI [=y]
|
||||
# Location:
|
||||
# -> Device Drivers
|
||||
# -> Industrial I/O support (IIO [=m])
|
||||
# -> Analog to digital converters
|
||||
# Selects: ADI_AXI_ADC [=n]
|
||||
#
|
||||
#
|
||||
#
|
||||
CONFIG_AD9467=m
|
||||
23
configs/fedora/generic/CONFIG_ADIS16475
Normal file
23
configs/fedora/generic/CONFIG_ADIS16475
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# CONFIG_ADIS16475:
|
||||
#
|
||||
# Say yes here to build support for Analog Devices ADIS16470, ADIS16475,
|
||||
# ADIS16477, ADIS16465, ADIS16467, ADIS16500, ADIS16505, ADIS16507 inertial
|
||||
# sensors.
|
||||
#
|
||||
# To compile this driver as a module, choose M here: the module will be
|
||||
# called adis16475.
|
||||
#
|
||||
# Symbol: ADIS16475 [=n]
|
||||
# Type : tristate
|
||||
# Defined at drivers/iio/imu/Kconfig:32
|
||||
# Prompt: Analog Devices ADIS16475 and similar IMU driver
|
||||
# Depends on: IIO [=m] && SPI [=y]
|
||||
# Location:
|
||||
# -> Device Drivers
|
||||
# -> Industrial I/O support (IIO [=m])
|
||||
# -> Inertial measurement units
|
||||
# Selects: IIO_ADIS_LIB [=n] && IIO_ADIS_LIB_BUFFER [=n]
|
||||
#
|
||||
#
|
||||
#
|
||||
CONFIG_ADIS16475=m
|
||||
32
configs/fedora/generic/CONFIG_ADI_AXI_ADC
Normal file
32
configs/fedora/generic/CONFIG_ADI_AXI_ADC
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# CONFIG_ADI_AXI_ADC:
|
||||
#
|
||||
# Say yes here to build support for Analog Devices Generic
|
||||
# AXI ADC IP core. The IP core is used for interfacing with
|
||||
# analog-to-digital (ADC) converters that require either a high-speed
|
||||
# serial interface (JESD204B/C) or a source synchronous parallel
|
||||
# interface (LVDS/CMOS).
|
||||
# Typically (for such devices) SPI will be used for configuration only,
|
||||
# while this IP core handles the streaming of data into memory via DMA.
|
||||
#
|
||||
# Link: https://wiki.analog.com/resources/fpga/docs/axi_adc_ip
|
||||
# If unsure, say N (but it's safe to say "Y").
|
||||
#
|
||||
# To compile this driver as a module, choose M here: the
|
||||
# module will be called adi-axi-adc.
|
||||
#
|
||||
# Symbol: ADI_AXI_ADC [=n]
|
||||
# Type : tristate
|
||||
# Defined at drivers/iio/adc/Kconfig:264
|
||||
# Prompt: Analog Devices Generic AXI ADC IP core driver
|
||||
# Depends on: IIO [=m]
|
||||
# Location:
|
||||
# -> Device Drivers
|
||||
# -> Industrial I/O support (IIO [=m])
|
||||
# -> Analog to digital converters
|
||||
# Selects: IIO_BUFFER [=y] && IIO_BUFFER_HW_CONSUMER [=m] && IIO_BUFFER_DMAENGINE [=n]
|
||||
# Selected by [n]:
|
||||
# - AD9467 [=n] && IIO [=m] && SPI [=y]
|
||||
#
|
||||
#
|
||||
#
|
||||
CONFIG_ADI_AXI_ADC=m
|
||||
1
configs/fedora/generic/CONFIG_AMDTEE
Normal file
1
configs/fedora/generic/CONFIG_AMDTEE
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_AMDTEE is not set
|
||||
1
configs/fedora/generic/CONFIG_ARCH_REALTEK
Normal file
1
configs/fedora/generic/CONFIG_ARCH_REALTEK
Normal file
|
|
@ -0,0 +1 @@
|
|||
# CONFIG_ARCH_REALTEK is not set
|
||||
1
configs/fedora/generic/CONFIG_ARM64_AMU_EXTN
Normal file
1
configs/fedora/generic/CONFIG_ARM64_AMU_EXTN
Normal file
|
|
@ -0,0 +1 @@
|
|||
CONFIG_ARM64_AMU_EXTN=y
|
||||
31
configs/fedora/generic/CONFIG_ARM64_BTI
Normal file
31
configs/fedora/generic/CONFIG_ARM64_BTI
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# CONFIG_ARM64_BTI:
|
||||
#
|
||||
# Branch Target Identification (part of the ARMv8.5 Extensions)
|
||||
# provides a mechanism to limit the set of locations to which computed
|
||||
# branch instructions such as BR or BLR can jump.
|
||||
#
|
||||
# To make use of BTI on CPUs that support it, say Y.
|
||||
#
|
||||
# BTI is intended to provide complementary protection to other control
|
||||
# flow integrity protection mechanisms, such as the Pointer
|
||||
# authentication mechanism provided as part of the ARMv8.3 Extensions.
|
||||
# For this reason, it does not make sense to enable this option without
|
||||
# also enabling support for pointer authentication. Thus, when
|
||||
# enabling this option you should also select ARM64_PTR_AUTH=y.
|
||||
#
|
||||
# Userspace binaries must also be specifically compiled to make use of
|
||||
# this mechanism. If you say N here or the hardware does not support
|
||||
# BTI, such binaries can still run, but you get no additional
|
||||
# enforcement of branch destinations.
|
||||
#
|
||||
# Symbol: ARM64_BTI [=y]
|
||||
# Type : bool
|
||||
# Defined at arch/arm64/Kconfig:1594
|
||||
# Prompt: Branch Target Identification support
|
||||
# Location:
|
||||
# -> Kernel Features
|
||||
# -> ARMv8.5 architectural features
|
||||
#
|
||||
#
|
||||
#
|
||||
CONFIG_ARM64_BTI=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