From 3814de27892f88d7bee46f434d386ada761fd4ba Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Fri, 15 Jan 2021 00:10:49 +0100 Subject: kernel 5.10.6 --- ...rkaround-for-spurious-wakeups-on-some-Int.patch | 88 - ...A-hda-via-Fix-runtime-PM-for-Clevo-W35xSS.patch | 86 + SOURCES/0001-Drop-that-for-now.patch | 11 +- ...remove-the-need-for-artificial-IRQ-in-cas.patch | 2 +- ...MCFG-quirks-for-Tegra194-host-controllers.patch | 22 +- ...-Wait-for-Raspberry-Pi-s-firmware-when-pr.patch | 57 - ...4-allwinner-dts-a64-add-LCD-related-devic.patch | 76 - ...ert-drm-panel-add-Xingbangda-XBD599-panel.patch | 418 -- ...sun4i-sun6i_mipi_dsi-fix-horizontal-timin.patch | 56 - ...indings-panel-add-binding-for-Xingbangda-.patch | 71 - ...1-USB-pci-quirks-Add-Raspberry-Pi-4-quirk.patch | 72 - ...Use-kmemdup-instead-of-kmalloc-and-memcpy.patch | 55 - ...nner-dts-a64-add-LCD-related-device-nodes.patch | 81 - ...un50i-a64-pinephone-Add-touchscreen-suppo.patch | 46 - ...un50i-a64-pinephone-Enable-LCD-support-on.patch | 112 - ...-remove-redundant-assignments-to-variable.patch | 32 - ...vice-detect-if-changing-endianness-failed.patch | 62 - SOURCES/0001-device-detect-vGPUs.patch | 59 - ...rk-mmio-mapping-code-to-get-rid-of-second.patch | 84 - ...regular-PRI-accessors-in-chipset-detectio.patch | 113 - ...0001-disp-gv100-expose-capabilities-class.patch | 149 - ...119-add-HAL-for-programming-device-entry-.patch | 146 - ...119-select-HDA-device-entry-based-on-boun.patch | 49 - ...p-hda-gt215-pass-head-to-nvkm_ior.hda.eld.patch | 83 - ...100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch | 105 - ...ncrease-timeout-on-pio-channel-free-polli.patch | 26 - ...f-xgene_pmu-Fix-uninitialized-resource-st.patch | 121 - ...Use-generic-helper-to-check-_PR3-presence.patch | 96 - ...001-drm-nouveau-kms-handle-mDP-connectors.patch | 54 + ...ocktech-jh057n00900-Rename-the-driver-to-.patch | 948 --- ...-st7703-Add-support-for-Xingbangda-XBD599.patch | 251 - ...t7703-Assert-reset-prior-to-powering-down.patch | 29 - ...anel-st7703-Enter-sleep-after-display-off.patch | 41 - ...t7703-Move-code-specific-to-jh057n-closer.patch | 84 - ...t7703-Move-generic-part-of-init-sequence-.patch | 84 - ...t7703-Prepare-for-supporting-multiple-pan.patch | 128 - ...t7703-Rename-functions-from-jh057n-prefix.patch | 265 - ...-panel-Add-compatible-for-Xingbangda-XBD5.patch | 37 - ...-panel-Convert-rocktech-jh057n00900-to-ya.patch | 119 - ...t-bindings-vendor-prefixes-Add-Xingbangda.patch | 33 - ...wn-the-kernel-if-booted-in-secure-boot-mo.patch | 4 +- ...-raspberrypi-Introduce-vl805-init-routine.patch | 110 - ...store-acpi_walk_dep_device_list-getting-c.patch | 70 - ...1-ipmi-do-not-configure-ipmi-for-HPE-m400.patch | 2 +- ...ms-gv100-Add-support-for-interlaced-modes.patch | 64 - ...itialize-core-channel-in-nouveau_display_.patch | 47 - ...ve-8BPC-limit-for-MST-into-nv50_mstc_get_.patch | 65 - ...obe-SOR-and-PIOR-caps-for-DP-interlacing-.patch | 439 -- ...Share-DP-SST-mode_valid-handling-with-MST.patch | 209 - SOURCES/0001-mmu-Remove-unneeded-semicolon.patch | 47 - ...-perf-cs-etm-Move-defined-of-traceid_list.patch | 58 - ...6-thinkpad_acpi-Add-support-for-dual-fan-.patch | 136 - ...6-thinkpad_acpi-lap-or-desk-mode-interfac.patch | 202 - ...4-vdso32-Install-vdso32-from-vdso_install.patch | 48 - ...ow-reading-labels-before-policy-is-loaded.patch | 49 - ...-Sync-xHCI-reset-firmware-property-with-d.patch | 32 - .../0001-update-phy-on-pine64-a64-devices.patch | 13 - ...b-fusb302-Convert-to-use-GPIO-descriptors.patch | 162 - ...dd-a-few-new-vmmdev-request-types-to-the-.patch | 58 - ...dd-support-for-the-new-VBG_IOCTL_ACQUIRE_.patch | 320 - ...dd-vbg_set_host_capabilities-helper-funct.patch | 130 - ...ix-VBGL_IOCTL_VMMDEV_REQUEST_BIG-and-_LOG.patch | 123 - ...rt-vbox-Fix-guest-capabilities-mask-check.patch | 47 - ...-vbox-Log-unknown-ioctl-requests-as-error.patch | 30 - ...ename-guest_caps-struct-members-to-set_gu.patch | 103 - ...avoid-removing-an-event-channel-while-han.patch | 161 - ...oundary-test-in-xfs_attr_shortform_verify.patch | 49 - ...-Re-order-PCIe-aperture-mappings-to-suppo.patch | 100 - ...-panel-Convert-rocktech-jh057n00900-to-ya.patch | 120 - ...-panel-Add-compatible-for-Xingbangda-XBD5.patch | 37 - ...ocktech-jh057n00900-Rename-the-driver-to-.patch | 91 - ...t7703-Rename-functions-from-jh057n-prefix.patch | 265 - ...t7703-Prepare-for-supporting-multiple-pan.patch | 129 - ...t7703-Move-code-specific-to-jh057n-closer.patch | 84 - ...t7703-Move-generic-part-of-init-sequence-.patch | 84 - ...-st7703-Add-support-for-Xingbangda-XBD599.patch | 251 - ...anel-st7703-Enter-sleep-after-display-off.patch | 41 - ...t7703-Assert-reset-prior-to-powering-down.patch | 29 - ...un50i-a64-pinephone-Enable-LCD-support-on.patch | 112 - ...un50i-a64-pinephone-Add-touchscreen-suppo.patch | 47 - ...ino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch | 132 - ...i-r40-bananapi-m2-ultra-Fix-ethernet-node.patch | 122 - ...-16119-DCCP-CCID-structure-use-after-free.patch | 305 - SOURCES/arm-pandaboard-fix-add-bluetooth.patch | 64 + SOURCES/arm-sun8i-realtek-phy-fixes.patch | 1385 ---- ...m64-Use-x16-with-indirect-branch-to-bti_c.patch | 149 - ...winner-a64-OrangePi-Win-Fix-ethernet-node.patch | 122 - ...lwinner-h5-OrangePi-PC2-Fix-ethernet-node.patch | 122 - ...inner-h5-OrangePi-Prime-Fix-ethernet-node.patch | 145 - ...s-allwinner-h6-Pine-H64-Fix-ethernet-node.patch | 125 - ...p-Keep-enabled-PWMs-running-while-probing.patch | 141 - ...arm64-rockchip-pinebookpro-add-fuel-gauge.patch | 59 - ...-valid-PWM-period-for-VDD_GPU-on-Tegra210.patch | 48 - .../arm64-tegra-enable-dfll-on-jetson-nano.patch | 86 - ...ix-LL-privacy-BLE-device-fails-to-connect.patch | 75 - SOURCES/bluetooth_cves.patch | 320 - .../brcmfmac-BCM4329-Fixes-and-improvement.patch | 254 - SOURCES/dma-pool-fixes.patch | 419 -- SOURCES/futex2.patch | 6706 +++++--------------- ...ommu-tegra-smmu-Fix-TLB-line-for-Tegra210.patch | 48 - ...-killer-wireless-ac-1550-cards-work-again.patch | 46 - SOURCES/kernel-aarch64-debug-fedora.config | 251 +- SOURCES/kernel-aarch64-fedora.config | 251 +- SOURCES/kernel-armv7hl-debug-fedora.config | 215 +- SOURCES/kernel-armv7hl-fedora.config | 213 +- SOURCES/kernel-armv7hl-lpae-debug-fedora.config | 213 +- SOURCES/kernel-armv7hl-lpae-fedora.config | 215 +- SOURCES/kernel-i686-debug-fedora.config | 168 +- SOURCES/kernel-i686-fedora.config | 168 +- SOURCES/kernel-ppc64le-debug-fedora.config | 184 +- SOURCES/kernel-ppc64le-fedora.config | 184 +- SOURCES/kernel-s390x-debug-fedora.config | 180 +- SOURCES/kernel-s390x-fedora.config | 180 +- SOURCES/kernel-x86_64-debug-fedora.config | 167 +- SOURCES/kernel-x86_64-fedora.config | 167 +- ...ory-tegra-Remove-GPU-from-DRM-IOMMU-group.patch | 113 - ...-Enable-eMMC-DDR-3.3V-support-for-bcm2711.patch | 98 - .../net-packet-fix-overflow-in-tpacket_rcv.patch | 59 - ...etlink-add-range-check-for-l3-l4-protonum.patch | 63 - SOURCES/pdx86-SW_TABLET_MODE-fixes.patch | 212 - ...ow_reading_labels_before_policy_is_loaded.patch | 48 - ...the-line-discipline-be-used-several-times.patch | 76 - ...Fix-security-label-length-not-being-reset.patch | 150 - SOURCES/zen.patch | 91 +- SPECS/kernel.spec | 46 +- 125 files changed, 4162 insertions(+), 19042 deletions(-) delete mode 100644 SOURCES/0001-ALSA-hda-Workaround-for-spurious-wakeups-on-some-Int.patch create mode 100644 SOURCES/0001-ALSA-hda-via-Fix-runtime-PM-for-Clevo-W35xSS.patch delete mode 100644 SOURCES/0001-PCI-brcmstb-Wait-for-Raspberry-Pi-s-firmware-when-pr.patch delete mode 100644 SOURCES/0001-Revert-arm64-allwinner-dts-a64-add-LCD-related-devic.patch delete mode 100644 SOURCES/0001-Revert-drm-panel-add-Xingbangda-XBD599-panel.patch delete mode 100644 SOURCES/0001-Revert-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timin.patch delete mode 100644 SOURCES/0001-Revert-dt-bindings-panel-add-binding-for-Xingbangda-.patch delete mode 100644 SOURCES/0001-USB-pci-quirks-Add-Raspberry-Pi-4-quirk.patch delete mode 100644 SOURCES/0001-acr-Use-kmemdup-instead-of-kmalloc-and-memcpy.patch delete mode 100644 SOURCES/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch delete mode 100644 SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch delete mode 100644 SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch delete mode 100644 SOURCES/0001-core-memory-remove-redundant-assignments-to-variable.patch delete mode 100644 SOURCES/0001-device-detect-if-changing-endianness-failed.patch delete mode 100644 SOURCES/0001-device-detect-vGPUs.patch delete mode 100644 SOURCES/0001-device-rework-mmio-mapping-code-to-get-rid-of-second.patch delete mode 100644 SOURCES/0001-device-use-regular-PRI-accessors-in-chipset-detectio.patch delete mode 100644 SOURCES/0001-disp-gv100-expose-capabilities-class.patch delete mode 100644 SOURCES/0001-disp-hda-gf119-add-HAL-for-programming-device-entry-.patch delete mode 100644 SOURCES/0001-disp-hda-gf119-select-HDA-device-entry-based-on-boun.patch delete mode 100644 SOURCES/0001-disp-hda-gt215-pass-head-to-nvkm_ior.hda.eld.patch delete mode 100644 SOURCES/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch delete mode 100644 SOURCES/0001-disp-nv50-increase-timeout-on-pio-channel-free-polli.patch delete mode 100644 SOURCES/0001-drivers-perf-xgene_pmu-Fix-uninitialized-resource-st.patch delete mode 100644 SOURCES/0001-drm-Use-generic-helper-to-check-_PR3-presence.patch create mode 100644 SOURCES/0001-drm-nouveau-kms-handle-mDP-connectors.patch delete mode 100644 SOURCES/0001-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Assert-reset-prior-to-powering-down.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Enter-sleep-after-display-off.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Move-code-specific-to-jh057n-closer.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Move-generic-part-of-init-sequence-.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch delete mode 100644 SOURCES/0001-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch delete mode 100644 SOURCES/0001-dt-bindings-panel-Add-compatible-for-Xingbangda-XBD5.patch delete mode 100644 SOURCES/0001-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch delete mode 100644 SOURCES/0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch delete mode 100644 SOURCES/0001-firmware-raspberrypi-Introduce-vl805-init-routine.patch delete mode 100644 SOURCES/0001-i2c-core-Restore-acpi_walk_dep_device_list-getting-c.patch delete mode 100644 SOURCES/0001-kms-gv100-Add-support-for-interlaced-modes.patch delete mode 100644 SOURCES/0001-kms-nv50-Initialize-core-channel-in-nouveau_display_.patch delete mode 100644 SOURCES/0001-kms-nv50-Move-8BPC-limit-for-MST-into-nv50_mstc_get_.patch delete mode 100644 SOURCES/0001-kms-nv50-Probe-SOR-and-PIOR-caps-for-DP-interlacing-.patch delete mode 100644 SOURCES/0001-kms-nv50-Share-DP-SST-mode_valid-handling-with-MST.patch delete mode 100644 SOURCES/0001-mmu-Remove-unneeded-semicolon.patch delete mode 100644 SOURCES/0001-perf-cs-etm-Move-defined-of-traceid_list.patch delete mode 100644 SOURCES/0001-platform-x86-thinkpad_acpi-Add-support-for-dual-fan-.patch delete mode 100644 SOURCES/0001-platform-x86-thinkpad_acpi-lap-or-desk-mode-interfac.patch delete mode 100644 SOURCES/0001-revert-ARM64-vdso32-Install-vdso32-from-vdso_install.patch delete mode 100644 SOURCES/0001-selinux-allow-reading-labels-before-policy-is-loaded.patch delete mode 100644 SOURCES/0001-soc-bcm2835-Sync-xHCI-reset-firmware-property-with-d.patch delete mode 100644 SOURCES/0001-usb-fusb302-Convert-to-use-GPIO-descriptors.patch delete mode 100644 SOURCES/0001-virt-vbox-Add-a-few-new-vmmdev-request-types-to-the-.patch delete mode 100644 SOURCES/0001-virt-vbox-Add-support-for-the-new-VBG_IOCTL_ACQUIRE_.patch delete mode 100644 SOURCES/0001-virt-vbox-Add-vbg_set_host_capabilities-helper-funct.patch delete mode 100644 SOURCES/0001-virt-vbox-Fix-VBGL_IOCTL_VMMDEV_REQUEST_BIG-and-_LOG.patch delete mode 100644 SOURCES/0001-virt-vbox-Fix-guest-capabilities-mask-check.patch delete mode 100644 SOURCES/0001-virt-vbox-Log-unknown-ioctl-requests-as-error.patch delete mode 100644 SOURCES/0001-virt-vbox-Rename-guest_caps-struct-members-to-set_gu.patch delete mode 100644 SOURCES/0001-xen-events-avoid-removing-an-event-channel-while-han.patch delete mode 100644 SOURCES/0001-xfs-fix-boundary-test-in-xfs_attr_shortform_verify.patch delete mode 100644 SOURCES/0002-arm64-tegra-Re-order-PCIe-aperture-mappings-to-suppo.patch delete mode 100644 SOURCES/0002-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch delete mode 100644 SOURCES/0003-dt-bindings-panel-Add-compatible-for-Xingbangda-XBD5.patch delete mode 100644 SOURCES/0004-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch delete mode 100644 SOURCES/0005-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch delete mode 100644 SOURCES/0006-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch delete mode 100644 SOURCES/0007-drm-panel-st7703-Move-code-specific-to-jh057n-closer.patch delete mode 100644 SOURCES/0008-drm-panel-st7703-Move-generic-part-of-init-sequence-.patch delete mode 100644 SOURCES/0009-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch delete mode 100644 SOURCES/0010-drm-panel-st7703-Enter-sleep-after-display-off.patch delete mode 100644 SOURCES/0011-drm-panel-st7703-Assert-reset-prior-to-powering-down.patch delete mode 100644 SOURCES/0012-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch delete mode 100644 SOURCES/0013-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch delete mode 100644 SOURCES/ARM-dts-sun7i-pcduino3-nano-enable-RGMII-RX-TX-delay-on-PHY.patch delete mode 100644 SOURCES/ARM-dts-sun8i-r40-bananapi-m2-ultra-Fix-ethernet-node.patch delete mode 100644 SOURCES/CVE-2020-16119-DCCP-CCID-structure-use-after-free.patch create mode 100644 SOURCES/arm-pandaboard-fix-add-bluetooth.patch delete mode 100644 SOURCES/arm-sun8i-realtek-phy-fixes.patch delete mode 100644 SOURCES/arm64-BUG-crypto-arm64-Use-x16-with-indirect-branch-to-bti_c.patch delete mode 100644 SOURCES/arm64-dts-allwinner-a64-OrangePi-Win-Fix-ethernet-node.patch delete mode 100644 SOURCES/arm64-dts-allwinner-h5-OrangePi-PC2-Fix-ethernet-node.patch delete mode 100644 SOURCES/arm64-dts-allwinner-h5-OrangePi-Prime-Fix-ethernet-node.patch delete mode 100644 SOURCES/arm64-dts-allwinner-h6-Pine-H64-Fix-ethernet-node.patch delete mode 100644 SOURCES/arm64-pwm-rockchip-Keep-enabled-PWMs-running-while-probing.patch delete mode 100644 SOURCES/arm64-rockchip-pinebookpro-add-fuel-gauge.patch delete mode 100644 SOURCES/arm64-tegra-Use-valid-PWM-period-for-VDD_GPU-on-Tegra210.patch delete mode 100644 SOURCES/arm64-tegra-enable-dfll-on-jetson-nano.patch delete mode 100644 SOURCES/bluetooth-fix-LL-privacy-BLE-device-fails-to-connect.patch delete mode 100644 SOURCES/bluetooth_cves.patch delete mode 100644 SOURCES/brcmfmac-BCM4329-Fixes-and-improvement.patch delete mode 100644 SOURCES/dma-pool-fixes.patch delete mode 100644 SOURCES/iommu-tegra-smmu-Fix-TLB-line-for-Tegra210.patch delete mode 100644 SOURCES/iwlwifi-make-some-killer-wireless-ac-1550-cards-work-again.patch delete mode 100644 SOURCES/memory-tegra-Remove-GPU-from-DRM-IOMMU-group.patch delete mode 100644 SOURCES/mmc-sdhci-iproc-Enable-eMMC-DDR-3.3V-support-for-bcm2711.patch delete mode 100644 SOURCES/net-packet-fix-overflow-in-tpacket_rcv.patch delete mode 100644 SOURCES/netfilter-ctnetlink-add-range-check-for-l3-l4-protonum.patch delete mode 100644 SOURCES/pdx86-SW_TABLET_MODE-fixes.patch delete mode 100644 SOURCES/selinux_allow_reading_labels_before_policy_is_loaded.patch delete mode 100644 SOURCES/speakup-do-not-let-the-line-discipline-be-used-several-times.patch delete mode 100644 SOURCES/v2-nfs-Fix-security-label-length-not-being-reset.patch diff --git a/SOURCES/0001-ALSA-hda-Workaround-for-spurious-wakeups-on-some-Int.patch b/SOURCES/0001-ALSA-hda-Workaround-for-spurious-wakeups-on-some-Int.patch deleted file mode 100644 index 1a36632..0000000 --- a/SOURCES/0001-ALSA-hda-Workaround-for-spurious-wakeups-on-some-Int.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 2b796b34a3b9ade3307304121a726d318641415a Mon Sep 17 00:00:00 2001 -From: Takashi Iwai -Date: Mon, 27 Jul 2020 17:19:18 +0200 -Subject: [PATCH] ALSA: hda: Workaround for spurious wakeups on some Intel - platforms - -We've received a regression report on Intel HD-audio controller that -wakes up immediately after S3 suspend. The bisection leads to the -commit c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not -needed"). This commit replaces the system-suspend to use -pm_runtime_force_suspend() instead of the direct call of -__azx_runtime_suspend(). However, by some really mysterious reason, -pm_runtime_force_suspend() causes a spurious wakeup (although it calls -the same __azx_runtime_suspend() internally). - -As an ugly workaround for now, revert the behavior to call -__azx_runtime_suspend() and __azx_runtime_resume() for those old Intel -platforms that may exhibit such a problem, while keeping the new -standard pm_runtime_force_suspend() and pm_runtime_force_resume() -pair for the remaining chips. - -Fixes: c4c8dd6ef807 ("ALSA: hda: Skip controller resume if not needed") -BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208649 -Cc: -Signed-off-by: Takashi Iwai ---- - sound/pci/hda/hda_controller.h | 2 +- - sound/pci/hda/hda_intel.c | 17 ++++++++++++++--- - 2 files changed, 15 insertions(+), 4 deletions(-) - -diff --git a/sound/pci/hda/hda_controller.h b/sound/pci/hda/hda_controller.h -index fe171685492d..be63ead8161f 100644 ---- a/sound/pci/hda/hda_controller.h -+++ b/sound/pci/hda/hda_controller.h -@@ -41,7 +41,7 @@ - /* 24 unused */ - #define AZX_DCAPS_COUNT_LPIB_DELAY (1 << 25) /* Take LPIB as delay */ - #define AZX_DCAPS_PM_RUNTIME (1 << 26) /* runtime PM support */ --/* 27 unused */ -+#define AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP (1 << 27) /* Workaround for spurious wakeups after suspend */ - #define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */ - #define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */ - #define AZX_DCAPS_SEPARATE_STREAM_TAG (1 << 30) /* capture and playback use separate stream tag */ -diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c -index 9ba1fb8f0b7f..fb65450d8de1 100644 ---- a/sound/pci/hda/hda_intel.c -+++ b/sound/pci/hda/hda_intel.c -@@ -297,7 +297,8 @@ enum { - /* PCH for HSW/BDW; with runtime PM */ - /* no i915 binding for this as HSW/BDW has another controller for HDMI */ - #define AZX_DCAPS_INTEL_PCH \ -- (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME) -+ (AZX_DCAPS_INTEL_PCH_BASE | AZX_DCAPS_PM_RUNTIME |\ -+ AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP) - - /* HSW HDMI */ - #define AZX_DCAPS_INTEL_HASWELL \ -@@ -1026,7 +1027,14 @@ static int azx_suspend(struct device *dev) - chip = card->private_data; - bus = azx_bus(chip); - snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); -- pm_runtime_force_suspend(dev); -+ /* An ugly workaround: direct call of __azx_runtime_suspend() and -+ * __azx_runtime_resume() for old Intel platforms that suffer from -+ * spurious wakeups after S3 suspend -+ */ -+ if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP) -+ __azx_runtime_suspend(chip); -+ else -+ pm_runtime_force_suspend(dev); - if (bus->irq >= 0) { - free_irq(bus->irq, chip); - bus->irq = -1; -@@ -1055,7 +1063,10 @@ static int azx_resume(struct device *dev) - if (azx_acquire_irq(chip, 1) < 0) - return -EIO; - -- pm_runtime_force_resume(dev); -+ if (chip->driver_caps & AZX_DCAPS_SUSPEND_SPURIOUS_WAKEUP) -+ __azx_runtime_resume(chip, false); -+ else -+ pm_runtime_force_resume(dev); - snd_power_change_state(card, SNDRV_CTL_POWER_D0); - - trace_azx_resume(chip); --- -2.26.2 - diff --git a/SOURCES/0001-ALSA-hda-via-Fix-runtime-PM-for-Clevo-W35xSS.patch b/SOURCES/0001-ALSA-hda-via-Fix-runtime-PM-for-Clevo-W35xSS.patch new file mode 100644 index 0000000..fb9b5f5 --- /dev/null +++ b/SOURCES/0001-ALSA-hda-via-Fix-runtime-PM-for-Clevo-W35xSS.patch @@ -0,0 +1,86 @@ +From 4bfd6247fa9164c8e193a55ef9c0ea3ee22f82d8 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 4 Jan 2021 16:30:46 +0100 +Subject: [PATCH] ALSA: hda/via: Fix runtime PM for Clevo W35xSS + +Clevo W35xSS_370SS with VIA codec has had the runtime PM problem that +looses the power state of some nodes after the runtime resume. This +was worked around by disabling the default runtime PM via a denylist +entry. Since 5.10.x made the runtime PM applied (casually) even +though it's disabled in the denylist, this problem was revisited. The +result was that disabling power_save_node feature suffices for the +runtime PM problem. + +This patch implements the disablement of power_save_node feature in +VIA codec for the device. It also drops the former denylist entry, +too, as the runtime PM should work in the codec side properly now. + +Fixes: b529ef2464ad ("ALSA: hda: Add Clevo W35xSS_370SS to the power_save blacklist") +Reported-by: Christian Labisch +Cc: +Link: https://lore.kernel.org/r/20210104153046.19993-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +--- + sound/pci/hda/hda_intel.c | 2 -- + sound/pci/hda/patch_via.c | 13 +++++++++++++ + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c +index 6852668f1bcb..770ad25f1907 100644 +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -2220,8 +2220,6 @@ static const struct snd_pci_quirk power_save_denylist[] = { + SND_PCI_QUIRK(0x1849, 0x7662, "Asrock H81M-HDS", 0), + /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ + SND_PCI_QUIRK(0x1043, 0x8733, "Asus Prime X370-Pro", 0), +- /* https://bugzilla.redhat.com/show_bug.cgi?id=1581607 */ +- SND_PCI_QUIRK(0x1558, 0x3501, "Clevo W35xSS_370SS", 0), + /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ + SND_PCI_QUIRK(0x1558, 0x6504, "Clevo W65_67SB", 0), + /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */ +diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c +index 7ef8f3105cdb..0ab40a8a68fb 100644 +--- a/sound/pci/hda/patch_via.c ++++ b/sound/pci/hda/patch_via.c +@@ -1002,6 +1002,7 @@ static const struct hda_verb vt1802_init_verbs[] = { + enum { + VIA_FIXUP_INTMIC_BOOST, + VIA_FIXUP_ASUS_G75, ++ VIA_FIXUP_POWER_SAVE, + }; + + static void via_fixup_intmic_boost(struct hda_codec *codec, +@@ -1011,6 +1012,13 @@ static void via_fixup_intmic_boost(struct hda_codec *codec, + override_mic_boost(codec, 0x30, 0, 2, 40); + } + ++static void via_fixup_power_save(struct hda_codec *codec, ++ const struct hda_fixup *fix, int action) ++{ ++ if (action == HDA_FIXUP_ACT_PRE_PROBE) ++ codec->power_save_node = 0; ++} ++ + static const struct hda_fixup via_fixups[] = { + [VIA_FIXUP_INTMIC_BOOST] = { + .type = HDA_FIXUP_FUNC, +@@ -1025,11 +1033,16 @@ static const struct hda_fixup via_fixups[] = { + { } + } + }, ++ [VIA_FIXUP_POWER_SAVE] = { ++ .type = HDA_FIXUP_FUNC, ++ .v.func = via_fixup_power_save, ++ }, + }; + + static const struct snd_pci_quirk vt2002p_fixups[] = { + SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75), + SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST), ++ SND_PCI_QUIRK(0x1558, 0x3501, "Clevo W35xSS_370SS", VIA_FIXUP_POWER_SAVE), + {} + }; + +-- +2.29.2 + diff --git a/SOURCES/0001-Drop-that-for-now.patch b/SOURCES/0001-Drop-that-for-now.patch index 8b813bf..5146b2a 100644 --- a/SOURCES/0001-Drop-that-for-now.patch +++ b/SOURCES/0001-Drop-that-for-now.patch @@ -4,19 +4,18 @@ Date: Wed, 23 Jan 2019 14:36:37 +0100 Subject: [PATCH] Drop that for now --- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + Makefile | 1 + + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index b70997f7ddf9..680d906eee35 100644 --- a/Makefile +++ b/Makefile -@@ -498,7 +498,7 @@ KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE - KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ +@@ -496,6 +496,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ -Werror=implicit-function-declaration -Werror=implicit-int \ -- -Wno-format-security \ -+ -Wno-format-security -Wno-address-of-packed-member \ + -Werror=return-type -Wno-format-security \ ++ -Wno-address-of-packed-member \ -std=gnu89 KBUILD_CPPFLAGS := -D__KERNEL__ KBUILD_AFLAGS_KERNEL := diff --git a/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch b/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch index 7804610..afdb790 100644 --- a/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch +++ b/SOURCES/0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch @@ -113,7 +113,7 @@ index 8cffa84c9650..6c4e3675601a 100644 - } - if (data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS) - rmi_hid_pdata.f30_data.disable = true; + rmi_hid_pdata.gpio_data.disable = true; data->xport.dev = hdev->dev.parent; data->xport.pdata = rmi_hid_pdata; diff --git a/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch b/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch index 0303436..eedb0ff 100644 --- a/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch +++ b/SOURCES/0001-PCI-Add-MCFG-quirks-for-Tegra194-host-controllers.patch @@ -1,6 +1,6 @@ -From dc7294c776b82b0f0feec1536b2f4676806b4b8a Mon Sep 17 00:00:00 2001 +From ec7b5bf1cc1444d9ad13bcef0f0f8d48ff9c0203 Mon Sep 17 00:00:00 2001 From: Peter Robinson -Date: Tue, 3 Nov 2020 14:04:29 +0000 +Date: Sat, 19 Dec 2020 14:10:40 +0000 Subject: [PATCH] PCI: Add MCFG quirks for Tegra194 host controllers The PCIe controller in Tegra194 SoC is not completely ECAM-compliant. @@ -29,7 +29,7 @@ Signed-off-by: Peter Robinson 5 files changed, 117 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c -index 54b36b7ad47d..6573d495d9c1 100644 +index 95f23acd5b80..53cab975f612 100644 --- a/drivers/acpi/pci_mcfg.c +++ b/drivers/acpi/pci_mcfg.c @@ -116,6 +116,13 @@ static struct mcfg_fixup mcfg_quirks[] = { @@ -47,10 +47,10 @@ index 54b36b7ad47d..6573d495d9c1 100644 {"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 044a3761c44f..e4ee4bf9ac64 100644 +index bc049865f8e0..c5d40951a6ad 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig -@@ -247,25 +247,27 @@ config PCI_MESON +@@ -248,25 +248,27 @@ config PCI_MESON implement the driver. config PCIE_TEGRA194 @@ -101,7 +101,7 @@ index a751553fa0db..dbb981876556 100644 +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 70498689d0c0..3db514e1ea7e 100644 +index f920e7efe118..87c7929db727 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -22,6 +22,8 @@ @@ -113,7 +113,7 @@ index 70498689d0c0..3db514e1ea7e 100644 #include #include #include -@@ -324,6 +326,103 @@ struct tegra_pcie_dw_of_data { +@@ -311,6 +313,103 @@ struct tegra_pcie_dw_of_data { enum dw_pcie_device_mode mode; }; @@ -217,7 +217,7 @@ index 70498689d0c0..3db514e1ea7e 100644 static inline struct tegra_pcie_dw *to_tegra_pcie(struct dw_pcie *pci) { return container_of(pci, struct tegra_pcie_dw, pci); -@@ -2403,3 +2502,6 @@ MODULE_DEVICE_TABLE(of, tegra_pcie_dw_of_match); +@@ -2339,3 +2438,6 @@ MODULE_DEVICE_TABLE(of, tegra_pcie_dw_of_match); MODULE_AUTHOR("Vidya Sagar "); MODULE_DESCRIPTION("NVIDIA PCIe host controller driver"); MODULE_LICENSE("GPL v2"); @@ -225,10 +225,10 @@ index 70498689d0c0..3db514e1ea7e 100644 +#endif /* CONFIG_PCIE_TEGRA194 */ + diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h -index 1af5cb02ef7f..3fb16ada505a 100644 +index 033ce74f02e8..ccbf3c38c6e6 100644 --- a/include/linux/pci-ecam.h +++ b/include/linux/pci-ecam.h -@@ -57,6 +57,7 @@ extern const struct pci_ecam_ops pci_thunder_ecam_ops; /* Cavium ThunderX 1.x */ +@@ -58,6 +58,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 */ @@ -237,5 +237,5 @@ index 1af5cb02ef7f..3fb16ada505a 100644 #if IS_ENABLED(CONFIG_PCI_HOST_COMMON) -- -2.28.0 +2.29.2 diff --git a/SOURCES/0001-PCI-brcmstb-Wait-for-Raspberry-Pi-s-firmware-when-pr.patch b/SOURCES/0001-PCI-brcmstb-Wait-for-Raspberry-Pi-s-firmware-when-pr.patch deleted file mode 100644 index 07f8b4e..0000000 --- a/SOURCES/0001-PCI-brcmstb-Wait-for-Raspberry-Pi-s-firmware-when-pr.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nicolas Saenz Julienne -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 -Reviewed-by: Florian Fainelli ---- - 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 - #include - -+#include -+ - #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 - diff --git a/SOURCES/0001-Revert-arm64-allwinner-dts-a64-add-LCD-related-devic.patch b/SOURCES/0001-Revert-arm64-allwinner-dts-a64-add-LCD-related-devic.patch deleted file mode 100644 index 0ea8f7d..0000000 --- a/SOURCES/0001-Revert-arm64-allwinner-dts-a64-add-LCD-related-devic.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -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 - diff --git a/SOURCES/0001-Revert-drm-panel-add-Xingbangda-XBD599-panel.patch b/SOURCES/0001-Revert-drm-panel-add-Xingbangda-XBD599-panel.patch deleted file mode 100644 index 2950f8a..0000000 --- a/SOURCES/0001-Revert-drm-panel-add-Xingbangda-XBD599-panel.patch +++ /dev/null @@ -1,418 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -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 -- * -- * Based on panel-rocktech-jh057n00900.c, which is: -- * Copyright (C) Purism SPC 2019 -- */ -- --#include --#include --#include --#include --#include --#include -- --#include --#include --#include --#include -- --/* 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 "); --MODULE_DESCRIPTION("DRM driver for Xingbangda XBD599 MIPI DSI panel"); --MODULE_LICENSE("GPL v2"); --- -2.26.2 - diff --git a/SOURCES/0001-Revert-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timin.patch b/SOURCES/0001-Revert-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timin.patch deleted file mode 100644 index c290e7a..0000000 --- a/SOURCES/0001-Revert-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timin.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -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 - diff --git a/SOURCES/0001-Revert-dt-bindings-panel-add-binding-for-Xingbangda-.patch b/SOURCES/0001-Revert-dt-bindings-panel-add-binding-for-Xingbangda-.patch deleted file mode 100644 index 990e624..0000000 --- a/SOURCES/0001-Revert-dt-bindings-panel-add-binding-for-Xingbangda-.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -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 -- --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 - diff --git a/SOURCES/0001-USB-pci-quirks-Add-Raspberry-Pi-4-quirk.patch b/SOURCES/0001-USB-pci-quirks-Add-Raspberry-Pi-4-quirk.patch deleted file mode 100644 index 7f13ec1..0000000 --- a/SOURCES/0001-USB-pci-quirks-Add-Raspberry-Pi-4-quirk.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nicolas Saenz Julienne -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 ---- - 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 - #include - #include -+ -+#include -+ - #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 - diff --git a/SOURCES/0001-acr-Use-kmemdup-instead-of-kmalloc-and-memcpy.patch b/SOURCES/0001-acr-Use-kmemdup-instead-of-kmalloc-and-memcpy.patch deleted file mode 100644 index 9470c46..0000000 --- a/SOURCES/0001-acr-Use-kmemdup-instead-of-kmalloc-and-memcpy.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zou Wei -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 -Signed-off-by: Zou Wei -Signed-off-by: Ben Skeggs ---- - 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 - diff --git a/SOURCES/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch b/SOURCES/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch deleted file mode 100644 index e3b07c2..0000000 --- a/SOURCES/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -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 ---- - .../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 - diff --git a/SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch b/SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch deleted file mode 100644 index d2511ae..0000000 --- a/SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ondrej Jirman -Date: Fri, 26 Jun 2020 02:56:01 +0200 -Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: Add touchscreen support - -Pinephone has a Goodix GT917S capacitive touchscreen controller on -I2C0 bus. Add support for it. - -Signed-off-by: Ondrej Jirman ---- - .../dts/allwinner/sun50i-a64-pinephone.dtsi | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -index 85a7aa5efd32..2d5694446d17 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -@@ -123,6 +123,25 @@ &ehci1 { - status = "okay"; - }; - -+&i2c0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&i2c0_pins>; -+ status = "okay"; -+ -+ touchscreen@5d { -+ compatible = "goodix,gt917s", "goodix,gt911"; -+ reg = <0x5d>; -+ interrupt-parent = <&pio>; -+ interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */ -+ irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ -+ reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ -+ AVDD28-supply = <®_ldo_io0>; -+ VDDIO-supply = <®_ldo_io0>; -+ touchscreen-size-x = <720>; -+ touchscreen-size-y = <1440>; -+ }; -+}; -+ - &i2c1 { - status = "okay"; - --- -2.26.2 - diff --git a/SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch b/SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch deleted file mode 100644 index a38cd72..0000000 --- a/SOURCES/0001-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng -Date: Fri, 26 Jun 2020 02:56:00 +0200 -Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: Enable LCD support on - PinePhone - -PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for -display. - -Backlight levels curve was optimized by Martijn Braam using a -lux meter. - -Add its device nodes. - -Signed-off-by: Icenowy Zheng -Signed-off-by: Martijn Braam -Signed-off-by: Ondrej Jirman ---- - .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 ++++++++++ - .../dts/allwinner/sun50i-a64-pinephone.dtsi | 35 +++++++++++++++++++ - 2 files changed, 54 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts -index 06a775c41664..3e99a87e9ce5 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts -@@ -9,3 +9,22 @@ / { - model = "Pine64 PinePhone Braveheart (1.1)"; - compatible = "pine64,pinephone-1.1", "allwinner,sun50i-a64"; - }; -+ -+&backlight { -+ power-supply = <®_ldo_io0>; -+ /* -+ * PWM backlight circuit on this PinePhone revision was changed since -+ * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight -+ * being off is around 20%. Duty cycle for the lowest brightness level -+ * also varries quite a bit between individual boards, so the lowest -+ * value here was chosen as a safe default. -+ */ -+ brightness-levels = < -+ 774 793 814 842 -+ 882 935 1003 1088 -+ 1192 1316 1462 1633 -+ 1830 2054 2309 2596 -+ 2916 3271 3664 4096>; -+ num-interpolated-steps = <50>; -+ default-brightness-level = <400>; -+}; -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -index cefda145c3c9..85a7aa5efd32 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -@@ -16,6 +16,13 @@ aliases { - serial0 = &uart0; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; -+ enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ -+ /* Backlight configuration differs per PinePhone revision. */ -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -84,6 +91,30 @@ &dai { - status = "okay"; - }; - -+&de { -+ status = "okay"; -+}; -+ -+&dphy { -+ status = "okay"; -+}; -+ -+&dsi { -+ vcc-dsi-supply = <®_dldo1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ panel@0 { -+ compatible = "xingbangda,xbd599"; -+ reg = <0>; -+ reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */ -+ iovcc-supply = <®_dldo2>; -+ vcc-supply = <®_ldo_io0>; -+ backlight = <&backlight>; -+ }; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -188,6 +219,10 @@ &r_pio { - */ - }; - -+&r_pwm { -+ status = "okay"; -+}; -+ - &r_rsb { - status = "okay"; - --- -2.26.2 - diff --git a/SOURCES/0001-core-memory-remove-redundant-assignments-to-variable.patch b/SOURCES/0001-core-memory-remove-redundant-assignments-to-variable.patch deleted file mode 100644 index d490d68..0000000 --- a/SOURCES/0001-core-memory-remove-redundant-assignments-to-variable.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Colin Ian King -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 -Signed-off-by: Ben Skeggs ---- - 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 - diff --git a/SOURCES/0001-device-detect-if-changing-endianness-failed.patch b/SOURCES/0001-device-detect-if-changing-endianness-failed.patch deleted file mode 100644 index 1089b7e..0000000 --- a/SOURCES/0001-device-detect-if-changing-endianness-failed.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Karol Herbst -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 -Signed-off-by: Ben Skeggs ---- - .../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 - diff --git a/SOURCES/0001-device-detect-vGPUs.patch b/SOURCES/0001-device-detect-vGPUs.patch deleted file mode 100644 index 08f591f..0000000 --- a/SOURCES/0001-device-detect-vGPUs.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Karol Herbst -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 -Signed-off-by: Ben Skeggs ---- - 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 - diff --git a/SOURCES/0001-device-rework-mmio-mapping-code-to-get-rid-of-second.patch b/SOURCES/0001-device-rework-mmio-mapping-code-to-get-rid-of-second.patch deleted file mode 100644 index bde820b..0000000 --- a/SOURCES/0001-device-rework-mmio-mapping-code-to-get-rid-of-second.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Karol Herbst -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 -Signed-off-by: Ben Skeggs ---- - .../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 - diff --git a/SOURCES/0001-device-use-regular-PRI-accessors-in-chipset-detectio.patch b/SOURCES/0001-device-use-regular-PRI-accessors-in-chipset-detectio.patch deleted file mode 100644 index ec43451..0000000 --- a/SOURCES/0001-device-use-regular-PRI-accessors-in-chipset-detectio.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -Date: Thu, 30 Apr 2020 14:08:53 +1000 -Subject: [PATCH] device: use regular PRI accessors in chipset detection - -Signed-off-by: Ben Skeggs ---- - .../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 - diff --git a/SOURCES/0001-disp-gv100-expose-capabilities-class.patch b/SOURCES/0001-disp-gv100-expose-capabilities-class.patch deleted file mode 100644 index 6029379..0000000 --- a/SOURCES/0001-disp-gv100-expose-capabilities-class.patch +++ /dev/null @@ -1,149 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -Date: Thu, 13 Feb 2020 09:39:34 +1000 -Subject: [PATCH] disp/gv100-: expose capabilities class - -Signed-off-by: Ben Skeggs ---- - 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 - diff --git a/SOURCES/0001-disp-hda-gf119-add-HAL-for-programming-device-entry-.patch b/SOURCES/0001-disp-hda-gf119-add-HAL-for-programming-device-entry-.patch deleted file mode 100644 index cba6699..0000000 --- a/SOURCES/0001-disp-hda-gf119-add-HAL-for-programming-device-entry-.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -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 ---- - 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 - diff --git a/SOURCES/0001-disp-hda-gf119-select-HDA-device-entry-based-on-boun.patch b/SOURCES/0001-disp-hda-gf119-select-HDA-device-entry-based-on-boun.patch deleted file mode 100644 index 714d1a0..0000000 --- a/SOURCES/0001-disp-hda-gf119-select-HDA-device-entry-based-on-boun.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -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 ---- - 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 - diff --git a/SOURCES/0001-disp-hda-gt215-pass-head-to-nvkm_ior.hda.eld.patch b/SOURCES/0001-disp-hda-gt215-pass-head-to-nvkm_ior.hda.eld.patch deleted file mode 100644 index 0011e60..0000000 --- a/SOURCES/0001-disp-hda-gt215-pass-head-to-nvkm_ior.hda.eld.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -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 ---- - 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 - diff --git a/SOURCES/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch b/SOURCES/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch deleted file mode 100644 index b93c9f1..0000000 --- a/SOURCES/0001-disp-hda-gv100-NV_PDISP_SF_AUDIO_CNTRL0-register-mov.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -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 ---- - .../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 - diff --git a/SOURCES/0001-disp-nv50-increase-timeout-on-pio-channel-free-polli.patch b/SOURCES/0001-disp-nv50-increase-timeout-on-pio-channel-free-polli.patch deleted file mode 100644 index d8c1a93..0000000 --- a/SOURCES/0001-disp-nv50-increase-timeout-on-pio-channel-free-polli.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ben Skeggs -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 ---- - 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 - diff --git a/SOURCES/0001-drivers-perf-xgene_pmu-Fix-uninitialized-resource-st.patch b/SOURCES/0001-drivers-perf-xgene_pmu-Fix-uninitialized-resource-st.patch deleted file mode 100644 index 00975ae..0000000 --- a/SOURCES/0001-drivers-perf-xgene_pmu-Fix-uninitialized-resource-st.patch +++ /dev/null @@ -1,121 +0,0 @@ -From b0697932d03bd78bd4db6466939680c0fbdd8589 Mon Sep 17 00:00:00 2001 -From: Mark Salter -Date: Tue, 15 Sep 2020 16:41:09 -0400 -Subject: [PATCH] drivers/perf: xgene_pmu: Fix uninitialized resource struct - -This splat was reported on newer Fedora kernels booting on certain -X-gene based machines: - - xgene-pmu APMC0D83:00: X-Gene PMU version 3 - Unable to handle kernel read from unreadable memory at virtual \ - address 0000000000004006 - ... - Call trace: - string+0x50/0x100 - vsnprintf+0x160/0x750 - devm_kvasprintf+0x5c/0xb4 - devm_kasprintf+0x54/0x60 - __devm_ioremap_resource+0xdc/0x1a0 - devm_ioremap_resource+0x14/0x20 - acpi_get_pmu_hw_inf.isra.0+0x84/0x15c - acpi_pmu_dev_add+0xbc/0x21c - acpi_ns_walk_namespace+0x16c/0x1e4 - acpi_walk_namespace+0xb4/0xfc - xgene_pmu_probe_pmu_dev+0x7c/0xe0 - xgene_pmu_probe.part.0+0x2c0/0x310 - xgene_pmu_probe+0x54/0x64 - platform_drv_probe+0x60/0xb4 - really_probe+0xe8/0x4a0 - driver_probe_device+0xe4/0x100 - device_driver_attach+0xcc/0xd4 - __driver_attach+0xb0/0x17c - bus_for_each_dev+0x6c/0xb0 - driver_attach+0x30/0x40 - bus_add_driver+0x154/0x250 - driver_register+0x84/0x140 - __platform_driver_register+0x54/0x60 - xgene_pmu_driver_init+0x28/0x34 - do_one_initcall+0x40/0x204 - do_initcalls+0x104/0x144 - kernel_init_freeable+0x198/0x210 - kernel_init+0x20/0x12c - ret_from_fork+0x10/0x18 - Code: 91000400 110004e1 eb08009f 540000c0 (38646846) - ---[ end trace f08c10566496a703 ]--- - -This is due to use of an uninitialized local resource struct in the xgene -pmu driver. The thunderx2_pmu driver avoids this by using the resource list -constructed by acpi_dev_get_resources() rather than using a callback from -that function. The callback in the xgene driver didn't fully initialize -the resource. So get rid of the callback and search the resource list as -done by thunderx2. - -Fixes: 832c927d119b ("perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver") -Signed-off-by: Mark Salter -Link: https://lore.kernel.org/r/20200915204110.326138-1-msalter@redhat.com -Signed-off-by: Will Deacon ---- - drivers/perf/xgene_pmu.c | 32 +++++++++++++++++--------------- - 1 file changed, 17 insertions(+), 15 deletions(-) - -diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c -index edac28cd25dd..633cf07ba672 100644 ---- a/drivers/perf/xgene_pmu.c -+++ b/drivers/perf/xgene_pmu.c -@@ -1453,17 +1453,6 @@ static char *xgene_pmu_dev_name(struct device *dev, u32 type, int id) - } - - #if defined(CONFIG_ACPI) --static int acpi_pmu_dev_add_resource(struct acpi_resource *ares, void *data) --{ -- struct resource *res = data; -- -- if (ares->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32) -- acpi_dev_resource_memory(ares, res); -- -- /* Always tell the ACPI core to skip this resource */ -- return 1; --} -- - static struct - xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu, - struct acpi_device *adev, u32 type) -@@ -1475,6 +1464,7 @@ xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu, - struct hw_pmu_info *inf; - void __iomem *dev_csr; - struct resource res; -+ struct resource_entry *rentry; - int enable_bit; - int rc; - -@@ -1483,11 +1473,23 @@ xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu, - return NULL; - - INIT_LIST_HEAD(&resource_list); -- rc = acpi_dev_get_resources(adev, &resource_list, -- acpi_pmu_dev_add_resource, &res); -+ rc = acpi_dev_get_resources(adev, &resource_list, NULL, NULL); -+ if (rc <= 0) { -+ dev_err(dev, "PMU type %d: No resources found\n", type); -+ return NULL; -+ } -+ -+ list_for_each_entry(rentry, &resource_list, node) { -+ if (resource_type(rentry->res) == IORESOURCE_MEM) { -+ res = *rentry->res; -+ rentry = NULL; -+ break; -+ } -+ } - acpi_dev_free_resource_list(&resource_list); -- if (rc < 0) { -- dev_err(dev, "PMU type %d: No resource address found\n", type); -+ -+ if (rentry) { -+ dev_err(dev, "PMU type %d: No memory resource found\n", type); - return NULL; - } - --- -2.26.2 - diff --git a/SOURCES/0001-drm-Use-generic-helper-to-check-_PR3-presence.patch b/SOURCES/0001-drm-Use-generic-helper-to-check-_PR3-presence.patch deleted file mode 100644 index f0f9e0d..0000000 --- a/SOURCES/0001-drm-Use-generic-helper-to-check-_PR3-presence.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kai-Heng Feng -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 -Signed-off-by: Ben Skeggs ---- - 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 - diff --git a/SOURCES/0001-drm-nouveau-kms-handle-mDP-connectors.patch b/SOURCES/0001-drm-nouveau-kms-handle-mDP-connectors.patch new file mode 100644 index 0000000..44c150f --- /dev/null +++ b/SOURCES/0001-drm-nouveau-kms-handle-mDP-connectors.patch @@ -0,0 +1,54 @@ +From 54a080fdc2e65b38aea4dd59dde357d6c340fa25 Mon Sep 17 00:00:00 2001 +From: Karol Herbst +Date: Thu, 26 Nov 2020 14:47:50 +0100 +Subject: [PATCH] drm/nouveau/kms: handle mDP connectors + +In some cases we have the handle those explicitly as the fallback +connector type detection fails and marks those as eDP connectors. + +Attempting to use such a connector with mutter leads to a crash of mutter +as it ends up with two eDP displays. + +Information is taken from the official DCB documentation. + +Upstream Nouveau commit: 95adf381b74e86a8a34b93c3fab73c15dd2f3f5c + +Cc: stable@vger.kernel.org +Cc: dri-devel@lists.freedesktop.org +Cc: Ben Skeggs +Reported-by: Mark Pearson +Tested-by: Mark Pearson +Signed-off-by: Karol Herbst +Signed-off-by: Ben Skeggs +--- + drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h | 1 + + drivers/gpu/drm/nouveau/nouveau_connector.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h +index f5f59261ea81..d1beaad0c82b 100644 +--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h ++++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/conn.h +@@ -14,6 +14,7 @@ enum dcb_connector_type { + DCB_CONNECTOR_LVDS_SPWG = 0x41, + DCB_CONNECTOR_DP = 0x46, + DCB_CONNECTOR_eDP = 0x47, ++ DCB_CONNECTOR_mDP = 0x48, + DCB_CONNECTOR_HDMI_0 = 0x60, + DCB_CONNECTOR_HDMI_1 = 0x61, + DCB_CONNECTOR_HDMI_C = 0x63, +diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c +index 8b4b3688c7ae..4c992fd5bd68 100644 +--- a/drivers/gpu/drm/nouveau/nouveau_connector.c ++++ b/drivers/gpu/drm/nouveau/nouveau_connector.c +@@ -1210,6 +1210,7 @@ drm_conntype_from_dcb(enum dcb_connector_type dcb) + case DCB_CONNECTOR_DMS59_DP0: + case DCB_CONNECTOR_DMS59_DP1: + case DCB_CONNECTOR_DP : ++ case DCB_CONNECTOR_mDP : + case DCB_CONNECTOR_USB_C : return DRM_MODE_CONNECTOR_DisplayPort; + case DCB_CONNECTOR_eDP : return DRM_MODE_CONNECTOR_eDP; + case DCB_CONNECTOR_HDMI_0 : +-- +2.29.2 + diff --git a/SOURCES/0001-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch b/SOURCES/0001-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch deleted file mode 100644 index d78bf56..0000000 --- a/SOURCES/0001-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch +++ /dev/null @@ -1,948 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ondrej Jirman -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 ---- - 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 --#include --#include --#include --#include --#include --#include -- --#include