i.MX fixes for 5.17, round 2:
- Drop reset signal from i.MX8MM vpumix power domain to fix a system hang. - Fix a dtbs_check warning caused by #thermal-sensor-cells in i.MX8ULP device tree. - Fix a clock disabling imbalance in gpcv2 driver. -----BEGIN PGP SIGNATURE----- iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmITP40UHHNoYXduZ3Vv QGtlcm5lbC5vcmcACgkQUFdYWoewfM7nFggAgiDRNWaiDNZMbWBEGLWyd+TGWuMi JiXF4h3Ic1UwOPzxcuNkpXGlwdiGdEISf5favuJmVuounlphgWDZaiy7odMyIOFV /3NXpzSowJJYgZMOLxySiOdIVdCU0R8VsyjzWNqsv7ICCosPKOVNa8FjhjjP1XS7 eiyGcrqw675GZNS7HqOwuOrY/F9jbx1h2uUpea14iaOulqVHAPawSvg93Y6YjMJ7 WWcIUELeyOfcx3cDlmyeLEDDMi8gXdx4rvvtjmgn6w+nBAwGwgRjisReEvdJfK7u hpyTubCilsrIDC/zsV0iIfrKOVoM66jVjSCSho7KZI2OVVtsneVLmjYXkw== =I6Wh -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmIX/aQACgkQmmx57+YA GNmf0w/9Hptkyce9hHHbGz/kxmBnUmRPZNqUd8mlzeESr7MjTP7XyI7CnHEWj/LR /vUgs91/HZDIQWa0U/VZAHidCygJImoNENHuzJekimxJ9hdzM6BC7BY2qGtqAl3w WgvbJ0H0zvZTLDQotlz+KwiS8R+m6QEbIeIOuL49CLL4N23jkym+IDU3YlPbhJkr 91hXDREymLKL26Iv3kb7VXyfpmwU1dZk633uDnMCQUtiSgTV22QRPMxr1bhKVi10 UuUDYrfoTYv5i7660UFbkwu509uh4zwWgONuDYO+nUocu+NJAFA76Y/Z7QQkiPg8 3J0Y22b8AK5WVrCpv9YAbQKTjMSYYY+Muwhu4+D9cLORVOD5VVK7ZLxG/iUnItsB JGUxx8ZZkDBQnexnmbkjDfJprVXrV7tAQcZfehk7Sf8wNUyYTKDuCnj3+gag7teU qVEBXe3M7np+YsdnY70UvNKGcTmUoQzx+rdFHH5S/67kgegR1Zxle6ynn1Cmtrs/ zOTZI01YGMZZWr8Iaa7rvzila0AKR0c0CgqEnTVg5p4/iLWaRmzDrOJk7pJjFso1 a3vmjsCvTyVRqYoddB2iqwKRqXdUr7djTvlHkI7hrX25BoKW0NaH36RBW8tUrSJt Pe6OjJ68NcqblbK2DNgMUSvSigjcWFk8Y3lAYKeGBHVJUYqP7Uo= =i8PD -----END PGP SIGNATURE----- Merge tag 'imx-fixes-5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.17, round 2: - Drop reset signal from i.MX8MM vpumix power domain to fix a system hang. - Fix a dtbs_check warning caused by #thermal-sensor-cells in i.MX8ULP device tree. - Fix a clock disabling imbalance in gpcv2 driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
3f96885eb7
@ -242,7 +242,7 @@ example:
|
||||
|
||||
int rectangle_area(struct shape *this)
|
||||
{
|
||||
struct rectangle *self = container_of(this, struct shape, parent);
|
||||
struct rectangle *self = container_of(this, struct rectangle, parent);
|
||||
|
||||
return self->length * self->width;
|
||||
};
|
||||
|
@ -35,6 +35,10 @@ description:
|
||||
contains a specific memory layout, which is documented in chapter 8 of the
|
||||
SiFive U5 Coreplex Series Manual <https://static.dev.sifive.com/U54-MC-RVCoreIP.pdf>.
|
||||
|
||||
The thead,c900-plic is different from sifive,plic-1.0.0 in opensbi, the
|
||||
T-HEAD PLIC implementation requires setting a delegation bit to allow access
|
||||
from S-mode. So add thead,c900-plic to distinguish them.
|
||||
|
||||
maintainers:
|
||||
- Sagar Kadam <sagar.kadam@sifive.com>
|
||||
- Paul Walmsley <paul.walmsley@sifive.com>
|
||||
@ -42,12 +46,17 @@ maintainers:
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
oneOf:
|
||||
- items:
|
||||
- enum:
|
||||
- sifive,fu540-c000-plic
|
||||
- starfive,jh7100-plic
|
||||
- canaan,k210-plic
|
||||
- const: sifive,plic-1.0.0
|
||||
- items:
|
||||
- enum:
|
||||
- allwinner,sun20i-d1-plic
|
||||
- const: thead,c900-plic
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
24
MAINTAINERS
24
MAINTAINERS
@ -7581,6 +7581,12 @@ S: Maintained
|
||||
W: http://floatingpoint.sourceforge.net/emulator/index.html
|
||||
F: arch/x86/math-emu/
|
||||
|
||||
FRAMEBUFFER CORE
|
||||
M: Daniel Vetter <daniel@ffwll.ch>
|
||||
F: drivers/video/fbdev/core/
|
||||
S: Odd Fixes
|
||||
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||
|
||||
FRAMEBUFFER LAYER
|
||||
M: Helge Deller <deller@gmx.de>
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
@ -13309,8 +13315,8 @@ W: http://www.iptables.org/
|
||||
W: http://www.nftables.org/
|
||||
Q: http://patchwork.ozlabs.org/project/netfilter-devel/list/
|
||||
C: irc://irc.libera.chat/netfilter
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next.git
|
||||
F: include/linux/netfilter*
|
||||
F: include/linux/netfilter/
|
||||
F: include/net/netfilter/
|
||||
@ -13577,7 +13583,7 @@ F: tools/testing/selftests/nci/
|
||||
|
||||
NFS, SUNRPC, AND LOCKD CLIENTS
|
||||
M: Trond Myklebust <trond.myklebust@hammerspace.com>
|
||||
M: Anna Schumaker <anna.schumaker@netapp.com>
|
||||
M: Anna Schumaker <anna@kernel.org>
|
||||
L: linux-nfs@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://client.linux-nfs.org
|
||||
@ -16827,8 +16833,8 @@ F: drivers/video/fbdev/savage/
|
||||
S390
|
||||
M: Heiko Carstens <hca@linux.ibm.com>
|
||||
M: Vasily Gorbik <gor@linux.ibm.com>
|
||||
M: Christian Borntraeger <borntraeger@linux.ibm.com>
|
||||
R: Alexander Gordeev <agordeev@linux.ibm.com>
|
||||
M: Alexander Gordeev <agordeev@linux.ibm.com>
|
||||
R: Christian Borntraeger <borntraeger@linux.ibm.com>
|
||||
R: Sven Schnelle <svens@linux.ibm.com>
|
||||
L: linux-s390@vger.kernel.org
|
||||
S: Supported
|
||||
@ -19621,6 +19627,14 @@ F: Documentation/trace/timerlat-tracer.rst
|
||||
F: Documentation/trace/hwlat_detector.rst
|
||||
F: arch/*/kernel/trace.c
|
||||
|
||||
Real-time Linux Analysis (RTLA) tools
|
||||
M: Daniel Bristot de Oliveira <bristot@kernel.org>
|
||||
M: Steven Rostedt <rostedt@goodmis.org>
|
||||
L: linux-trace-devel@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/tools/rtla/
|
||||
F: tools/tracing/rtla/
|
||||
|
||||
TRADITIONAL CHINESE DOCUMENTATION
|
||||
M: Hu Haowen <src.res@email.cn>
|
||||
L: linux-doc-tw-discuss@lists.sourceforge.net
|
||||
|
4
Makefile
4
Makefile
@ -2,8 +2,8 @@
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 17
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Gobble Gobble
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Superb Owl
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
|
@ -672,6 +672,7 @@ config ARM64_WORKAROUND_TRBE_OVERWRITE_FILL_MODE
|
||||
|
||||
config ARM64_ERRATUM_2051678
|
||||
bool "Cortex-A510: 2051678: disable Hardware Update of the page table dirty bit"
|
||||
default y
|
||||
help
|
||||
This options adds the workaround for ARM Cortex-A510 erratum ARM64_ERRATUM_2051678.
|
||||
Affected Coretex-A510 might not respect the ordering rules for
|
||||
|
@ -707,7 +707,6 @@
|
||||
clocks = <&clk IMX8MM_CLK_VPU_DEC_ROOT>;
|
||||
assigned-clocks = <&clk IMX8MM_CLK_VPU_BUS>;
|
||||
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_800M>;
|
||||
resets = <&src IMX8MQ_RESET_VPU_RESET>;
|
||||
};
|
||||
|
||||
pgc_vpu_g1: power-domain@7 {
|
||||
|
@ -132,7 +132,7 @@
|
||||
|
||||
scmi_sensor: protocol@15 {
|
||||
reg = <0x15>;
|
||||
#thermal-sensor-cells = <0>;
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -83,6 +83,8 @@
|
||||
label = "HDMI OUT";
|
||||
type = "a";
|
||||
|
||||
ddc-en-gpios = <&gpa 25 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
port {
|
||||
hdmi_con: endpoint {
|
||||
remote-endpoint = <&dw_hdmi_out>;
|
||||
@ -114,17 +116,6 @@
|
||||
gpio = <&gpf 14 GPIO_ACTIVE_LOW>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
hdmi_power: fixedregulator@3 {
|
||||
compatible = "regulator-fixed";
|
||||
|
||||
regulator-name = "hdmi_power";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
|
||||
gpio = <&gpa 25 0>;
|
||||
enable-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
&ext {
|
||||
@ -576,8 +567,6 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pins_hdmi_ddc>;
|
||||
|
||||
hdmi-5v-supply = <&hdmi_power>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -50,6 +50,12 @@ riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
|
||||
riscv-march-$(CONFIG_ARCH_RV64I) := rv64ima
|
||||
riscv-march-$(CONFIG_FPU) := $(riscv-march-y)fd
|
||||
riscv-march-$(CONFIG_RISCV_ISA_C) := $(riscv-march-y)c
|
||||
|
||||
# Newer binutils versions default to ISA spec version 20191213 which moves some
|
||||
# instructions from the I extension to the Zicsr and Zifencei extensions.
|
||||
toolchain-need-zicsr-zifencei := $(call cc-option-yn, -march=$(riscv-march-y)_zicsr_zifencei)
|
||||
riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei
|
||||
|
||||
KBUILD_CFLAGS += -march=$(subst fd,,$(riscv-march-y))
|
||||
KBUILD_AFLAGS += -march=$(riscv-march-y)
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <linux/sched/hotplug.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/cpu_ops.h>
|
||||
#include <asm/numa.h>
|
||||
#include <asm/sbi.h>
|
||||
|
||||
bool cpu_has_hotplug(unsigned int cpu)
|
||||
@ -40,6 +41,7 @@ int __cpu_disable(void)
|
||||
return ret;
|
||||
|
||||
remove_cpu_topology(cpu);
|
||||
numa_remove_cpu(cpu);
|
||||
set_cpu_online(cpu, false);
|
||||
irq_migrate_all_off_this_cpu();
|
||||
|
||||
|
@ -22,14 +22,13 @@
|
||||
add \reg, \reg, t0
|
||||
.endm
|
||||
.macro XIP_FIXUP_FLASH_OFFSET reg
|
||||
la t1, __data_loc
|
||||
li t0, XIP_OFFSET_MASK
|
||||
and t1, t1, t0
|
||||
li t1, XIP_OFFSET
|
||||
sub t0, t0, t1
|
||||
sub \reg, \reg, t0
|
||||
la t0, __data_loc
|
||||
REG_L t1, _xip_phys_offset
|
||||
sub \reg, \reg, t1
|
||||
add \reg, \reg, t0
|
||||
.endm
|
||||
_xip_fixup: .dword CONFIG_PHYS_RAM_BASE - CONFIG_XIP_PHYS_ADDR - XIP_OFFSET
|
||||
_xip_phys_offset: .dword CONFIG_XIP_PHYS_ADDR + XIP_OFFSET
|
||||
#else
|
||||
.macro XIP_FIXUP_OFFSET reg
|
||||
.endm
|
||||
|
@ -22,15 +22,16 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
|
||||
bool (*fn)(void *, unsigned long), void *arg)
|
||||
{
|
||||
unsigned long fp, sp, pc;
|
||||
int level = 0;
|
||||
|
||||
if (regs) {
|
||||
fp = frame_pointer(regs);
|
||||
sp = user_stack_pointer(regs);
|
||||
pc = instruction_pointer(regs);
|
||||
} else if (task == NULL || task == current) {
|
||||
fp = (unsigned long)__builtin_frame_address(1);
|
||||
sp = (unsigned long)__builtin_frame_address(0);
|
||||
pc = (unsigned long)__builtin_return_address(0);
|
||||
fp = (unsigned long)__builtin_frame_address(0);
|
||||
sp = sp_in_global;
|
||||
pc = (unsigned long)walk_stackframe;
|
||||
} else {
|
||||
/* task blocked in __switch_to */
|
||||
fp = task->thread.s[0];
|
||||
@ -42,7 +43,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
|
||||
unsigned long low, high;
|
||||
struct stackframe *frame;
|
||||
|
||||
if (unlikely(!__kernel_text_address(pc) || !fn(arg, pc)))
|
||||
if (unlikely(!__kernel_text_address(pc) || (level++ >= 1 && !fn(arg, pc))))
|
||||
break;
|
||||
|
||||
/* Validate frame pointer */
|
||||
|
@ -33,7 +33,7 @@ static inline void regs_set_gpr(struct pt_regs *regs, unsigned int offset,
|
||||
if (unlikely(offset > MAX_REG_OFFSET))
|
||||
return;
|
||||
|
||||
if (!offset)
|
||||
if (offset)
|
||||
*(unsigned long *)((unsigned long)regs + offset) = val;
|
||||
}
|
||||
|
||||
@ -43,8 +43,8 @@ static bool ex_handler_uaccess_err_zero(const struct exception_table_entry *ex,
|
||||
int reg_err = FIELD_GET(EX_DATA_REG_ERR, ex->data);
|
||||
int reg_zero = FIELD_GET(EX_DATA_REG_ZERO, ex->data);
|
||||
|
||||
regs_set_gpr(regs, reg_err, -EFAULT);
|
||||
regs_set_gpr(regs, reg_zero, 0);
|
||||
regs_set_gpr(regs, reg_err * sizeof(unsigned long), -EFAULT);
|
||||
regs_set_gpr(regs, reg_zero * sizeof(unsigned long), 0);
|
||||
|
||||
regs->epc = get_ex_fixup(ex);
|
||||
return true;
|
||||
|
@ -232,6 +232,7 @@ static pmd_t __maybe_unused early_dtb_pmd[PTRS_PER_PMD] __initdata __aligned(PAG
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
#define pt_ops (*(struct pt_alloc_ops *)XIP_FIXUP(&pt_ops))
|
||||
#define riscv_pfn_base (*(unsigned long *)XIP_FIXUP(&riscv_pfn_base))
|
||||
#define trampoline_pg_dir ((pgd_t *)XIP_FIXUP(trampoline_pg_dir))
|
||||
#define fixmap_pte ((pte_t *)XIP_FIXUP(fixmap_pte))
|
||||
#define early_pg_dir ((pgd_t *)XIP_FIXUP(early_pg_dir))
|
||||
@ -522,6 +523,7 @@ static uintptr_t __init best_map_size(phys_addr_t base, phys_addr_t size)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XIP_KERNEL
|
||||
#define phys_ram_base (*(phys_addr_t *)XIP_FIXUP(&phys_ram_base))
|
||||
extern char _xiprom[], _exiprom[], __data_loc;
|
||||
|
||||
/* called from head.S with MMU off */
|
||||
|
@ -4667,6 +4667,8 @@ static long kvm_s390_guest_sida_op(struct kvm_vcpu *vcpu,
|
||||
return -EINVAL;
|
||||
if (mop->size + mop->sida_offset > sida_size(vcpu->arch.sie_block))
|
||||
return -E2BIG;
|
||||
if (!kvm_s390_pv_cpu_is_protected(vcpu))
|
||||
return -EINVAL;
|
||||
|
||||
switch (mop->op) {
|
||||
case KVM_S390_MEMOP_SIDA_READ:
|
||||
|
@ -5,9 +5,6 @@
|
||||
|
||||
#include "test_modules.h"
|
||||
|
||||
#define DECLARE_RETURN(i) int test_modules_return_ ## i(void)
|
||||
REPEAT_10000(DECLARE_RETURN);
|
||||
|
||||
/*
|
||||
* Test that modules with many relocations are loaded properly.
|
||||
*/
|
||||
|
@ -47,4 +47,7 @@
|
||||
__REPEAT_10000_1(f, 8); \
|
||||
__REPEAT_10000_1(f, 9)
|
||||
|
||||
#define DECLARE_RETURN(i) int test_modules_return_ ## i(void)
|
||||
REPEAT_10000(DECLARE_RETURN);
|
||||
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
|
||||
#define _BUG_FLAGS(ins, flags) \
|
||||
#define _BUG_FLAGS(ins, flags, extra) \
|
||||
do { \
|
||||
asm_inline volatile("1:\t" ins "\n" \
|
||||
".pushsection __bug_table,\"aw\"\n" \
|
||||
@ -31,7 +31,8 @@ do { \
|
||||
"\t.word %c1" "\t# bug_entry::line\n" \
|
||||
"\t.word %c2" "\t# bug_entry::flags\n" \
|
||||
"\t.org 2b+%c3\n" \
|
||||
".popsection" \
|
||||
".popsection\n" \
|
||||
extra \
|
||||
: : "i" (__FILE__), "i" (__LINE__), \
|
||||
"i" (flags), \
|
||||
"i" (sizeof(struct bug_entry))); \
|
||||
@ -39,14 +40,15 @@ do { \
|
||||
|
||||
#else /* !CONFIG_DEBUG_BUGVERBOSE */
|
||||
|
||||
#define _BUG_FLAGS(ins, flags) \
|
||||
#define _BUG_FLAGS(ins, flags, extra) \
|
||||
do { \
|
||||
asm_inline volatile("1:\t" ins "\n" \
|
||||
".pushsection __bug_table,\"aw\"\n" \
|
||||
"2:\t" __BUG_REL(1b) "\t# bug_entry::bug_addr\n" \
|
||||
"\t.word %c0" "\t# bug_entry::flags\n" \
|
||||
"\t.org 2b+%c1\n" \
|
||||
".popsection" \
|
||||
".popsection\n" \
|
||||
extra \
|
||||
: : "i" (flags), \
|
||||
"i" (sizeof(struct bug_entry))); \
|
||||
} while (0)
|
||||
@ -55,7 +57,7 @@ do { \
|
||||
|
||||
#else
|
||||
|
||||
#define _BUG_FLAGS(ins, flags) asm volatile(ins)
|
||||
#define _BUG_FLAGS(ins, flags, extra) asm volatile(ins)
|
||||
|
||||
#endif /* CONFIG_GENERIC_BUG */
|
||||
|
||||
@ -63,8 +65,8 @@ do { \
|
||||
#define BUG() \
|
||||
do { \
|
||||
instrumentation_begin(); \
|
||||
_BUG_FLAGS(ASM_UD2, 0); \
|
||||
unreachable(); \
|
||||
_BUG_FLAGS(ASM_UD2, 0, ""); \
|
||||
__builtin_unreachable(); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
@ -75,9 +77,9 @@ do { \
|
||||
*/
|
||||
#define __WARN_FLAGS(flags) \
|
||||
do { \
|
||||
__auto_type f = BUGFLAG_WARNING|(flags); \
|
||||
instrumentation_begin(); \
|
||||
_BUG_FLAGS(ASM_UD2, BUGFLAG_WARNING|(flags)); \
|
||||
annotate_reachable(); \
|
||||
_BUG_FLAGS(ASM_UD2, f, ASM_REACHABLE); \
|
||||
instrumentation_end(); \
|
||||
} while (0)
|
||||
|
||||
|
@ -100,6 +100,13 @@
|
||||
/* Memory mapped from other domains has valid IOMMU entries */
|
||||
#define XEN_HVM_CPUID_IOMMU_MAPPINGS (1u << 2)
|
||||
#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */
|
||||
#define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */
|
||||
/*
|
||||
* Bits 55:49 from the IO-APIC RTE and bits 11:5 from the MSI address can be
|
||||
* used to store high bits for the Destination ID. This expands the Destination
|
||||
* ID field from 8 to 15 bits, allowing to target APIC IDs up 32768.
|
||||
*/
|
||||
#define XEN_HVM_CPUID_EXT_DEST_ID (1u << 5)
|
||||
|
||||
/*
|
||||
* Leaf 6 (0x40000x05)
|
||||
|
@ -410,6 +410,8 @@ void sgx_encl_release(struct kref *ref)
|
||||
}
|
||||
|
||||
kfree(entry);
|
||||
/* Invoke scheduler to prevent soft lockups. */
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
xa_destroy(&encl->page_array);
|
||||
|
@ -1,5 +1,4 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <asm/e820/api.h>
|
||||
|
||||
@ -24,31 +23,11 @@ static void resource_clip(struct resource *res, resource_size_t start,
|
||||
res->start = end + 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some BIOS-es contain a bug where they add addresses which map to
|
||||
* system RAM in the PCI host bridge window returned by the ACPI _CRS
|
||||
* method, see commit 4dc2287c1805 ("x86: avoid E820 regions when
|
||||
* allocating address space"). To avoid this Linux by default excludes
|
||||
* E820 reservations when allocating addresses since 2010.
|
||||
* In 2019 some systems have shown-up with E820 reservations which cover
|
||||
* the entire _CRS returned PCI host bridge window, causing all attempts
|
||||
* to assign memory to PCI BARs to fail if Linux uses E820 reservations.
|
||||
*
|
||||
* Ideally Linux would fully stop using E820 reservations, but then
|
||||
* the old systems this was added for will regress.
|
||||
* Instead keep the old behavior for old systems, while ignoring the
|
||||
* E820 reservations for any systems from now on.
|
||||
*/
|
||||
static void remove_e820_regions(struct resource *avail)
|
||||
{
|
||||
int i, year = dmi_get_bios_year();
|
||||
int i;
|
||||
struct e820_entry *entry;
|
||||
|
||||
if (year >= 2018)
|
||||
return;
|
||||
|
||||
pr_info_once("PCI: Removing E820 reservations from host bridge windows\n");
|
||||
|
||||
for (i = 0; i < e820_table->nr_entries; i++) {
|
||||
entry = &e820_table->entries[i];
|
||||
|
||||
|
@ -185,7 +185,6 @@ static int xen_cpu_dead_hvm(unsigned int cpu)
|
||||
|
||||
if (xen_have_vector_callback && xen_feature(XENFEAT_hvm_safe_pvclock))
|
||||
xen_teardown_timer(cpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -248,6 +247,11 @@ static __init bool xen_x2apic_available(void)
|
||||
return x2apic_supported();
|
||||
}
|
||||
|
||||
static bool __init msi_ext_dest_id(void)
|
||||
{
|
||||
return cpuid_eax(xen_cpuid_base() + 4) & XEN_HVM_CPUID_EXT_DEST_ID;
|
||||
}
|
||||
|
||||
static __init void xen_hvm_guest_late_init(void)
|
||||
{
|
||||
#ifdef CONFIG_XEN_PVH
|
||||
@ -310,6 +314,7 @@ struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
|
||||
.init.x2apic_available = xen_x2apic_available,
|
||||
.init.init_mem_mapping = xen_hvm_init_mem_mapping,
|
||||
.init.guest_late_init = xen_hvm_guest_late_init,
|
||||
.init.msi_ext_dest_id = msi_ext_dest_id,
|
||||
.runtime.pin_vcpu = xen_pin_vcpu,
|
||||
.ignore_nopv = true,
|
||||
};
|
||||
|
@ -57,6 +57,14 @@ void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
|
||||
screen_info->rsvd_size = info->u.vesa_lfb.rsvd_size;
|
||||
screen_info->rsvd_pos = info->u.vesa_lfb.rsvd_pos;
|
||||
|
||||
if (size >= offsetof(struct dom0_vga_console_info,
|
||||
u.vesa_lfb.ext_lfb_base)
|
||||
+ sizeof(info->u.vesa_lfb.ext_lfb_base)
|
||||
&& info->u.vesa_lfb.ext_lfb_base) {
|
||||
screen_info->ext_lfb_base = info->u.vesa_lfb.ext_lfb_base;
|
||||
screen_info->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
|
||||
}
|
||||
|
||||
if (info->video_type == XEN_VGATYPE_EFI_LFB) {
|
||||
screen_info->orig_video_isVGA = VIDEO_TYPE_EFI;
|
||||
break;
|
||||
@ -66,14 +74,6 @@ void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
|
||||
u.vesa_lfb.mode_attrs)
|
||||
+ sizeof(info->u.vesa_lfb.mode_attrs))
|
||||
screen_info->vesa_attributes = info->u.vesa_lfb.mode_attrs;
|
||||
|
||||
if (size >= offsetof(struct dom0_vga_console_info,
|
||||
u.vesa_lfb.ext_lfb_base)
|
||||
+ sizeof(info->u.vesa_lfb.ext_lfb_base)
|
||||
&& info->u.vesa_lfb.ext_lfb_base) {
|
||||
screen_info->ext_lfb_base = info->u.vesa_lfb.ext_lfb_base;
|
||||
screen_info->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1324,3 +1324,4 @@ module_exit(crypto_algapi_exit);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Cryptographic algorithms API");
|
||||
MODULE_SOFTDEP("pre: cryptomgr");
|
||||
|
@ -643,4 +643,3 @@ EXPORT_SYMBOL_GPL(crypto_req_done);
|
||||
|
||||
MODULE_DESCRIPTION("Cryptographic core API");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_SOFTDEP("pre: cryptomgr");
|
||||
|
@ -44,6 +44,7 @@ static struct var_t vars[] = {
|
||||
{ CAPS_START, .u.s = {"[:dv ap 160] " } },
|
||||
{ CAPS_STOP, .u.s = {"[:dv ap 100 ] " } },
|
||||
{ RATE, .u.n = {"[:ra %d] ", 180, 75, 650, 0, 0, NULL } },
|
||||
{ PITCH, .u.n = {"[:dv ap %d] ", 122, 50, 350, 0, 0, NULL } },
|
||||
{ INFLECTION, .u.n = {"[:dv pr %d] ", 100, 0, 10000, 0, 0, NULL } },
|
||||
{ VOL, .u.n = {"[:dv g5 %d] ", 86, 60, 86, 0, 0, NULL } },
|
||||
{ PUNCT, .u.n = {"[:pu %c] ", 0, 0, 2, 0, 0, "nsa" } },
|
||||
|
@ -1361,9 +1361,17 @@ static void __init arm_smmu_v3_pmcg_init_resources(struct resource *res,
|
||||
res[0].start = pmcg->page0_base_address;
|
||||
res[0].end = pmcg->page0_base_address + SZ_4K - 1;
|
||||
res[0].flags = IORESOURCE_MEM;
|
||||
/*
|
||||
* The initial version in DEN0049C lacked a way to describe register
|
||||
* page 1, which makes it broken for most PMCG implementations; in
|
||||
* that case, just let the driver fail gracefully if it expects to
|
||||
* find a second memory resource.
|
||||
*/
|
||||
if (node->revision > 0) {
|
||||
res[1].start = pmcg->page1_base_address;
|
||||
res[1].end = pmcg->page1_base_address + SZ_4K - 1;
|
||||
res[1].flags = IORESOURCE_MEM;
|
||||
}
|
||||
|
||||
if (pmcg->overflow_gsiv)
|
||||
acpi_iort_register_irq(pmcg->overflow_gsiv, "overflow",
|
||||
|
@ -2065,6 +2065,16 @@ bool acpi_ec_dispatch_gpe(void)
|
||||
if (acpi_any_gpe_status_set(first_ec->gpe))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Cancel the SCI wakeup and process all pending events in case there
|
||||
* are any wakeup ones in there.
|
||||
*
|
||||
* Note that if any non-EC GPEs are active at this point, the SCI will
|
||||
* retrigger after the rearming in acpi_s2idle_wake(), so no events
|
||||
* should be missed by canceling the wakeup here.
|
||||
*/
|
||||
pm_system_cancel_wakeup();
|
||||
|
||||
/*
|
||||
* Dispatch the EC GPE in-band, but do not report wakeup in any case
|
||||
* to allow the caller to process events properly after that.
|
||||
|
@ -736,21 +736,15 @@ bool acpi_s2idle_wake(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Check non-EC GPE wakeups and dispatch the EC GPE. */
|
||||
/*
|
||||
* Check non-EC GPE wakeups and if there are none, cancel the
|
||||
* SCI-related wakeup and dispatch the EC GPE.
|
||||
*/
|
||||
if (acpi_ec_dispatch_gpe()) {
|
||||
pm_pr_dbg("ACPI non-EC GPE wakeup\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Cancel the SCI wakeup and process all pending events in case
|
||||
* there are any wakeup ones in there.
|
||||
*
|
||||
* Note that if any non-EC GPEs are active at this point, the
|
||||
* SCI will retrigger after the rearming below, so no events
|
||||
* should be missed by canceling the wakeup here.
|
||||
*/
|
||||
pm_system_cancel_wakeup();
|
||||
acpi_os_wait_events_complete();
|
||||
|
||||
/*
|
||||
@ -764,6 +758,7 @@ bool acpi_s2idle_wake(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
pm_wakeup_clear(acpi_sci_irq);
|
||||
rearm_wake_irq(acpi_sci_irq);
|
||||
}
|
||||
|
||||
|
@ -424,14 +424,10 @@ static int lps0_device_attach(struct acpi_device *adev,
|
||||
mem_sleep_current = PM_SUSPEND_TO_IDLE;
|
||||
|
||||
/*
|
||||
* Some Intel based LPS0 systems, like ASUS Zenbook UX430UNR/i7-8550U don't
|
||||
* use intel-hid or intel-vbtn but require the EC GPE to be enabled while
|
||||
* suspended for certain wakeup devices to work, so mark it as wakeup-capable.
|
||||
*
|
||||
* Only enable on !AMD as enabling this universally causes problems for a number
|
||||
* of AMD based systems.
|
||||
* Some LPS0 systems, like ASUS Zenbook UX430UNR/i7-8550U, require the
|
||||
* EC GPE to be enabled while suspended for certain wakeup devices to
|
||||
* work, so mark it as wakeup-capable.
|
||||
*/
|
||||
if (!acpi_s2idle_vendor_amd())
|
||||
acpi_ec_mark_gpe_for_wake();
|
||||
|
||||
return 0;
|
||||
|
@ -2448,23 +2448,21 @@ static void ata_dev_config_cpr(struct ata_device *dev)
|
||||
struct ata_cpr_log *cpr_log = NULL;
|
||||
u8 *desc, *buf = NULL;
|
||||
|
||||
if (!ata_identify_page_supported(dev,
|
||||
ATA_LOG_CONCURRENT_POSITIONING_RANGES))
|
||||
if (ata_id_major_version(dev->id) < 11 ||
|
||||
!ata_log_supported(dev, ATA_LOG_CONCURRENT_POSITIONING_RANGES))
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Read IDENTIFY DEVICE data log, page 0x47
|
||||
* (concurrent positioning ranges). We can have at most 255 32B range
|
||||
* descriptors plus a 64B header.
|
||||
* Read the concurrent positioning ranges log (0x47). We can have at
|
||||
* most 255 32B range descriptors plus a 64B header.
|
||||
*/
|
||||
buf_len = (64 + 255 * 32 + 511) & ~511;
|
||||
buf = kzalloc(buf_len, GFP_KERNEL);
|
||||
if (!buf)
|
||||
goto out;
|
||||
|
||||
err_mask = ata_read_log_page(dev, ATA_LOG_IDENTIFY_DEVICE,
|
||||
ATA_LOG_CONCURRENT_POSITIONING_RANGES,
|
||||
buf, buf_len >> 9);
|
||||
err_mask = ata_read_log_page(dev, ATA_LOG_CONCURRENT_POSITIONING_RANGES,
|
||||
0, buf, buf_len >> 9);
|
||||
if (err_mask)
|
||||
goto out;
|
||||
|
||||
@ -4031,6 +4029,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
|
||||
|
||||
/* devices that don't properly handle TRIM commands */
|
||||
{ "SuperSSpeed S238*", NULL, ATA_HORKAGE_NOTRIM, },
|
||||
{ "M88V29*", NULL, ATA_HORKAGE_NOTRIM, },
|
||||
|
||||
/*
|
||||
* As defined, the DRAT (Deterministic Read After Trim) and RZAT
|
||||
|
@ -322,7 +322,7 @@ static void fsl_sata_set_irq_coalescing(struct ata_host *host,
|
||||
static ssize_t fsl_sata_intr_coalescing_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return sysfs_emit(buf, "%d %d\n",
|
||||
return sysfs_emit(buf, "%u %u\n",
|
||||
intr_coalescing_count, intr_coalescing_ticks);
|
||||
}
|
||||
|
||||
@ -332,10 +332,8 @@ static ssize_t fsl_sata_intr_coalescing_store(struct device *dev,
|
||||
{
|
||||
unsigned int coalescing_count, coalescing_ticks;
|
||||
|
||||
if (sscanf(buf, "%d%d",
|
||||
&coalescing_count,
|
||||
&coalescing_ticks) != 2) {
|
||||
printk(KERN_ERR "fsl-sata: wrong parameter format.\n");
|
||||
if (sscanf(buf, "%u%u", &coalescing_count, &coalescing_ticks) != 2) {
|
||||
dev_err(dev, "fsl-sata: wrong parameter format.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -359,7 +357,7 @@ static ssize_t fsl_sata_rx_watermark_show(struct device *dev,
|
||||
rx_watermark &= 0x1f;
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
|
||||
return sysfs_emit(buf, "%d\n", rx_watermark);
|
||||
return sysfs_emit(buf, "%u\n", rx_watermark);
|
||||
}
|
||||
|
||||
static ssize_t fsl_sata_rx_watermark_store(struct device *dev,
|
||||
@ -373,8 +371,8 @@ static ssize_t fsl_sata_rx_watermark_store(struct device *dev,
|
||||
void __iomem *csr_base = host_priv->csr_base;
|
||||
u32 temp;
|
||||
|
||||
if (sscanf(buf, "%d", &rx_watermark) != 1) {
|
||||
printk(KERN_ERR "fsl-sata: wrong parameter format.\n");
|
||||
if (kstrtouint(buf, 10, &rx_watermark) < 0) {
|
||||
dev_err(dev, "fsl-sata: wrong parameter format.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -382,8 +380,8 @@ static ssize_t fsl_sata_rx_watermark_store(struct device *dev,
|
||||
temp = ioread32(csr_base + TRANSCFG);
|
||||
temp &= 0xffffffe0;
|
||||
iowrite32(temp | rx_watermark, csr_base + TRANSCFG);
|
||||
|
||||
spin_unlock_irqrestore(&host->lock, flags);
|
||||
|
||||
return strlen(buf);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,8 @@ suspend_state_t pm_suspend_target_state;
|
||||
bool events_check_enabled __read_mostly;
|
||||
|
||||
/* First wakeup IRQ seen by the kernel in the last cycle. */
|
||||
unsigned int pm_wakeup_irq __read_mostly;
|
||||
static unsigned int wakeup_irq[2] __read_mostly;
|
||||
static DEFINE_RAW_SPINLOCK(wakeup_irq_lock);
|
||||
|
||||
/* If greater than 0 and the system is suspending, terminate the suspend. */
|
||||
static atomic_t pm_abort_suspend __read_mostly;
|
||||
@ -942,19 +943,45 @@ void pm_system_cancel_wakeup(void)
|
||||
atomic_dec_if_positive(&pm_abort_suspend);
|
||||
}
|
||||
|
||||
void pm_wakeup_clear(bool reset)
|
||||
void pm_wakeup_clear(unsigned int irq_number)
|
||||
{
|
||||
pm_wakeup_irq = 0;
|
||||
if (reset)
|
||||
raw_spin_lock_irq(&wakeup_irq_lock);
|
||||
|
||||
if (irq_number && wakeup_irq[0] == irq_number)
|
||||
wakeup_irq[0] = wakeup_irq[1];
|
||||
else
|
||||
wakeup_irq[0] = 0;
|
||||
|
||||
wakeup_irq[1] = 0;
|
||||
|
||||
raw_spin_unlock_irq(&wakeup_irq_lock);
|
||||
|
||||
if (!irq_number)
|
||||
atomic_set(&pm_abort_suspend, 0);
|
||||
}
|
||||
|
||||
void pm_system_irq_wakeup(unsigned int irq_number)
|
||||
{
|
||||
if (pm_wakeup_irq == 0) {
|
||||
pm_wakeup_irq = irq_number;
|
||||
unsigned long flags;
|
||||
|
||||
raw_spin_lock_irqsave(&wakeup_irq_lock, flags);
|
||||
|
||||
if (wakeup_irq[0] == 0)
|
||||
wakeup_irq[0] = irq_number;
|
||||
else if (wakeup_irq[1] == 0)
|
||||
wakeup_irq[1] = irq_number;
|
||||
else
|
||||
irq_number = 0;
|
||||
|
||||
raw_spin_unlock_irqrestore(&wakeup_irq_lock, flags);
|
||||
|
||||
if (irq_number)
|
||||
pm_system_wakeup();
|
||||
}
|
||||
|
||||
unsigned int pm_wakeup_irq(void)
|
||||
{
|
||||
return wakeup_irq[0];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1082,7 +1082,7 @@ out_putf:
|
||||
return error;
|
||||
}
|
||||
|
||||
static void __loop_clr_fd(struct loop_device *lo)
|
||||
static void __loop_clr_fd(struct loop_device *lo, bool release)
|
||||
{
|
||||
struct file *filp;
|
||||
gfp_t gfp = lo->old_gfp_mask;
|
||||
@ -1144,6 +1144,8 @@ static void __loop_clr_fd(struct loop_device *lo)
|
||||
/* let user-space know about this change */
|
||||
kobject_uevent(&disk_to_dev(lo->lo_disk)->kobj, KOBJ_CHANGE);
|
||||
mapping_set_gfp_mask(filp->f_mapping, gfp);
|
||||
/* This is safe: open() is still holding a reference. */
|
||||
module_put(THIS_MODULE);
|
||||
blk_mq_unfreeze_queue(lo->lo_queue);
|
||||
|
||||
disk_force_media_change(lo->lo_disk, DISK_EVENT_MEDIA_CHANGE);
|
||||
@ -1151,8 +1153,18 @@ static void __loop_clr_fd(struct loop_device *lo)
|
||||
if (lo->lo_flags & LO_FLAGS_PARTSCAN) {
|
||||
int err;
|
||||
|
||||
/*
|
||||
* open_mutex has been held already in release path, so don't
|
||||
* acquire it if this function is called in such case.
|
||||
*
|
||||
* If the reread partition isn't from release path, lo_refcnt
|
||||
* must be at least one and it can only become zero when the
|
||||
* current holder is released.
|
||||
*/
|
||||
if (!release)
|
||||
mutex_lock(&lo->lo_disk->open_mutex);
|
||||
err = bdev_disk_changed(lo->lo_disk, false);
|
||||
if (!release)
|
||||
mutex_unlock(&lo->lo_disk->open_mutex);
|
||||
if (err)
|
||||
pr_warn("%s: partition scan of loop%d failed (rc=%d)\n",
|
||||
@ -1160,43 +1172,25 @@ static void __loop_clr_fd(struct loop_device *lo)
|
||||
/* Device is gone, no point in returning error */
|
||||
}
|
||||
|
||||
/*
|
||||
* lo->lo_state is set to Lo_unbound here after above partscan has
|
||||
* finished. There cannot be anybody else entering __loop_clr_fd() as
|
||||
* Lo_rundown state protects us from all the other places trying to
|
||||
* change the 'lo' device.
|
||||
*/
|
||||
lo->lo_flags = 0;
|
||||
if (!part_shift)
|
||||
lo->lo_disk->flags |= GENHD_FL_NO_PART;
|
||||
|
||||
fput(filp);
|
||||
}
|
||||
|
||||
static void loop_rundown_completed(struct loop_device *lo)
|
||||
{
|
||||
mutex_lock(&lo->lo_mutex);
|
||||
lo->lo_state = Lo_unbound;
|
||||
mutex_unlock(&lo->lo_mutex);
|
||||
module_put(THIS_MODULE);
|
||||
}
|
||||
|
||||
static void loop_rundown_workfn(struct work_struct *work)
|
||||
{
|
||||
struct loop_device *lo = container_of(work, struct loop_device,
|
||||
rundown_work);
|
||||
struct block_device *bdev = lo->lo_device;
|
||||
struct gendisk *disk = lo->lo_disk;
|
||||
|
||||
__loop_clr_fd(lo);
|
||||
kobject_put(&bdev->bd_device.kobj);
|
||||
module_put(disk->fops->owner);
|
||||
loop_rundown_completed(lo);
|
||||
}
|
||||
|
||||
static void loop_schedule_rundown(struct loop_device *lo)
|
||||
{
|
||||
struct block_device *bdev = lo->lo_device;
|
||||
struct gendisk *disk = lo->lo_disk;
|
||||
|
||||
__module_get(disk->fops->owner);
|
||||
kobject_get(&bdev->bd_device.kobj);
|
||||
INIT_WORK(&lo->rundown_work, loop_rundown_workfn);
|
||||
queue_work(system_long_wq, &lo->rundown_work);
|
||||
/*
|
||||
* Need not hold lo_mutex to fput backing file. Calling fput holding
|
||||
* lo_mutex triggers a circular lock dependency possibility warning as
|
||||
* fput can take open_mutex which is usually taken before lo_mutex.
|
||||
*/
|
||||
fput(filp);
|
||||
}
|
||||
|
||||
static int loop_clr_fd(struct loop_device *lo)
|
||||
@ -1228,8 +1222,7 @@ static int loop_clr_fd(struct loop_device *lo)
|
||||
lo->lo_state = Lo_rundown;
|
||||
mutex_unlock(&lo->lo_mutex);
|
||||
|
||||
__loop_clr_fd(lo);
|
||||
loop_rundown_completed(lo);
|
||||
__loop_clr_fd(lo, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1754,7 +1747,7 @@ static void lo_release(struct gendisk *disk, fmode_t mode)
|
||||
* In autoclear mode, stop the loop thread
|
||||
* and remove configuration after last close.
|
||||
*/
|
||||
loop_schedule_rundown(lo);
|
||||
__loop_clr_fd(lo, true);
|
||||
return;
|
||||
} else if (lo->lo_state == Lo_bound) {
|
||||
/*
|
||||
|
@ -56,7 +56,6 @@ struct loop_device {
|
||||
struct gendisk *lo_disk;
|
||||
struct mutex lo_mutex;
|
||||
bool idr_visible;
|
||||
struct work_struct rundown_work;
|
||||
};
|
||||
|
||||
struct loop_cmd {
|
||||
|
@ -366,6 +366,7 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx55_info = {
|
||||
.config = &modem_foxconn_sdx55_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
.sideband_wake = false,
|
||||
};
|
||||
|
||||
@ -401,6 +402,7 @@ static const struct mhi_pci_dev_info mhi_mv31_info = {
|
||||
.config = &modem_mv31_config,
|
||||
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
|
||||
.dma_data_width = 32,
|
||||
.mru_default = 32768,
|
||||
};
|
||||
|
||||
static const struct mhi_channel_config mhi_sierra_em919x_channels[] = {
|
||||
|
@ -1753,7 +1753,6 @@ void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
|
||||
char engs_info[2 * OTX2_CPT_NAME_LENGTH];
|
||||
struct otx2_cpt_eng_grp_info *grp;
|
||||
struct otx2_cpt_engs_rsvd *engs;
|
||||
u32 mask[4];
|
||||
int i, j;
|
||||
|
||||
pr_debug("Engine groups global info");
|
||||
@ -1785,6 +1784,8 @@ void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf)
|
||||
for (j = 0; j < OTX2_CPT_MAX_ETYPES_PER_GRP; j++) {
|
||||
engs = &grp->engs[j];
|
||||
if (engs->type) {
|
||||
u32 mask[5] = { };
|
||||
|
||||
get_engs_info(grp, engs_info,
|
||||
2 * OTX2_CPT_NAME_LENGTH, j);
|
||||
pr_debug("Slot%d: %s", j, engs_info);
|
||||
|
@ -278,7 +278,8 @@ static int gpio_fwd_get(struct gpio_chip *chip, unsigned int offset)
|
||||
{
|
||||
struct gpiochip_fwd *fwd = gpiochip_get_data(chip);
|
||||
|
||||
return gpiod_get_value(fwd->descs[offset]);
|
||||
return chip->can_sleep ? gpiod_get_value_cansleep(fwd->descs[offset])
|
||||
: gpiod_get_value(fwd->descs[offset]);
|
||||
}
|
||||
|
||||
static int gpio_fwd_get_multiple(struct gpiochip_fwd *fwd, unsigned long *mask,
|
||||
@ -293,6 +294,9 @@ static int gpio_fwd_get_multiple(struct gpiochip_fwd *fwd, unsigned long *mask,
|
||||
for_each_set_bit(i, mask, fwd->chip.ngpio)
|
||||
descs[j++] = fwd->descs[i];
|
||||
|
||||
if (fwd->chip.can_sleep)
|
||||
error = gpiod_get_array_value_cansleep(j, descs, NULL, values);
|
||||
else
|
||||
error = gpiod_get_array_value(j, descs, NULL, values);
|
||||
if (error)
|
||||
return error;
|
||||
@ -328,6 +332,9 @@ static void gpio_fwd_set(struct gpio_chip *chip, unsigned int offset, int value)
|
||||
{
|
||||
struct gpiochip_fwd *fwd = gpiochip_get_data(chip);
|
||||
|
||||
if (chip->can_sleep)
|
||||
gpiod_set_value_cansleep(fwd->descs[offset], value);
|
||||
else
|
||||
gpiod_set_value(fwd->descs[offset], value);
|
||||
}
|
||||
|
||||
@ -343,6 +350,9 @@ static void gpio_fwd_set_multiple(struct gpiochip_fwd *fwd, unsigned long *mask,
|
||||
descs[j++] = fwd->descs[i];
|
||||
}
|
||||
|
||||
if (fwd->chip.can_sleep)
|
||||
gpiod_set_array_value_cansleep(j, descs, NULL, values);
|
||||
else
|
||||
gpiod_set_array_value(j, descs, NULL, values);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ static int sifive_gpio_probe(struct platform_device *pdev)
|
||||
NULL,
|
||||
chip->base + SIFIVE_GPIO_OUTPUT_EN,
|
||||
chip->base + SIFIVE_GPIO_INPUT_EN,
|
||||
0);
|
||||
BGPIOF_READ_OUTPUT_REG_SET);
|
||||
if (ret) {
|
||||
dev_err(dev, "unable to init generic GPIO\n");
|
||||
return ret;
|
||||
|
@ -570,6 +570,11 @@ static struct gpio_sim_bank *to_gpio_sim_bank(struct config_item *item)
|
||||
return container_of(group, struct gpio_sim_bank, group);
|
||||
}
|
||||
|
||||
static bool gpio_sim_bank_has_label(struct gpio_sim_bank *bank)
|
||||
{
|
||||
return bank->label && *bank->label;
|
||||
}
|
||||
|
||||
static struct gpio_sim_device *
|
||||
gpio_sim_bank_get_device(struct gpio_sim_bank *bank)
|
||||
{
|
||||
@ -770,9 +775,15 @@ static int gpio_sim_add_hogs(struct gpio_sim_device *dev)
|
||||
* point the device doesn't exist yet and so dev_name()
|
||||
* is not available.
|
||||
*/
|
||||
if (gpio_sim_bank_has_label(bank))
|
||||
hog->chip_label = kstrdup(bank->label,
|
||||
GFP_KERNEL);
|
||||
else
|
||||
hog->chip_label = kasprintf(GFP_KERNEL,
|
||||
"gpio-sim.%u-%s", dev->id,
|
||||
fwnode_get_name(bank->swnode));
|
||||
"gpio-sim.%u-%s",
|
||||
dev->id,
|
||||
fwnode_get_name(
|
||||
bank->swnode));
|
||||
if (!hog->chip_label) {
|
||||
gpio_sim_remove_hogs(dev);
|
||||
return -ENOMEM;
|
||||
@ -816,7 +827,7 @@ gpio_sim_make_bank_swnode(struct gpio_sim_bank *bank,
|
||||
|
||||
properties[prop_idx++] = PROPERTY_ENTRY_U32("ngpios", bank->num_lines);
|
||||
|
||||
if (bank->label && (strlen(bank->label) > 0))
|
||||
if (gpio_sim_bank_has_label(bank))
|
||||
properties[prop_idx++] = PROPERTY_ENTRY_STRING("gpio-sim,label",
|
||||
bank->label);
|
||||
|
||||
|
@ -330,7 +330,7 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
|
||||
goto out_free_lh;
|
||||
}
|
||||
|
||||
ret = gpiod_request(desc, lh->label);
|
||||
ret = gpiod_request_user(desc, lh->label);
|
||||
if (ret)
|
||||
goto out_free_lh;
|
||||
lh->descs[i] = desc;
|
||||
@ -1378,7 +1378,7 @@ static int linereq_create(struct gpio_device *gdev, void __user *ip)
|
||||
goto out_free_linereq;
|
||||
}
|
||||
|
||||
ret = gpiod_request(desc, lr->label);
|
||||
ret = gpiod_request_user(desc, lr->label);
|
||||
if (ret)
|
||||
goto out_free_linereq;
|
||||
|
||||
@ -1764,7 +1764,7 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)
|
||||
}
|
||||
}
|
||||
|
||||
ret = gpiod_request(desc, le->label);
|
||||
ret = gpiod_request_user(desc, le->label);
|
||||
if (ret)
|
||||
goto out_free_le;
|
||||
le->desc = desc;
|
||||
|
@ -475,12 +475,9 @@ static ssize_t export_store(struct class *class,
|
||||
* they may be undone on its behalf too.
|
||||
*/
|
||||
|
||||
status = gpiod_request(desc, "sysfs");
|
||||
if (status) {
|
||||
if (status == -EPROBE_DEFER)
|
||||
status = -ENODEV;
|
||||
status = gpiod_request_user(desc, "sysfs");
|
||||
if (status)
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = gpiod_set_transitory(desc, false);
|
||||
if (!status) {
|
||||
|
@ -135,6 +135,18 @@ struct gpio_desc {
|
||||
|
||||
int gpiod_request(struct gpio_desc *desc, const char *label);
|
||||
void gpiod_free(struct gpio_desc *desc);
|
||||
|
||||
static inline int gpiod_request_user(struct gpio_desc *desc, const char *label)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpiod_request(desc, label);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
ret = -ENODEV;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id,
|
||||
unsigned long lflags, enum gpiod_flags dflags);
|
||||
int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce);
|
||||
|
@ -543,7 +543,9 @@ static void gfxhub_v2_1_utcl2_harvest(struct amdgpu_device *adev)
|
||||
adev->gfx.config.max_sh_per_se *
|
||||
adev->gfx.config.max_shader_engines);
|
||||
|
||||
if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 3)) {
|
||||
switch (adev->ip_versions[GC_HWIP][0]) {
|
||||
case IP_VERSION(10, 3, 1):
|
||||
case IP_VERSION(10, 3, 3):
|
||||
/* Get SA disabled bitmap from eFuse setting */
|
||||
efuse_setting = RREG32_SOC15(GC, 0, mmCC_GC_SA_UNIT_DISABLE);
|
||||
efuse_setting &= CC_GC_SA_UNIT_DISABLE__SA_DISABLE_MASK;
|
||||
@ -566,6 +568,9 @@ static void gfxhub_v2_1_utcl2_harvest(struct amdgpu_device *adev)
|
||||
disabled_sa = tmp;
|
||||
|
||||
WREG32_SOC15(GC, 0, mmGCUTCL2_HARVEST_BYPASS_GROUPS_YELLOW_CARP, disabled_sa);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3653,7 +3653,7 @@ static int dcn10_register_irq_handlers(struct amdgpu_device *adev)
|
||||
|
||||
/* Use GRPH_PFLIP interrupt */
|
||||
for (i = DCN_1_0__SRCID__HUBP0_FLIP_INTERRUPT;
|
||||
i <= DCN_1_0__SRCID__HUBP0_FLIP_INTERRUPT + adev->mode_info.num_crtc - 1;
|
||||
i <= DCN_1_0__SRCID__HUBP0_FLIP_INTERRUPT + dc->caps.max_otg_num - 1;
|
||||
i++) {
|
||||
r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_DCE, i, &adev->pageflip_irq);
|
||||
if (r) {
|
||||
|
@ -120,6 +120,10 @@ static int dcn31_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
|
||||
result = dcn31_smu_wait_for_response(clk_mgr, 10, 200000);
|
||||
|
||||
if (result == VBIOSSMC_Result_Failed) {
|
||||
if (msg_id == VBIOSSMC_MSG_TransferTableDram2Smu &&
|
||||
param == TABLE_WATERMARKS)
|
||||
DC_LOG_WARNING("Watermarks table not configured properly by SMU");
|
||||
else
|
||||
ASSERT(0);
|
||||
REG_WRITE(MP1_SMN_C2PMSG_91, VBIOSSMC_Result_OK);
|
||||
return -1;
|
||||
|
@ -1220,6 +1220,8 @@ struct dc *dc_create(const struct dc_init_data *init_params)
|
||||
|
||||
dc->caps.max_dp_protocol_version = DP_VERSION_1_4;
|
||||
|
||||
dc->caps.max_otg_num = dc->res_pool->res_cap->num_timing_generator;
|
||||
|
||||
if (dc->res_pool->dmcu != NULL)
|
||||
dc->versions.dmcu_version = dc->res_pool->dmcu->dmcu_version;
|
||||
}
|
||||
|
@ -202,6 +202,7 @@ struct dc_caps {
|
||||
bool edp_dsc_support;
|
||||
bool vbios_lttpr_aware;
|
||||
bool vbios_lttpr_enable;
|
||||
uint32_t max_otg_num;
|
||||
};
|
||||
|
||||
struct dc_bug_wa {
|
||||
|
@ -1834,9 +1834,29 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// We are trying to enable eDP, don't power down VDD
|
||||
if (can_apply_edp_fast_boot)
|
||||
|
||||
/*
|
||||
* TO-DO: So far the code logic below only addresses single eDP case.
|
||||
* For dual eDP case, there are a few things that need to be
|
||||
* implemented first:
|
||||
*
|
||||
* 1. Change the fastboot logic above, so eDP link[0 or 1]'s
|
||||
* stream[0 or 1] will all be checked.
|
||||
*
|
||||
* 2. Change keep_edp_vdd_on to an array, and maintain keep_edp_vdd_on
|
||||
* for each eDP.
|
||||
*
|
||||
* Once above 2 things are completed, we can then change the logic below
|
||||
* correspondingly, so dual eDP case will be fully covered.
|
||||
*/
|
||||
|
||||
// We are trying to enable eDP, don't power down VDD if eDP stream is existing
|
||||
if ((edp_stream_num == 1 && edp_streams[0] != NULL) || can_apply_edp_fast_boot) {
|
||||
keep_edp_vdd_on = true;
|
||||
DC_LOG_EVENT_LINK_TRAINING("Keep eDP Vdd on\n");
|
||||
} else {
|
||||
DC_LOG_EVENT_LINK_TRAINING("No eDP stream enabled, turn eDP Vdd off\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Check seamless boot support
|
||||
|
@ -1069,7 +1069,7 @@ static const struct dc_debug_options debug_defaults_drv = {
|
||||
.timing_trace = false,
|
||||
.clock_trace = true,
|
||||
.disable_pplib_clock_request = true,
|
||||
.pipe_split_policy = MPC_SPLIT_DYNAMIC,
|
||||
.pipe_split_policy = MPC_SPLIT_AVOID_MULT_DISP,
|
||||
.force_single_disp_pipe_split = false,
|
||||
.disable_dcc = DCC_ENABLE,
|
||||
.vsr_support = true,
|
||||
|
@ -138,8 +138,11 @@ static uint32_t convert_and_clamp(
|
||||
ret_val = wm_ns * refclk_mhz;
|
||||
ret_val /= 1000;
|
||||
|
||||
if (ret_val > clamp_value)
|
||||
if (ret_val > clamp_value) {
|
||||
/* clamping WMs is abnormal, unexpected and may lead to underflow*/
|
||||
ASSERT(0);
|
||||
ret_val = clamp_value;
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
@ -159,7 +162,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->a.urgent_ns > hubbub2->watermarks.a.urgent_ns) {
|
||||
hubbub2->watermarks.a.urgent_ns = watermarks->a.urgent_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->a.urgent_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_A, 0,
|
||||
DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_A, prog_wm_value);
|
||||
|
||||
@ -193,7 +196,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->a.urgent_latency_ns > hubbub2->watermarks.a.urgent_latency_ns) {
|
||||
hubbub2->watermarks.a.urgent_latency_ns = watermarks->a.urgent_latency_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->a.urgent_latency_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_A, 0,
|
||||
DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_A, prog_wm_value);
|
||||
} else if (watermarks->a.urgent_latency_ns < hubbub2->watermarks.a.urgent_latency_ns)
|
||||
@ -203,7 +206,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->b.urgent_ns > hubbub2->watermarks.b.urgent_ns) {
|
||||
hubbub2->watermarks.b.urgent_ns = watermarks->b.urgent_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->b.urgent_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_B, 0,
|
||||
DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_B, prog_wm_value);
|
||||
|
||||
@ -237,7 +240,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->b.urgent_latency_ns > hubbub2->watermarks.b.urgent_latency_ns) {
|
||||
hubbub2->watermarks.b.urgent_latency_ns = watermarks->b.urgent_latency_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->b.urgent_latency_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_B, 0,
|
||||
DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_B, prog_wm_value);
|
||||
} else if (watermarks->b.urgent_latency_ns < hubbub2->watermarks.b.urgent_latency_ns)
|
||||
@ -247,7 +250,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->c.urgent_ns > hubbub2->watermarks.c.urgent_ns) {
|
||||
hubbub2->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->c.urgent_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_C, 0,
|
||||
DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_C, prog_wm_value);
|
||||
|
||||
@ -281,7 +284,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->c.urgent_latency_ns > hubbub2->watermarks.c.urgent_latency_ns) {
|
||||
hubbub2->watermarks.c.urgent_latency_ns = watermarks->c.urgent_latency_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->c.urgent_latency_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_C, 0,
|
||||
DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_C, prog_wm_value);
|
||||
} else if (watermarks->c.urgent_latency_ns < hubbub2->watermarks.c.urgent_latency_ns)
|
||||
@ -291,7 +294,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->d.urgent_ns > hubbub2->watermarks.d.urgent_ns) {
|
||||
hubbub2->watermarks.d.urgent_ns = watermarks->d.urgent_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->d.urgent_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_D, 0,
|
||||
DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_D, prog_wm_value);
|
||||
|
||||
@ -325,7 +328,7 @@ static bool hubbub31_program_urgent_watermarks(
|
||||
if (safe_to_lower || watermarks->d.urgent_latency_ns > hubbub2->watermarks.d.urgent_latency_ns) {
|
||||
hubbub2->watermarks.d.urgent_latency_ns = watermarks->d.urgent_latency_ns;
|
||||
prog_wm_value = convert_and_clamp(watermarks->d.urgent_latency_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0x3fff);
|
||||
REG_SET(DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_D, 0,
|
||||
DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_D, prog_wm_value);
|
||||
} else if (watermarks->d.urgent_latency_ns < hubbub2->watermarks.d.urgent_latency_ns)
|
||||
@ -351,7 +354,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_A, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_A, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_EXIT_WATERMARK_A calculated =%d\n"
|
||||
@ -367,7 +370,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->a.cstate_pstate.cstate_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->a.cstate_pstate.cstate_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_A, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_A, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_A calculated =%d\n"
|
||||
@ -383,7 +386,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->a.cstate_pstate.cstate_enter_plus_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->a.cstate_pstate.cstate_enter_plus_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_A, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_A, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_WATERMARK_Z8_A calculated =%d\n"
|
||||
@ -399,7 +402,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->a.cstate_pstate.cstate_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->a.cstate_pstate.cstate_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_A, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_A, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_Z8_A calculated =%d\n"
|
||||
@ -416,7 +419,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_B, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_B, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_EXIT_WATERMARK_B calculated =%d\n"
|
||||
@ -432,7 +435,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->b.cstate_pstate.cstate_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->b.cstate_pstate.cstate_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_B, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_B, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_B calculated =%d\n"
|
||||
@ -448,7 +451,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->b.cstate_pstate.cstate_enter_plus_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->b.cstate_pstate.cstate_enter_plus_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_B, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_B, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_WATERMARK_Z8_B calculated =%d\n"
|
||||
@ -464,7 +467,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->b.cstate_pstate.cstate_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->b.cstate_pstate.cstate_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_B, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_B, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_Z8_B calculated =%d\n"
|
||||
@ -481,7 +484,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_C, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_C, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_EXIT_WATERMARK_C calculated =%d\n"
|
||||
@ -497,7 +500,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->c.cstate_pstate.cstate_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->c.cstate_pstate.cstate_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_C, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_C, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_C calculated =%d\n"
|
||||
@ -513,7 +516,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->c.cstate_pstate.cstate_enter_plus_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_C, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_C, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_WATERMARK_Z8_C calculated =%d\n"
|
||||
@ -529,7 +532,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->c.cstate_pstate.cstate_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->c.cstate_pstate.cstate_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_C, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_C, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_Z8_C calculated =%d\n"
|
||||
@ -546,7 +549,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_D, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_D, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_EXIT_WATERMARK_D calculated =%d\n"
|
||||
@ -562,7 +565,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->d.cstate_pstate.cstate_exit_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->d.cstate_pstate.cstate_exit_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_D, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_D, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_D calculated =%d\n"
|
||||
@ -578,7 +581,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->d.cstate_pstate.cstate_enter_plus_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->d.cstate_pstate.cstate_enter_plus_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_D, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_Z8_D, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_ENTER_WATERMARK_Z8_D calculated =%d\n"
|
||||
@ -594,7 +597,7 @@ static bool hubbub31_program_stutter_watermarks(
|
||||
watermarks->d.cstate_pstate.cstate_exit_z8_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->d.cstate_pstate.cstate_exit_z8_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_D, 0,
|
||||
DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_Z8_D, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("SR_EXIT_WATERMARK_Z8_D calculated =%d\n"
|
||||
@ -625,7 +628,7 @@ static bool hubbub31_program_pstate_watermarks(
|
||||
watermarks->a.cstate_pstate.pstate_change_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->a.cstate_pstate.pstate_change_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_A, 0,
|
||||
DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_A, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("DRAM_CLK_CHANGE_WATERMARK_A calculated =%d\n"
|
||||
@ -642,7 +645,7 @@ static bool hubbub31_program_pstate_watermarks(
|
||||
watermarks->b.cstate_pstate.pstate_change_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->b.cstate_pstate.pstate_change_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_B, 0,
|
||||
DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_B, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("DRAM_CLK_CHANGE_WATERMARK_B calculated =%d\n"
|
||||
@ -659,7 +662,7 @@ static bool hubbub31_program_pstate_watermarks(
|
||||
watermarks->c.cstate_pstate.pstate_change_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->c.cstate_pstate.pstate_change_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_C, 0,
|
||||
DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_C, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("DRAM_CLK_CHANGE_WATERMARK_C calculated =%d\n"
|
||||
@ -676,7 +679,7 @@ static bool hubbub31_program_pstate_watermarks(
|
||||
watermarks->d.cstate_pstate.pstate_change_ns;
|
||||
prog_wm_value = convert_and_clamp(
|
||||
watermarks->d.cstate_pstate.pstate_change_ns,
|
||||
refclk_mhz, 0x1fffff);
|
||||
refclk_mhz, 0xffff);
|
||||
REG_SET(DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D, 0,
|
||||
DCHUBBUB_ARB_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D, prog_wm_value);
|
||||
DC_LOG_BANDWIDTH_CALCS("DRAM_CLK_CHANGE_WATERMARK_D calculated =%d\n"
|
||||
|
@ -3462,8 +3462,7 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
|
||||
attr == &sensor_dev_attr_power2_cap_min.dev_attr.attr ||
|
||||
attr == &sensor_dev_attr_power2_cap.dev_attr.attr ||
|
||||
attr == &sensor_dev_attr_power2_cap_default.dev_attr.attr ||
|
||||
attr == &sensor_dev_attr_power2_label.dev_attr.attr ||
|
||||
attr == &sensor_dev_attr_power1_label.dev_attr.attr))
|
||||
attr == &sensor_dev_attr_power2_label.dev_attr.attr))
|
||||
return 0;
|
||||
|
||||
return effective_mode;
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/irq.h>
|
||||
#include <linux/math64.h>
|
||||
@ -196,12 +197,9 @@ static u32 ps2bc(struct nwl_dsi *dsi, unsigned long long ps)
|
||||
/*
|
||||
* ui2bc - UI time periods to byte clock cycles
|
||||
*/
|
||||
static u32 ui2bc(struct nwl_dsi *dsi, unsigned long long ui)
|
||||
static u32 ui2bc(unsigned int ui)
|
||||
{
|
||||
u32 bpp = mipi_dsi_pixel_format_to_bpp(dsi->format);
|
||||
|
||||
return DIV64_U64_ROUND_UP(ui * dsi->lanes,
|
||||
dsi->mode.clock * 1000 * bpp);
|
||||
return DIV_ROUND_UP(ui, BITS_PER_BYTE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -232,12 +230,12 @@ static int nwl_dsi_config_host(struct nwl_dsi *dsi)
|
||||
}
|
||||
|
||||
/* values in byte clock cycles */
|
||||
cycles = ui2bc(dsi, cfg->clk_pre);
|
||||
cycles = ui2bc(cfg->clk_pre);
|
||||
DRM_DEV_DEBUG_DRIVER(dsi->dev, "cfg_t_pre: 0x%x\n", cycles);
|
||||
nwl_dsi_write(dsi, NWL_DSI_CFG_T_PRE, cycles);
|
||||
cycles = ps2bc(dsi, cfg->lpx + cfg->clk_prepare + cfg->clk_zero);
|
||||
DRM_DEV_DEBUG_DRIVER(dsi->dev, "cfg_tx_gap (pre): 0x%x\n", cycles);
|
||||
cycles += ui2bc(dsi, cfg->clk_pre);
|
||||
cycles += ui2bc(cfg->clk_pre);
|
||||
DRM_DEV_DEBUG_DRIVER(dsi->dev, "cfg_t_post: 0x%x\n", cycles);
|
||||
nwl_dsi_write(dsi, NWL_DSI_CFG_T_POST, cycles);
|
||||
cycles = ps2bc(dsi, cfg->hs_exit);
|
||||
|
@ -269,7 +269,7 @@ EXPORT_SYMBOL(drm_privacy_screen_get_state);
|
||||
*
|
||||
* The notifier is called with no locks held. The new hw_state and sw_state
|
||||
* can be retrieved using the drm_privacy_screen_get_state() function.
|
||||
* A pointer to the drm_privacy_screen's struct is passed as the void *data
|
||||
* A pointer to the drm_privacy_screen's struct is passed as the ``void *data``
|
||||
* argument of the notifier_block's notifier_call.
|
||||
*
|
||||
* The notifier will NOT be called when changes are made through
|
||||
|
@ -10673,6 +10673,7 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
|
||||
vlv_wm_sanitize(dev_priv);
|
||||
} else if (DISPLAY_VER(dev_priv) >= 9) {
|
||||
skl_wm_get_hw_state(dev_priv);
|
||||
skl_wm_sanitize(dev_priv);
|
||||
} else if (HAS_PCH_SPLIT(dev_priv)) {
|
||||
ilk_wm_get_hw_state(dev_priv);
|
||||
}
|
||||
|
@ -405,6 +405,7 @@ intel_drrs_init(struct intel_connector *connector,
|
||||
struct drm_display_mode *fixed_mode)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
|
||||
struct intel_encoder *encoder = connector->encoder;
|
||||
struct drm_display_mode *downclock_mode = NULL;
|
||||
|
||||
INIT_DELAYED_WORK(&dev_priv->drrs.work, intel_drrs_downclock_work);
|
||||
@ -416,6 +417,13 @@ intel_drrs_init(struct intel_connector *connector,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((DISPLAY_VER(dev_priv) < 8 && !HAS_GMCH(dev_priv)) &&
|
||||
encoder->port != PORT_A) {
|
||||
drm_dbg_kms(&dev_priv->drm,
|
||||
"DRRS only supported on eDP port A\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (dev_priv->vbt.drrs_type != SEAMLESS_DRRS_SUPPORT) {
|
||||
drm_dbg_kms(&dev_priv->drm, "VBT doesn't support DRRS\n");
|
||||
return NULL;
|
||||
|
@ -427,12 +427,18 @@ __i915_ttm_move(struct ttm_buffer_object *bo,
|
||||
|
||||
if (!IS_ERR(fence))
|
||||
goto out;
|
||||
} else if (move_deps) {
|
||||
int err = i915_deps_sync(move_deps, ctx);
|
||||
} else {
|
||||
int err = PTR_ERR(fence);
|
||||
|
||||
if (err == -EINTR || err == -ERESTARTSYS || err == -EAGAIN)
|
||||
return fence;
|
||||
|
||||
if (move_deps) {
|
||||
err = i915_deps_sync(move_deps, ctx);
|
||||
if (err)
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
}
|
||||
|
||||
/* Error intercept failed or no accelerated migration to start with */
|
||||
if (!copy_work)
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef __I915_MM_H__
|
||||
#define __I915_MM_H__
|
||||
|
||||
#include <linux/bug.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct vm_area_struct;
|
||||
|
@ -4717,6 +4717,10 @@ static const struct dbuf_slice_conf_entry dg2_allowed_dbufs[] = {
|
||||
};
|
||||
|
||||
static const struct dbuf_slice_conf_entry adlp_allowed_dbufs[] = {
|
||||
/*
|
||||
* Keep the join_mbus cases first so check_mbus_joined()
|
||||
* will prefer them over the !join_mbus cases.
|
||||
*/
|
||||
{
|
||||
.active_pipes = BIT(PIPE_A),
|
||||
.dbuf_mask = {
|
||||
@ -4731,6 +4735,20 @@ static const struct dbuf_slice_conf_entry adlp_allowed_dbufs[] = {
|
||||
},
|
||||
.join_mbus = true,
|
||||
},
|
||||
{
|
||||
.active_pipes = BIT(PIPE_A),
|
||||
.dbuf_mask = {
|
||||
[PIPE_A] = BIT(DBUF_S1) | BIT(DBUF_S2),
|
||||
},
|
||||
.join_mbus = false,
|
||||
},
|
||||
{
|
||||
.active_pipes = BIT(PIPE_B),
|
||||
.dbuf_mask = {
|
||||
[PIPE_B] = BIT(DBUF_S3) | BIT(DBUF_S4),
|
||||
},
|
||||
.join_mbus = false,
|
||||
},
|
||||
{
|
||||
.active_pipes = BIT(PIPE_A) | BIT(PIPE_B),
|
||||
.dbuf_mask = {
|
||||
@ -4847,13 +4865,14 @@ static bool adlp_check_mbus_joined(u8 active_pipes)
|
||||
return check_mbus_joined(active_pipes, adlp_allowed_dbufs);
|
||||
}
|
||||
|
||||
static u8 compute_dbuf_slices(enum pipe pipe, u8 active_pipes,
|
||||
static u8 compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus,
|
||||
const struct dbuf_slice_conf_entry *dbuf_slices)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dbuf_slices[i].active_pipes; i++) {
|
||||
if (dbuf_slices[i].active_pipes == active_pipes)
|
||||
if (dbuf_slices[i].active_pipes == active_pipes &&
|
||||
dbuf_slices[i].join_mbus == join_mbus)
|
||||
return dbuf_slices[i].dbuf_mask[pipe];
|
||||
}
|
||||
return 0;
|
||||
@ -4864,7 +4883,7 @@ static u8 compute_dbuf_slices(enum pipe pipe, u8 active_pipes,
|
||||
* returns correspondent DBuf slice mask as stated in BSpec for particular
|
||||
* platform.
|
||||
*/
|
||||
static u8 icl_compute_dbuf_slices(enum pipe pipe, u8 active_pipes)
|
||||
static u8 icl_compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus)
|
||||
{
|
||||
/*
|
||||
* FIXME: For ICL this is still a bit unclear as prev BSpec revision
|
||||
@ -4878,37 +4897,41 @@ static u8 icl_compute_dbuf_slices(enum pipe pipe, u8 active_pipes)
|
||||
* still here - we will need it once those additional constraints
|
||||
* pop up.
|
||||
*/
|
||||
return compute_dbuf_slices(pipe, active_pipes, icl_allowed_dbufs);
|
||||
return compute_dbuf_slices(pipe, active_pipes, join_mbus,
|
||||
icl_allowed_dbufs);
|
||||
}
|
||||
|
||||
static u8 tgl_compute_dbuf_slices(enum pipe pipe, u8 active_pipes)
|
||||
static u8 tgl_compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus)
|
||||
{
|
||||
return compute_dbuf_slices(pipe, active_pipes, tgl_allowed_dbufs);
|
||||
return compute_dbuf_slices(pipe, active_pipes, join_mbus,
|
||||
tgl_allowed_dbufs);
|
||||
}
|
||||
|
||||
static u32 adlp_compute_dbuf_slices(enum pipe pipe, u32 active_pipes)
|
||||
static u8 adlp_compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus)
|
||||
{
|
||||
return compute_dbuf_slices(pipe, active_pipes, adlp_allowed_dbufs);
|
||||
return compute_dbuf_slices(pipe, active_pipes, join_mbus,
|
||||
adlp_allowed_dbufs);
|
||||
}
|
||||
|
||||
static u32 dg2_compute_dbuf_slices(enum pipe pipe, u32 active_pipes)
|
||||
static u8 dg2_compute_dbuf_slices(enum pipe pipe, u8 active_pipes, bool join_mbus)
|
||||
{
|
||||
return compute_dbuf_slices(pipe, active_pipes, dg2_allowed_dbufs);
|
||||
return compute_dbuf_slices(pipe, active_pipes, join_mbus,
|
||||
dg2_allowed_dbufs);
|
||||
}
|
||||
|
||||
static u8 skl_compute_dbuf_slices(struct intel_crtc *crtc, u8 active_pipes)
|
||||
static u8 skl_compute_dbuf_slices(struct intel_crtc *crtc, u8 active_pipes, bool join_mbus)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
enum pipe pipe = crtc->pipe;
|
||||
|
||||
if (IS_DG2(dev_priv))
|
||||
return dg2_compute_dbuf_slices(pipe, active_pipes);
|
||||
return dg2_compute_dbuf_slices(pipe, active_pipes, join_mbus);
|
||||
else if (IS_ALDERLAKE_P(dev_priv))
|
||||
return adlp_compute_dbuf_slices(pipe, active_pipes);
|
||||
return adlp_compute_dbuf_slices(pipe, active_pipes, join_mbus);
|
||||
else if (DISPLAY_VER(dev_priv) == 12)
|
||||
return tgl_compute_dbuf_slices(pipe, active_pipes);
|
||||
return tgl_compute_dbuf_slices(pipe, active_pipes, join_mbus);
|
||||
else if (DISPLAY_VER(dev_priv) == 11)
|
||||
return icl_compute_dbuf_slices(pipe, active_pipes);
|
||||
return icl_compute_dbuf_slices(pipe, active_pipes, join_mbus);
|
||||
/*
|
||||
* For anything else just return one slice yet.
|
||||
* Should be extended for other platforms.
|
||||
@ -6127,11 +6150,16 @@ skl_compute_ddb(struct intel_atomic_state *state)
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (IS_ALDERLAKE_P(dev_priv))
|
||||
new_dbuf_state->joined_mbus =
|
||||
adlp_check_mbus_joined(new_dbuf_state->active_pipes);
|
||||
|
||||
for_each_intel_crtc(&dev_priv->drm, crtc) {
|
||||
enum pipe pipe = crtc->pipe;
|
||||
|
||||
new_dbuf_state->slices[pipe] =
|
||||
skl_compute_dbuf_slices(crtc, new_dbuf_state->active_pipes);
|
||||
skl_compute_dbuf_slices(crtc, new_dbuf_state->active_pipes,
|
||||
new_dbuf_state->joined_mbus);
|
||||
|
||||
if (old_dbuf_state->slices[pipe] == new_dbuf_state->slices[pipe])
|
||||
continue;
|
||||
@ -6143,9 +6171,6 @@ skl_compute_ddb(struct intel_atomic_state *state)
|
||||
|
||||
new_dbuf_state->enabled_slices = intel_dbuf_enabled_slices(new_dbuf_state);
|
||||
|
||||
if (IS_ALDERLAKE_P(dev_priv))
|
||||
new_dbuf_state->joined_mbus = adlp_check_mbus_joined(new_dbuf_state->active_pipes);
|
||||
|
||||
if (old_dbuf_state->enabled_slices != new_dbuf_state->enabled_slices ||
|
||||
old_dbuf_state->joined_mbus != new_dbuf_state->joined_mbus) {
|
||||
ret = intel_atomic_serialize_global_state(&new_dbuf_state->base);
|
||||
@ -6626,6 +6651,7 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
|
||||
enum pipe pipe = crtc->pipe;
|
||||
unsigned int mbus_offset;
|
||||
enum plane_id plane_id;
|
||||
u8 slices;
|
||||
|
||||
skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
|
||||
crtc_state->wm.skl.raw = crtc_state->wm.skl.optimal;
|
||||
@ -6645,19 +6671,22 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
|
||||
skl_ddb_entry_union(&dbuf_state->ddb[pipe], ddb_uv);
|
||||
}
|
||||
|
||||
dbuf_state->slices[pipe] =
|
||||
skl_compute_dbuf_slices(crtc, dbuf_state->active_pipes);
|
||||
|
||||
dbuf_state->weight[pipe] = intel_crtc_ddb_weight(crtc_state);
|
||||
|
||||
/*
|
||||
* Used for checking overlaps, so we need absolute
|
||||
* offsets instead of MBUS relative offsets.
|
||||
*/
|
||||
mbus_offset = mbus_ddb_offset(dev_priv, dbuf_state->slices[pipe]);
|
||||
slices = skl_compute_dbuf_slices(crtc, dbuf_state->active_pipes,
|
||||
dbuf_state->joined_mbus);
|
||||
mbus_offset = mbus_ddb_offset(dev_priv, slices);
|
||||
crtc_state->wm.skl.ddb.start = mbus_offset + dbuf_state->ddb[pipe].start;
|
||||
crtc_state->wm.skl.ddb.end = mbus_offset + dbuf_state->ddb[pipe].end;
|
||||
|
||||
/* The slices actually used by the planes on the pipe */
|
||||
dbuf_state->slices[pipe] =
|
||||
skl_ddb_dbuf_slice_mask(dev_priv, &crtc_state->wm.skl.ddb);
|
||||
|
||||
drm_dbg_kms(&dev_priv->drm,
|
||||
"[CRTC:%d:%s] dbuf slices 0x%x, ddb (%d - %d), active pipes 0x%x, mbus joined: %s\n",
|
||||
crtc->base.base.id, crtc->base.name,
|
||||
@ -6669,6 +6698,74 @@ void skl_wm_get_hw_state(struct drm_i915_private *dev_priv)
|
||||
dbuf_state->enabled_slices = dev_priv->dbuf.enabled_slices;
|
||||
}
|
||||
|
||||
static bool skl_dbuf_is_misconfigured(struct drm_i915_private *i915)
|
||||
{
|
||||
const struct intel_dbuf_state *dbuf_state =
|
||||
to_intel_dbuf_state(i915->dbuf.obj.state);
|
||||
struct skl_ddb_entry entries[I915_MAX_PIPES] = {};
|
||||
struct intel_crtc *crtc;
|
||||
|
||||
for_each_intel_crtc(&i915->drm, crtc) {
|
||||
const struct intel_crtc_state *crtc_state =
|
||||
to_intel_crtc_state(crtc->base.state);
|
||||
|
||||
entries[crtc->pipe] = crtc_state->wm.skl.ddb;
|
||||
}
|
||||
|
||||
for_each_intel_crtc(&i915->drm, crtc) {
|
||||
const struct intel_crtc_state *crtc_state =
|
||||
to_intel_crtc_state(crtc->base.state);
|
||||
u8 slices;
|
||||
|
||||
slices = skl_compute_dbuf_slices(crtc, dbuf_state->active_pipes,
|
||||
dbuf_state->joined_mbus);
|
||||
if (dbuf_state->slices[crtc->pipe] & ~slices)
|
||||
return true;
|
||||
|
||||
if (skl_ddb_allocation_overlaps(&crtc_state->wm.skl.ddb, entries,
|
||||
I915_MAX_PIPES, crtc->pipe))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void skl_wm_sanitize(struct drm_i915_private *i915)
|
||||
{
|
||||
struct intel_crtc *crtc;
|
||||
|
||||
/*
|
||||
* On TGL/RKL (at least) the BIOS likes to assign the planes
|
||||
* to the wrong DBUF slices. This will cause an infinite loop
|
||||
* in skl_commit_modeset_enables() as it can't find a way to
|
||||
* transition between the old bogus DBUF layout to the new
|
||||
* proper DBUF layout without DBUF allocation overlaps between
|
||||
* the planes (which cannot be allowed or else the hardware
|
||||
* may hang). If we detect a bogus DBUF layout just turn off
|
||||
* all the planes so that skl_commit_modeset_enables() can
|
||||
* simply ignore them.
|
||||
*/
|
||||
if (!skl_dbuf_is_misconfigured(i915))
|
||||
return;
|
||||
|
||||
drm_dbg_kms(&i915->drm, "BIOS has misprogrammed the DBUF, disabling all planes\n");
|
||||
|
||||
for_each_intel_crtc(&i915->drm, crtc) {
|
||||
struct intel_plane *plane = to_intel_plane(crtc->base.primary);
|
||||
const struct intel_plane_state *plane_state =
|
||||
to_intel_plane_state(plane->base.state);
|
||||
struct intel_crtc_state *crtc_state =
|
||||
to_intel_crtc_state(crtc->base.state);
|
||||
|
||||
if (plane_state->uapi.visible)
|
||||
intel_plane_disable_noatomic(crtc, plane);
|
||||
|
||||
drm_WARN_ON(&i915->drm, crtc_state->active_planes != 0);
|
||||
|
||||
memset(&crtc_state->wm.skl.ddb, 0, sizeof(crtc_state->wm.skl.ddb));
|
||||
}
|
||||
}
|
||||
|
||||
static void ilk_pipe_wm_get_hw_state(struct intel_crtc *crtc)
|
||||
{
|
||||
struct drm_device *dev = crtc->base.dev;
|
||||
|
@ -47,6 +47,7 @@ void skl_pipe_wm_get_hw_state(struct intel_crtc *crtc,
|
||||
struct skl_pipe_wm *out);
|
||||
void g4x_wm_sanitize(struct drm_i915_private *dev_priv);
|
||||
void vlv_wm_sanitize(struct drm_i915_private *dev_priv);
|
||||
void skl_wm_sanitize(struct drm_i915_private *dev_priv);
|
||||
bool intel_can_enable_sagv(struct drm_i915_private *dev_priv,
|
||||
const struct intel_bw_state *bw_state);
|
||||
void intel_sagv_pre_plane_update(struct intel_atomic_state *state);
|
||||
|
@ -68,8 +68,6 @@ static noinline depot_stack_handle_t __save_depot_stack(void)
|
||||
static void init_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm)
|
||||
{
|
||||
spin_lock_init(&rpm->debug.lock);
|
||||
|
||||
if (rpm->available)
|
||||
stack_depot_init();
|
||||
}
|
||||
|
||||
|
@ -588,6 +588,7 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
|
||||
err = panel_dpi_probe(dev, panel);
|
||||
if (err)
|
||||
goto free_ddc;
|
||||
desc = panel->desc;
|
||||
} else {
|
||||
if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
|
||||
panel_simple_parse_panel_timing_node(dev, panel, &dt);
|
||||
|
@ -529,13 +529,6 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(hdmi->vpll_clk);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(hdmi->dev, "Failed to enable HDMI vpll: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
hdmi->phy = devm_phy_optional_get(dev, "hdmi");
|
||||
if (IS_ERR(hdmi->phy)) {
|
||||
ret = PTR_ERR(hdmi->phy);
|
||||
@ -544,6 +537,13 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = clk_prepare_enable(hdmi->vpll_clk);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(hdmi->dev, "Failed to enable HDMI vpll: %d\n",
|
||||
ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
drm_encoder_helper_add(encoder, &dw_hdmi_rockchip_encoder_helper_funcs);
|
||||
drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
|
||||
|
||||
|
@ -902,6 +902,7 @@ static const struct vop_win_phy rk3399_win01_data = {
|
||||
.enable = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 0),
|
||||
.format = VOP_REG(RK3288_WIN0_CTRL0, 0x7, 1),
|
||||
.rb_swap = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 12),
|
||||
.x_mir_en = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 21),
|
||||
.y_mir_en = VOP_REG(RK3288_WIN0_CTRL0, 0x1, 22),
|
||||
.act_info = VOP_REG(RK3288_WIN0_ACT_INFO, 0x1fff1fff, 0),
|
||||
.dsp_info = VOP_REG(RK3288_WIN0_DSP_INFO, 0x0fff0fff, 0),
|
||||
@ -912,6 +913,7 @@ static const struct vop_win_phy rk3399_win01_data = {
|
||||
.uv_vir = VOP_REG(RK3288_WIN0_VIR, 0x3fff, 16),
|
||||
.src_alpha_ctl = VOP_REG(RK3288_WIN0_SRC_ALPHA_CTRL, 0xff, 0),
|
||||
.dst_alpha_ctl = VOP_REG(RK3288_WIN0_DST_ALPHA_CTRL, 0xff, 0),
|
||||
.channel = VOP_REG(RK3288_WIN0_CTRL2, 0xff, 0),
|
||||
};
|
||||
|
||||
/*
|
||||
@ -922,11 +924,11 @@ static const struct vop_win_phy rk3399_win01_data = {
|
||||
static const struct vop_win_data rk3399_vop_win_data[] = {
|
||||
{ .base = 0x00, .phy = &rk3399_win01_data,
|
||||
.type = DRM_PLANE_TYPE_PRIMARY },
|
||||
{ .base = 0x40, .phy = &rk3288_win01_data,
|
||||
{ .base = 0x40, .phy = &rk3368_win01_data,
|
||||
.type = DRM_PLANE_TYPE_OVERLAY },
|
||||
{ .base = 0x00, .phy = &rk3288_win23_data,
|
||||
{ .base = 0x00, .phy = &rk3368_win23_data,
|
||||
.type = DRM_PLANE_TYPE_OVERLAY },
|
||||
{ .base = 0x50, .phy = &rk3288_win23_data,
|
||||
{ .base = 0x50, .phy = &rk3368_win23_data,
|
||||
.type = DRM_PLANE_TYPE_CURSOR },
|
||||
};
|
||||
|
||||
|
@ -671,7 +671,6 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
|
||||
const struct drm_display_mode *mode = &crtc_state->adjusted_mode;
|
||||
struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder);
|
||||
|
||||
mode = &crtc_state->adjusted_mode;
|
||||
if (vc4_encoder->type == VC4_ENCODER_TYPE_HDMI0) {
|
||||
vc4_state->hvs_load = max(mode->clock * mode->hdisplay / mode->htotal + 1000,
|
||||
mode->clock * 9 / 10) * 1000;
|
||||
|
@ -196,14 +196,8 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
|
||||
if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio))
|
||||
connected = true;
|
||||
} else {
|
||||
unsigned long flags;
|
||||
u32 hotplug;
|
||||
|
||||
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
|
||||
hotplug = HDMI_READ(HDMI_HOTPLUG);
|
||||
spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags);
|
||||
|
||||
if (hotplug & VC4_HDMI_HOTPLUG_CONNECTED)
|
||||
if (vc4_hdmi->variant->hp_detect &&
|
||||
vc4_hdmi->variant->hp_detect(vc4_hdmi))
|
||||
connected = true;
|
||||
}
|
||||
|
||||
@ -1251,6 +1245,7 @@ static int vc4_hdmi_encoder_atomic_check(struct drm_encoder *encoder,
|
||||
unsigned long long tmds_rate;
|
||||
|
||||
if (vc4_hdmi->variant->unsupported_odd_h_timings &&
|
||||
!(mode->flags & DRM_MODE_FLAG_DBLCLK) &&
|
||||
((mode->hdisplay % 2) || (mode->hsync_start % 2) ||
|
||||
(mode->hsync_end % 2) || (mode->htotal % 2)))
|
||||
return -EINVAL;
|
||||
@ -1298,6 +1293,7 @@ vc4_hdmi_encoder_mode_valid(struct drm_encoder *encoder,
|
||||
struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder);
|
||||
|
||||
if (vc4_hdmi->variant->unsupported_odd_h_timings &&
|
||||
!(mode->flags & DRM_MODE_FLAG_DBLCLK) &&
|
||||
((mode->hdisplay % 2) || (mode->hsync_start % 2) ||
|
||||
(mode->hsync_end % 2) || (mode->htotal % 2)))
|
||||
return MODE_H_ILLEGAL;
|
||||
@ -1343,6 +1339,18 @@ static u32 vc5_hdmi_channel_map(struct vc4_hdmi *vc4_hdmi, u32 channel_mask)
|
||||
return channel_map;
|
||||
}
|
||||
|
||||
static bool vc5_hdmi_hp_detect(struct vc4_hdmi *vc4_hdmi)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 hotplug;
|
||||
|
||||
spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
|
||||
hotplug = HDMI_READ(HDMI_HOTPLUG);
|
||||
spin_unlock_irqrestore(&vc4_hdmi->hw_lock, flags);
|
||||
|
||||
return !!(hotplug & VC4_HDMI_HOTPLUG_CONNECTED);
|
||||
}
|
||||
|
||||
/* HDMI audio codec callbacks */
|
||||
static void vc4_hdmi_audio_set_mai_clock(struct vc4_hdmi *vc4_hdmi,
|
||||
unsigned int samplerate)
|
||||
@ -2504,6 +2512,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
|
||||
* vc4_hdmi_disable_scrambling() will thus run at boot, make
|
||||
* sure it's disabled, and avoid any inconsistency.
|
||||
*/
|
||||
if (variant->max_pixel_clock > HDMI_14_MAX_TMDS_CLK)
|
||||
vc4_hdmi->scdc_enabled = true;
|
||||
|
||||
ret = variant->init_resources(vc4_hdmi);
|
||||
@ -2723,6 +2732,7 @@ static const struct vc4_hdmi_variant bcm2711_hdmi0_variant = {
|
||||
.phy_rng_disable = vc5_hdmi_phy_rng_disable,
|
||||
.channel_map = vc5_hdmi_channel_map,
|
||||
.supports_hdr = true,
|
||||
.hp_detect = vc5_hdmi_hp_detect,
|
||||
};
|
||||
|
||||
static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = {
|
||||
@ -2751,6 +2761,7 @@ static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = {
|
||||
.phy_rng_disable = vc5_hdmi_phy_rng_disable,
|
||||
.channel_map = vc5_hdmi_channel_map,
|
||||
.supports_hdr = true,
|
||||
.hp_detect = vc5_hdmi_hp_detect,
|
||||
};
|
||||
|
||||
static const struct of_device_id vc4_hdmi_dt_match[] = {
|
||||
|
@ -102,6 +102,9 @@ struct vc4_hdmi_variant {
|
||||
|
||||
/* Enables HDR metadata */
|
||||
bool supports_hdr;
|
||||
|
||||
/* Callback for hardware specific hotplug detect */
|
||||
bool (*hp_detect)(struct vc4_hdmi *vc4_hdmi);
|
||||
};
|
||||
|
||||
/* HDMI audio information */
|
||||
|
@ -1569,9 +1569,17 @@ static long iio_device_buffer_getfd(struct iio_dev *indio_dev, unsigned long arg
|
||||
}
|
||||
|
||||
if (copy_to_user(ival, &fd, sizeof(fd))) {
|
||||
put_unused_fd(fd);
|
||||
ret = -EFAULT;
|
||||
goto error_free_ib;
|
||||
/*
|
||||
* "Leak" the fd, as there's not much we can do about this
|
||||
* anyway. 'fd' might have been closed already, as
|
||||
* anon_inode_getfd() called fd_install() on it, which made
|
||||
* it reachable by userland.
|
||||
*
|
||||
* Instead of allowing a malicious user to play tricks with
|
||||
* us, rely on the process exit path to do any necessary
|
||||
* cleanup, as in releasing the file, if still needed.
|
||||
*/
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -5517,6 +5517,9 @@ int __init its_lpi_memreserve_init(void)
|
||||
if (!efi_enabled(EFI_CONFIG_TABLES))
|
||||
return 0;
|
||||
|
||||
if (list_empty(&its_nodes))
|
||||
return 0;
|
||||
|
||||
gic_rdists->cpuhp_memreserve_state = CPUHP_INVALID;
|
||||
state = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,
|
||||
"irqchip/arm/gicv3/memreserve:online",
|
||||
|
@ -398,3 +398,4 @@ out_free_priv:
|
||||
|
||||
IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init);
|
||||
IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy systems */
|
||||
IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_init); /* for firmware driver */
|
||||
|
@ -114,6 +114,9 @@ static ssize_t ee1004_eeprom_read(struct i2c_client *client, char *buf,
|
||||
if (offset + count > EE1004_PAGE_SIZE)
|
||||
count = EE1004_PAGE_SIZE - offset;
|
||||
|
||||
if (count > I2C_SMBUS_BLOCK_MAX)
|
||||
count = I2C_SMBUS_BLOCK_MAX;
|
||||
|
||||
return i2c_smbus_read_i2c_block_data_or_emulated(client, offset, count, buf);
|
||||
}
|
||||
|
||||
|
@ -1288,7 +1288,14 @@ static int fastrpc_dmabuf_alloc(struct fastrpc_user *fl, char __user *argp)
|
||||
}
|
||||
|
||||
if (copy_to_user(argp, &bp, sizeof(bp))) {
|
||||
dma_buf_put(buf->dmabuf);
|
||||
/*
|
||||
* The usercopy failed, but we can't do much about it, as
|
||||
* dma_buf_fd() already called fd_install() and made the
|
||||
* file descriptor accessible for the current process. It
|
||||
* might already be closed and dmabuf no longer valid when
|
||||
* we reach this point. Therefore "leak" the fd and rely on
|
||||
* the process exit path to do any required cleanup.
|
||||
*/
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ static const unsigned int sd_au_size[] = {
|
||||
__res & __mask; \
|
||||
})
|
||||
|
||||
#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 2000
|
||||
#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 1000
|
||||
#define SD_WRITE_EXTR_SINGLE_TIMEOUT_MS 1000
|
||||
|
||||
struct sd_busy_data {
|
||||
@ -1664,6 +1664,12 @@ static int sd_poweroff_notify(struct mmc_card *card)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Find out when the command is completed. */
|
||||
err = mmc_poll_for_busy(card, SD_WRITE_EXTR_SINGLE_TIMEOUT_MS, false,
|
||||
MMC_BUSY_EXTR_SINGLE);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
cb_data.card = card;
|
||||
cb_data.reg_buf = reg_buf;
|
||||
err = __mmc_poll_for_busy(card->host, SD_POWEROFF_NOTIFY_TIMEOUT_MS,
|
||||
|
@ -705,12 +705,12 @@ static int moxart_remove(struct platform_device *pdev)
|
||||
if (!IS_ERR_OR_NULL(host->dma_chan_rx))
|
||||
dma_release_channel(host->dma_chan_rx);
|
||||
mmc_remove_host(mmc);
|
||||
mmc_free_host(mmc);
|
||||
|
||||
writel(0, host->base + REG_INTERRUPT_MASK);
|
||||
writel(0, host->base + REG_POWER_CONTROL);
|
||||
writel(readl(host->base + REG_CLOCK_CONTROL) | CLK_OFF,
|
||||
host->base + REG_CLOCK_CONTROL);
|
||||
mmc_free_host(mmc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -524,12 +524,16 @@ static void esdhc_of_adma_workaround(struct sdhci_host *host, u32 intmask)
|
||||
|
||||
static int esdhc_of_enable_dma(struct sdhci_host *host)
|
||||
{
|
||||
int ret;
|
||||
u32 value;
|
||||
struct device *dev = mmc_dev(host->mmc);
|
||||
|
||||
if (of_device_is_compatible(dev->of_node, "fsl,ls1043a-esdhc") ||
|
||||
of_device_is_compatible(dev->of_node, "fsl,ls1046a-esdhc"))
|
||||
dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));
|
||||
of_device_is_compatible(dev->of_node, "fsl,ls1046a-esdhc")) {
|
||||
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(40));
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
value = sdhci_readl(host, ESDHC_DMA_SYSCTL);
|
||||
|
||||
|
@ -405,6 +405,9 @@ static int sh_mmcif_dma_slave_config(struct sh_mmcif_host *host,
|
||||
struct dma_slave_config cfg = { 0, };
|
||||
|
||||
res = platform_get_resource(host->pd, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
cfg.direction = direction;
|
||||
|
||||
if (direction == DMA_DEV_TO_MEM) {
|
||||
|
@ -1021,8 +1021,8 @@ static void ad_mux_machine(struct port *port, bool *update_slave_arr)
|
||||
if (port->aggregator &&
|
||||
port->aggregator->is_active &&
|
||||
!__port_is_enabled(port)) {
|
||||
|
||||
__enable_port(port);
|
||||
*update_slave_arr = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1779,6 +1779,7 @@ static void ad_agg_selection_logic(struct aggregator *agg,
|
||||
port = port->next_port_in_aggregator) {
|
||||
__enable_port(port);
|
||||
}
|
||||
*update_slave_arr = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -621,7 +621,7 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
|
||||
get_device(&priv->master_mii_bus->dev);
|
||||
priv->master_mii_dn = dn;
|
||||
|
||||
priv->slave_mii_bus = devm_mdiobus_alloc(ds->dev);
|
||||
priv->slave_mii_bus = mdiobus_alloc();
|
||||
if (!priv->slave_mii_bus) {
|
||||
of_node_put(dn);
|
||||
return -ENOMEM;
|
||||
@ -681,8 +681,10 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
|
||||
}
|
||||
|
||||
err = mdiobus_register(priv->slave_mii_bus);
|
||||
if (err && dn)
|
||||
if (err && dn) {
|
||||
mdiobus_free(priv->slave_mii_bus);
|
||||
of_node_put(dn);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@ -690,6 +692,7 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
|
||||
static void bcm_sf2_mdio_unregister(struct bcm_sf2_priv *priv)
|
||||
{
|
||||
mdiobus_unregister(priv->slave_mii_bus);
|
||||
mdiobus_free(priv->slave_mii_bus);
|
||||
of_node_put(priv->master_mii_dn);
|
||||
}
|
||||
|
||||
|
@ -498,8 +498,9 @@ static int gswip_mdio_rd(struct mii_bus *bus, int addr, int reg)
|
||||
static int gswip_mdio(struct gswip_priv *priv, struct device_node *mdio_np)
|
||||
{
|
||||
struct dsa_switch *ds = priv->ds;
|
||||
int err;
|
||||
|
||||
ds->slave_mii_bus = devm_mdiobus_alloc(priv->dev);
|
||||
ds->slave_mii_bus = mdiobus_alloc();
|
||||
if (!ds->slave_mii_bus)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -512,7 +513,11 @@ static int gswip_mdio(struct gswip_priv *priv, struct device_node *mdio_np)
|
||||
ds->slave_mii_bus->parent = priv->dev;
|
||||
ds->slave_mii_bus->phy_mask = ~ds->phys_mii_mask;
|
||||
|
||||
return of_mdiobus_register(ds->slave_mii_bus, mdio_np);
|
||||
err = of_mdiobus_register(ds->slave_mii_bus, mdio_np);
|
||||
if (err)
|
||||
mdiobus_free(ds->slave_mii_bus);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int gswip_pce_table_entry_read(struct gswip_priv *priv,
|
||||
@ -2145,8 +2150,10 @@ disable_switch:
|
||||
gswip_mdio_mask(priv, GSWIP_MDIO_GLOB_ENABLE, 0, GSWIP_MDIO_GLOB);
|
||||
dsa_unregister_switch(priv->ds);
|
||||
mdio_bus:
|
||||
if (mdio_np)
|
||||
if (mdio_np) {
|
||||
mdiobus_unregister(priv->ds->slave_mii_bus);
|
||||
mdiobus_free(priv->ds->slave_mii_bus);
|
||||
}
|
||||
put_mdio_node:
|
||||
of_node_put(mdio_np);
|
||||
for (i = 0; i < priv->num_gphy_fw; i++)
|
||||
@ -2169,6 +2176,7 @@ static int gswip_remove(struct platform_device *pdev)
|
||||
|
||||
if (priv->ds->slave_mii_bus) {
|
||||
mdiobus_unregister(priv->ds->slave_mii_bus);
|
||||
mdiobus_free(priv->ds->slave_mii_bus);
|
||||
of_node_put(priv->ds->slave_mii_bus->dev.of_node);
|
||||
}
|
||||
|
||||
|
@ -2074,7 +2074,7 @@ mt7530_setup_mdio(struct mt7530_priv *priv)
|
||||
if (priv->irq)
|
||||
mt7530_setup_mdio_irq(priv);
|
||||
|
||||
ret = mdiobus_register(bus);
|
||||
ret = devm_mdiobus_register(dev, bus);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to register MDIO bus: %d\n", ret);
|
||||
if (priv->irq)
|
||||
|
@ -3399,7 +3399,7 @@ static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,
|
||||
return err;
|
||||
}
|
||||
|
||||
bus = devm_mdiobus_alloc_size(chip->dev, sizeof(*mdio_bus));
|
||||
bus = mdiobus_alloc_size(sizeof(*mdio_bus));
|
||||
if (!bus)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -3424,14 +3424,14 @@ static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,
|
||||
if (!external) {
|
||||
err = mv88e6xxx_g2_irq_mdio_setup(chip, bus);
|
||||
if (err)
|
||||
return err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = of_mdiobus_register(bus, np);
|
||||
if (err) {
|
||||
dev_err(chip->dev, "Cannot register MDIO bus (%d)\n", err);
|
||||
mv88e6xxx_g2_irq_mdio_free(chip, bus);
|
||||
return err;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (external)
|
||||
@ -3440,21 +3440,26 @@ static int mv88e6xxx_mdio_register(struct mv88e6xxx_chip *chip,
|
||||
list_add(&mdio_bus->list, &chip->mdios);
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
mdiobus_free(bus);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void mv88e6xxx_mdios_unregister(struct mv88e6xxx_chip *chip)
|
||||
|
||||
{
|
||||
struct mv88e6xxx_mdio_bus *mdio_bus;
|
||||
struct mv88e6xxx_mdio_bus *mdio_bus, *p;
|
||||
struct mii_bus *bus;
|
||||
|
||||
list_for_each_entry(mdio_bus, &chip->mdios, list) {
|
||||
list_for_each_entry_safe(mdio_bus, p, &chip->mdios, list) {
|
||||
bus = mdio_bus->bus;
|
||||
|
||||
if (!mdio_bus->external)
|
||||
mv88e6xxx_g2_irq_mdio_free(chip, bus);
|
||||
|
||||
mdiobus_unregister(bus);
|
||||
mdiobus_free(bus);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1061,7 +1061,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
|
||||
return PTR_ERR(hw);
|
||||
}
|
||||
|
||||
bus = devm_mdiobus_alloc_size(dev, sizeof(*mdio_priv));
|
||||
bus = mdiobus_alloc_size(sizeof(*mdio_priv));
|
||||
if (!bus)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -1081,6 +1081,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
|
||||
rc = mdiobus_register(bus);
|
||||
if (rc < 0) {
|
||||
dev_err(dev, "failed to register MDIO bus\n");
|
||||
mdiobus_free(bus);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -1132,6 +1133,7 @@ static void vsc9959_mdio_bus_free(struct ocelot *ocelot)
|
||||
lynx_pcs_destroy(phylink_pcs);
|
||||
}
|
||||
mdiobus_unregister(felix->imdio);
|
||||
mdiobus_free(felix->imdio);
|
||||
}
|
||||
|
||||
static void vsc9959_sched_speed_set(struct ocelot *ocelot, int port,
|
||||
|
@ -1029,7 +1029,7 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot)
|
||||
}
|
||||
|
||||
/* Needed in order to initialize the bus mutex lock */
|
||||
rc = of_mdiobus_register(bus, NULL);
|
||||
rc = devm_of_mdiobus_register(dev, bus, NULL);
|
||||
if (rc < 0) {
|
||||
dev_err(dev, "failed to register MDIO bus\n");
|
||||
return rc;
|
||||
@ -1083,7 +1083,8 @@ static void vsc9953_mdio_bus_free(struct ocelot *ocelot)
|
||||
mdio_device_free(mdio_device);
|
||||
lynx_pcs_destroy(phylink_pcs);
|
||||
}
|
||||
mdiobus_unregister(felix->imdio);
|
||||
|
||||
/* mdiobus_unregister and mdiobus_free handled by devres */
|
||||
}
|
||||
|
||||
static const struct felix_info seville_info_vsc9953 = {
|
||||
|
@ -378,7 +378,7 @@ static int ar9331_sw_mbus_init(struct ar9331_sw_priv *priv)
|
||||
if (!mnp)
|
||||
return -ENODEV;
|
||||
|
||||
ret = of_mdiobus_register(mbus, mnp);
|
||||
ret = devm_of_mdiobus_register(dev, mbus, mnp);
|
||||
of_node_put(mnp);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -1091,7 +1091,6 @@ static void ar9331_sw_remove(struct mdio_device *mdiodev)
|
||||
}
|
||||
|
||||
irq_domain_remove(priv->irqdomain);
|
||||
mdiobus_unregister(priv->mbus);
|
||||
dsa_unregister_switch(&priv->ds);
|
||||
|
||||
reset_control_assert(priv->sw_reset);
|
||||
|
@ -425,6 +425,9 @@ static void xgbe_pci_remove(struct pci_dev *pdev)
|
||||
|
||||
pci_free_irq_vectors(pdata->pcidev);
|
||||
|
||||
/* Disable all interrupts in the hardware */
|
||||
XP_IOWRITE(pdata, XP_INT_EN, 0x0);
|
||||
|
||||
xgbe_free_pdata(pdata);
|
||||
}
|
||||
|
||||
|
@ -4712,7 +4712,7 @@ static int macb_probe(struct platform_device *pdev)
|
||||
|
||||
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
|
||||
if (GEM_BFEXT(DAW64, gem_readl(bp, DCFG6))) {
|
||||
dma_set_mask(&pdev->dev, DMA_BIT_MASK(44));
|
||||
dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44));
|
||||
bp->hw_dma_cap |= HW_DMA_CAP_64B;
|
||||
}
|
||||
#endif
|
||||
|
@ -4523,12 +4523,12 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
dpaa2_dbg_remove(priv);
|
||||
#endif
|
||||
|
||||
unregister_netdev(net_dev);
|
||||
rtnl_lock();
|
||||
dpaa2_eth_disconnect_mac(priv);
|
||||
rtnl_unlock();
|
||||
|
||||
unregister_netdev(net_dev);
|
||||
|
||||
dpaa2_eth_dl_port_del(priv);
|
||||
dpaa2_eth_dl_traps_unregister(priv);
|
||||
dpaa2_eth_dl_free(priv);
|
||||
|
@ -609,6 +609,7 @@ static bool gve_rx(struct gve_rx_ring *rx, netdev_features_t feat,
|
||||
|
||||
*packet_size_bytes = skb->len + (skb->protocol ? ETH_HLEN : 0);
|
||||
*work_done = work_cnt;
|
||||
skb_record_rx_queue(skb, rx->q_num);
|
||||
if (skb_is_nonlinear(skb))
|
||||
napi_gro_frags(napi);
|
||||
else
|
||||
|
@ -110,6 +110,7 @@ static void ibmvnic_tx_scrq_clean_buffer(struct ibmvnic_adapter *adapter,
|
||||
struct ibmvnic_sub_crq_queue *tx_scrq);
|
||||
static void free_long_term_buff(struct ibmvnic_adapter *adapter,
|
||||
struct ibmvnic_long_term_buff *ltb);
|
||||
static void ibmvnic_disable_irqs(struct ibmvnic_adapter *adapter);
|
||||
|
||||
struct ibmvnic_stat {
|
||||
char name[ETH_GSTRING_LEN];
|
||||
@ -1424,7 +1425,7 @@ static int __ibmvnic_open(struct net_device *netdev)
|
||||
rc = set_link_state(adapter, IBMVNIC_LOGICAL_LNK_UP);
|
||||
if (rc) {
|
||||
ibmvnic_napi_disable(adapter);
|
||||
release_resources(adapter);
|
||||
ibmvnic_disable_irqs(adapter);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -1474,9 +1475,6 @@ static int ibmvnic_open(struct net_device *netdev)
|
||||
rc = init_resources(adapter);
|
||||
if (rc) {
|
||||
netdev_err(netdev, "failed to initialize resources\n");
|
||||
release_resources(adapter);
|
||||
release_rx_pools(adapter);
|
||||
release_tx_pools(adapter);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@ -1493,6 +1491,13 @@ out:
|
||||
adapter->state = VNIC_OPEN;
|
||||
rc = 0;
|
||||
}
|
||||
|
||||
if (rc) {
|
||||
release_resources(adapter);
|
||||
release_rx_pools(adapter);
|
||||
release_tx_pools(adapter);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -483,6 +483,7 @@ enum ice_pf_flags {
|
||||
ICE_FLAG_VF_TRUE_PROMISC_ENA,
|
||||
ICE_FLAG_MDD_AUTO_RESET_VF,
|
||||
ICE_FLAG_LINK_LENIENT_MODE_ENA,
|
||||
ICE_FLAG_PLUG_AUX_DEV,
|
||||
ICE_PF_FLAGS_NBITS /* must be last */
|
||||
};
|
||||
|
||||
@ -887,7 +888,7 @@ static inline void ice_set_rdma_cap(struct ice_pf *pf)
|
||||
if (pf->hw.func_caps.common_cap.rdma && pf->num_rdma_msix) {
|
||||
set_bit(ICE_FLAG_RDMA_ENA, pf->flags);
|
||||
set_bit(ICE_FLAG_AUX_ENA, pf->flags);
|
||||
ice_plug_aux_dev(pf);
|
||||
set_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3342,7 +3342,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
|
||||
!ice_fw_supports_report_dflt_cfg(hw)) {
|
||||
struct ice_link_default_override_tlv tlv;
|
||||
|
||||
if (ice_get_link_default_override(&tlv, pi))
|
||||
status = ice_get_link_default_override(&tlv, pi);
|
||||
if (status)
|
||||
goto out;
|
||||
|
||||
if (!(tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE) &&
|
||||
|
@ -204,17 +204,39 @@ ice_lag_unlink(struct ice_lag *lag,
|
||||
lag->upper_netdev = NULL;
|
||||
}
|
||||
|
||||
if (lag->peer_netdev) {
|
||||
dev_put(lag->peer_netdev);
|
||||
lag->peer_netdev = NULL;
|
||||
}
|
||||
|
||||
ice_set_sriov_cap(pf);
|
||||
ice_set_rdma_cap(pf);
|
||||
lag->bonded = false;
|
||||
lag->role = ICE_LAG_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_lag_unregister - handle netdev unregister events
|
||||
* @lag: LAG info struct
|
||||
* @netdev: netdev reporting the event
|
||||
*/
|
||||
static void ice_lag_unregister(struct ice_lag *lag, struct net_device *netdev)
|
||||
{
|
||||
struct ice_pf *pf = lag->pf;
|
||||
|
||||
/* check to see if this event is for this netdev
|
||||
* check that we are in an aggregate
|
||||
*/
|
||||
if (netdev != lag->netdev || !lag->bonded)
|
||||
return;
|
||||
|
||||
if (lag->upper_netdev) {
|
||||
dev_put(lag->upper_netdev);
|
||||
lag->upper_netdev = NULL;
|
||||
ice_set_sriov_cap(pf);
|
||||
ice_set_rdma_cap(pf);
|
||||
}
|
||||
/* perform some cleanup in case we come back */
|
||||
lag->bonded = false;
|
||||
lag->role = ICE_LAG_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_lag_changeupper_event - handle LAG changeupper event
|
||||
* @lag: LAG info struct
|
||||
@ -307,7 +329,7 @@ ice_lag_event_handler(struct notifier_block *notif_blk, unsigned long event,
|
||||
ice_lag_info_event(lag, ptr);
|
||||
break;
|
||||
case NETDEV_UNREGISTER:
|
||||
ice_lag_unlink(lag, ptr);
|
||||
ice_lag_unregister(lag, netdev);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -568,6 +568,7 @@ struct ice_tx_ctx_desc {
|
||||
(0x3FFFFULL << ICE_TXD_CTX_QW1_TSO_LEN_S)
|
||||
|
||||
#define ICE_TXD_CTX_QW1_MSS_S 50
|
||||
#define ICE_TXD_CTX_MIN_MSS 64
|
||||
|
||||
#define ICE_TXD_CTX_QW1_VSI_S 50
|
||||
#define ICE_TXD_CTX_QW1_VSI_M (0x3FFULL << ICE_TXD_CTX_QW1_VSI_S)
|
||||
|
@ -2253,6 +2253,9 @@ static void ice_service_task(struct work_struct *work)
|
||||
return;
|
||||
}
|
||||
|
||||
if (test_and_clear_bit(ICE_FLAG_PLUG_AUX_DEV, pf->flags))
|
||||
ice_plug_aux_dev(pf);
|
||||
|
||||
ice_clean_adminq_subtask(pf);
|
||||
ice_check_media_subtask(pf);
|
||||
ice_check_for_hang_subtask(pf);
|
||||
@ -8525,6 +8528,7 @@ ice_features_check(struct sk_buff *skb,
|
||||
struct net_device __always_unused *netdev,
|
||||
netdev_features_t features)
|
||||
{
|
||||
bool gso = skb_is_gso(skb);
|
||||
size_t len;
|
||||
|
||||
/* No point in doing any of this if neither checksum nor GSO are
|
||||
@ -8537,24 +8541,32 @@ ice_features_check(struct sk_buff *skb,
|
||||
/* We cannot support GSO if the MSS is going to be less than
|
||||
* 64 bytes. If it is then we need to drop support for GSO.
|
||||
*/
|
||||
if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_size < 64))
|
||||
if (gso && (skb_shinfo(skb)->gso_size < ICE_TXD_CTX_MIN_MSS))
|
||||
features &= ~NETIF_F_GSO_MASK;
|
||||
|
||||
len = skb_network_header(skb) - skb->data;
|
||||
len = skb_network_offset(skb);
|
||||
if (len > ICE_TXD_MACLEN_MAX || len & 0x1)
|
||||
goto out_rm_features;
|
||||
|
||||
len = skb_transport_header(skb) - skb_network_header(skb);
|
||||
len = skb_network_header_len(skb);
|
||||
if (len > ICE_TXD_IPLEN_MAX || len & 0x1)
|
||||
goto out_rm_features;
|
||||
|
||||
if (skb->encapsulation) {
|
||||
len = skb_inner_network_header(skb) - skb_transport_header(skb);
|
||||
/* this must work for VXLAN frames AND IPIP/SIT frames, and in
|
||||
* the case of IPIP frames, the transport header pointer is
|
||||
* after the inner header! So check to make sure that this
|
||||
* is a GRE or UDP_TUNNEL frame before doing that math.
|
||||
*/
|
||||
if (gso && (skb_shinfo(skb)->gso_type &
|
||||
(SKB_GSO_GRE | SKB_GSO_UDP_TUNNEL))) {
|
||||
len = skb_inner_network_header(skb) -
|
||||
skb_transport_header(skb);
|
||||
if (len > ICE_TXD_L4LEN_MAX || len & 0x1)
|
||||
goto out_rm_features;
|
||||
}
|
||||
|
||||
len = skb_inner_transport_header(skb) -
|
||||
skb_inner_network_header(skb);
|
||||
len = skb_inner_network_header_len(skb);
|
||||
if (len > ICE_TXD_IPLEN_MAX || len & 0x1)
|
||||
goto out_rm_features;
|
||||
}
|
||||
|
@ -1984,14 +1984,15 @@ static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter,
|
||||
if (adapter->flags & IXGBEVF_FLAGS_LEGACY_RX)
|
||||
return;
|
||||
|
||||
set_ring_build_skb_enabled(rx_ring);
|
||||
if (PAGE_SIZE < 8192)
|
||||
if (max_frame > IXGBEVF_MAX_FRAME_BUILD_SKB)
|
||||
set_ring_uses_large_buffer(rx_ring);
|
||||
|
||||
if (PAGE_SIZE < 8192) {
|
||||
if (max_frame <= IXGBEVF_MAX_FRAME_BUILD_SKB)
|
||||
/* 82599 can't rely on RXDCTL.RLPML to restrict the size of the frame */
|
||||
if (adapter->hw.mac.type == ixgbe_mac_82599_vf && !ring_uses_large_buffer(rx_ring))
|
||||
return;
|
||||
|
||||
set_ring_uses_large_buffer(rx_ring);
|
||||
}
|
||||
set_ring_build_skb_enabled(rx_ring);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ if NET_VENDOR_LITEX
|
||||
|
||||
config LITEX_LITEETH
|
||||
tristate "LiteX Ethernet support"
|
||||
depends on OF
|
||||
depends on OF && HAS_IOMEM
|
||||
help
|
||||
If you wish to compile a kernel for hardware with a LiteX LiteEth
|
||||
device then you should answer Y to this.
|
||||
|
@ -1103,7 +1103,7 @@ void sparx5_get_stats64(struct net_device *ndev,
|
||||
stats->tx_carrier_errors = portstats[spx5_stats_tx_csense_cnt];
|
||||
stats->tx_window_errors = portstats[spx5_stats_tx_late_coll_cnt];
|
||||
stats->rx_dropped = portstats[spx5_stats_ana_ac_port_stat_lsb_cnt];
|
||||
for (idx = 0; idx < 2 * SPX5_PRIOS; ++idx, ++stats)
|
||||
for (idx = 0; idx < 2 * SPX5_PRIOS; ++idx)
|
||||
stats->rx_dropped += portstats[spx5_stats_green_p0_rx_port_drop
|
||||
+ idx];
|
||||
stats->tx_dropped = portstats[spx5_stats_tx_local_drop];
|
||||
|
@ -1432,6 +1432,8 @@ static void
|
||||
ocelot_populate_ipv4_ptp_event_trap_key(struct ocelot_vcap_filter *trap)
|
||||
{
|
||||
trap->key_type = OCELOT_VCAP_KEY_IPV4;
|
||||
trap->key.ipv4.proto.value[0] = IPPROTO_UDP;
|
||||
trap->key.ipv4.proto.mask[0] = 0xff;
|
||||
trap->key.ipv4.dport.value = PTP_EV_PORT;
|
||||
trap->key.ipv4.dport.mask = 0xffff;
|
||||
}
|
||||
@ -1440,6 +1442,8 @@ static void
|
||||
ocelot_populate_ipv6_ptp_event_trap_key(struct ocelot_vcap_filter *trap)
|
||||
{
|
||||
trap->key_type = OCELOT_VCAP_KEY_IPV6;
|
||||
trap->key.ipv4.proto.value[0] = IPPROTO_UDP;
|
||||
trap->key.ipv4.proto.mask[0] = 0xff;
|
||||
trap->key.ipv6.dport.value = PTP_EV_PORT;
|
||||
trap->key.ipv6.dport.mask = 0xffff;
|
||||
}
|
||||
@ -1448,6 +1452,8 @@ static void
|
||||
ocelot_populate_ipv4_ptp_general_trap_key(struct ocelot_vcap_filter *trap)
|
||||
{
|
||||
trap->key_type = OCELOT_VCAP_KEY_IPV4;
|
||||
trap->key.ipv4.proto.value[0] = IPPROTO_UDP;
|
||||
trap->key.ipv4.proto.mask[0] = 0xff;
|
||||
trap->key.ipv4.dport.value = PTP_GEN_PORT;
|
||||
trap->key.ipv4.dport.mask = 0xffff;
|
||||
}
|
||||
@ -1456,6 +1462,8 @@ static void
|
||||
ocelot_populate_ipv6_ptp_general_trap_key(struct ocelot_vcap_filter *trap)
|
||||
{
|
||||
trap->key_type = OCELOT_VCAP_KEY_IPV6;
|
||||
trap->key.ipv4.proto.value[0] = IPPROTO_UDP;
|
||||
trap->key.ipv4.proto.mask[0] = 0xff;
|
||||
trap->key.ipv6.dport.value = PTP_GEN_PORT;
|
||||
trap->key.ipv6.dport.mask = 0xffff;
|
||||
}
|
||||
@ -1737,12 +1745,11 @@ void ocelot_get_strings(struct ocelot *ocelot, int port, u32 sset, u8 *data)
|
||||
}
|
||||
EXPORT_SYMBOL(ocelot_get_strings);
|
||||
|
||||
/* Caller must hold &ocelot->stats_lock */
|
||||
static void ocelot_update_stats(struct ocelot *ocelot)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
mutex_lock(&ocelot->stats_lock);
|
||||
|
||||
for (i = 0; i < ocelot->num_phys_ports; i++) {
|
||||
/* Configure the port to read the stats from */
|
||||
ocelot_write(ocelot, SYS_STAT_CFG_STAT_VIEW(i), SYS_STAT_CFG);
|
||||
@ -1761,8 +1768,6 @@ static void ocelot_update_stats(struct ocelot *ocelot)
|
||||
~(u64)U32_MAX) + val;
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&ocelot->stats_lock);
|
||||
}
|
||||
|
||||
static void ocelot_check_stats_work(struct work_struct *work)
|
||||
@ -1771,7 +1776,9 @@ static void ocelot_check_stats_work(struct work_struct *work)
|
||||
struct ocelot *ocelot = container_of(del_work, struct ocelot,
|
||||
stats_work);
|
||||
|
||||
mutex_lock(&ocelot->stats_lock);
|
||||
ocelot_update_stats(ocelot);
|
||||
mutex_unlock(&ocelot->stats_lock);
|
||||
|
||||
queue_delayed_work(ocelot->stats_queue, &ocelot->stats_work,
|
||||
OCELOT_STATS_CHECK_DELAY);
|
||||
@ -1781,12 +1788,16 @@ void ocelot_get_ethtool_stats(struct ocelot *ocelot, int port, u64 *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
mutex_lock(&ocelot->stats_lock);
|
||||
|
||||
/* check and update now */
|
||||
ocelot_update_stats(ocelot);
|
||||
|
||||
/* Copy all counters */
|
||||
for (i = 0; i < ocelot->num_stats; i++)
|
||||
*data++ = ocelot->stats[port * ocelot->num_stats + i];
|
||||
|
||||
mutex_unlock(&ocelot->stats_lock);
|
||||
}
|
||||
EXPORT_SYMBOL(ocelot_get_ethtool_stats);
|
||||
|
||||
|
@ -1011,6 +1011,7 @@ nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev,
|
||||
struct nfp_flower_repr_priv *repr_priv;
|
||||
struct nfp_tun_offloaded_mac *entry;
|
||||
struct nfp_repr *repr;
|
||||
u16 nfp_mac_idx;
|
||||
int ida_idx;
|
||||
|
||||
entry = nfp_tunnel_lookup_offloaded_macs(app, mac);
|
||||
@ -1029,8 +1030,6 @@ nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev,
|
||||
entry->bridge_count--;
|
||||
|
||||
if (!entry->bridge_count && entry->ref_count) {
|
||||
u16 nfp_mac_idx;
|
||||
|
||||
nfp_mac_idx = entry->index & ~NFP_TUN_PRE_TUN_IDX_BIT;
|
||||
if (__nfp_tunnel_offload_mac(app, mac, nfp_mac_idx,
|
||||
false)) {
|
||||
@ -1046,7 +1045,6 @@ nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev,
|
||||
|
||||
/* If MAC is now used by 1 repr set the offloaded MAC index to port. */
|
||||
if (entry->ref_count == 1 && list_is_singular(&entry->repr_list)) {
|
||||
u16 nfp_mac_idx;
|
||||
int port, err;
|
||||
|
||||
repr_priv = list_first_entry(&entry->repr_list,
|
||||
@ -1074,8 +1072,14 @@ nfp_tunnel_del_shared_mac(struct nfp_app *app, struct net_device *netdev,
|
||||
WARN_ON_ONCE(rhashtable_remove_fast(&priv->tun.offloaded_macs,
|
||||
&entry->ht_node,
|
||||
offloaded_macs_params));
|
||||
|
||||
if (nfp_flower_is_supported_bridge(netdev))
|
||||
nfp_mac_idx = entry->index & ~NFP_TUN_PRE_TUN_IDX_BIT;
|
||||
else
|
||||
nfp_mac_idx = entry->index;
|
||||
|
||||
/* If MAC has global ID then extract and free the ida entry. */
|
||||
if (nfp_tunnel_is_mac_idx_global(entry->index)) {
|
||||
if (nfp_tunnel_is_mac_idx_global(nfp_mac_idx)) {
|
||||
ida_idx = nfp_tunnel_get_ida_from_global_mac_idx(entry->index);
|
||||
ida_simple_remove(&priv->tun.mac_off_ids, ida_idx);
|
||||
}
|
||||
|
@ -148,6 +148,7 @@ static const struct of_device_id aspeed_mdio_of_match[] = {
|
||||
{ .compatible = "aspeed,ast2600-mdio", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, aspeed_mdio_of_match);
|
||||
|
||||
static struct platform_driver aspeed_mdio_driver = {
|
||||
.driver = {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user