This is the 6.8.6 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmYaaC8ACgkQONu9yGCS aT4EsA//VK6HqN9PNZIMGN7yz5EnkLToYBrj12j2uVZ0yV8xryj967fEtHvuw783 Do/Dwb5mq2XVcoQgsp4E/QREQhMW8IrId+M95Z4JdNDX9yNtltYkwC2jquCh/Npl BC6DGynXtTkE3XVwYcI8rjirL0HR9I48oe+f4kiHfbkam2xXxs2mAsDtI3fBzUhI QAP+7to2IoE8+jSMiCgcHgf1sO0Hkkl4K1VDVNqN0rsXxFjPtgF0FvqclLVlhpPN gYK9duBvMoCp76RBrJWk//X7bn0VAzMVuAGkQFXzF0rzpNWhjjW/ar21Dw3Mbq12 AH2LSjIU+6dORukRLCXBELZ5n3SkNnzvH4TP8BhSh6MwElCRBYQwepKL1Kl+SsgB 6r+FbStl/g3dK7EvdgBBZQ/MrmqAWQEW3rTK4pKeY13Lnw7oIadGjKlSzk2V7a/x S4VAmN2uZHW/L2MD0mFOAXkfK3vUI8S5ndThcTKmByp/51axb9q92ly1gA/60k3r 8EI+m1XcsO702vgHKA9eQAMbJAWQv90Lz7luzVRwhuz4nD5dffyLOtVEL77XH+d5 0izrBspVsAEsMA+AsgI4s3FZAH+lkwVseYKR2iAJPs0F0JsJKfkGtFLeMpIK3yvJ lZp7GAkSH0X36mZlxhpfR3QIKESJ5BZTGGlRJNCahmCsWxYgB/4= =e1Uw -----END PGP SIGNATURE----- Merge v6.8.6 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
commit
486067966c
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 8
|
||||
SUBLEVEL = 5
|
||||
SUBLEVEL = 6
|
||||
EXTRAVERSION =
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
|
|
|
@ -736,14 +736,20 @@
|
|||
status = "disabled";
|
||||
|
||||
ports {
|
||||
hdmi_in: port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
hdmi_in_vop: endpoint@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hdmi_in: port@0 {
|
||||
reg = <0>;
|
||||
|
||||
hdmi_in_vop: endpoint {
|
||||
remote-endpoint = <&vop_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi_out: port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1240,27 +1240,37 @@
|
|||
compatible = "rockchip,rk3288-dw-hdmi";
|
||||
reg = <0x0 0xff980000 0x0 0x20000>;
|
||||
reg-io-width = <4>;
|
||||
#sound-dai-cells = <0>;
|
||||
rockchip,grf = <&grf>;
|
||||
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&cru PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
|
||||
clock-names = "iahb", "isfr", "cec";
|
||||
power-domains = <&power RK3288_PD_VIO>;
|
||||
rockchip,grf = <&grf>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
hdmi_in: port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hdmi_in: port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hdmi_in_vopb: endpoint@0 {
|
||||
reg = <0>;
|
||||
remote-endpoint = <&vopb_out_hdmi>;
|
||||
};
|
||||
|
||||
hdmi_in_vopl: endpoint@1 {
|
||||
reg = <1>;
|
||||
remote-endpoint = <&vopl_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi_out: port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
|
||||
#include "sc7280.dtsi"
|
||||
#include "pm7325.dtsi"
|
||||
|
@ -415,6 +416,33 @@
|
|||
};
|
||||
};
|
||||
|
||||
&pm8350c_pwm {
|
||||
status = "okay";
|
||||
|
||||
multi-led {
|
||||
color = <LED_COLOR_ID_RGB>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
};
|
||||
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
};
|
||||
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qupv3_id_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -413,6 +413,23 @@
|
|||
};
|
||||
};
|
||||
|
||||
&gcc {
|
||||
protected-clocks = <GCC_CFG_NOC_LPASS_CLK>,
|
||||
<GCC_MSS_CFG_AHB_CLK>,
|
||||
<GCC_MSS_GPLL0_MAIN_DIV_CLK_SRC>,
|
||||
<GCC_MSS_OFFLINE_AXI_CLK>,
|
||||
<GCC_MSS_Q6SS_BOOT_CLK_SRC>,
|
||||
<GCC_MSS_Q6_MEMNOC_AXI_CLK>,
|
||||
<GCC_MSS_SNOC_AXI_CLK>,
|
||||
<GCC_QSPI_CNOC_PERIPH_AHB_CLK>,
|
||||
<GCC_QSPI_CORE_CLK>,
|
||||
<GCC_QSPI_CORE_CLK_SRC>,
|
||||
<GCC_SEC_CTRL_CLK_SRC>,
|
||||
<GCC_WPSS_AHB_BDG_MST_CLK>,
|
||||
<GCC_WPSS_AHB_CLK>,
|
||||
<GCC_WPSS_RSCP_CLK>;
|
||||
};
|
||||
|
||||
&qupv3_id_0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -177,6 +177,24 @@
|
|||
};
|
||||
};
|
||||
|
||||
&CPU_PD0 {
|
||||
/delete-property/ power-domains;
|
||||
};
|
||||
|
||||
&CPU_PD1 {
|
||||
/delete-property/ power-domains;
|
||||
};
|
||||
|
||||
&CPU_PD2 {
|
||||
/delete-property/ power-domains;
|
||||
};
|
||||
|
||||
&CPU_PD3 {
|
||||
/delete-property/ power-domains;
|
||||
};
|
||||
|
||||
/delete-node/ &CLUSTER_PD;
|
||||
|
||||
&gpi_dma0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -744,11 +744,20 @@
|
|||
status = "disabled";
|
||||
|
||||
ports {
|
||||
hdmi_in: port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hdmi_in: port@0 {
|
||||
reg = <0>;
|
||||
|
||||
hdmi_in_vop: endpoint {
|
||||
remote-endpoint = <&vop_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi_out: port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1956,6 +1956,7 @@
|
|||
hdmi: hdmi@ff940000 {
|
||||
compatible = "rockchip,rk3399-dw-hdmi";
|
||||
reg = <0x0 0xff940000 0x0 0x20000>;
|
||||
reg-io-width = <4>;
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
clocks = <&cru PCLK_HDMI_CTRL>,
|
||||
<&cru SCLK_HDMI_SFR>,
|
||||
|
@ -1964,13 +1965,16 @@
|
|||
<&cru PLL_VPLL>;
|
||||
clock-names = "iahb", "isfr", "cec", "grf", "ref";
|
||||
power-domains = <&power RK3399_PD_HDCP>;
|
||||
reg-io-width = <4>;
|
||||
rockchip,grf = <&grf>;
|
||||
#sound-dai-cells = <0>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
hdmi_in: port {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
hdmi_in: port@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
|
@ -1983,6 +1987,10 @@
|
|||
remote-endpoint = <&vopl_out_hdmi>;
|
||||
};
|
||||
};
|
||||
|
||||
hdmi_out: port@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -34,8 +34,13 @@ obj-y += vma.o extable.o
|
|||
KASAN_SANITIZE_vma.o := y
|
||||
UBSAN_SANITIZE_vma.o := y
|
||||
KCSAN_SANITIZE_vma.o := y
|
||||
OBJECT_FILES_NON_STANDARD_vma.o := n
|
||||
OBJECT_FILES_NON_STANDARD_extable.o := n
|
||||
|
||||
OBJECT_FILES_NON_STANDARD_extable.o := n
|
||||
OBJECT_FILES_NON_STANDARD_vdso-image-32.o := n
|
||||
OBJECT_FILES_NON_STANDARD_vdso-image-x32.o := n
|
||||
OBJECT_FILES_NON_STANDARD_vdso-image-64.o := n
|
||||
OBJECT_FILES_NON_STANDARD_vdso32-setup.o := n
|
||||
OBJECT_FILES_NON_STANDARD_vma.o := n
|
||||
|
||||
# vDSO images to build
|
||||
vdso_img-$(VDSO64-y) += 64
|
||||
|
@ -43,7 +48,6 @@ vdso_img-$(VDSOX32-y) += x32
|
|||
vdso_img-$(VDSO32-y) += 32
|
||||
|
||||
obj-$(VDSO32-y) += vdso32-setup.o
|
||||
OBJECT_FILES_NON_STANDARD_vdso32-setup.o := n
|
||||
|
||||
vobjs := $(foreach F,$(vobjs-y),$(obj)/$F)
|
||||
vobjs32 := $(foreach F,$(vobjs32-y),$(obj)/$F)
|
||||
|
|
|
@ -173,9 +173,11 @@ void amd_pmu_lbr_read(void)
|
|||
|
||||
/*
|
||||
* Check if a branch has been logged; if valid = 0, spec = 0
|
||||
* then no branch was recorded
|
||||
* then no branch was recorded; if reserved = 1 then an
|
||||
* erroneous branch was recorded (see Erratum 1452)
|
||||
*/
|
||||
if (!entry.to.split.valid && !entry.to.split.spec)
|
||||
if ((!entry.to.split.valid && !entry.to.split.spec) ||
|
||||
entry.to.split.reserved)
|
||||
continue;
|
||||
|
||||
perf_clear_branch_entry_bitfields(br + out);
|
||||
|
|
|
@ -62,6 +62,11 @@ void xen_arch_unregister_cpu(int num);
|
|||
#ifdef CONFIG_PVH
|
||||
void __init xen_pvh_init(struct boot_params *boot_params);
|
||||
void __init mem_map_via_hcall(struct boot_params *boot_params_p);
|
||||
#ifdef CONFIG_XEN_PVH
|
||||
void __init xen_reserve_extra_memory(struct boot_params *bootp);
|
||||
#else
|
||||
static inline void xen_reserve_extra_memory(struct boot_params *bootp) { }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Lazy mode for batching updates / context switch */
|
||||
|
|
|
@ -907,6 +907,54 @@ static void chromeos_fixup_apl_pci_l1ss_capability(struct pci_dev *dev)
|
|||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_save_apl_pci_l1ss_capability);
|
||||
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, 0x5ad6, chromeos_fixup_apl_pci_l1ss_capability);
|
||||
|
||||
/*
|
||||
* Disable D3cold on Asus B1400 PCI-NVMe bridge
|
||||
*
|
||||
* On this platform with VMD off, the NVMe device cannot successfully power
|
||||
* back on from D3cold. This appears to be an untested transition by the
|
||||
* vendor: Windows leaves the NVMe and parent bridge in D0 during suspend.
|
||||
*
|
||||
* We disable D3cold on the parent bridge for simplicity, and the fact that
|
||||
* both parent bridge and NVMe device share the same power resource.
|
||||
*
|
||||
* This is only needed on BIOS versions before 308; the newer versions flip
|
||||
* StorageD3Enable from 1 to 0.
|
||||
*/
|
||||
static const struct dmi_system_id asus_nvme_broken_d3cold_table[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.304"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.305"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.306"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BIOS_VERSION, "B1400CEAE.307"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static void asus_disable_nvme_d3cold(struct pci_dev *pdev)
|
||||
{
|
||||
if (dmi_check_system(asus_nvme_broken_d3cold_table) > 0)
|
||||
pci_d3cold_disable(pdev);
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x9a09, asus_disable_nvme_d3cold);
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
/*
|
||||
* Root Ports on some AMD SoCs advertise PME_Support for D3hot and D3cold, but
|
||||
|
|
|
@ -74,6 +74,9 @@ static void __init init_pvh_bootparams(bool xen_guest)
|
|||
} else
|
||||
xen_raw_printk("Warning: Can fit ISA range into e820\n");
|
||||
|
||||
if (xen_guest)
|
||||
xen_reserve_extra_memory(&pvh_bootparams);
|
||||
|
||||
pvh_bootparams.hdr.cmd_line_ptr =
|
||||
pvh_start_info.cmdline_paddr;
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <linux/console.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/panic_notifier.h>
|
||||
|
||||
|
@ -350,3 +351,34 @@ void xen_arch_unregister_cpu(int num)
|
|||
}
|
||||
EXPORT_SYMBOL(xen_arch_unregister_cpu);
|
||||
#endif
|
||||
|
||||
/* Amount of extra memory space we add to the e820 ranges */
|
||||
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
|
||||
|
||||
void __init xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
/*
|
||||
* No need to check for zero size, should happen rarely and will only
|
||||
* write a new entry regarded to be unused due to zero size.
|
||||
*/
|
||||
for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
|
||||
/* Add new region. */
|
||||
if (xen_extra_mem[i].n_pfns == 0) {
|
||||
xen_extra_mem[i].start_pfn = start_pfn;
|
||||
xen_extra_mem[i].n_pfns = n_pfns;
|
||||
break;
|
||||
}
|
||||
/* Append to existing region. */
|
||||
if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns ==
|
||||
start_pfn) {
|
||||
xen_extra_mem[i].n_pfns += n_pfns;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == XEN_EXTRA_MEM_MAX_REGIONS)
|
||||
printk(KERN_WARNING "Warning: not enough extra memory regions\n");
|
||||
|
||||
memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#include <xen/hvc-console.h>
|
||||
|
||||
|
@ -72,3 +73,70 @@ void __init mem_map_via_hcall(struct boot_params *boot_params_p)
|
|||
}
|
||||
boot_params_p->e820_entries = memmap.nr_entries;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reserve e820 UNUSABLE regions to inflate the memory balloon.
|
||||
*
|
||||
* On PVH dom0 the host memory map is used, RAM regions available to dom0 are
|
||||
* located as the same place as in the native memory map, but since dom0 gets
|
||||
* less memory than the total amount of host RAM the ranges that can't be
|
||||
* populated are converted from RAM -> UNUSABLE. Use such regions (up to the
|
||||
* ratio signaled in EXTRA_MEM_RATIO) in order to inflate the balloon driver at
|
||||
* boot. Doing so prevents the guest (even if just temporary) from using holes
|
||||
* in the memory map in order to map grants or foreign addresses, and
|
||||
* hopefully limits the risk of a clash with a device MMIO region. Ideally the
|
||||
* hypervisor should notify us which memory ranges are suitable for creating
|
||||
* foreign mappings, but that's not yet implemented.
|
||||
*/
|
||||
void __init xen_reserve_extra_memory(struct boot_params *bootp)
|
||||
{
|
||||
unsigned int i, ram_pages = 0, extra_pages;
|
||||
|
||||
for (i = 0; i < bootp->e820_entries; i++) {
|
||||
struct boot_e820_entry *e = &bootp->e820_table[i];
|
||||
|
||||
if (e->type != E820_TYPE_RAM)
|
||||
continue;
|
||||
ram_pages += PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr);
|
||||
}
|
||||
|
||||
/* Max amount of extra memory. */
|
||||
extra_pages = EXTRA_MEM_RATIO * ram_pages;
|
||||
|
||||
/*
|
||||
* Convert UNUSABLE ranges to RAM and reserve them for foreign mapping
|
||||
* purposes.
|
||||
*/
|
||||
for (i = 0; i < bootp->e820_entries && extra_pages; i++) {
|
||||
struct boot_e820_entry *e = &bootp->e820_table[i];
|
||||
unsigned long pages;
|
||||
|
||||
if (e->type != E820_TYPE_UNUSABLE)
|
||||
continue;
|
||||
|
||||
pages = min(extra_pages,
|
||||
PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr));
|
||||
|
||||
if (pages != (PFN_DOWN(e->addr + e->size) - PFN_UP(e->addr))) {
|
||||
struct boot_e820_entry *next;
|
||||
|
||||
if (bootp->e820_entries ==
|
||||
ARRAY_SIZE(bootp->e820_table))
|
||||
/* No space left to split - skip region. */
|
||||
continue;
|
||||
|
||||
/* Split entry. */
|
||||
next = e + 1;
|
||||
memmove(next, e,
|
||||
(bootp->e820_entries - i) * sizeof(*e));
|
||||
bootp->e820_entries++;
|
||||
next->addr = PAGE_ALIGN(e->addr) + PFN_PHYS(pages);
|
||||
e->size = next->addr - e->addr;
|
||||
next->size -= e->size;
|
||||
}
|
||||
e->type = E820_TYPE_RAM;
|
||||
extra_pages -= pages;
|
||||
|
||||
xen_add_extra_mem(PFN_UP(e->addr), pages);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,9 +38,6 @@
|
|||
|
||||
#define GB(x) ((uint64_t)(x) * 1024 * 1024 * 1024)
|
||||
|
||||
/* Amount of extra memory space we add to the e820 ranges */
|
||||
struct xen_memory_region xen_extra_mem[XEN_EXTRA_MEM_MAX_REGIONS] __initdata;
|
||||
|
||||
/* Number of pages released from the initial allocation. */
|
||||
unsigned long xen_released_pages;
|
||||
|
||||
|
@ -64,18 +61,6 @@ static struct {
|
|||
} xen_remap_buf __initdata __aligned(PAGE_SIZE);
|
||||
static unsigned long xen_remap_mfn __initdata = INVALID_P2M_ENTRY;
|
||||
|
||||
/*
|
||||
* The maximum amount of extra memory compared to the base size. The
|
||||
* main scaling factor is the size of struct page. At extreme ratios
|
||||
* of base:extra, all the base memory can be filled with page
|
||||
* structures for the extra memory, leaving no space for anything
|
||||
* else.
|
||||
*
|
||||
* 10x seems like a reasonable balance between scaling flexibility and
|
||||
* leaving a practically usable system.
|
||||
*/
|
||||
#define EXTRA_MEM_RATIO (10)
|
||||
|
||||
static bool xen_512gb_limit __initdata = IS_ENABLED(CONFIG_XEN_512GB);
|
||||
|
||||
static void __init xen_parse_512gb(void)
|
||||
|
@ -96,35 +81,6 @@ static void __init xen_parse_512gb(void)
|
|||
xen_512gb_limit = val;
|
||||
}
|
||||
|
||||
static void __init xen_add_extra_mem(unsigned long start_pfn,
|
||||
unsigned long n_pfns)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* No need to check for zero size, should happen rarely and will only
|
||||
* write a new entry regarded to be unused due to zero size.
|
||||
*/
|
||||
for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
|
||||
/* Add new region. */
|
||||
if (xen_extra_mem[i].n_pfns == 0) {
|
||||
xen_extra_mem[i].start_pfn = start_pfn;
|
||||
xen_extra_mem[i].n_pfns = n_pfns;
|
||||
break;
|
||||
}
|
||||
/* Append to existing region. */
|
||||
if (xen_extra_mem[i].start_pfn + xen_extra_mem[i].n_pfns ==
|
||||
start_pfn) {
|
||||
xen_extra_mem[i].n_pfns += n_pfns;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == XEN_EXTRA_MEM_MAX_REGIONS)
|
||||
printk(KERN_WARNING "Warning: not enough extra memory regions\n");
|
||||
|
||||
memblock_reserve(PFN_PHYS(start_pfn), PFN_PHYS(n_pfns));
|
||||
}
|
||||
|
||||
static void __init xen_del_extra_mem(unsigned long start_pfn,
|
||||
unsigned long n_pfns)
|
||||
{
|
||||
|
|
|
@ -163,4 +163,18 @@ void xen_hvm_post_suspend(int suspend_cancelled);
|
|||
static inline void xen_hvm_post_suspend(int suspend_cancelled) {}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The maximum amount of extra memory compared to the base size. The
|
||||
* main scaling factor is the size of struct page. At extreme ratios
|
||||
* of base:extra, all the base memory can be filled with page
|
||||
* structures for the extra memory, leaving no space for anything
|
||||
* else.
|
||||
*
|
||||
* 10x seems like a reasonable balance between scaling flexibility and
|
||||
* leaving a practically usable system.
|
||||
*/
|
||||
#define EXTRA_MEM_RATIO (10)
|
||||
|
||||
void xen_add_extra_mem(unsigned long start_pfn, unsigned long n_pfns);
|
||||
|
||||
#endif /* XEN_OPS_H */
|
||||
|
|
|
@ -27,7 +27,7 @@ void blk_rq_stat_init(struct blk_rq_stat *stat)
|
|||
/* src is a per-cpu stat, mean isn't initialized */
|
||||
void blk_rq_stat_sum(struct blk_rq_stat *dst, struct blk_rq_stat *src)
|
||||
{
|
||||
if (!src->nr_samples)
|
||||
if (dst->nr_samples + src->nr_samples <= dst->nr_samples)
|
||||
return;
|
||||
|
||||
dst->min = min(dst->min, src->min);
|
||||
|
|
|
@ -2547,7 +2547,7 @@ struct hl_state_dump_specs {
|
|||
* DEVICES
|
||||
*/
|
||||
|
||||
#define HL_STR_MAX 32
|
||||
#define HL_STR_MAX 64
|
||||
|
||||
#define HL_DEV_STS_MAX (HL_DEVICE_STATUS_LAST + 1)
|
||||
|
||||
|
|
|
@ -489,6 +489,13 @@ static const struct dmi_system_id irq1_level_low_skip_override[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "B2502CBA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus ExpertBook B2502FBA */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "B2502FBA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Asus Vivobook E1504GA */
|
||||
.matches = {
|
||||
|
|
|
@ -385,18 +385,6 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "20GGA00L00"),
|
||||
},
|
||||
},
|
||||
/*
|
||||
* ASUS B1400CEAE hangs on resume from suspend (see
|
||||
* https://bugzilla.kernel.org/show_bug.cgi?id=215742).
|
||||
*/
|
||||
{
|
||||
.callback = init_default_s3,
|
||||
.ident = "ASUS B1400CEAE",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ASUS EXPERTBOOK B1400CEAE"),
|
||||
},
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_i2c_client_enumeration);
|
||||
|
||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(controller_parent);
|
||||
const struct dmi_system_id *dmi_id;
|
||||
|
@ -436,8 +436,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
|||
u64 uid;
|
||||
int ret;
|
||||
|
||||
*skip = false;
|
||||
|
||||
ret = acpi_dev_uid_to_integer(adev, &uid);
|
||||
if (ret)
|
||||
return 0;
|
||||
|
@ -463,7 +461,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
||||
|
||||
bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||
{
|
||||
|
@ -478,8 +475,41 @@ bool acpi_quirk_skip_gpio_event_handlers(void)
|
|||
return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers);
|
||||
#else
|
||||
static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(controller_parent);
|
||||
|
||||
*skip = false;
|
||||
|
||||
/*
|
||||
* The DELL0501 ACPI HID represents an UART (CID is set to PNP0501) with
|
||||
* a backlight-controller attached. There is no separate ACPI device with
|
||||
* an UartSerialBusV2() resource to model the backlight-controller.
|
||||
* Set skip to true so that the tty core creates a serdev ctrl device.
|
||||
* The backlight driver will manually create the serdev client device.
|
||||
*/
|
||||
if (acpi_dev_hid_match(adev, "DELL0501")) {
|
||||
*skip = true;
|
||||
/*
|
||||
* Create a platform dev for dell-uart-backlight to bind to.
|
||||
* This is a static device, so no need to store the result.
|
||||
*/
|
||||
platform_device_register_simple("dell-uart-backlight", PLATFORM_DEVID_NONE,
|
||||
NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return acpi_dmi_skip_serdev_enumeration(controller_parent, skip);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
||||
|
||||
/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
|
||||
static const struct {
|
||||
const char *hid;
|
||||
|
|
|
@ -441,7 +441,7 @@ int btintel_read_version(struct hci_dev *hdev, struct intel_version *ver)
|
|||
return PTR_ERR(skb);
|
||||
}
|
||||
|
||||
if (skb->len != sizeof(*ver)) {
|
||||
if (!skb || skb->len != sizeof(*ver)) {
|
||||
bt_dev_err(hdev, "Intel version event size mismatch");
|
||||
kfree_skb(skb);
|
||||
return -EILSEQ;
|
||||
|
|
|
@ -422,5 +422,6 @@ MODULE_LICENSE("GPL");
|
|||
MODULE_FIRMWARE(FIRMWARE_MT7622);
|
||||
MODULE_FIRMWARE(FIRMWARE_MT7663);
|
||||
MODULE_FIRMWARE(FIRMWARE_MT7668);
|
||||
MODULE_FIRMWARE(FIRMWARE_MT7922);
|
||||
MODULE_FIRMWARE(FIRMWARE_MT7961);
|
||||
MODULE_FIRMWARE(FIRMWARE_MT7925);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#define FIRMWARE_MT7622 "mediatek/mt7622pr2h.bin"
|
||||
#define FIRMWARE_MT7663 "mediatek/mt7663pr2h.bin"
|
||||
#define FIRMWARE_MT7668 "mediatek/mt7668pr2h.bin"
|
||||
#define FIRMWARE_MT7922 "mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin"
|
||||
#define FIRMWARE_MT7961 "mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin"
|
||||
#define FIRMWARE_MT7925 "mediatek/mt7925/BT_RAM_CODE_MT7925_1_1_hdr.bin"
|
||||
|
||||
|
|
|
@ -4483,6 +4483,7 @@ static int btusb_probe(struct usb_interface *intf,
|
|||
set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_SET_RPA_TIMEOUT, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_EXT_SCAN, &hdev->quirks);
|
||||
set_bit(HCI_QUIRK_BROKEN_READ_ENC_KEY_SIZE, &hdev->quirks);
|
||||
}
|
||||
|
||||
if (!reset)
|
||||
|
|
|
@ -62,6 +62,7 @@ static const char * const mhi_pm_state_str[] = {
|
|||
[MHI_PM_STATE_FW_DL_ERR] = "Firmware Download Error",
|
||||
[MHI_PM_STATE_SYS_ERR_DETECT] = "SYS ERROR Detect",
|
||||
[MHI_PM_STATE_SYS_ERR_PROCESS] = "SYS ERROR Process",
|
||||
[MHI_PM_STATE_SYS_ERR_FAIL] = "SYS ERROR Failure",
|
||||
[MHI_PM_STATE_SHUTDOWN_PROCESS] = "SHUTDOWN Process",
|
||||
[MHI_PM_STATE_LD_ERR_FATAL_DETECT] = "Linkdown or Error Fatal Detect",
|
||||
};
|
||||
|
|
|
@ -88,6 +88,7 @@ enum mhi_pm_state {
|
|||
MHI_PM_STATE_FW_DL_ERR,
|
||||
MHI_PM_STATE_SYS_ERR_DETECT,
|
||||
MHI_PM_STATE_SYS_ERR_PROCESS,
|
||||
MHI_PM_STATE_SYS_ERR_FAIL,
|
||||
MHI_PM_STATE_SHUTDOWN_PROCESS,
|
||||
MHI_PM_STATE_LD_ERR_FATAL_DETECT,
|
||||
MHI_PM_STATE_MAX
|
||||
|
@ -104,14 +105,16 @@ enum mhi_pm_state {
|
|||
#define MHI_PM_FW_DL_ERR BIT(7)
|
||||
#define MHI_PM_SYS_ERR_DETECT BIT(8)
|
||||
#define MHI_PM_SYS_ERR_PROCESS BIT(9)
|
||||
#define MHI_PM_SHUTDOWN_PROCESS BIT(10)
|
||||
#define MHI_PM_SYS_ERR_FAIL BIT(10)
|
||||
#define MHI_PM_SHUTDOWN_PROCESS BIT(11)
|
||||
/* link not accessible */
|
||||
#define MHI_PM_LD_ERR_FATAL_DETECT BIT(11)
|
||||
#define MHI_PM_LD_ERR_FATAL_DETECT BIT(12)
|
||||
|
||||
#define MHI_REG_ACCESS_VALID(pm_state) ((pm_state & (MHI_PM_POR | MHI_PM_M0 | \
|
||||
MHI_PM_M2 | MHI_PM_M3_ENTER | MHI_PM_M3_EXIT | \
|
||||
MHI_PM_SYS_ERR_DETECT | MHI_PM_SYS_ERR_PROCESS | \
|
||||
MHI_PM_SHUTDOWN_PROCESS | MHI_PM_FW_DL_ERR)))
|
||||
MHI_PM_SYS_ERR_FAIL | MHI_PM_SHUTDOWN_PROCESS | \
|
||||
MHI_PM_FW_DL_ERR)))
|
||||
#define MHI_PM_IN_ERROR_STATE(pm_state) (pm_state >= MHI_PM_FW_DL_ERR)
|
||||
#define MHI_PM_IN_FATAL_STATE(pm_state) (pm_state == MHI_PM_LD_ERR_FATAL_DETECT)
|
||||
#define MHI_DB_ACCESS_VALID(mhi_cntrl) (mhi_cntrl->pm_state & mhi_cntrl->db_access)
|
||||
|
|
|
@ -36,7 +36,10 @@
|
|||
* M0 <--> M0
|
||||
* M0 -> FW_DL_ERR
|
||||
* M0 -> M3_ENTER -> M3 -> M3_EXIT --> M0
|
||||
* L1: SYS_ERR_DETECT -> SYS_ERR_PROCESS --> POR
|
||||
* L1: SYS_ERR_DETECT -> SYS_ERR_PROCESS
|
||||
* SYS_ERR_PROCESS -> SYS_ERR_FAIL
|
||||
* SYS_ERR_FAIL -> SYS_ERR_DETECT
|
||||
* SYS_ERR_PROCESS --> POR
|
||||
* L2: SHUTDOWN_PROCESS -> LD_ERR_FATAL_DETECT
|
||||
* SHUTDOWN_PROCESS -> DISABLE
|
||||
* L3: LD_ERR_FATAL_DETECT <--> LD_ERR_FATAL_DETECT
|
||||
|
@ -93,7 +96,12 @@ static const struct mhi_pm_transitions dev_state_transitions[] = {
|
|||
},
|
||||
{
|
||||
MHI_PM_SYS_ERR_PROCESS,
|
||||
MHI_PM_POR | MHI_PM_SHUTDOWN_PROCESS |
|
||||
MHI_PM_POR | MHI_PM_SYS_ERR_FAIL | MHI_PM_SHUTDOWN_PROCESS |
|
||||
MHI_PM_LD_ERR_FATAL_DETECT
|
||||
},
|
||||
{
|
||||
MHI_PM_SYS_ERR_FAIL,
|
||||
MHI_PM_SYS_ERR_DETECT | MHI_PM_SHUTDOWN_PROCESS |
|
||||
MHI_PM_LD_ERR_FATAL_DETECT
|
||||
},
|
||||
/* L2 States */
|
||||
|
@ -629,7 +637,13 @@ static void mhi_pm_sys_error_transition(struct mhi_controller *mhi_cntrl)
|
|||
!in_reset, timeout);
|
||||
if (!ret || in_reset) {
|
||||
dev_err(dev, "Device failed to exit MHI Reset state\n");
|
||||
goto exit_sys_error_transition;
|
||||
write_lock_irq(&mhi_cntrl->pm_lock);
|
||||
cur_state = mhi_tryset_pm_state(mhi_cntrl,
|
||||
MHI_PM_SYS_ERR_FAIL);
|
||||
write_unlock_irq(&mhi_cntrl->pm_lock);
|
||||
/* Shutdown may have occurred, otherwise cleanup now */
|
||||
if (cur_state != MHI_PM_SYS_ERR_FAIL)
|
||||
goto exit_sys_error_transition;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1576,7 +1576,8 @@ static int cpufreq_online(unsigned int cpu)
|
|||
if (cpufreq_driver->ready)
|
||||
cpufreq_driver->ready(policy);
|
||||
|
||||
if (cpufreq_thermal_control_enabled(cpufreq_driver))
|
||||
/* Register cpufreq cooling only for a new policy */
|
||||
if (new_policy && cpufreq_thermal_control_enabled(cpufreq_driver))
|
||||
policy->cdev = of_cpufreq_cooling_register(policy);
|
||||
|
||||
pr_debug("initialization complete\n");
|
||||
|
@ -1660,11 +1661,6 @@ static void __cpufreq_offline(unsigned int cpu, struct cpufreq_policy *policy)
|
|||
else
|
||||
policy->last_policy = policy->policy;
|
||||
|
||||
if (cpufreq_thermal_control_enabled(cpufreq_driver)) {
|
||||
cpufreq_cooling_unregister(policy->cdev);
|
||||
policy->cdev = NULL;
|
||||
}
|
||||
|
||||
if (has_target())
|
||||
cpufreq_exit_governor(policy);
|
||||
|
||||
|
@ -1725,6 +1721,15 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unregister cpufreq cooling once all the CPUs of the policy are
|
||||
* removed.
|
||||
*/
|
||||
if (cpufreq_thermal_control_enabled(cpufreq_driver)) {
|
||||
cpufreq_cooling_unregister(policy->cdev);
|
||||
policy->cdev = NULL;
|
||||
}
|
||||
|
||||
/* We did light-weight exit earlier, do full tear down now */
|
||||
if (cpufreq_driver->offline)
|
||||
cpufreq_driver->exit(policy);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <linux/cpumask.h>
|
||||
#include <linux/tick.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/math64.h>
|
||||
|
||||
#include "cpuidle.h"
|
||||
|
||||
|
@ -187,7 +188,7 @@ static void __cpuidle_driver_init(struct cpuidle_driver *drv)
|
|||
s->target_residency = div_u64(s->target_residency_ns, NSEC_PER_USEC);
|
||||
|
||||
if (s->exit_latency > 0)
|
||||
s->exit_latency_ns = s->exit_latency * NSEC_PER_USEC;
|
||||
s->exit_latency_ns = mul_u32_u32(s->exit_latency, NSEC_PER_USEC);
|
||||
else if (s->exit_latency_ns < 0)
|
||||
s->exit_latency_ns = 0;
|
||||
else
|
||||
|
|
|
@ -1328,7 +1328,7 @@ static int iaa_compress(struct crypto_tfm *tfm, struct acomp_req *req,
|
|||
|
||||
*compression_crc = idxd_desc->iax_completion->crc;
|
||||
|
||||
if (!ctx->async_mode)
|
||||
if (!ctx->async_mode || disable_async)
|
||||
idxd_free_desc(wq, idxd_desc);
|
||||
out:
|
||||
return ret;
|
||||
|
@ -1574,7 +1574,7 @@ static int iaa_decompress(struct crypto_tfm *tfm, struct acomp_req *req,
|
|||
|
||||
*dlen = req->dlen;
|
||||
|
||||
if (!ctx->async_mode)
|
||||
if (!ctx->async_mode || disable_async)
|
||||
idxd_free_desc(wq, idxd_desc);
|
||||
|
||||
/* Update stats */
|
||||
|
|
|
@ -77,7 +77,7 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
|
|||
|
||||
root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
|
||||
if (!root_path_buf)
|
||||
goto out;
|
||||
return NULL;
|
||||
|
||||
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
|
||||
root_path_buf_len);
|
||||
|
|
|
@ -146,7 +146,7 @@ int amdgpu_amdkfd_drm_client_create(struct amdgpu_device *adev)
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (!adev->kfd.init_complete)
|
||||
if (!adev->kfd.init_complete || adev->kfd.client.dev)
|
||||
return 0;
|
||||
|
||||
ret = drm_client_init(&adev->ddev, &adev->kfd.client, "kfd",
|
||||
|
|
|
@ -6109,6 +6109,20 @@ pci_ers_result_t amdgpu_pci_slot_reset(struct pci_dev *pdev)
|
|||
struct amdgpu_reset_context reset_context;
|
||||
u32 memsize;
|
||||
struct list_head device_list;
|
||||
struct amdgpu_hive_info *hive;
|
||||
int hive_ras_recovery = 0;
|
||||
struct amdgpu_ras *ras;
|
||||
|
||||
/* PCI error slot reset should be skipped During RAS recovery */
|
||||
hive = amdgpu_get_xgmi_hive(adev);
|
||||
if (hive) {
|
||||
hive_ras_recovery = atomic_read(&hive->ras_recovery);
|
||||
amdgpu_put_xgmi_hive(hive);
|
||||
}
|
||||
ras = amdgpu_ras_get_context(adev);
|
||||
if ((amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 3)) &&
|
||||
ras && (atomic_read(&ras->in_recovery) || hive_ras_recovery))
|
||||
return PCI_ERS_RESULT_RECOVERED;
|
||||
|
||||
DRM_INFO("PCI error: slot reset callback!!\n");
|
||||
|
||||
|
|
|
@ -2451,8 +2451,11 @@ static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work)
|
|||
}
|
||||
for (i = 0; i < mgpu_info.num_dgpu; i++) {
|
||||
adev = mgpu_info.gpu_ins[i].adev;
|
||||
if (!adev->kfd.init_complete)
|
||||
if (!adev->kfd.init_complete) {
|
||||
kgd2kfd_init_zone_device(adev);
|
||||
amdgpu_amdkfd_device_init(adev);
|
||||
amdgpu_amdkfd_drm_client_create(adev);
|
||||
}
|
||||
amdgpu_ttm_set_buffer_funcs_status(adev, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -778,8 +778,8 @@ static int kfd_ioctl_get_process_apertures_new(struct file *filp,
|
|||
* nodes, but not more than args->num_of_nodes as that is
|
||||
* the amount of memory allocated by user
|
||||
*/
|
||||
pa = kzalloc((sizeof(struct kfd_process_device_apertures) *
|
||||
args->num_of_nodes), GFP_KERNEL);
|
||||
pa = kcalloc(args->num_of_nodes, sizeof(struct kfd_process_device_apertures),
|
||||
GFP_KERNEL);
|
||||
if (!pa)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -987,6 +987,7 @@ struct dc_debug_options {
|
|||
bool psp_disabled_wa;
|
||||
unsigned int ips2_eval_delay_us;
|
||||
unsigned int ips2_entry_delay_us;
|
||||
bool disable_dmub_reallow_idle;
|
||||
bool disable_timeout;
|
||||
bool disable_extblankadj;
|
||||
unsigned int static_screen_wait_frames;
|
||||
|
|
|
@ -1364,7 +1364,7 @@ bool dc_wake_and_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned in
|
|||
else
|
||||
result = dm_execute_dmub_cmd(ctx, cmd, wait_type);
|
||||
|
||||
if (result && reallow_idle)
|
||||
if (result && reallow_idle && !ctx->dc->debug.disable_dmub_reallow_idle)
|
||||
dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, true);
|
||||
|
||||
return result;
|
||||
|
@ -1413,7 +1413,7 @@ bool dc_wake_and_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_com
|
|||
|
||||
result = dc_dmub_execute_gpint(ctx, command_code, param, response, wait_type);
|
||||
|
||||
if (result && reallow_idle)
|
||||
if (result && reallow_idle && !ctx->dc->debug.disable_dmub_reallow_idle)
|
||||
dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, true);
|
||||
|
||||
return result;
|
||||
|
|
|
@ -2760,7 +2760,7 @@ static int build_synthetic_soc_states(bool disable_dc_mode_overwrite, struct clk
|
|||
struct _vcs_dpi_voltage_scaling_st entry = {0};
|
||||
struct clk_limit_table_entry max_clk_data = {0};
|
||||
|
||||
unsigned int min_dcfclk_mhz = 199, min_fclk_mhz = 299;
|
||||
unsigned int min_dcfclk_mhz = 399, min_fclk_mhz = 599;
|
||||
|
||||
static const unsigned int num_dcfclk_stas = 5;
|
||||
unsigned int dcfclk_sta_targets[DC__VOLTAGE_STATES] = {199, 615, 906, 1324, 1564};
|
||||
|
|
|
@ -782,6 +782,7 @@ static const struct dc_debug_options debug_defaults_drv = {
|
|||
.psp_disabled_wa = true,
|
||||
.ips2_eval_delay_us = 2000,
|
||||
.ips2_entry_delay_us = 800,
|
||||
.disable_dmub_reallow_idle = true,
|
||||
.static_screen_wait_frames = 2,
|
||||
};
|
||||
|
||||
|
|
|
@ -57,10 +57,10 @@ void mod_stats_update_event(struct mod_stats *mod_stats,
|
|||
unsigned int length);
|
||||
|
||||
void mod_stats_update_flip(struct mod_stats *mod_stats,
|
||||
unsigned long timestamp_in_ns);
|
||||
unsigned long long timestamp_in_ns);
|
||||
|
||||
void mod_stats_update_vupdate(struct mod_stats *mod_stats,
|
||||
unsigned long timestamp_in_ns);
|
||||
unsigned long long timestamp_in_ns);
|
||||
|
||||
void mod_stats_update_freesync(struct mod_stats *mod_stats,
|
||||
unsigned int v_total_min,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
variables:
|
||||
DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa
|
||||
DRM_CI_COMMIT_SHA: &drm-ci-commit-sha edfbf74df1d4d6ce54ffe24566108be0e1a98c3d
|
||||
DRM_CI_COMMIT_SHA: &drm-ci-commit-sha 9d162de9a05155e1c4041857a5848842749164cf
|
||||
|
||||
UPSTREAM_REPO: git://anongit.freedesktop.org/drm/drm
|
||||
TARGET_BRANCH: drm-next
|
||||
|
@ -25,7 +25,9 @@ variables:
|
|||
# per-job artifact storage on MinIO
|
||||
JOB_ARTIFACTS_BASE: ${PIPELINE_ARTIFACTS_BASE}/${CI_JOB_ID}
|
||||
# default kernel for rootfs before injecting the current kernel tree
|
||||
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/gfx-ci/linux/v6.4.12-for-mesa-ci-f6b4ad45f48d
|
||||
KERNEL_REPO: "gfx-ci/linux"
|
||||
KERNEL_TAG: "v6.6.4-for-mesa-ci-e4f4c500f7fb"
|
||||
KERNEL_IMAGE_BASE: https://${S3_HOST}/mesa-lava/${KERNEL_REPO}/${KERNEL_TAG}
|
||||
LAVA_TAGS: subset-1-gfx
|
||||
LAVA_JOB_PRIORITY: 30
|
||||
|
||||
|
@ -133,6 +135,11 @@ stages:
|
|||
- if: &is-pre-merge-for-marge '$GITLAB_USER_LOGIN == "marge-bot" && $CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: on_success
|
||||
|
||||
.never-post-merge-rules:
|
||||
rules:
|
||||
- if: *is-post-merge
|
||||
when: never
|
||||
|
||||
# Rule to filter for only scheduled pipelines.
|
||||
.scheduled_pipeline-rules:
|
||||
rules:
|
||||
|
@ -150,6 +157,7 @@ stages:
|
|||
.build-rules:
|
||||
rules:
|
||||
- !reference [.no_scheduled_pipelines-rules, rules]
|
||||
- !reference [.never-post-merge-rules, rules]
|
||||
# Run automatically once all dependency jobs have passed
|
||||
- when: on_success
|
||||
|
||||
|
@ -157,6 +165,7 @@ stages:
|
|||
.container+build-rules:
|
||||
rules:
|
||||
- !reference [.no_scheduled_pipelines-rules, rules]
|
||||
- !reference [.never-post-merge-rules, rules]
|
||||
- when: manual
|
||||
|
||||
.ci-deqp-artifacts:
|
||||
|
@ -175,6 +184,7 @@ stages:
|
|||
.container-rules:
|
||||
rules:
|
||||
- !reference [.no_scheduled_pipelines-rules, rules]
|
||||
- !reference [.never-post-merge-rules, rules]
|
||||
# Run pipeline by default in the main project if any CI pipeline
|
||||
# configuration files were changed, to ensure docker images are up to date
|
||||
- if: *is-post-merge
|
||||
|
|
|
@ -327,6 +327,7 @@ virtio_gpu:none:
|
|||
GPU_VERSION: none
|
||||
extends:
|
||||
- .test-gl
|
||||
- .test-rules
|
||||
tags:
|
||||
- kvm
|
||||
script:
|
||||
|
|
|
@ -193,13 +193,22 @@ int drm_mode_config_helper_suspend(struct drm_device *dev)
|
|||
|
||||
if (!dev)
|
||||
return 0;
|
||||
/*
|
||||
* Don't disable polling if it was never initialized
|
||||
*/
|
||||
if (dev->mode_config.poll_enabled)
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 1);
|
||||
state = drm_atomic_helper_suspend(dev);
|
||||
if (IS_ERR(state)) {
|
||||
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0);
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
/*
|
||||
* Don't enable polling if it was never initialized
|
||||
*/
|
||||
if (dev->mode_config.poll_enabled)
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
|
||||
return PTR_ERR(state);
|
||||
}
|
||||
|
||||
|
@ -239,7 +248,11 @@ int drm_mode_config_helper_resume(struct drm_device *dev)
|
|||
dev->mode_config.suspend_state = NULL;
|
||||
|
||||
drm_fb_helper_set_suspend_unlocked(dev->fb_helper, 0);
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
/*
|
||||
* Don't enable polling if it is not initialized
|
||||
*/
|
||||
if (dev->mode_config.poll_enabled)
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -117,6 +117,12 @@ static const struct drm_dmi_panel_orientation_data lcd1080x1920_leftside_up = {
|
|||
.orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data lcd1080x1920_rightside_up = {
|
||||
.width = 1080,
|
||||
.height = 1920,
|
||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||
};
|
||||
|
||||
static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = {
|
||||
.width = 1200,
|
||||
.height = 1920,
|
||||
|
@ -279,6 +285,12 @@ static const struct dmi_system_id orientation_data[] = {
|
|||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03")
|
||||
},
|
||||
.driver_data = (void *)&lcd720x1280_rightside_up,
|
||||
}, { /* GPD Win Mini */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1617-01")
|
||||
},
|
||||
.driver_data = (void *)&lcd1080x1920_rightside_up,
|
||||
}, { /* I.T.Works TW891 */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
|
||||
|
|
|
@ -293,14 +293,17 @@ static void reschedule_output_poll_work(struct drm_device *dev)
|
|||
* Drivers can call this helper from their device resume implementation. It is
|
||||
* not an error to call this even when output polling isn't enabled.
|
||||
*
|
||||
* If device polling was never initialized before, this call will trigger a
|
||||
* warning and return.
|
||||
*
|
||||
* Note that calls to enable and disable polling must be strictly ordered, which
|
||||
* is automatically the case when they're only call from suspend/resume
|
||||
* callbacks.
|
||||
*/
|
||||
void drm_kms_helper_poll_enable(struct drm_device *dev)
|
||||
{
|
||||
if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll ||
|
||||
dev->mode_config.poll_running)
|
||||
if (drm_WARN_ON_ONCE(dev, !dev->mode_config.poll_enabled) ||
|
||||
!drm_kms_helper_poll || dev->mode_config.poll_running)
|
||||
return;
|
||||
|
||||
if (drm_kms_helper_enable_hpd(dev) ||
|
||||
|
@ -626,8 +629,12 @@ retry:
|
|||
0);
|
||||
}
|
||||
|
||||
/* Re-enable polling in case the global poll config changed. */
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
/*
|
||||
* Re-enable polling in case the global poll config changed but polling
|
||||
* is still initialized.
|
||||
*/
|
||||
if (dev->mode_config.poll_enabled)
|
||||
drm_kms_helper_poll_enable(dev);
|
||||
|
||||
if (connector->status == connector_status_disconnected) {
|
||||
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
|
||||
|
@ -880,12 +887,18 @@ EXPORT_SYMBOL(drm_kms_helper_is_poll_worker);
|
|||
* not an error to call this even when output polling isn't enabled or already
|
||||
* disabled. Polling is re-enabled by calling drm_kms_helper_poll_enable().
|
||||
*
|
||||
* If however, the polling was never initialized, this call will trigger a
|
||||
* warning and return
|
||||
*
|
||||
* Note that calls to enable and disable polling must be strictly ordered, which
|
||||
* is automatically the case when they're only call from suspend/resume
|
||||
* callbacks.
|
||||
*/
|
||||
void drm_kms_helper_poll_disable(struct drm_device *dev)
|
||||
{
|
||||
if (drm_WARN_ON(dev, !dev->mode_config.poll_enabled))
|
||||
return;
|
||||
|
||||
if (dev->mode_config.poll_running)
|
||||
drm_kms_helper_disable_hpd(dev);
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include <subdev/bios.h>
|
||||
#include <subdev/bios/init.h>
|
||||
#include <subdev/gsp.h>
|
||||
|
||||
void
|
||||
gm107_devinit_disable(struct nvkm_devinit *init)
|
||||
|
@ -33,10 +34,13 @@ gm107_devinit_disable(struct nvkm_devinit *init)
|
|||
u32 r021c00 = nvkm_rd32(device, 0x021c00);
|
||||
u32 r021c04 = nvkm_rd32(device, 0x021c04);
|
||||
|
||||
if (r021c00 & 0x00000001)
|
||||
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
|
||||
if (r021c00 & 0x00000004)
|
||||
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 2);
|
||||
/* gsp only wants to enable/disable display */
|
||||
if (!nvkm_gsp_rm(device->gsp)) {
|
||||
if (r021c00 & 0x00000001)
|
||||
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
|
||||
if (r021c00 & 0x00000004)
|
||||
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 2);
|
||||
}
|
||||
if (r021c04 & 0x00000001)
|
||||
nvkm_subdev_disable(device, NVKM_ENGINE_DISP, 0);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ r535_devinit_new(const struct nvkm_devinit_func *hw,
|
|||
|
||||
rm->dtor = r535_devinit_dtor;
|
||||
rm->post = hw->post;
|
||||
rm->disable = hw->disable;
|
||||
|
||||
ret = nv50_devinit_new_(rm, device, type, inst, pdevinit);
|
||||
if (ret)
|
||||
|
|
|
@ -1367,6 +1367,23 @@ static const struct drm_display_mode boe_bp101wx1_100_mode = {
|
|||
.vtotal = 800 + 6 + 8 + 2,
|
||||
};
|
||||
|
||||
static const struct panel_desc boe_bp082wx1_100 = {
|
||||
.modes = &boe_bp101wx1_100_mode,
|
||||
.num_modes = 1,
|
||||
.bpc = 8,
|
||||
.size = {
|
||||
.width = 177,
|
||||
.height = 110,
|
||||
},
|
||||
.delay = {
|
||||
.enable = 50,
|
||||
.disable = 50,
|
||||
},
|
||||
.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
|
||||
.bus_flags = DRM_BUS_FLAG_DE_HIGH,
|
||||
.connector_type = DRM_MODE_CONNECTOR_LVDS,
|
||||
};
|
||||
|
||||
static const struct panel_desc boe_bp101wx1_100 = {
|
||||
.modes = &boe_bp101wx1_100_mode,
|
||||
.num_modes = 1,
|
||||
|
@ -4345,6 +4362,9 @@ static const struct of_device_id platform_of_match[] = {
|
|||
}, {
|
||||
.compatible = "bananapi,s070wv20-ct16",
|
||||
.data = &bananapi_s070wv20_ct16,
|
||||
}, {
|
||||
.compatible = "boe,bp082wx1-100",
|
||||
.data = &boe_bp082wx1_100,
|
||||
}, {
|
||||
.compatible = "boe,bp101wx1-100",
|
||||
.data = &boe_bp101wx1_100,
|
||||
|
|
|
@ -770,7 +770,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo,
|
|||
* This function may sleep while waiting for space to become available.
|
||||
* Returns:
|
||||
* -EBUSY: No space available (only if no_wait == 1).
|
||||
* -ENOMEM: Could not allocate memory for the buffer object, either due to
|
||||
* -ENOSPC: Could not allocate space for the buffer object, either due to
|
||||
* fragmentation or concurrent allocators.
|
||||
* -ERESTARTSYS: An interruptible sleep was interrupted by a signal.
|
||||
*/
|
||||
|
@ -830,7 +830,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
|
|||
goto error;
|
||||
}
|
||||
|
||||
ret = -ENOMEM;
|
||||
ret = -ENOSPC;
|
||||
if (!type_found) {
|
||||
pr_err(TTM_PFX "No compatible memory type found\n");
|
||||
ret = -EINVAL;
|
||||
|
@ -916,6 +916,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
|
|||
return -EINVAL;
|
||||
|
||||
ret = ttm_bo_move_buffer(bo, placement, ctx);
|
||||
/* For backward compatibility with userspace */
|
||||
if (ret == -ENOSPC)
|
||||
return -ENOMEM;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -1505,9 +1505,6 @@ static int vc4_prepare_fb(struct drm_plane *plane,
|
|||
|
||||
drm_gem_plane_helper_prepare_fb(plane, state);
|
||||
|
||||
if (plane->state->fb == state->fb)
|
||||
return 0;
|
||||
|
||||
return vc4_bo_inc_usecnt(bo);
|
||||
}
|
||||
|
||||
|
@ -1516,7 +1513,7 @@ static void vc4_cleanup_fb(struct drm_plane *plane,
|
|||
{
|
||||
struct vc4_bo *bo;
|
||||
|
||||
if (plane->state->fb == state->fb || !state->fb)
|
||||
if (!state->fb)
|
||||
return;
|
||||
|
||||
bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base);
|
||||
|
|
|
@ -430,6 +430,7 @@
|
|||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V1 0x2BED
|
||||
#define I2C_DEVICE_ID_HP_SPECTRE_X360_14T_EA100_V2 0x2BEE
|
||||
#define I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG 0x2D02
|
||||
#define I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM 0x2F81
|
||||
|
||||
#define USB_VENDOR_ID_ELECOM 0x056e
|
||||
#define USB_DEVICE_ID_ELECOM_BM084 0x0061
|
||||
|
|
|
@ -411,6 +411,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
|
|||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15_EU0556NG),
|
||||
HID_BATTERY_QUIRK_IGNORE },
|
||||
{ HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_CHROMEBOOK_TROGDOR_POMPOM),
|
||||
HID_BATTERY_QUIRK_AVOID_QUERY },
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -318,7 +318,7 @@ struct dw_i2c_dev {
|
|||
#define AMD_UCSI_INTR_EN 0xd
|
||||
|
||||
#define TXGBE_TX_FIFO_DEPTH 4
|
||||
#define TXGBE_RX_FIFO_DEPTH 0
|
||||
#define TXGBE_RX_FIFO_DEPTH 1
|
||||
|
||||
struct i2c_dw_semaphore_callbacks {
|
||||
int (*probe)(struct dw_i2c_dev *dev);
|
||||
|
|
|
@ -34,6 +34,7 @@ MODULE_AUTHOR("Sean Hefty");
|
|||
MODULE_DESCRIPTION("InfiniBand CM");
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
|
||||
#define CM_DESTROY_ID_WAIT_TIMEOUT 10000 /* msecs */
|
||||
static const char * const ibcm_rej_reason_strs[] = {
|
||||
[IB_CM_REJ_NO_QP] = "no QP",
|
||||
[IB_CM_REJ_NO_EEC] = "no EEC",
|
||||
|
@ -1025,10 +1026,20 @@ static void cm_reset_to_idle(struct cm_id_private *cm_id_priv)
|
|||
}
|
||||
}
|
||||
|
||||
static noinline void cm_destroy_id_wait_timeout(struct ib_cm_id *cm_id)
|
||||
{
|
||||
struct cm_id_private *cm_id_priv;
|
||||
|
||||
cm_id_priv = container_of(cm_id, struct cm_id_private, id);
|
||||
pr_err("%s: cm_id=%p timed out. state=%d refcnt=%d\n", __func__,
|
||||
cm_id, cm_id->state, refcount_read(&cm_id_priv->refcount));
|
||||
}
|
||||
|
||||
static void cm_destroy_id(struct ib_cm_id *cm_id, int err)
|
||||
{
|
||||
struct cm_id_private *cm_id_priv;
|
||||
struct cm_work *work;
|
||||
int ret;
|
||||
|
||||
cm_id_priv = container_of(cm_id, struct cm_id_private, id);
|
||||
spin_lock_irq(&cm_id_priv->lock);
|
||||
|
@ -1135,7 +1146,14 @@ retest:
|
|||
|
||||
xa_erase(&cm.local_id_table, cm_local_id(cm_id->local_id));
|
||||
cm_deref_id(cm_id_priv);
|
||||
wait_for_completion(&cm_id_priv->comp);
|
||||
do {
|
||||
ret = wait_for_completion_timeout(&cm_id_priv->comp,
|
||||
msecs_to_jiffies(
|
||||
CM_DESTROY_ID_WAIT_TIMEOUT));
|
||||
if (!ret) /* timeout happened */
|
||||
cm_destroy_id_wait_timeout(cm_id);
|
||||
} while (!ret);
|
||||
|
||||
while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
|
||||
cm_free_work(work);
|
||||
|
||||
|
|
|
@ -366,6 +366,8 @@ static const struct xpad_device {
|
|||
{ 0x24c6, 0x5d04, "Razer Sabertooth", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 },
|
||||
{ 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 },
|
||||
{ 0x294b, 0x3303, "Snakebyte GAMEPAD BASE X", 0, XTYPE_XBOXONE },
|
||||
{ 0x294b, 0x3404, "Snakebyte GAMEPAD RGB X", 0, XTYPE_XBOXONE },
|
||||
{ 0x2dc8, 0x2000, "8BitDo Pro 2 Wired Controller fox Xbox", 0, XTYPE_XBOXONE },
|
||||
{ 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 },
|
||||
|
@ -507,6 +509,7 @@ static const struct usb_device_id xpad_table[] = {
|
|||
XPAD_XBOXONE_VENDOR(0x24c6), /* PowerA controllers */
|
||||
XPAD_XBOX360_VENDOR(0x2563), /* OneXPlayer Gamepad */
|
||||
XPAD_XBOX360_VENDOR(0x260d), /* Dareu H101 */
|
||||
XPAD_XBOXONE_VENDOR(0x294b), /* Snakebyte */
|
||||
XPAD_XBOX360_VENDOR(0x2c22), /* Qanba Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller */
|
||||
XPAD_XBOXONE_VENDOR(0x2dc8), /* 8BitDo Pro 2 Wired Controller for Xbox */
|
||||
|
|
|
@ -1196,7 +1196,11 @@ static int rmi_driver_probe(struct device *dev)
|
|||
}
|
||||
rmi_driver_set_input_params(rmi_dev, data->input);
|
||||
data->input->phys = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"%s/input0", dev_name(dev));
|
||||
"%s/input0", dev_name(dev));
|
||||
if (!data->input->phys) {
|
||||
retval = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
retval = rmi_init_functions(data);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/i2c.h>
|
||||
|
@ -23,12 +24,9 @@
|
|||
#define IST3038C_I2C_RETRY_COUNT 3
|
||||
#define IST3038C_MAX_FINGER_NUM 10
|
||||
#define IST3038C_X_MASK GENMASK(23, 12)
|
||||
#define IST3038C_X_SHIFT 12
|
||||
#define IST3038C_Y_MASK GENMASK(11, 0)
|
||||
#define IST3038C_AREA_MASK GENMASK(27, 24)
|
||||
#define IST3038C_AREA_SHIFT 24
|
||||
#define IST3038C_FINGER_COUNT_MASK GENMASK(15, 12)
|
||||
#define IST3038C_FINGER_COUNT_SHIFT 12
|
||||
#define IST3038C_FINGER_STATUS_MASK GENMASK(9, 0)
|
||||
|
||||
struct imagis_ts {
|
||||
|
@ -92,8 +90,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)
|
|||
goto out;
|
||||
}
|
||||
|
||||
finger_count = (intr_message & IST3038C_FINGER_COUNT_MASK) >>
|
||||
IST3038C_FINGER_COUNT_SHIFT;
|
||||
finger_count = FIELD_GET(IST3038C_FINGER_COUNT_MASK, intr_message);
|
||||
if (finger_count > IST3038C_MAX_FINGER_NUM) {
|
||||
dev_err(&ts->client->dev,
|
||||
"finger count %d is more than maximum supported\n",
|
||||
|
@ -101,7 +98,7 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)
|
|||
goto out;
|
||||
}
|
||||
|
||||
finger_pressed = intr_message & IST3038C_FINGER_STATUS_MASK;
|
||||
finger_pressed = FIELD_GET(IST3038C_FINGER_STATUS_MASK, intr_message);
|
||||
|
||||
for (i = 0; i < finger_count; i++) {
|
||||
error = imagis_i2c_read_reg(ts,
|
||||
|
@ -118,12 +115,11 @@ static irqreturn_t imagis_interrupt(int irq, void *dev_id)
|
|||
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER,
|
||||
finger_pressed & BIT(i));
|
||||
touchscreen_report_pos(ts->input_dev, &ts->prop,
|
||||
(finger_status & IST3038C_X_MASK) >>
|
||||
IST3038C_X_SHIFT,
|
||||
finger_status & IST3038C_Y_MASK, 1);
|
||||
FIELD_GET(IST3038C_X_MASK, finger_status),
|
||||
FIELD_GET(IST3038C_Y_MASK, finger_status),
|
||||
true);
|
||||
input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR,
|
||||
(finger_status & IST3038C_AREA_MASK) >>
|
||||
IST3038C_AREA_SHIFT);
|
||||
FIELD_GET(IST3038C_AREA_MASK, finger_status));
|
||||
}
|
||||
|
||||
input_mt_sync_frame(ts->input_dev);
|
||||
|
@ -210,7 +206,7 @@ static int imagis_init_input_dev(struct imagis_ts *ts)
|
|||
|
||||
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X);
|
||||
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y);
|
||||
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
|
||||
input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 16, 0, 0);
|
||||
|
||||
touchscreen_parse_properties(input_dev, true, &ts->prop);
|
||||
if (!ts->prop.max_x || !ts->prop.max_y) {
|
||||
|
|
|
@ -2398,8 +2398,6 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
arm_smmu_detach_dev(master);
|
||||
|
||||
mutex_lock(&smmu_domain->init_mutex);
|
||||
|
||||
if (!smmu_domain->smmu) {
|
||||
|
@ -2414,6 +2412,16 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Prevent arm_smmu_share_asid() from trying to change the ASID
|
||||
* of either the old or new domain while we are working on it.
|
||||
* This allows the STE and the smmu_domain->devices list to
|
||||
* be inconsistent during this routine.
|
||||
*/
|
||||
mutex_lock(&arm_smmu_asid_lock);
|
||||
|
||||
arm_smmu_detach_dev(master);
|
||||
|
||||
master->domain = smmu_domain;
|
||||
|
||||
/*
|
||||
|
@ -2439,13 +2447,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Prevent SVA from concurrently modifying the CD or writing to
|
||||
* the CD entry
|
||||
*/
|
||||
mutex_lock(&arm_smmu_asid_lock);
|
||||
ret = arm_smmu_write_ctx_desc(master, IOMMU_NO_PASID, &smmu_domain->cd);
|
||||
mutex_unlock(&arm_smmu_asid_lock);
|
||||
if (ret) {
|
||||
master->domain = NULL;
|
||||
goto out_list_del;
|
||||
|
@ -2455,13 +2457,15 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
|
|||
arm_smmu_install_ste_for_dev(master);
|
||||
|
||||
arm_smmu_enable_ats(master);
|
||||
return 0;
|
||||
goto out_unlock;
|
||||
|
||||
out_list_del:
|
||||
spin_lock_irqsave(&smmu_domain->devices_lock, flags);
|
||||
list_del(&master->domain_head);
|
||||
spin_unlock_irqrestore(&smmu_domain->devices_lock, flags);
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&arm_smmu_asid_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -757,7 +757,7 @@ static const struct video_device video_dev_template = {
|
|||
/**
|
||||
* vip_irq - interrupt routine
|
||||
* @irq: Number of interrupt ( not used, correct number is assumed )
|
||||
* @vip: local data structure containing all information
|
||||
* @data: local data structure containing all information
|
||||
*
|
||||
* check for both frame interrupts set ( top and bottom ).
|
||||
* check FIFO overflow, but limit number of log messages after open.
|
||||
|
@ -767,8 +767,9 @@ static const struct video_device video_dev_template = {
|
|||
*
|
||||
* IRQ_HANDLED, interrupt done.
|
||||
*/
|
||||
static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip)
|
||||
static irqreturn_t vip_irq(int irq, void *data)
|
||||
{
|
||||
struct sta2x11_vip *vip = data;
|
||||
unsigned int status;
|
||||
|
||||
status = reg_read(vip, DVP_ITS);
|
||||
|
@ -1053,9 +1054,7 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev,
|
|||
|
||||
spin_lock_init(&vip->slock);
|
||||
|
||||
ret = request_irq(pdev->irq,
|
||||
(irq_handler_t) vip_irq,
|
||||
IRQF_SHARED, KBUILD_MODNAME, vip);
|
||||
ret = request_irq(pdev->irq, vip_irq, IRQF_SHARED, KBUILD_MODNAME, vip);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "request_irq failed\n");
|
||||
ret = -ENODEV;
|
||||
|
|
|
@ -50,12 +50,12 @@ static void mtk_vcodec_vpu_reset_dec_handler(void *priv)
|
|||
|
||||
dev_err(&dev->plat_dev->dev, "Watchdog timeout!!");
|
||||
|
||||
mutex_lock(&dev->dev_mutex);
|
||||
mutex_lock(&dev->dev_ctx_lock);
|
||||
list_for_each_entry(ctx, &dev->ctx_list, list) {
|
||||
ctx->state = MTK_STATE_ABORT;
|
||||
mtk_v4l2_vdec_dbg(0, ctx, "[%d] Change to state MTK_STATE_ABORT", ctx->id);
|
||||
}
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
mutex_unlock(&dev->dev_ctx_lock);
|
||||
}
|
||||
|
||||
static void mtk_vcodec_vpu_reset_enc_handler(void *priv)
|
||||
|
@ -65,12 +65,12 @@ static void mtk_vcodec_vpu_reset_enc_handler(void *priv)
|
|||
|
||||
dev_err(&dev->plat_dev->dev, "Watchdog timeout!!");
|
||||
|
||||
mutex_lock(&dev->dev_mutex);
|
||||
mutex_lock(&dev->dev_ctx_lock);
|
||||
list_for_each_entry(ctx, &dev->ctx_list, list) {
|
||||
ctx->state = MTK_STATE_ABORT;
|
||||
mtk_v4l2_vdec_dbg(0, ctx, "[%d] Change to state MTK_STATE_ABORT", ctx->id);
|
||||
}
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
mutex_unlock(&dev->dev_ctx_lock);
|
||||
}
|
||||
|
||||
static const struct mtk_vcodec_fw_ops mtk_vcodec_vpu_msg = {
|
||||
|
|
|
@ -268,7 +268,9 @@ static int fops_vcodec_open(struct file *file)
|
|||
|
||||
ctx->dev->vdec_pdata->init_vdec_params(ctx);
|
||||
|
||||
mutex_lock(&dev->dev_ctx_lock);
|
||||
list_add(&ctx->list, &dev->ctx_list);
|
||||
mutex_unlock(&dev->dev_ctx_lock);
|
||||
mtk_vcodec_dbgfs_create(ctx);
|
||||
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
|
@ -311,7 +313,9 @@ static int fops_vcodec_release(struct file *file)
|
|||
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
||||
|
||||
mtk_vcodec_dbgfs_remove(dev, ctx->id);
|
||||
mutex_lock(&dev->dev_ctx_lock);
|
||||
list_del_init(&ctx->list);
|
||||
mutex_unlock(&dev->dev_ctx_lock);
|
||||
kfree(ctx);
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
return 0;
|
||||
|
@ -404,6 +408,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
|
|||
for (i = 0; i < MTK_VDEC_HW_MAX; i++)
|
||||
mutex_init(&dev->dec_mutex[i]);
|
||||
mutex_init(&dev->dev_mutex);
|
||||
mutex_init(&dev->dev_ctx_lock);
|
||||
spin_lock_init(&dev->irqlock);
|
||||
|
||||
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
|
||||
|
|
|
@ -241,6 +241,7 @@ struct mtk_vcodec_dec_ctx {
|
|||
*
|
||||
* @dec_mutex: decoder hardware lock
|
||||
* @dev_mutex: video_device lock
|
||||
* @dev_ctx_lock: the lock of context list
|
||||
* @decode_workqueue: decode work queue
|
||||
*
|
||||
* @irqlock: protect data access by irq handler and work thread
|
||||
|
@ -282,6 +283,7 @@ struct mtk_vcodec_dec_dev {
|
|||
/* decoder hardware mutex lock */
|
||||
struct mutex dec_mutex[MTK_VDEC_HW_MAX];
|
||||
struct mutex dev_mutex;
|
||||
struct mutex dev_ctx_lock;
|
||||
struct workqueue_struct *decode_workqueue;
|
||||
|
||||
spinlock_t irqlock;
|
||||
|
|
|
@ -869,7 +869,6 @@ static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx)
|
|||
inst->vpu.codec_type = ctx->current_codec;
|
||||
inst->vpu.capture_type = ctx->capture_fourcc;
|
||||
|
||||
ctx->drv_handle = inst;
|
||||
err = vpu_dec_init(&inst->vpu);
|
||||
if (err) {
|
||||
mtk_vdec_err(ctx, "vdec_hevc init err=%d", err);
|
||||
|
@ -898,6 +897,7 @@ static int vdec_hevc_slice_init(struct mtk_vcodec_dec_ctx *ctx)
|
|||
mtk_vdec_debug(ctx, "lat hevc instance >> %p, codec_type = 0x%x",
|
||||
inst, inst->vpu.codec_type);
|
||||
|
||||
ctx->drv_handle = inst;
|
||||
return 0;
|
||||
error_free_inst:
|
||||
kfree(inst);
|
||||
|
|
|
@ -77,12 +77,14 @@ static bool vpu_dec_check_ap_inst(struct mtk_vcodec_dec_dev *dec_dev, struct vde
|
|||
struct mtk_vcodec_dec_ctx *ctx;
|
||||
int ret = false;
|
||||
|
||||
mutex_lock(&dec_dev->dev_ctx_lock);
|
||||
list_for_each_entry(ctx, &dec_dev->ctx_list, list) {
|
||||
if (!IS_ERR_OR_NULL(ctx) && ctx->vpu_inst == vpu) {
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&dec_dev->dev_ctx_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -177,7 +177,9 @@ static int fops_vcodec_open(struct file *file)
|
|||
mtk_v4l2_venc_dbg(2, ctx, "Create instance [%d]@%p m2m_ctx=%p ",
|
||||
ctx->id, ctx, ctx->m2m_ctx);
|
||||
|
||||
mutex_lock(&dev->dev_ctx_lock);
|
||||
list_add(&ctx->list, &dev->ctx_list);
|
||||
mutex_unlock(&dev->dev_ctx_lock);
|
||||
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
mtk_v4l2_venc_dbg(0, ctx, "%s encoder [%d]", dev_name(&dev->plat_dev->dev),
|
||||
|
@ -212,7 +214,9 @@ static int fops_vcodec_release(struct file *file)
|
|||
v4l2_fh_exit(&ctx->fh);
|
||||
v4l2_ctrl_handler_free(&ctx->ctrl_hdl);
|
||||
|
||||
mutex_lock(&dev->dev_ctx_lock);
|
||||
list_del_init(&ctx->list);
|
||||
mutex_unlock(&dev->dev_ctx_lock);
|
||||
kfree(ctx);
|
||||
mutex_unlock(&dev->dev_mutex);
|
||||
return 0;
|
||||
|
@ -294,6 +298,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
|
|||
|
||||
mutex_init(&dev->enc_mutex);
|
||||
mutex_init(&dev->dev_mutex);
|
||||
mutex_init(&dev->dev_ctx_lock);
|
||||
spin_lock_init(&dev->irqlock);
|
||||
|
||||
snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s",
|
||||
|
|
|
@ -178,6 +178,7 @@ struct mtk_vcodec_enc_ctx {
|
|||
*
|
||||
* @enc_mutex: encoder hardware lock.
|
||||
* @dev_mutex: video_device lock
|
||||
* @dev_ctx_lock: the lock of context list
|
||||
* @encode_workqueue: encode work queue
|
||||
*
|
||||
* @enc_irq: h264 encoder irq resource
|
||||
|
@ -205,6 +206,7 @@ struct mtk_vcodec_enc_dev {
|
|||
/* encoder hardware mutex lock */
|
||||
struct mutex enc_mutex;
|
||||
struct mutex dev_mutex;
|
||||
struct mutex dev_ctx_lock;
|
||||
struct workqueue_struct *encode_workqueue;
|
||||
|
||||
int enc_irq;
|
||||
|
|
|
@ -47,12 +47,14 @@ static bool vpu_enc_check_ap_inst(struct mtk_vcodec_enc_dev *enc_dev, struct ven
|
|||
struct mtk_vcodec_enc_ctx *ctx;
|
||||
int ret = false;
|
||||
|
||||
mutex_lock(&enc_dev->dev_ctx_lock);
|
||||
list_for_each_entry(ctx, &enc_dev->ctx_list, list) {
|
||||
if (!IS_ERR_OR_NULL(ctx) && ctx->vpu_inst == vpu) {
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&enc_dev->dev_ctx_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -234,7 +234,8 @@ static int dg_dispatch_as_host(u32 context_id, struct vmci_datagram *dg)
|
|||
|
||||
dg_info->in_dg_host_queue = true;
|
||||
dg_info->entry = dst_entry;
|
||||
memcpy(&dg_info->msg, dg, dg_size);
|
||||
dg_info->msg = *dg;
|
||||
memcpy(&dg_info->msg_payload, dg + 1, dg->payload_size);
|
||||
|
||||
INIT_WORK(&dg_info->work, dg_delayed_dispatch);
|
||||
schedule_work(&dg_info->work);
|
||||
|
@ -377,7 +378,8 @@ int vmci_datagram_invoke_guest_handler(struct vmci_datagram *dg)
|
|||
|
||||
dg_info->in_dg_host_queue = false;
|
||||
dg_info->entry = dst_entry;
|
||||
memcpy(&dg_info->msg, dg, VMCI_DG_SIZE(dg));
|
||||
dg_info->msg = *dg;
|
||||
memcpy(&dg_info->msg_payload, dg + 1, dg->payload_size);
|
||||
|
||||
INIT_WORK(&dg_info->work, dg_delayed_dispatch);
|
||||
schedule_work(&dg_info->work);
|
||||
|
|
|
@ -954,7 +954,7 @@ qca8k_mdio_register(struct qca8k_priv *priv)
|
|||
|
||||
mdio = of_get_child_by_name(dev->of_node, "mdio");
|
||||
if (mdio && !of_device_is_available(mdio))
|
||||
goto out;
|
||||
goto out_put_node;
|
||||
|
||||
bus = devm_mdiobus_alloc(dev);
|
||||
if (!bus) {
|
||||
|
@ -988,7 +988,6 @@ qca8k_mdio_register(struct qca8k_priv *priv)
|
|||
|
||||
out_put_node:
|
||||
of_node_put(mdio);
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ static int dummy_dev_init(struct net_device *dev)
|
|||
if (!dev->lstats)
|
||||
return -ENOMEM;
|
||||
|
||||
netdev_lockdep_set_classes(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -147,10 +147,11 @@ void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len)
|
|||
|
||||
phy_fw_ver[0] = '\0';
|
||||
bnx2x_get_ext_phy_fw_version(&bp->link_params,
|
||||
phy_fw_ver, PHY_FW_VER_LEN);
|
||||
strscpy(buf, bp->fw_ver, buf_len);
|
||||
snprintf(buf + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver),
|
||||
"bc %d.%d.%d%s%s",
|
||||
phy_fw_ver, sizeof(phy_fw_ver));
|
||||
/* This may become truncated. */
|
||||
scnprintf(buf, buf_len,
|
||||
"%sbc %d.%d.%d%s%s",
|
||||
bp->fw_ver,
|
||||
(bp->common.bc_ver & 0xff0000) >> 16,
|
||||
(bp->common.bc_ver & 0xff00) >> 8,
|
||||
(bp->common.bc_ver & 0xff),
|
||||
|
|
|
@ -1132,7 +1132,7 @@ static void bnx2x_get_drvinfo(struct net_device *dev,
|
|||
}
|
||||
|
||||
memset(version, 0, sizeof(version));
|
||||
bnx2x_fill_fw_str(bp, version, ETHTOOL_FWVERS_LEN);
|
||||
bnx2x_fill_fw_str(bp, version, sizeof(version));
|
||||
strlcat(info->fw_version, version, sizeof(info->fw_version));
|
||||
|
||||
strscpy(info->bus_info, pci_name(bp->pdev), sizeof(info->bus_info));
|
||||
|
|
|
@ -6163,8 +6163,8 @@ static void bnx2x_link_int_ack(struct link_params *params,
|
|||
|
||||
static int bnx2x_null_format_ver(u32 spirom_ver, u8 *str, u16 *len)
|
||||
{
|
||||
str[0] = '\0';
|
||||
(*len)--;
|
||||
if (*len)
|
||||
str[0] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -6173,7 +6173,7 @@ static int bnx2x_format_ver(u32 num, u8 *str, u16 *len)
|
|||
u16 ret;
|
||||
|
||||
if (*len < 10) {
|
||||
/* Need more than 10chars for this format */
|
||||
/* Need more than 10 chars for this format */
|
||||
bnx2x_null_format_ver(num, str, len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -6188,8 +6188,8 @@ static int bnx2x_3_seq_format_ver(u32 num, u8 *str, u16 *len)
|
|||
{
|
||||
u16 ret;
|
||||
|
||||
if (*len < 10) {
|
||||
/* Need more than 10chars for this format */
|
||||
if (*len < 9) {
|
||||
/* Need more than 9 chars for this format */
|
||||
bnx2x_null_format_ver(num, str, len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -6208,7 +6208,7 @@ int bnx2x_get_ext_phy_fw_version(struct link_params *params, u8 *version,
|
|||
int status = 0;
|
||||
u8 *ver_p = version;
|
||||
u16 remain_len = len;
|
||||
if (version == NULL || params == NULL)
|
||||
if (version == NULL || params == NULL || len == 0)
|
||||
return -EINVAL;
|
||||
bp = params->bp;
|
||||
|
||||
|
@ -11546,7 +11546,7 @@ static int bnx2x_7101_format_ver(u32 spirom_ver, u8 *str, u16 *len)
|
|||
str[2] = (spirom_ver & 0xFF0000) >> 16;
|
||||
str[3] = (spirom_ver & 0xFF000000) >> 24;
|
||||
str[4] = '\0';
|
||||
*len -= 5;
|
||||
*len -= 4;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -499,7 +499,7 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)
|
|||
vfres->rss_lut_size = ICE_LUT_VSI_SIZE;
|
||||
vfres->max_mtu = ice_vc_get_max_frame_size(vf);
|
||||
|
||||
vfres->vsi_res[0].vsi_id = vf->lan_vsi_num;
|
||||
vfres->vsi_res[0].vsi_id = ICE_VF_VSI_ID;
|
||||
vfres->vsi_res[0].vsi_type = VIRTCHNL_VSI_SRIOV;
|
||||
vfres->vsi_res[0].num_queue_pairs = vsi->num_txq;
|
||||
ether_addr_copy(vfres->vsi_res[0].default_mac_addr,
|
||||
|
@ -545,12 +545,7 @@ static void ice_vc_reset_vf_msg(struct ice_vf *vf)
|
|||
*/
|
||||
bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id)
|
||||
{
|
||||
struct ice_pf *pf = vf->pf;
|
||||
struct ice_vsi *vsi;
|
||||
|
||||
vsi = ice_find_vsi(pf, vsi_id);
|
||||
|
||||
return (vsi && (vsi->vf == vf));
|
||||
return vsi_id == ICE_VF_VSI_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,6 +19,15 @@
|
|||
#define ICE_MAX_MACADDR_PER_VF 18
|
||||
#define ICE_FLEX_DESC_RXDID_MAX_NUM 64
|
||||
|
||||
/* VFs only get a single VSI. For ice hardware, the VF does not need to know
|
||||
* its VSI index. However, the virtchnl interface requires a VSI number,
|
||||
* mainly due to legacy hardware.
|
||||
*
|
||||
* Since the VF doesn't need this information, report a static value to the VF
|
||||
* instead of leaking any information about the PF or hardware setup.
|
||||
*/
|
||||
#define ICE_VF_VSI_ID 1
|
||||
|
||||
struct ice_virtchnl_ops {
|
||||
int (*get_ver_msg)(struct ice_vf *vf, u8 *msg);
|
||||
int (*get_vf_res_msg)(struct ice_vf *vf, u8 *msg);
|
||||
|
|
|
@ -3391,9 +3391,12 @@ static int ionic_lif_adminq_init(struct ionic_lif *lif)
|
|||
|
||||
napi_enable(&qcq->napi);
|
||||
|
||||
if (qcq->flags & IONIC_QCQ_F_INTR)
|
||||
if (qcq->flags & IONIC_QCQ_F_INTR) {
|
||||
irq_set_affinity_hint(qcq->intr.vector,
|
||||
&qcq->intr.affinity_mask);
|
||||
ionic_intr_mask(idev->intr_ctrl, qcq->intr.index,
|
||||
IONIC_INTR_MASK_CLEAR);
|
||||
}
|
||||
|
||||
qcq->flags |= IONIC_QCQ_F_INITED;
|
||||
|
||||
|
|
|
@ -165,9 +165,9 @@ config DWMAC_STARFIVE
|
|||
help
|
||||
Support for ethernet controllers on StarFive RISC-V SoCs
|
||||
|
||||
This selects the StarFive platform specific glue layer support for
|
||||
the stmmac device driver. This driver is used for StarFive JH7110
|
||||
ethernet controller.
|
||||
This selects the StarFive platform specific glue layer support
|
||||
for the stmmac device driver. This driver is used for the
|
||||
StarFive JH7100 and JH7110 ethernet controllers.
|
||||
|
||||
config DWMAC_STI
|
||||
tristate "STi GMAC support"
|
||||
|
|
|
@ -15,13 +15,20 @@
|
|||
|
||||
#include "stmmac_platform.h"
|
||||
|
||||
#define STARFIVE_DWMAC_PHY_INFT_RGMII 0x1
|
||||
#define STARFIVE_DWMAC_PHY_INFT_RMII 0x4
|
||||
#define STARFIVE_DWMAC_PHY_INFT_FIELD 0x7U
|
||||
#define STARFIVE_DWMAC_PHY_INFT_RGMII 0x1
|
||||
#define STARFIVE_DWMAC_PHY_INFT_RMII 0x4
|
||||
#define STARFIVE_DWMAC_PHY_INFT_FIELD 0x7U
|
||||
|
||||
#define JH7100_SYSMAIN_REGISTER49_DLYCHAIN 0xc8
|
||||
|
||||
struct starfive_dwmac_data {
|
||||
unsigned int gtxclk_dlychain;
|
||||
};
|
||||
|
||||
struct starfive_dwmac {
|
||||
struct device *dev;
|
||||
struct clk *clk_tx;
|
||||
const struct starfive_dwmac_data *data;
|
||||
};
|
||||
|
||||
static void starfive_dwmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
|
||||
|
@ -67,6 +74,8 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
|
|||
|
||||
case PHY_INTERFACE_MODE_RGMII:
|
||||
case PHY_INTERFACE_MODE_RGMII_ID:
|
||||
case PHY_INTERFACE_MODE_RGMII_RXID:
|
||||
case PHY_INTERFACE_MODE_RGMII_TXID:
|
||||
mode = STARFIVE_DWMAC_PHY_INFT_RGMII;
|
||||
break;
|
||||
|
||||
|
@ -89,6 +98,14 @@ static int starfive_dwmac_set_mode(struct plat_stmmacenet_data *plat_dat)
|
|||
if (err)
|
||||
return dev_err_probe(dwmac->dev, err, "error setting phy mode\n");
|
||||
|
||||
if (dwmac->data) {
|
||||
err = regmap_write(regmap, JH7100_SYSMAIN_REGISTER49_DLYCHAIN,
|
||||
dwmac->data->gtxclk_dlychain);
|
||||
if (err)
|
||||
return dev_err_probe(dwmac->dev, err,
|
||||
"error selecting gtxclk delay chain\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -114,6 +131,8 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
|
|||
if (!dwmac)
|
||||
return -ENOMEM;
|
||||
|
||||
dwmac->data = device_get_match_data(&pdev->dev);
|
||||
|
||||
dwmac->clk_tx = devm_clk_get_enabled(&pdev->dev, "tx");
|
||||
if (IS_ERR(dwmac->clk_tx))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(dwmac->clk_tx),
|
||||
|
@ -144,8 +163,13 @@ static int starfive_dwmac_probe(struct platform_device *pdev)
|
|||
return stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
|
||||
}
|
||||
|
||||
static const struct starfive_dwmac_data jh7100_data = {
|
||||
.gtxclk_dlychain = 4,
|
||||
};
|
||||
|
||||
static const struct of_device_id starfive_dwmac_match[] = {
|
||||
{ .compatible = "starfive,jh7110-dwmac" },
|
||||
{ .compatible = "starfive,jh7100-dwmac", .data = &jh7100_data },
|
||||
{ .compatible = "starfive,jh7110-dwmac" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, starfive_dwmac_match);
|
||||
|
|
|
@ -349,6 +349,7 @@ static int geneve_init(struct net_device *dev)
|
|||
gro_cells_destroy(&geneve->gro_cells);
|
||||
return err;
|
||||
}
|
||||
netdev_lockdep_set_classes(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,6 +144,7 @@ static int loopback_dev_init(struct net_device *dev)
|
|||
dev->lstats = netdev_alloc_pcpu_stats(struct pcpu_lstats);
|
||||
if (!dev->lstats)
|
||||
return -ENOMEM;
|
||||
netdev_lockdep_set_classes(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ static int xpcs_soft_reset(struct dw_xpcs *xpcs,
|
|||
dev = MDIO_MMD_VEND2;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = xpcs_write(xpcs, dev, MDIO_CTRL1, MDIO_CTRL1_RESET);
|
||||
|
@ -891,7 +891,7 @@ int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
|
|||
return ret;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (compat->pma_config) {
|
||||
|
|
|
@ -1413,6 +1413,11 @@ int phy_sfp_probe(struct phy_device *phydev,
|
|||
}
|
||||
EXPORT_SYMBOL(phy_sfp_probe);
|
||||
|
||||
static bool phy_drv_supports_irq(struct phy_driver *phydrv)
|
||||
{
|
||||
return phydrv->config_intr && phydrv->handle_interrupt;
|
||||
}
|
||||
|
||||
/**
|
||||
* phy_attach_direct - attach a network device to a given PHY device pointer
|
||||
* @dev: network device to attach
|
||||
|
@ -1527,6 +1532,9 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
|||
if (phydev->dev_flags & PHY_F_NO_IRQ)
|
||||
phydev->irq = PHY_POLL;
|
||||
|
||||
if (!phy_drv_supports_irq(phydev->drv) && phy_interrupt_is_valid(phydev))
|
||||
phydev->irq = PHY_POLL;
|
||||
|
||||
/* Port is set to PORT_TP by default and the actual PHY driver will set
|
||||
* it to different value depending on the PHY configuration. If we have
|
||||
* the generic PHY driver we can't figure it out, thus set the old
|
||||
|
@ -2992,11 +3000,6 @@ s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
|
|||
}
|
||||
EXPORT_SYMBOL(phy_get_internal_delay);
|
||||
|
||||
static bool phy_drv_supports_irq(struct phy_driver *phydrv)
|
||||
{
|
||||
return phydrv->config_intr && phydrv->handle_interrupt;
|
||||
}
|
||||
|
||||
static int phy_led_set_brightness(struct led_classdev *led_cdev,
|
||||
enum led_brightness value)
|
||||
{
|
||||
|
|
|
@ -1483,6 +1483,7 @@ static void veth_free_queues(struct net_device *dev)
|
|||
|
||||
static int veth_dev_init(struct net_device *dev)
|
||||
{
|
||||
netdev_lockdep_set_classes(dev);
|
||||
return veth_alloc_queues(dev);
|
||||
}
|
||||
|
||||
|
|
|
@ -2855,6 +2855,7 @@ static int vxlan_init(struct net_device *dev)
|
|||
if (err)
|
||||
goto err_gro_cells_destroy;
|
||||
|
||||
netdev_lockdep_set_classes(dev);
|
||||
return 0;
|
||||
|
||||
err_gro_cells_destroy:
|
||||
|
|
|
@ -106,7 +106,7 @@ static struct mhi_controller_config ath11k_mhi_config_qca6390 = {
|
|||
.max_channels = 128,
|
||||
.timeout_ms = 2000,
|
||||
.use_bounce_buf = false,
|
||||
.buf_len = 0,
|
||||
.buf_len = 8192,
|
||||
.num_channels = ARRAY_SIZE(ath11k_mhi_channels_qca6390),
|
||||
.ch_cfg = ath11k_mhi_channels_qca6390,
|
||||
.num_events = ARRAY_SIZE(ath11k_mhi_events_qca6390),
|
||||
|
|
|
@ -643,7 +643,7 @@ static void ath_ant_try_scan(struct ath_ant_comb *antcomb,
|
|||
conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
|
||||
conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
|
||||
} else if (antcomb->rssi_sub >
|
||||
antcomb->rssi_lna1) {
|
||||
antcomb->rssi_lna2) {
|
||||
/* set to A-B */
|
||||
conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
|
||||
conf->alt_lna_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
|
||||
|
|
|
@ -82,6 +82,15 @@ static const struct dmi_system_id dmi_platform_data[] = {
|
|||
},
|
||||
.driver_data = (void *)&acepc_t8_data,
|
||||
},
|
||||
{
|
||||
/* ACEPC W5 Pro Cherry Trail Z8350 HDMI stick, same wifi as the T8 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "T3 MRD"),
|
||||
DMI_MATCH(DMI_CHASSIS_TYPE, "3"),
|
||||
DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
|
||||
},
|
||||
.driver_data = (void *)&acepc_t8_data,
|
||||
},
|
||||
{
|
||||
/* Chuwi Hi8 Pro with D2D3_Hi8Pro.233 BIOS */
|
||||
.matches = {
|
||||
|
|
|
@ -299,3 +299,9 @@ MODULE_FIRMWARE(IWL_MA_B_HR_B_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
|||
MODULE_FIRMWARE(IWL_MA_B_GF_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_GF4_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_MA_B_MR_A_FW_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX));
|
||||
|
||||
MODULE_FIRMWARE("iwlwifi-so-a0-gf-a0.pnvm");
|
||||
MODULE_FIRMWARE("iwlwifi-so-a0-gf4-a0.pnvm");
|
||||
MODULE_FIRMWARE("iwlwifi-ty-a0-gf-a0.pnvm");
|
||||
MODULE_FIRMWARE("iwlwifi-ma-b0-gf-a0.pnvm");
|
||||
MODULE_FIRMWARE("iwlwifi-ma-b0-gf4-a0.pnvm");
|
||||
|
|
|
@ -179,3 +179,5 @@ MODULE_FIRMWARE(IWL_BZ_A_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
|||
MODULE_FIRMWARE(IWL_BZ_A_FM4_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_GL_B_FM_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_GL_C_FM_C_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX));
|
||||
|
||||
MODULE_FIRMWARE("iwlwifi-gl-c0-fm-c0.pnvm");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2015-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/stringify.h>
|
||||
|
@ -33,6 +33,10 @@
|
|||
#define IWL_SC_A_GF_A_FW_PRE "iwlwifi-sc-a0-gf-a0"
|
||||
#define IWL_SC_A_GF4_A_FW_PRE "iwlwifi-sc-a0-gf4-a0"
|
||||
#define IWL_SC_A_WH_A_FW_PRE "iwlwifi-sc-a0-wh-a0"
|
||||
#define IWL_SC2_A_FM_C_FW_PRE "iwlwifi-sc2-a0-fm-c0"
|
||||
#define IWL_SC2_A_WH_A_FW_PRE "iwlwifi-sc2-a0-wh-a0"
|
||||
#define IWL_SC2F_A_FM_C_FW_PRE "iwlwifi-sc2f-a0-fm-c0"
|
||||
#define IWL_SC2F_A_WH_A_FW_PRE "iwlwifi-sc2f-a0-wh-a0"
|
||||
|
||||
#define IWL_SC_A_FM_B_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_FM_B_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
@ -48,6 +52,14 @@
|
|||
IWL_SC_A_GF4_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC_A_WH_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC_A_WH_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC2_A_FM_C_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC2_A_FM_C_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC2_A_WH_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC2_A_WH_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC2F_A_FM_C_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC2F_A_FM_C_FW_PRE "-" __stringify(api) ".ucode"
|
||||
#define IWL_SC2F_A_WH_A_FW_MODULE_FIRMWARE(api) \
|
||||
IWL_SC2F_A_WH_A_FW_PRE "-" __stringify(api) ".ucode"
|
||||
|
||||
static const struct iwl_base_params iwl_sc_base_params = {
|
||||
.eeprom_size = OTP_LOW_IMAGE_SIZE_32K,
|
||||
|
@ -124,6 +136,9 @@ static const struct iwl_base_params iwl_sc_base_params = {
|
|||
|
||||
#define IWL_DEVICE_SC \
|
||||
IWL_DEVICE_BZ_COMMON, \
|
||||
.uhb_supported = true, \
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, \
|
||||
.num_rbds = IWL_NUM_RBDS_SC_EHT, \
|
||||
.ht_params = &iwl_22000_ht_params
|
||||
|
||||
/*
|
||||
|
@ -149,10 +164,21 @@ const char iwl_sc_name[] = "Intel(R) TBD Sc device";
|
|||
|
||||
const struct iwl_cfg iwl_cfg_sc = {
|
||||
.fw_name_mac = "sc",
|
||||
.uhb_supported = true,
|
||||
IWL_DEVICE_SC,
|
||||
.features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM,
|
||||
.num_rbds = IWL_NUM_RBDS_SC_EHT,
|
||||
};
|
||||
|
||||
const char iwl_sc2_name[] = "Intel(R) TBD Sc2 device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc2 = {
|
||||
.fw_name_mac = "sc2",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
const char iwl_sc2f_name[] = "Intel(R) TBD Sc2f device";
|
||||
|
||||
const struct iwl_cfg iwl_cfg_sc2f = {
|
||||
.fw_name_mac = "sc2f",
|
||||
IWL_DEVICE_SC,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL_SC_A_FM_B_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
|
@ -162,3 +188,7 @@ MODULE_FIRMWARE(IWL_SC_A_HR_B_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
|||
MODULE_FIRMWARE(IWL_SC_A_GF_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_GF4_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC_A_WH_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC2_A_FM_C_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC2_A_WH_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC2F_A_FM_C_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
MODULE_FIRMWARE(IWL_SC2F_A_WH_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*/
|
||||
#ifndef __IWL_CONFIG_H__
|
||||
#define __IWL_CONFIG_H__
|
||||
|
@ -418,6 +418,8 @@ struct iwl_cfg {
|
|||
#define IWL_CFG_MAC_TYPE_BZ 0x46
|
||||
#define IWL_CFG_MAC_TYPE_GL 0x47
|
||||
#define IWL_CFG_MAC_TYPE_SC 0x48
|
||||
#define IWL_CFG_MAC_TYPE_SC2 0x49
|
||||
#define IWL_CFG_MAC_TYPE_SC2F 0x4A
|
||||
|
||||
#define IWL_CFG_RF_TYPE_TH 0x105
|
||||
#define IWL_CFG_RF_TYPE_TH1 0x108
|
||||
|
@ -527,6 +529,8 @@ extern const char iwl_ax231_name[];
|
|||
extern const char iwl_ax411_name[];
|
||||
extern const char iwl_bz_name[];
|
||||
extern const char iwl_sc_name[];
|
||||
extern const char iwl_sc2_name[];
|
||||
extern const char iwl_sc2f_name[];
|
||||
#if IS_ENABLED(CONFIG_IWLDVM)
|
||||
extern const struct iwl_cfg iwl5300_agn_cfg;
|
||||
extern const struct iwl_cfg iwl5100_agn_cfg;
|
||||
|
@ -632,6 +636,8 @@ extern const struct iwl_cfg iwl_cfg_bz;
|
|||
extern const struct iwl_cfg iwl_cfg_gl;
|
||||
|
||||
extern const struct iwl_cfg iwl_cfg_sc;
|
||||
extern const struct iwl_cfg iwl_cfg_sc2;
|
||||
extern const struct iwl_cfg iwl_cfg_sc2f;
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
|
||||
#endif /* __IWL_CONFIG_H__ */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
/*
|
||||
* Copyright (C) 2005-2014, 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2005-2014, 2018-2024 Intel Corporation
|
||||
* Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
||||
* Copyright (C) 2016-2017 Intel Deutschland GmbH
|
||||
*/
|
||||
|
@ -502,12 +502,16 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
|
|||
|
||||
/* Bz devices */
|
||||
{IWL_PCI_DEVICE(0x2727, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0x272D, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0x272b, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0xA840, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0x7740, PCI_ANY_ID, iwl_bz_trans_cfg)},
|
||||
|
||||
/* Sc devices */
|
||||
{IWL_PCI_DEVICE(0xE440, PCI_ANY_ID, iwl_sc_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0xE340, PCI_ANY_ID, iwl_sc_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0xD340, PCI_ANY_ID, iwl_sc_trans_cfg)},
|
||||
{IWL_PCI_DEVICE(0x6E70, PCI_ANY_ID, iwl_sc_trans_cfg)},
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
|
||||
{0}
|
||||
|
@ -1115,6 +1119,16 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
|
|||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc, iwl_sc_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2, iwl_sc2_name),
|
||||
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_MAC_TYPE_SC2F, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
|
||||
iwl_cfg_sc2f, iwl_sc2f_name),
|
||||
#endif /* CONFIG_IWLMVM */
|
||||
};
|
||||
|
||||
|
|
|
@ -490,6 +490,11 @@ static u32 __mt7915_reg_addr(struct mt7915_dev *dev, u32 addr)
|
|||
return dev->reg.map[i].maps + ofs;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 __mt7915_reg_remap_addr(struct mt7915_dev *dev, u32 addr)
|
||||
{
|
||||
if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
|
||||
(addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
|
||||
(addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END))
|
||||
|
@ -514,15 +519,30 @@ void mt7915_memcpy_fromio(struct mt7915_dev *dev, void *buf, u32 offset,
|
|||
{
|
||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||
|
||||
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
||||
if (addr) {
|
||||
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
memcpy_fromio(buf, dev->mt76.mmio.regs +
|
||||
__mt7915_reg_remap_addr(dev, offset), len);
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
}
|
||||
|
||||
static u32 mt7915_rr(struct mt76_dev *mdev, u32 offset)
|
||||
{
|
||||
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||
u32 addr = __mt7915_reg_addr(dev, offset), val;
|
||||
|
||||
return dev->bus_ops->rr(mdev, addr);
|
||||
if (addr)
|
||||
return dev->bus_ops->rr(mdev, addr);
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
val = dev->bus_ops->rr(mdev, __mt7915_reg_remap_addr(dev, offset));
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static void mt7915_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
||||
|
@ -530,7 +550,14 @@ static void mt7915_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
|||
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||
|
||||
dev->bus_ops->wr(mdev, addr, val);
|
||||
if (addr) {
|
||||
dev->bus_ops->wr(mdev, addr, val);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
dev->bus_ops->wr(mdev, __mt7915_reg_remap_addr(dev, offset), val);
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
}
|
||||
|
||||
static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
||||
|
@ -538,7 +565,14 @@ static u32 mt7915_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
|||
struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||
u32 addr = __mt7915_reg_addr(dev, offset);
|
||||
|
||||
return dev->bus_ops->rmw(mdev, addr, mask, val);
|
||||
if (addr)
|
||||
return dev->bus_ops->rmw(mdev, addr, mask, val);
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
val = dev->bus_ops->rmw(mdev, __mt7915_reg_remap_addr(dev, offset), mask, val);
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
|
||||
|
@ -707,6 +741,7 @@ static int mt7915_mmio_init(struct mt76_dev *mdev,
|
|||
|
||||
dev = container_of(mdev, struct mt7915_dev, mt76);
|
||||
mt76_mmio_init(&dev->mt76, mem_base);
|
||||
spin_lock_init(&dev->reg_lock);
|
||||
|
||||
switch (device_id) {
|
||||
case 0x7915:
|
||||
|
|
|
@ -287,6 +287,7 @@ struct mt7915_dev {
|
|||
|
||||
struct list_head sta_rc_list;
|
||||
struct list_head twt_list;
|
||||
spinlock_t reg_lock;
|
||||
|
||||
u32 hw_pattern;
|
||||
|
||||
|
|
|
@ -732,6 +732,9 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi,
|
|||
FIELD_PREP(MT_TXD2_SUB_TYPE, fc_stype);
|
||||
|
||||
txwi[2] |= cpu_to_le32(val);
|
||||
|
||||
if (wcid->amsdu)
|
||||
txwi[3] |= cpu_to_le32(MT_TXD3_HW_AMSDU);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -862,8 +865,6 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
|
|||
val |= MT_TXD3_PROTECT_FRAME;
|
||||
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
|
||||
val |= MT_TXD3_NO_ACK;
|
||||
if (wcid->amsdu)
|
||||
val |= MT_TXD3_HW_AMSDU;
|
||||
|
||||
txwi[3] = cpu_to_le32(val);
|
||||
txwi[4] = 0;
|
||||
|
|
|
@ -140,7 +140,6 @@ static u32 mt7996_reg_map_l1(struct mt7996_dev *dev, u32 addr)
|
|||
u32 offset = FIELD_GET(MT_HIF_REMAP_L1_OFFSET, addr);
|
||||
u32 base = FIELD_GET(MT_HIF_REMAP_L1_BASE, addr);
|
||||
|
||||
dev->reg_l1_backup = dev->bus_ops->rr(&dev->mt76, MT_HIF_REMAP_L1);
|
||||
dev->bus_ops->rmw(&dev->mt76, MT_HIF_REMAP_L1,
|
||||
MT_HIF_REMAP_L1_MASK,
|
||||
FIELD_PREP(MT_HIF_REMAP_L1_MASK, base));
|
||||
|
@ -155,7 +154,6 @@ static u32 mt7996_reg_map_l2(struct mt7996_dev *dev, u32 addr)
|
|||
u32 offset = FIELD_GET(MT_HIF_REMAP_L2_OFFSET, addr);
|
||||
u32 base = FIELD_GET(MT_HIF_REMAP_L2_BASE, addr);
|
||||
|
||||
dev->reg_l2_backup = dev->bus_ops->rr(&dev->mt76, MT_HIF_REMAP_L2);
|
||||
dev->bus_ops->rmw(&dev->mt76, MT_HIF_REMAP_L2,
|
||||
MT_HIF_REMAP_L2_MASK,
|
||||
FIELD_PREP(MT_HIF_REMAP_L2_MASK, base));
|
||||
|
@ -165,26 +163,10 @@ static u32 mt7996_reg_map_l2(struct mt7996_dev *dev, u32 addr)
|
|||
return MT_HIF_REMAP_BASE_L2 + offset;
|
||||
}
|
||||
|
||||
static void mt7996_reg_remap_restore(struct mt7996_dev *dev)
|
||||
{
|
||||
/* remap to ori status */
|
||||
if (unlikely(dev->reg_l1_backup)) {
|
||||
dev->bus_ops->wr(&dev->mt76, MT_HIF_REMAP_L1, dev->reg_l1_backup);
|
||||
dev->reg_l1_backup = 0;
|
||||
}
|
||||
|
||||
if (dev->reg_l2_backup) {
|
||||
dev->bus_ops->wr(&dev->mt76, MT_HIF_REMAP_L2, dev->reg_l2_backup);
|
||||
dev->reg_l2_backup = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static u32 __mt7996_reg_addr(struct mt7996_dev *dev, u32 addr)
|
||||
{
|
||||
int i;
|
||||
|
||||
mt7996_reg_remap_restore(dev);
|
||||
|
||||
if (addr < 0x100000)
|
||||
return addr;
|
||||
|
||||
|
@ -201,6 +183,11 @@ static u32 __mt7996_reg_addr(struct mt7996_dev *dev, u32 addr)
|
|||
return dev->reg.map[i].mapped + ofs;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 __mt7996_reg_remap_addr(struct mt7996_dev *dev, u32 addr)
|
||||
{
|
||||
if ((addr >= MT_INFRA_BASE && addr < MT_WFSYS0_PHY_START) ||
|
||||
(addr >= MT_WFSYS0_PHY_START && addr < MT_WFSYS1_PHY_START) ||
|
||||
(addr >= MT_WFSYS1_PHY_START && addr <= MT_WFSYS1_PHY_END))
|
||||
|
@ -225,28 +212,60 @@ void mt7996_memcpy_fromio(struct mt7996_dev *dev, void *buf, u32 offset,
|
|||
{
|
||||
u32 addr = __mt7996_reg_addr(dev, offset);
|
||||
|
||||
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
||||
if (addr) {
|
||||
memcpy_fromio(buf, dev->mt76.mmio.regs + addr, len);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
memcpy_fromio(buf, dev->mt76.mmio.regs +
|
||||
__mt7996_reg_remap_addr(dev, offset), len);
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
}
|
||||
|
||||
static u32 mt7996_rr(struct mt76_dev *mdev, u32 offset)
|
||||
{
|
||||
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||
u32 addr = __mt7996_reg_addr(dev, offset), val;
|
||||
|
||||
return dev->bus_ops->rr(mdev, __mt7996_reg_addr(dev, offset));
|
||||
if (addr)
|
||||
return dev->bus_ops->rr(mdev, addr);
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
val = dev->bus_ops->rr(mdev, __mt7996_reg_remap_addr(dev, offset));
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static void mt7996_wr(struct mt76_dev *mdev, u32 offset, u32 val)
|
||||
{
|
||||
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||
u32 addr = __mt7996_reg_addr(dev, offset);
|
||||
|
||||
dev->bus_ops->wr(mdev, __mt7996_reg_addr(dev, offset), val);
|
||||
if (addr) {
|
||||
dev->bus_ops->wr(mdev, addr, val);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
dev->bus_ops->wr(mdev, __mt7996_reg_remap_addr(dev, offset), val);
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
}
|
||||
|
||||
static u32 mt7996_rmw(struct mt76_dev *mdev, u32 offset, u32 mask, u32 val)
|
||||
{
|
||||
struct mt7996_dev *dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||
u32 addr = __mt7996_reg_addr(dev, offset);
|
||||
|
||||
return dev->bus_ops->rmw(mdev, __mt7996_reg_addr(dev, offset), mask, val);
|
||||
if (addr)
|
||||
return dev->bus_ops->rmw(mdev, addr, mask, val);
|
||||
|
||||
spin_lock_bh(&dev->reg_lock);
|
||||
val = dev->bus_ops->rmw(mdev, __mt7996_reg_remap_addr(dev, offset), mask, val);
|
||||
spin_unlock_bh(&dev->reg_lock);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
|
||||
|
@ -421,6 +440,7 @@ static int mt7996_mmio_init(struct mt76_dev *mdev,
|
|||
|
||||
dev = container_of(mdev, struct mt7996_dev, mt76);
|
||||
mt76_mmio_init(&dev->mt76, mem_base);
|
||||
spin_lock_init(&dev->reg_lock);
|
||||
|
||||
switch (device_id) {
|
||||
case 0x7990:
|
||||
|
|
|
@ -325,8 +325,7 @@ struct mt7996_dev {
|
|||
u8 n_agrt;
|
||||
} twt;
|
||||
|
||||
u32 reg_l1_backup;
|
||||
u32 reg_l2_backup;
|
||||
spinlock_t reg_lock;
|
||||
|
||||
u8 wtbl_size_group;
|
||||
};
|
||||
|
|
|
@ -441,7 +441,7 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|||
* when disconnected by peer
|
||||
*/
|
||||
if (rtwdev->scanning)
|
||||
rtw89_hw_scan_abort(rtwdev, vif);
|
||||
rtw89_hw_scan_abort(rtwdev, rtwdev->scan_info.scanning_vif);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -990,7 +990,7 @@ static int rtw89_ops_remain_on_channel(struct ieee80211_hw *hw,
|
|||
}
|
||||
|
||||
if (rtwdev->scanning)
|
||||
rtw89_hw_scan_abort(rtwdev, vif);
|
||||
rtw89_hw_scan_abort(rtwdev, rtwdev->scan_info.scanning_vif);
|
||||
|
||||
if (type == IEEE80211_ROC_TYPE_MGMT_TX)
|
||||
roc->state = RTW89_ROC_MGMT;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue