mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 21:54:06 +08:00
Immutable branch for ASoC, as requested by Mark Brown
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJSjfuVAAoJEFGvii+H/HdhOYsP/2lrz6GLYBgQFp9H+6t95+8H KvFmefaM5pjoBdnq6Q7pZBxYO4m15J3TaFNzH+Ib6oWJlg/awpu1Qwu5+Pwwv9RK 6x4mEyy9yDu2CJd+6wpBFxx1Ujj4CdAq5dm/bUMiCr0d4Ez2qZhxdiDPGB02QHv7 J7KkJBnG0PSiV4uoiLh8pOQsCF+v5y1l0rUaI3ZG+7x2QAi9I3liZGBI02BVvXsh /0aYWc8xQUar1JurPNVN4I6cojyKp5oyq4SHkpdbkk3Yt7ek1aNoPMG6ORqvaEMn 5WF7LISpFF1NrHifW5SUdnbx5dxOnZyKRRgEWcP1TMZEmSJ4mdYFbqgMIJCJuRCN k23mVQEcQYy+1V8CuymhMuIB4SBiNYLpbJ7bvQ/Q5N34yuVl9eqPxshcVgAUhFkc 8+vZj+/be+lpxw4zhIrAS0IlEVjUvMs8/B/kmCfcKPID5zPLUWPVbxGRSPMDEpzS liR7uw94/LHUiW3JD7I1x2MchjK7sH55p22hZJFhqUcU0LjcFfY0+3mz0ljAuPZt BZrt1O3yW987m6WXVZmJDI10h0feh1K8TlpnnL3ppWO4cKsgoB7wruYxQtptVyZR wzN0rq6UyianNMIGHWYgHQ7ye8wzeazMZWTQLl8AblIJ3xXozsmLScKBHJGXgeKh jafyhkX8wFiEoEMGWW5G =IhEz -----END PGP SIGNATURE----- Merge tag 'ib-asoc-1' of git://git.linaro.org/people/ljones/mfd into asoc-arizona Immutable branch for ASoC, as requested by Mark Brown
This commit is contained in:
commit
16ec790938
@ -71,7 +71,7 @@ static int netlink_send(int s, struct cn_msg *msg)
|
||||
nlh->nlmsg_seq = seq++;
|
||||
nlh->nlmsg_pid = getpid();
|
||||
nlh->nlmsg_type = NLMSG_DONE;
|
||||
nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh));
|
||||
nlh->nlmsg_len = size;
|
||||
nlh->nlmsg_flags = 0;
|
||||
|
||||
m = NLMSG_DATA(nlh);
|
||||
|
139
MAINTAINERS
139
MAINTAINERS
@ -1009,6 +1009,7 @@ ARM/Marvell Armada 370 and Armada XP SOC support
|
||||
M: Jason Cooper <jason@lakedaemon.net>
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
M: Gregory Clement <gregory.clement@free-electrons.com>
|
||||
M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-mvebu/
|
||||
@ -1016,6 +1017,7 @@ F: arch/arm/mach-mvebu/
|
||||
ARM/Marvell Dove/Kirkwood/MV78xx0/Orion SOC support
|
||||
M: Jason Cooper <jason@lakedaemon.net>
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-dove/
|
||||
@ -1148,6 +1150,13 @@ F: drivers/net/ethernet/i825xx/ether1*
|
||||
F: drivers/net/ethernet/seeq/ether3*
|
||||
F: drivers/scsi/arm/
|
||||
|
||||
ARM/Rockchip SoC support
|
||||
M: Heiko Stuebner <heiko@sntech.de>
|
||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||
S: Maintained
|
||||
F: arch/arm/mach-rockchip/
|
||||
F: drivers/*/*rockchip*
|
||||
|
||||
ARM/SHARK MACHINE SUPPORT
|
||||
M: Alexander Schulz <alex@shark-linux.de>
|
||||
W: http://www.shark-linux.de/shark.html
|
||||
@ -1791,6 +1800,7 @@ F: include/net/bluetooth/
|
||||
|
||||
BONDING DRIVER
|
||||
M: Jay Vosburgh <fubar@us.ibm.com>
|
||||
M: Veaceslav Falico <vfalico@redhat.com>
|
||||
M: Andy Gospodarek <andy@greyhouse.net>
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://sourceforge.net/projects/bonding/
|
||||
@ -2718,6 +2728,8 @@ T: git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git
|
||||
DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
|
||||
M: Vinod Koul <vinod.koul@intel.com>
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
L: dmaengine@vger.kernel.org
|
||||
Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
|
||||
S: Supported
|
||||
F: drivers/dma/
|
||||
F: include/linux/dma*
|
||||
@ -2821,7 +2833,7 @@ M: Terje Bergström <tbergstrom@nvidia.com>
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
L: linux-tegra@vger.kernel.org
|
||||
T: git git://anongit.freedesktop.org/tegra/linux.git
|
||||
S: Maintained
|
||||
S: Supported
|
||||
F: drivers/gpu/host1x/
|
||||
F: include/uapi/drm/tegra_drm.h
|
||||
F: Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
|
||||
@ -4357,7 +4369,10 @@ F: arch/x86/kernel/microcode_intel.c
|
||||
|
||||
INTEL I/OAT DMA DRIVER
|
||||
M: Dan Williams <dan.j.williams@intel.com>
|
||||
S: Maintained
|
||||
M: Dave Jiang <dave.jiang@intel.com>
|
||||
L: dmaengine@vger.kernel.org
|
||||
Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
|
||||
S: Supported
|
||||
F: drivers/dma/ioat*
|
||||
|
||||
INTEL IOMMU (VT-d)
|
||||
@ -7822,6 +7837,13 @@ F: Documentation/sound/alsa/soc/
|
||||
F: sound/soc/
|
||||
F: include/sound/soc*
|
||||
|
||||
SOUND - DMAENGINE HELPERS
|
||||
M: Lars-Peter Clausen <lars@metafoo.de>
|
||||
S: Supported
|
||||
F: include/sound/dmaengine_pcm.h
|
||||
F: sound/core/pcm_dmaengine.c
|
||||
F: sound/soc/soc-generic-dmaengine-pcm.c
|
||||
|
||||
SPARC + UltraSPARC (sparc/sparc64)
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
L: sparclinux@vger.kernel.org
|
||||
@ -8294,14 +8316,72 @@ L: linux-media@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/media/rc/ttusbir.c
|
||||
|
||||
TEGRA SUPPORT
|
||||
TEGRA ARCHITECTURE SUPPORT
|
||||
M: Stephen Warren <swarren@wwwdotorg.org>
|
||||
M: Thierry Reding <thierry.reding@gmail.com>
|
||||
L: linux-tegra@vger.kernel.org
|
||||
Q: http://patchwork.ozlabs.org/project/linux-tegra/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
|
||||
S: Supported
|
||||
N: [^a-z]tegra
|
||||
|
||||
TEGRA ASOC DRIVER
|
||||
M: Stephen Warren <swarren@wwwdotorg.org>
|
||||
S: Supported
|
||||
F: sound/soc/tegra/
|
||||
|
||||
TEGRA CLOCK DRIVER
|
||||
M: Peter De Schrijver <pdeschrijver@nvidia.com>
|
||||
M: Prashant Gaikwad <pgaikwad@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/clk/tegra/
|
||||
|
||||
TEGRA DMA DRIVER
|
||||
M: Laxman Dewangan <ldewangan@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/dma/tegra20-apb-dma.c
|
||||
|
||||
TEGRA GPIO DRIVER
|
||||
M: Stephen Warren <swarren@wwwdotorg.org>
|
||||
S: Supported
|
||||
F: drivers/gpio/gpio-tegra.c
|
||||
|
||||
TEGRA I2C DRIVER
|
||||
M: Laxman Dewangan <ldewangan@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/i2c/busses/i2c-tegra.c
|
||||
|
||||
TEGRA IOMMU DRIVERS
|
||||
M: Hiroshi Doyu <hdoyu@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/iommu/tegra*
|
||||
|
||||
TEGRA KBC DRIVER
|
||||
M: Rakesh Iyer <riyer@nvidia.com>
|
||||
M: Laxman Dewangan <ldewangan@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/input/keyboard/tegra-kbc.c
|
||||
|
||||
TEGRA PINCTRL DRIVER
|
||||
M: Stephen Warren <swarren@wwwdotorg.org>
|
||||
S: Supported
|
||||
F: drivers/pinctrl/pinctrl-tegra*
|
||||
|
||||
TEGRA PWM DRIVER
|
||||
M: Thierry Reding <thierry.reding@gmail.com>
|
||||
S: Supported
|
||||
F: drivers/pwm/pwm-tegra.c
|
||||
|
||||
TEGRA SERIAL DRIVER
|
||||
M: Laxman Dewangan <ldewangan@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/tty/serial/serial-tegra.c
|
||||
|
||||
TEGRA SPI DRIVER
|
||||
M: Laxman Dewangan <ldewangan@nvidia.com>
|
||||
S: Supported
|
||||
F: drivers/spi/spi-tegra*
|
||||
|
||||
TEHUTI ETHERNET DRIVER
|
||||
M: Andy Gospodarek <andy@greyhouse.net>
|
||||
L: netdev@vger.kernel.org
|
||||
@ -8837,61 +8917,14 @@ W: http://pegasus2.sourceforge.net/
|
||||
S: Maintained
|
||||
F: drivers/net/usb/rtl8150.c
|
||||
|
||||
USB SERIAL BELKIN F5U103 DRIVER
|
||||
M: William Greathouse <wgreathouse@smva.com>
|
||||
USB SERIAL SUBSYSTEM
|
||||
M: Johan Hovold <jhovold@gmail.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/serial/belkin_sa.*
|
||||
|
||||
USB SERIAL CYPRESS M8 DRIVER
|
||||
M: Lonnie Mendez <dignome@gmail.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://geocities.com/i0xox0i
|
||||
W: http://firstlight.net/cvs
|
||||
F: drivers/usb/serial/cypress_m8.*
|
||||
|
||||
USB SERIAL CYBERJACK DRIVER
|
||||
M: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
|
||||
W: http://www.reiner-sct.de/support/treiber_cyberjack.php
|
||||
S: Maintained
|
||||
F: drivers/usb/serial/cyberjack.c
|
||||
|
||||
USB SERIAL DIGI ACCELEPORT DRIVER
|
||||
M: Peter Berger <pberger@brimson.com>
|
||||
M: Al Borchers <alborchers@steinerpoint.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/serial/digi_acceleport.c
|
||||
|
||||
USB SERIAL DRIVER
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/usb/usb-serial.txt
|
||||
F: drivers/usb/serial/generic.c
|
||||
F: drivers/usb/serial/usb-serial.c
|
||||
F: drivers/usb/serial/
|
||||
F: include/linux/usb/serial.h
|
||||
|
||||
USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER
|
||||
M: Gary Brubaker <xavyer@ix.netcom.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/serial/empeg.c
|
||||
|
||||
USB SERIAL KEYSPAN DRIVER
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
L: linux-usb@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/usb/serial/*keyspan*
|
||||
|
||||
USB SERIAL WHITEHEAT DRIVER
|
||||
M: Support Department <support@connecttech.com>
|
||||
L: linux-usb@vger.kernel.org
|
||||
W: http://www.connecttech.com
|
||||
S: Supported
|
||||
F: drivers/usb/serial/whiteheat*
|
||||
|
||||
USB SMSC75XX ETHERNET DRIVER
|
||||
M: Steve Glendinning <steve.glendinning@shawell.net>
|
||||
L: netdev@vger.kernel.org
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 12
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION =
|
||||
NAME = One Giant Leap for Frogkind
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <asm/pgalloc.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
static int handle_vmalloc_fault(struct mm_struct *mm, unsigned long address)
|
||||
static int handle_vmalloc_fault(unsigned long address)
|
||||
{
|
||||
/*
|
||||
* Synchronize this task's top level page-table
|
||||
@ -27,7 +27,7 @@ static int handle_vmalloc_fault(struct mm_struct *mm, unsigned long address)
|
||||
pud_t *pud, *pud_k;
|
||||
pmd_t *pmd, *pmd_k;
|
||||
|
||||
pgd = pgd_offset_fast(mm, address);
|
||||
pgd = pgd_offset_fast(current->active_mm, address);
|
||||
pgd_k = pgd_offset_k(address);
|
||||
|
||||
if (!pgd_present(*pgd_k))
|
||||
@ -72,7 +72,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address)
|
||||
* nothing more.
|
||||
*/
|
||||
if (address >= VMALLOC_START && address <= VMALLOC_END) {
|
||||
ret = handle_vmalloc_fault(mm, address);
|
||||
ret = handle_vmalloc_fault(address);
|
||||
if (unlikely(ret))
|
||||
goto bad_area_nosemaphore;
|
||||
else
|
||||
|
@ -9,11 +9,6 @@
|
||||
model = "ARM Integrator/CP";
|
||||
compatible = "arm,integrator-cp";
|
||||
|
||||
aliases {
|
||||
arm,timer-primary = &timer2;
|
||||
arm,timer-secondary = &timer1;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "root=/dev/ram0 console=ttyAMA0,38400n8 earlyprintk";
|
||||
};
|
||||
@ -24,14 +19,18 @@
|
||||
};
|
||||
|
||||
timer0: timer@13000000 {
|
||||
/* TIMER0 runs @ 25MHz */
|
||||
compatible = "arm,integrator-cp-timer";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
timer1: timer@13000100 {
|
||||
/* TIMER1 runs @ 1MHz */
|
||||
compatible = "arm,integrator-cp-timer";
|
||||
};
|
||||
|
||||
timer2: timer@13000200 {
|
||||
/* TIMER2 runs @ 1MHz */
|
||||
compatible = "arm,integrator-cp-timer";
|
||||
};
|
||||
|
||||
|
@ -930,4 +930,5 @@ void bpf_jit_free(struct sk_filter *fp)
|
||||
{
|
||||
if (fp->bpf_func != sk_run_filter)
|
||||
module_free(NULL, fp->bpf_func);
|
||||
kfree(fp);
|
||||
}
|
||||
|
@ -971,11 +971,11 @@ static const struct mips_perf_event mipsxx74Kcore_cache_map
|
||||
[C(LL)] = {
|
||||
[C(OP_READ)] = {
|
||||
[C(RESULT_ACCESS)] = { 0x1c, CNTR_ODD, P },
|
||||
[C(RESULT_MISS)] = { 0x1d, CNTR_EVEN | CNTR_ODD, P },
|
||||
[C(RESULT_MISS)] = { 0x1d, CNTR_EVEN, P },
|
||||
},
|
||||
[C(OP_WRITE)] = {
|
||||
[C(RESULT_ACCESS)] = { 0x1c, CNTR_ODD, P },
|
||||
[C(RESULT_MISS)] = { 0x1d, CNTR_EVEN | CNTR_ODD, P },
|
||||
[C(RESULT_MISS)] = { 0x1d, CNTR_EVEN, P },
|
||||
},
|
||||
},
|
||||
[C(ITLB)] = {
|
||||
|
@ -473,7 +473,7 @@ static void __init fill_ipi_map(void)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for (cpu = 0; cpu < NR_CPUS; cpu++) {
|
||||
for (cpu = 0; cpu < nr_cpu_ids; cpu++) {
|
||||
fill_ipi_map1(gic_resched_int_base, cpu, GIC_CPU_INT1);
|
||||
fill_ipi_map1(gic_call_int_base, cpu, GIC_CPU_INT2);
|
||||
}
|
||||
@ -574,8 +574,9 @@ void __init arch_init_irq(void)
|
||||
/* FIXME */
|
||||
int i;
|
||||
#if defined(CONFIG_MIPS_MT_SMP)
|
||||
gic_call_int_base = GIC_NUM_INTRS - NR_CPUS;
|
||||
gic_resched_int_base = gic_call_int_base - NR_CPUS;
|
||||
gic_call_int_base = GIC_NUM_INTRS -
|
||||
(NR_CPUS - nr_cpu_ids) * 2 - nr_cpu_ids;
|
||||
gic_resched_int_base = gic_call_int_base - nr_cpu_ids;
|
||||
fill_ipi_map();
|
||||
#endif
|
||||
gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map,
|
||||
@ -599,7 +600,7 @@ void __init arch_init_irq(void)
|
||||
printk("CPU%d: status register now %08x\n", smp_processor_id(), read_c0_status());
|
||||
write_c0_status(0x1100dc00);
|
||||
printk("CPU%d: status register frc %08x\n", smp_processor_id(), read_c0_status());
|
||||
for (i = 0; i < NR_CPUS; i++) {
|
||||
for (i = 0; i < nr_cpu_ids; i++) {
|
||||
arch_init_ipiirq(MIPS_GIC_IRQ_BASE +
|
||||
GIC_RESCHED_INT(i), &irq_resched);
|
||||
arch_init_ipiirq(MIPS_GIC_IRQ_BASE +
|
||||
|
@ -126,7 +126,7 @@ static int rt_timer_probe(struct platform_device *pdev)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
rt->membase = devm_request_and_ioremap(&pdev->dev, res);
|
||||
rt->membase = devm_ioremap_resource(&pdev->dev, res);
|
||||
if (IS_ERR(rt->membase))
|
||||
return PTR_ERR(rt->membase);
|
||||
|
||||
|
@ -40,6 +40,8 @@ CONFIG_IP_NF_QUEUE=m
|
||||
CONFIG_LLC2=m
|
||||
CONFIG_NET_PKTGEN=m
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_PARPORT=y
|
||||
|
@ -79,6 +79,8 @@ CONFIG_IP_DCCP=m
|
||||
CONFIG_LLC2=m
|
||||
CONFIG_NET_PKTGEN=m
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_BLK_DEV_UMEM=m
|
||||
|
@ -4,6 +4,7 @@ CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODVERSIONS=y
|
||||
@ -27,6 +28,8 @@ CONFIG_IP_PNP_BOOTP=y
|
||||
# CONFIG_INET_LRO is not set
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_PARPORT=y
|
||||
CONFIG_PARPORT_PC=y
|
||||
|
@ -5,6 +5,7 @@ CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_LOG_BUF_SHIFT=16
|
||||
CONFIG_SYSFS_DEPRECATED_V2=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
@ -39,6 +40,8 @@ CONFIG_NETFILTER_DEBUG=y
|
||||
CONFIG_IP_NF_QUEUE=m
|
||||
CONFIG_NET_PKTGEN=m
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_BLK_DEV_UMEM=m
|
||||
|
@ -62,6 +62,8 @@ CONFIG_TIPC=m
|
||||
CONFIG_LLC2=m
|
||||
CONFIG_DNS_RESOLVER=y
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_PARPORT=y
|
||||
CONFIG_PARPORT_PC=y
|
||||
|
@ -49,6 +49,8 @@ CONFIG_INET6_ESP=y
|
||||
CONFIG_INET6_IPCOMP=y
|
||||
CONFIG_LLC2=m
|
||||
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
# CONFIG_STANDALONE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
CONFIG_PARPORT=y
|
||||
|
@ -602,7 +602,6 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long
|
||||
__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(flush_cache_page);
|
||||
|
||||
#ifdef CONFIG_PARISC_TMPALIAS
|
||||
|
||||
|
@ -195,6 +195,8 @@ common_stext:
|
||||
ldw MEM_PDC_HI(%r0),%r6
|
||||
depd %r6, 31, 32, %r3 /* move to upper word */
|
||||
|
||||
mfctl %cr30,%r6 /* PCX-W2 firmware bug */
|
||||
|
||||
ldo PDC_PSW(%r0),%arg0 /* 21 */
|
||||
ldo PDC_PSW_SET_DEFAULTS(%r0),%arg1 /* 2 */
|
||||
ldo PDC_PSW_WIDE_BIT(%r0),%arg2 /* 2 */
|
||||
@ -203,6 +205,8 @@ common_stext:
|
||||
copy %r0,%arg3
|
||||
|
||||
stext_pdc_ret:
|
||||
mtctl %r6,%cr30 /* restore task thread info */
|
||||
|
||||
/* restore rfi target address*/
|
||||
ldd TI_TASK-THREAD_SZ_ALGN(%sp), %r10
|
||||
tophys_r1 %r10
|
||||
|
@ -691,4 +691,5 @@ void bpf_jit_free(struct sk_filter *fp)
|
||||
{
|
||||
if (fp->bpf_func != sk_run_filter)
|
||||
module_free(NULL, fp->bpf_func);
|
||||
kfree(fp);
|
||||
}
|
||||
|
@ -748,7 +748,9 @@ static inline void pgste_set_key(pte_t *ptep, pgste_t pgste, pte_t entry)
|
||||
|
||||
static inline void pgste_set_pte(pte_t *ptep, pte_t entry)
|
||||
{
|
||||
if (!MACHINE_HAS_ESOP && (pte_val(entry) & _PAGE_WRITE)) {
|
||||
if (!MACHINE_HAS_ESOP &&
|
||||
(pte_val(entry) & _PAGE_PRESENT) &&
|
||||
(pte_val(entry) & _PAGE_WRITE)) {
|
||||
/*
|
||||
* Without enhanced suppression-on-protection force
|
||||
* the dirty bit on for all writable ptes.
|
||||
|
@ -71,30 +71,30 @@ static inline void local_tick_enable(unsigned long long comp)
|
||||
|
||||
typedef unsigned long long cycles_t;
|
||||
|
||||
static inline unsigned long long get_tod_clock(void)
|
||||
{
|
||||
unsigned long long clk;
|
||||
|
||||
#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
|
||||
asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc");
|
||||
#else
|
||||
asm volatile("stck %0" : "=Q" (clk) : : "cc");
|
||||
#endif
|
||||
return clk;
|
||||
}
|
||||
|
||||
static inline void get_tod_clock_ext(char *clk)
|
||||
{
|
||||
asm volatile("stcke %0" : "=Q" (*clk) : : "cc");
|
||||
}
|
||||
|
||||
static inline unsigned long long get_tod_clock_xt(void)
|
||||
static inline unsigned long long get_tod_clock(void)
|
||||
{
|
||||
unsigned char clk[16];
|
||||
get_tod_clock_ext(clk);
|
||||
return *((unsigned long long *)&clk[1]);
|
||||
}
|
||||
|
||||
static inline unsigned long long get_tod_clock_fast(void)
|
||||
{
|
||||
#ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES
|
||||
unsigned long long clk;
|
||||
|
||||
asm volatile("stckf %0" : "=Q" (clk) : : "cc");
|
||||
return clk;
|
||||
#else
|
||||
return get_tod_clock();
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline cycles_t get_cycles(void)
|
||||
{
|
||||
return (cycles_t) get_tod_clock() >> 2;
|
||||
@ -125,7 +125,7 @@ extern u64 sched_clock_base_cc;
|
||||
*/
|
||||
static inline unsigned long long get_tod_clock_monotonic(void)
|
||||
{
|
||||
return get_tod_clock_xt() - sched_clock_base_cc;
|
||||
return get_tod_clock() - sched_clock_base_cc;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
return err ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
|
||||
@ -148,7 +148,7 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
return err ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs)
|
||||
|
@ -867,7 +867,7 @@ static inline void
|
||||
debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level,
|
||||
int exception)
|
||||
{
|
||||
active->id.stck = get_tod_clock();
|
||||
active->id.stck = get_tod_clock_fast();
|
||||
active->id.fields.cpuid = smp_processor_id();
|
||||
active->caller = __builtin_return_address(0);
|
||||
active->id.fields.exception = exception;
|
||||
|
@ -385,7 +385,7 @@ static int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu)
|
||||
}
|
||||
|
||||
if ((!rc) && (vcpu->arch.sie_block->ckc <
|
||||
get_tod_clock() + vcpu->arch.sie_block->epoch)) {
|
||||
get_tod_clock_fast() + vcpu->arch.sie_block->epoch)) {
|
||||
if ((!psw_extint_disabled(vcpu)) &&
|
||||
(vcpu->arch.sie_block->gcr[0] & 0x800ul))
|
||||
rc = 1;
|
||||
@ -425,7 +425,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
|
||||
goto no_timer;
|
||||
}
|
||||
|
||||
now = get_tod_clock() + vcpu->arch.sie_block->epoch;
|
||||
now = get_tod_clock_fast() + vcpu->arch.sie_block->epoch;
|
||||
if (vcpu->arch.sie_block->ckc < now) {
|
||||
__unset_cpu_idle(vcpu);
|
||||
return 0;
|
||||
@ -515,7 +515,7 @@ void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu)
|
||||
}
|
||||
|
||||
if ((vcpu->arch.sie_block->ckc <
|
||||
get_tod_clock() + vcpu->arch.sie_block->epoch))
|
||||
get_tod_clock_fast() + vcpu->arch.sie_block->epoch))
|
||||
__try_deliver_ckc_interrupt(vcpu);
|
||||
|
||||
if (atomic_read(&fi->active)) {
|
||||
|
@ -44,7 +44,7 @@ static void __udelay_disabled(unsigned long long usecs)
|
||||
do {
|
||||
set_clock_comparator(end);
|
||||
vtime_stop_cpu();
|
||||
} while (get_tod_clock() < end);
|
||||
} while (get_tod_clock_fast() < end);
|
||||
lockdep_on();
|
||||
__ctl_load(cr0, 0, 0);
|
||||
__ctl_load(cr6, 6, 6);
|
||||
@ -55,7 +55,7 @@ static void __udelay_enabled(unsigned long long usecs)
|
||||
{
|
||||
u64 clock_saved, end;
|
||||
|
||||
end = get_tod_clock() + (usecs << 12);
|
||||
end = get_tod_clock_fast() + (usecs << 12);
|
||||
do {
|
||||
clock_saved = 0;
|
||||
if (end < S390_lowcore.clock_comparator) {
|
||||
@ -65,7 +65,7 @@ static void __udelay_enabled(unsigned long long usecs)
|
||||
vtime_stop_cpu();
|
||||
if (clock_saved)
|
||||
local_tick_enable(clock_saved);
|
||||
} while (get_tod_clock() < end);
|
||||
} while (get_tod_clock_fast() < end);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -109,8 +109,8 @@ void udelay_simple(unsigned long long usecs)
|
||||
{
|
||||
u64 end;
|
||||
|
||||
end = get_tod_clock() + (usecs << 12);
|
||||
while (get_tod_clock() < end)
|
||||
end = get_tod_clock_fast() + (usecs << 12);
|
||||
while (get_tod_clock_fast() < end)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
@ -120,10 +120,10 @@ void __ndelay(unsigned long long nsecs)
|
||||
|
||||
nsecs <<= 9;
|
||||
do_div(nsecs, 125);
|
||||
end = get_tod_clock() + nsecs;
|
||||
end = get_tod_clock_fast() + nsecs;
|
||||
if (nsecs & ~0xfffUL)
|
||||
__udelay(nsecs >> 12);
|
||||
while (get_tod_clock() < end)
|
||||
while (get_tod_clock_fast() < end)
|
||||
barrier();
|
||||
}
|
||||
EXPORT_SYMBOL(__ndelay);
|
||||
|
@ -881,7 +881,9 @@ void bpf_jit_free(struct sk_filter *fp)
|
||||
struct bpf_binary_header *header = (void *)addr;
|
||||
|
||||
if (fp->bpf_func == sk_run_filter)
|
||||
return;
|
||||
goto free_filter;
|
||||
set_memory_rw(addr, header->pages);
|
||||
module_free(NULL, header);
|
||||
free_filter:
|
||||
kfree(fp);
|
||||
}
|
||||
|
@ -808,4 +808,5 @@ void bpf_jit_free(struct sk_filter *fp)
|
||||
{
|
||||
if (fp->bpf_func != sk_run_filter)
|
||||
module_free(NULL, fp->bpf_func);
|
||||
kfree(fp);
|
||||
}
|
||||
|
@ -40,9 +40,11 @@ static ssize_t exitcode_proc_write(struct file *file,
|
||||
const char __user *buffer, size_t count, loff_t *pos)
|
||||
{
|
||||
char *end, buf[sizeof("nnnnn\0")];
|
||||
size_t size;
|
||||
int tmp;
|
||||
|
||||
if (copy_from_user(buf, buffer, count))
|
||||
size = min(count, sizeof(buf));
|
||||
if (copy_from_user(buf, buffer, size))
|
||||
return -EFAULT;
|
||||
|
||||
tmp = simple_strtol(buf, &end, 0);
|
||||
|
@ -128,7 +128,8 @@ do { \
|
||||
do { \
|
||||
typedef typeof(var) pao_T__; \
|
||||
const int pao_ID__ = (__builtin_constant_p(val) && \
|
||||
((val) == 1 || (val) == -1)) ? (val) : 0; \
|
||||
((val) == 1 || (val) == -1)) ? \
|
||||
(int)(val) : 0; \
|
||||
if (0) { \
|
||||
pao_T__ pao_tmp__; \
|
||||
pao_tmp__ = (val); \
|
||||
|
@ -1276,16 +1276,16 @@ void perf_events_lapic_init(void)
|
||||
static int __kprobes
|
||||
perf_event_nmi_handler(unsigned int cmd, struct pt_regs *regs)
|
||||
{
|
||||
int ret;
|
||||
u64 start_clock;
|
||||
u64 finish_clock;
|
||||
int ret;
|
||||
|
||||
if (!atomic_read(&active_events))
|
||||
return NMI_DONE;
|
||||
|
||||
start_clock = local_clock();
|
||||
start_clock = sched_clock();
|
||||
ret = x86_pmu.handle_irq(regs);
|
||||
finish_clock = local_clock();
|
||||
finish_clock = sched_clock();
|
||||
|
||||
perf_sample_event_took(finish_clock - start_clock);
|
||||
|
||||
|
@ -609,7 +609,7 @@ static struct dentry *d_kvm_debug;
|
||||
|
||||
struct dentry *kvm_init_debugfs(void)
|
||||
{
|
||||
d_kvm_debug = debugfs_create_dir("kvm", NULL);
|
||||
d_kvm_debug = debugfs_create_dir("kvm-guest", NULL);
|
||||
if (!d_kvm_debug)
|
||||
printk(KERN_WARNING "Could not create 'kvm' debugfs directory\n");
|
||||
|
||||
|
@ -113,10 +113,10 @@ static int __kprobes nmi_handle(unsigned int type, struct pt_regs *regs, bool b2
|
||||
u64 before, delta, whole_msecs;
|
||||
int remainder_ns, decimal_msecs, thishandled;
|
||||
|
||||
before = local_clock();
|
||||
before = sched_clock();
|
||||
thishandled = a->handler(type, regs);
|
||||
handled += thishandled;
|
||||
delta = local_clock() - before;
|
||||
delta = sched_clock() - before;
|
||||
trace_nmi_handler(a->handler, (int)delta, thishandled);
|
||||
|
||||
if (delta < nmi_longest_ns)
|
||||
|
@ -772,13 +772,21 @@ out:
|
||||
return;
|
||||
}
|
||||
|
||||
static void bpf_jit_free_deferred(struct work_struct *work)
|
||||
{
|
||||
struct sk_filter *fp = container_of(work, struct sk_filter, work);
|
||||
unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
|
||||
struct bpf_binary_header *header = (void *)addr;
|
||||
|
||||
set_memory_rw(addr, header->pages);
|
||||
module_free(NULL, header);
|
||||
kfree(fp);
|
||||
}
|
||||
|
||||
void bpf_jit_free(struct sk_filter *fp)
|
||||
{
|
||||
if (fp->bpf_func != sk_run_filter) {
|
||||
unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
|
||||
struct bpf_binary_header *header = (void *)addr;
|
||||
|
||||
set_memory_rw(addr, header->pages);
|
||||
module_free(NULL, header);
|
||||
INIT_WORK(&fp->work, bpf_jit_free_deferred);
|
||||
schedule_work(&fp->work);
|
||||
}
|
||||
}
|
||||
|
@ -1122,7 +1122,7 @@ ENDPROC(fast_syscall_spill_registers)
|
||||
* a3: exctable, original value in excsave1
|
||||
*/
|
||||
|
||||
fast_syscall_spill_registers_fixup:
|
||||
ENTRY(fast_syscall_spill_registers_fixup)
|
||||
|
||||
rsr a2, windowbase # get current windowbase (a2 is saved)
|
||||
xsr a0, depc # restore depc and a0
|
||||
@ -1134,22 +1134,26 @@ fast_syscall_spill_registers_fixup:
|
||||
*/
|
||||
|
||||
xsr a3, excsave1 # get spill-mask
|
||||
slli a2, a3, 1 # shift left by one
|
||||
slli a3, a3, 1 # shift left by one
|
||||
|
||||
slli a3, a2, 32-WSBITS
|
||||
src a2, a2, a3 # a1 = xxwww1yyxxxwww1yy......
|
||||
slli a2, a3, 32-WSBITS
|
||||
src a2, a3, a2 # a2 = xxwww1yyxxxwww1yy......
|
||||
wsr a2, windowstart # set corrected windowstart
|
||||
|
||||
rsr a3, excsave1
|
||||
l32i a2, a3, EXC_TABLE_DOUBLE_SAVE # restore a2
|
||||
l32i a3, a3, EXC_TABLE_PARAM # original WB (in user task)
|
||||
srli a3, a3, 1
|
||||
rsr a2, excsave1
|
||||
l32i a2, a2, EXC_TABLE_DOUBLE_SAVE # restore a2
|
||||
xsr a2, excsave1
|
||||
s32i a3, a2, EXC_TABLE_DOUBLE_SAVE # save a3
|
||||
l32i a3, a2, EXC_TABLE_PARAM # original WB (in user task)
|
||||
xsr a2, excsave1
|
||||
|
||||
/* Return to the original (user task) WINDOWBASE.
|
||||
* We leave the following frame behind:
|
||||
* a0, a1, a2 same
|
||||
* a3: trashed (saved in excsave_1)
|
||||
* a3: trashed (saved in EXC_TABLE_DOUBLE_SAVE)
|
||||
* depc: depc (we have to return to that address)
|
||||
* excsave_1: a3
|
||||
* excsave_1: exctable
|
||||
*/
|
||||
|
||||
wsr a3, windowbase
|
||||
@ -1159,9 +1163,9 @@ fast_syscall_spill_registers_fixup:
|
||||
* a0: return address
|
||||
* a1: used, stack pointer
|
||||
* a2: kernel stack pointer
|
||||
* a3: available, saved in EXCSAVE_1
|
||||
* a3: available
|
||||
* depc: exception address
|
||||
* excsave: a3
|
||||
* excsave: exctable
|
||||
* Note: This frame might be the same as above.
|
||||
*/
|
||||
|
||||
@ -1181,9 +1185,12 @@ fast_syscall_spill_registers_fixup:
|
||||
rsr a0, exccause
|
||||
addx4 a0, a0, a3 # find entry in table
|
||||
l32i a0, a0, EXC_TABLE_FAST_USER # load handler
|
||||
l32i a3, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
jx a0
|
||||
|
||||
fast_syscall_spill_registers_fixup_return:
|
||||
ENDPROC(fast_syscall_spill_registers_fixup)
|
||||
|
||||
ENTRY(fast_syscall_spill_registers_fixup_return)
|
||||
|
||||
/* When we return here, all registers have been restored (a2: DEPC) */
|
||||
|
||||
@ -1191,13 +1198,13 @@ fast_syscall_spill_registers_fixup_return:
|
||||
|
||||
/* Restore fixup handler. */
|
||||
|
||||
xsr a3, excsave1
|
||||
movi a2, fast_syscall_spill_registers_fixup
|
||||
s32i a2, a3, EXC_TABLE_FIXUP
|
||||
s32i a0, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
rsr a2, windowbase
|
||||
s32i a2, a3, EXC_TABLE_PARAM
|
||||
l32i a2, a3, EXC_TABLE_KSTK
|
||||
rsr a2, excsave1
|
||||
s32i a3, a2, EXC_TABLE_DOUBLE_SAVE
|
||||
movi a3, fast_syscall_spill_registers_fixup
|
||||
s32i a3, a2, EXC_TABLE_FIXUP
|
||||
rsr a3, windowbase
|
||||
s32i a3, a2, EXC_TABLE_PARAM
|
||||
l32i a2, a2, EXC_TABLE_KSTK
|
||||
|
||||
/* Load WB at the time the exception occurred. */
|
||||
|
||||
@ -1206,8 +1213,12 @@ fast_syscall_spill_registers_fixup_return:
|
||||
wsr a3, windowbase
|
||||
rsync
|
||||
|
||||
rsr a3, excsave1
|
||||
l32i a3, a3, EXC_TABLE_DOUBLE_SAVE
|
||||
|
||||
rfde
|
||||
|
||||
ENDPROC(fast_syscall_spill_registers_fixup_return)
|
||||
|
||||
/*
|
||||
* spill all registers.
|
||||
|
@ -341,7 +341,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
|
||||
|
||||
sp = regs->areg[1];
|
||||
|
||||
if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp)) {
|
||||
if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && sas_ss_flags(sp) == 0) {
|
||||
sp = current->sas_ss_sp + current->sas_ss_size;
|
||||
}
|
||||
|
||||
|
@ -737,7 +737,8 @@ static int __init iss_net_setup(char *str)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((new = alloc_bootmem(sizeof new)) == NULL) {
|
||||
new = alloc_bootmem(sizeof(*new));
|
||||
if (new == NULL) {
|
||||
printk("Alloc_bootmem failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
@ -1343,7 +1343,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
|
||||
host->flags |= ATA_HOST_PARALLEL_SCAN;
|
||||
else
|
||||
printk(KERN_INFO "ahci: SSS flag set, parallel bus scan disabled\n");
|
||||
dev_info(&pdev->dev, "SSS flag set, parallel bus scan disabled\n");
|
||||
|
||||
if (pi.flags & ATA_FLAG_EM)
|
||||
ahci_reset_em(host);
|
||||
|
@ -184,7 +184,7 @@ static int ahci_probe(struct platform_device *pdev)
|
||||
if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
|
||||
host->flags |= ATA_HOST_PARALLEL_SCAN;
|
||||
else
|
||||
printk(KERN_INFO "ahci: SSS flag set, parallel bus scan disabled\n");
|
||||
dev_info(dev, "SSS flag set, parallel bus scan disabled\n");
|
||||
|
||||
if (pi.flags & ATA_FLAG_EM)
|
||||
ahci_reset_em(host);
|
||||
|
@ -778,8 +778,16 @@ static void ahci_start_port(struct ata_port *ap)
|
||||
rc = ap->ops->transmit_led_message(ap,
|
||||
emp->led_state,
|
||||
4);
|
||||
/*
|
||||
* If busy, give a breather but do not
|
||||
* release EH ownership by using msleep()
|
||||
* instead of ata_msleep(). EM Transmit
|
||||
* bit is busy for the whole host and
|
||||
* releasing ownership will cause other
|
||||
* ports to fail the same way.
|
||||
*/
|
||||
if (rc == -EBUSY)
|
||||
ata_msleep(ap, 1);
|
||||
msleep(1);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
@ -1322,14 +1322,14 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
|
||||
* should be retried. To be used from EH.
|
||||
*
|
||||
* SCSI midlayer limits the number of retries to scmd->allowed.
|
||||
* scmd->retries is decremented for commands which get retried
|
||||
* scmd->allowed is incremented for commands which get retried
|
||||
* due to unrelated failures (qc->err_mask is zero).
|
||||
*/
|
||||
void ata_eh_qc_retry(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct scsi_cmnd *scmd = qc->scsicmd;
|
||||
if (!qc->err_mask && scmd->retries)
|
||||
scmd->retries--;
|
||||
if (!qc->err_mask)
|
||||
scmd->allowed++;
|
||||
__ata_eh_qc_complete(qc);
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
|
||||
|
||||
ap->ioaddr.cmd_addr = cmd_addr;
|
||||
|
||||
if (pnp_port_valid(idev, 1) == 0) {
|
||||
if (pnp_port_valid(idev, 1)) {
|
||||
ctl_addr = devm_ioport_map(&idev->dev,
|
||||
pnp_port_start(idev, 1), 1);
|
||||
ap->ioaddr.altstatus_addr = ctl_addr;
|
||||
|
@ -27,6 +27,14 @@
|
||||
*/
|
||||
|
||||
#define SRC_CR 0x00U
|
||||
#define SRC_CR_T0_ENSEL BIT(15)
|
||||
#define SRC_CR_T1_ENSEL BIT(17)
|
||||
#define SRC_CR_T2_ENSEL BIT(19)
|
||||
#define SRC_CR_T3_ENSEL BIT(21)
|
||||
#define SRC_CR_T4_ENSEL BIT(23)
|
||||
#define SRC_CR_T5_ENSEL BIT(25)
|
||||
#define SRC_CR_T6_ENSEL BIT(27)
|
||||
#define SRC_CR_T7_ENSEL BIT(29)
|
||||
#define SRC_XTALCR 0x0CU
|
||||
#define SRC_XTALCR_XTALTIMEN BIT(20)
|
||||
#define SRC_XTALCR_SXTALDIS BIT(19)
|
||||
@ -543,6 +551,19 @@ void __init nomadik_clk_init(void)
|
||||
__func__, np->name);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Set all timers to use the 2.4 MHz TIMCLK */
|
||||
val = readl(src_base + SRC_CR);
|
||||
val |= SRC_CR_T0_ENSEL;
|
||||
val |= SRC_CR_T1_ENSEL;
|
||||
val |= SRC_CR_T2_ENSEL;
|
||||
val |= SRC_CR_T3_ENSEL;
|
||||
val |= SRC_CR_T4_ENSEL;
|
||||
val |= SRC_CR_T5_ENSEL;
|
||||
val |= SRC_CR_T6_ENSEL;
|
||||
val |= SRC_CR_T7_ENSEL;
|
||||
writel(val, src_base + SRC_CR);
|
||||
|
||||
val = readl(src_base + SRC_XTALCR);
|
||||
pr_info("SXTALO is %s\n",
|
||||
(val & SRC_XTALCR_SXTALDIS) ? "disabled" : "enabled");
|
||||
|
@ -39,8 +39,8 @@ static const struct coreclk_ratio a370_coreclk_ratios[] __initconst = {
|
||||
};
|
||||
|
||||
static const u32 a370_tclk_freqs[] __initconst = {
|
||||
16600000,
|
||||
20000000,
|
||||
166000000,
|
||||
200000000,
|
||||
};
|
||||
|
||||
static u32 __init a370_get_tclk_freq(void __iomem *sar)
|
||||
|
@ -49,7 +49,7 @@
|
||||
#define SOCFPGA_L4_SP_CLK "l4_sp_clk"
|
||||
#define SOCFPGA_NAND_CLK "nand_clk"
|
||||
#define SOCFPGA_NAND_X_CLK "nand_x_clk"
|
||||
#define SOCFPGA_MMC_CLK "mmc_clk"
|
||||
#define SOCFPGA_MMC_CLK "sdmmc_clk"
|
||||
#define SOCFPGA_DB_CLK "gpio_db_clk"
|
||||
|
||||
#define div_mask(width) ((1 << (width)) - 1)
|
||||
|
@ -107,7 +107,7 @@ static int icst_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
||||
vco = icst_hz_to_vco(icst->params, rate);
|
||||
icst->rate = icst_hz(icst->params, vco);
|
||||
vco_set(icst->vcoreg, icst->lockreg, vco);
|
||||
vco_set(icst->lockreg, icst->vcoreg, vco);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,7 @@ void proc_fork_connector(struct task_struct *task)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -80,6 +81,7 @@ void proc_fork_connector(struct task_struct *task)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
/* If cn_netlink_send() failed, the data is not sent */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
@ -96,6 +98,7 @@ void proc_exec_connector(struct task_struct *task)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -106,6 +109,7 @@ void proc_exec_connector(struct task_struct *task)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -122,6 +126,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
ev->what = which_id;
|
||||
ev->event_data.id.process_pid = task->pid;
|
||||
ev->event_data.id.process_tgid = task->tgid;
|
||||
@ -145,6 +150,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -160,6 +166,7 @@ void proc_sid_connector(struct task_struct *task)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -170,6 +177,7 @@ void proc_sid_connector(struct task_struct *task)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -185,6 +193,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -203,6 +212,7 @@ void proc_ptrace_connector(struct task_struct *task, int ptrace_id)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -218,6 +228,7 @@ void proc_comm_connector(struct task_struct *task)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -229,6 +240,7 @@ void proc_comm_connector(struct task_struct *task)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -244,6 +256,7 @@ void proc_coredump_connector(struct task_struct *task)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -254,6 +267,7 @@ void proc_coredump_connector(struct task_struct *task)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -269,6 +283,7 @@ void proc_exit_connector(struct task_struct *task)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
get_seq(&msg->seq, &ev->cpu);
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -281,6 +296,7 @@ void proc_exit_connector(struct task_struct *task)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = 0; /* not used */
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
@ -304,6 +320,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
|
||||
|
||||
msg = (struct cn_msg *)buffer;
|
||||
ev = (struct proc_event *)msg->data;
|
||||
memset(&ev->event_data, 0, sizeof(ev->event_data));
|
||||
msg->seq = rcvd_seq;
|
||||
ktime_get_ts(&ts); /* get high res monotonic timestamp */
|
||||
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
|
||||
@ -313,6 +330,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
|
||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||
msg->ack = rcvd_ack + 1;
|
||||
msg->len = sizeof(*ev);
|
||||
msg->flags = 0; /* not used */
|
||||
cn_netlink_send(msg, CN_IDX_PROC, GFP_KERNEL);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask)
|
||||
|
||||
data = nlmsg_data(nlh);
|
||||
|
||||
memcpy(data, msg, sizeof(*data) + msg->len);
|
||||
memcpy(data, msg, size);
|
||||
|
||||
NETLINK_CB(skb).dst_group = group;
|
||||
|
||||
@ -157,17 +157,18 @@ static int cn_call_callback(struct sk_buff *skb)
|
||||
static void cn_rx_skb(struct sk_buff *__skb)
|
||||
{
|
||||
struct nlmsghdr *nlh;
|
||||
int err;
|
||||
struct sk_buff *skb;
|
||||
int len, err;
|
||||
|
||||
skb = skb_get(__skb);
|
||||
|
||||
if (skb->len >= NLMSG_HDRLEN) {
|
||||
nlh = nlmsg_hdr(skb);
|
||||
len = nlmsg_len(nlh);
|
||||
|
||||
if (nlh->nlmsg_len < sizeof(struct cn_msg) ||
|
||||
if (len < (int)sizeof(struct cn_msg) ||
|
||||
skb->len < nlh->nlmsg_len ||
|
||||
nlh->nlmsg_len > CONNECTOR_MAX_MSG_SIZE) {
|
||||
len > CONNECTOR_MAX_MSG_SIZE) {
|
||||
kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
|
@ -986,12 +986,12 @@ static int __init acpi_cpufreq_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (acpi_disabled)
|
||||
return -ENODEV;
|
||||
|
||||
/* don't keep reloading if cpufreq_driver exists */
|
||||
if (cpufreq_get_current_driver())
|
||||
return 0;
|
||||
|
||||
if (acpi_disabled)
|
||||
return 0;
|
||||
return -EEXIST;
|
||||
|
||||
pr_debug("acpi_cpufreq_init\n");
|
||||
|
||||
|
@ -48,7 +48,7 @@ static inline int32_t div_fp(int32_t x, int32_t y)
|
||||
}
|
||||
|
||||
struct sample {
|
||||
int core_pct_busy;
|
||||
int32_t core_pct_busy;
|
||||
u64 aperf;
|
||||
u64 mperf;
|
||||
int freq;
|
||||
@ -68,7 +68,7 @@ struct _pid {
|
||||
int32_t i_gain;
|
||||
int32_t d_gain;
|
||||
int deadband;
|
||||
int last_err;
|
||||
int32_t last_err;
|
||||
};
|
||||
|
||||
struct cpudata {
|
||||
@ -153,16 +153,15 @@ static inline void pid_d_gain_set(struct _pid *pid, int percent)
|
||||
pid->d_gain = div_fp(int_tofp(percent), int_tofp(100));
|
||||
}
|
||||
|
||||
static signed int pid_calc(struct _pid *pid, int busy)
|
||||
static signed int pid_calc(struct _pid *pid, int32_t busy)
|
||||
{
|
||||
signed int err, result;
|
||||
signed int result;
|
||||
int32_t pterm, dterm, fp_error;
|
||||
int32_t integral_limit;
|
||||
|
||||
err = pid->setpoint - busy;
|
||||
fp_error = int_tofp(err);
|
||||
fp_error = int_tofp(pid->setpoint) - busy;
|
||||
|
||||
if (abs(err) <= pid->deadband)
|
||||
if (abs(fp_error) <= int_tofp(pid->deadband))
|
||||
return 0;
|
||||
|
||||
pterm = mul_fp(pid->p_gain, fp_error);
|
||||
@ -176,8 +175,8 @@ static signed int pid_calc(struct _pid *pid, int busy)
|
||||
if (pid->integral < -integral_limit)
|
||||
pid->integral = -integral_limit;
|
||||
|
||||
dterm = mul_fp(pid->d_gain, (err - pid->last_err));
|
||||
pid->last_err = err;
|
||||
dterm = mul_fp(pid->d_gain, fp_error - pid->last_err);
|
||||
pid->last_err = fp_error;
|
||||
|
||||
result = pterm + mul_fp(pid->integral, pid->i_gain) + dterm;
|
||||
|
||||
@ -367,12 +366,13 @@ static int intel_pstate_turbo_pstate(void)
|
||||
static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max)
|
||||
{
|
||||
int max_perf = cpu->pstate.turbo_pstate;
|
||||
int max_perf_adj;
|
||||
int min_perf;
|
||||
if (limits.no_turbo)
|
||||
max_perf = cpu->pstate.max_pstate;
|
||||
|
||||
max_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf));
|
||||
*max = clamp_t(int, max_perf,
|
||||
max_perf_adj = fp_toint(mul_fp(int_tofp(max_perf), limits.max_perf));
|
||||
*max = clamp_t(int, max_perf_adj,
|
||||
cpu->pstate.min_pstate, cpu->pstate.turbo_pstate);
|
||||
|
||||
min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf));
|
||||
@ -436,8 +436,9 @@ static inline void intel_pstate_calc_busy(struct cpudata *cpu,
|
||||
struct sample *sample)
|
||||
{
|
||||
u64 core_pct;
|
||||
core_pct = div64_u64(sample->aperf * 100, sample->mperf);
|
||||
sample->freq = cpu->pstate.max_pstate * core_pct * 1000;
|
||||
core_pct = div64_u64(int_tofp(sample->aperf * 100),
|
||||
sample->mperf);
|
||||
sample->freq = fp_toint(cpu->pstate.max_pstate * core_pct * 1000);
|
||||
|
||||
sample->core_pct_busy = core_pct;
|
||||
}
|
||||
@ -469,22 +470,19 @@ static inline void intel_pstate_set_sample_time(struct cpudata *cpu)
|
||||
mod_timer_pinned(&cpu->timer, jiffies + delay);
|
||||
}
|
||||
|
||||
static inline int intel_pstate_get_scaled_busy(struct cpudata *cpu)
|
||||
static inline int32_t intel_pstate_get_scaled_busy(struct cpudata *cpu)
|
||||
{
|
||||
int32_t busy_scaled;
|
||||
int32_t core_busy, max_pstate, current_pstate;
|
||||
|
||||
core_busy = int_tofp(cpu->samples[cpu->sample_ptr].core_pct_busy);
|
||||
core_busy = cpu->samples[cpu->sample_ptr].core_pct_busy;
|
||||
max_pstate = int_tofp(cpu->pstate.max_pstate);
|
||||
current_pstate = int_tofp(cpu->pstate.current_pstate);
|
||||
busy_scaled = mul_fp(core_busy, div_fp(max_pstate, current_pstate));
|
||||
|
||||
return fp_toint(busy_scaled);
|
||||
return mul_fp(core_busy, div_fp(max_pstate, current_pstate));
|
||||
}
|
||||
|
||||
static inline void intel_pstate_adjust_busy_pstate(struct cpudata *cpu)
|
||||
{
|
||||
int busy_scaled;
|
||||
int32_t busy_scaled;
|
||||
struct _pid *pid;
|
||||
signed int ctl = 0;
|
||||
int steps;
|
||||
|
@ -305,6 +305,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
|
||||
edma_alloc_slot(EDMA_CTLR(echan->ch_num),
|
||||
EDMA_SLOT_ANY);
|
||||
if (echan->slot[i] < 0) {
|
||||
kfree(edesc);
|
||||
dev_err(dev, "Failed to allocate slot\n");
|
||||
kfree(edesc);
|
||||
return NULL;
|
||||
@ -346,6 +347,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg(
|
||||
ccnt = sg_dma_len(sg) / (acnt * bcnt);
|
||||
if (ccnt > (SZ_64K - 1)) {
|
||||
dev_err(dev, "Exceeded max SG segment size\n");
|
||||
kfree(edesc);
|
||||
return NULL;
|
||||
}
|
||||
cidx = acnt * bcnt;
|
||||
|
@ -61,7 +61,7 @@ static int drm_version(struct drm_device *dev, void *data,
|
||||
|
||||
/** Ioctl table */
|
||||
static const struct drm_ioctl_desc drm_ioctls[] = {
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED|DRM_RENDER_ALLOW),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_GET_MAGIC, drm_getmagic, 0),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_IRQ_BUSID, drm_irq_by_busid, DRM_MASTER|DRM_ROOT_ONLY),
|
||||
@ -402,9 +402,16 @@ long drm_ioctl(struct file *filp,
|
||||
cmd = ioctl->cmd_drv;
|
||||
}
|
||||
else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) {
|
||||
u32 drv_size;
|
||||
|
||||
ioctl = &drm_ioctls[nr];
|
||||
cmd = ioctl->cmd;
|
||||
|
||||
drv_size = _IOC_SIZE(ioctl->cmd);
|
||||
usize = asize = _IOC_SIZE(cmd);
|
||||
if (drv_size > asize)
|
||||
asize = drv_size;
|
||||
|
||||
cmd = ioctl->cmd;
|
||||
} else
|
||||
goto err_i1;
|
||||
|
||||
|
@ -505,6 +505,8 @@ static int i915_drm_freeze(struct drm_device *dev)
|
||||
intel_modeset_suspend_hw(dev);
|
||||
}
|
||||
|
||||
i915_gem_suspend_gtt_mappings(dev);
|
||||
|
||||
i915_save_state(dev);
|
||||
|
||||
intel_opregion_fini(dev);
|
||||
@ -648,7 +650,8 @@ static int i915_drm_thaw(struct drm_device *dev)
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
i915_gem_restore_gtt_mappings(dev);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
}
|
||||
} else if (drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
i915_check_and_clear_faults(dev);
|
||||
|
||||
__i915_drm_thaw(dev);
|
||||
|
||||
|
@ -497,10 +497,12 @@ struct i915_address_space {
|
||||
|
||||
/* FIXME: Need a more generic return type */
|
||||
gen6_gtt_pte_t (*pte_encode)(dma_addr_t addr,
|
||||
enum i915_cache_level level);
|
||||
enum i915_cache_level level,
|
||||
bool valid); /* Create a valid PTE */
|
||||
void (*clear_range)(struct i915_address_space *vm,
|
||||
unsigned int first_entry,
|
||||
unsigned int num_entries);
|
||||
unsigned int num_entries,
|
||||
bool use_scratch);
|
||||
void (*insert_entries)(struct i915_address_space *vm,
|
||||
struct sg_table *st,
|
||||
unsigned int first_entry,
|
||||
@ -2065,6 +2067,8 @@ void i915_ppgtt_bind_object(struct i915_hw_ppgtt *ppgtt,
|
||||
void i915_ppgtt_unbind_object(struct i915_hw_ppgtt *ppgtt,
|
||||
struct drm_i915_gem_object *obj);
|
||||
|
||||
void i915_check_and_clear_faults(struct drm_device *dev);
|
||||
void i915_gem_suspend_gtt_mappings(struct drm_device *dev);
|
||||
void i915_gem_restore_gtt_mappings(struct drm_device *dev);
|
||||
int __must_check i915_gem_gtt_prepare_object(struct drm_i915_gem_object *obj);
|
||||
void i915_gem_gtt_bind_object(struct drm_i915_gem_object *obj,
|
||||
|
@ -58,9 +58,10 @@
|
||||
#define HSW_WT_ELLC_LLC_AGE0 HSW_CACHEABILITY_CONTROL(0x6)
|
||||
|
||||
static gen6_gtt_pte_t snb_pte_encode(dma_addr_t addr,
|
||||
enum i915_cache_level level)
|
||||
enum i915_cache_level level,
|
||||
bool valid)
|
||||
{
|
||||
gen6_gtt_pte_t pte = GEN6_PTE_VALID;
|
||||
gen6_gtt_pte_t pte = valid ? GEN6_PTE_VALID : 0;
|
||||
pte |= GEN6_PTE_ADDR_ENCODE(addr);
|
||||
|
||||
switch (level) {
|
||||
@ -79,9 +80,10 @@ static gen6_gtt_pte_t snb_pte_encode(dma_addr_t addr,
|
||||
}
|
||||
|
||||
static gen6_gtt_pte_t ivb_pte_encode(dma_addr_t addr,
|
||||
enum i915_cache_level level)
|
||||
enum i915_cache_level level,
|
||||
bool valid)
|
||||
{
|
||||
gen6_gtt_pte_t pte = GEN6_PTE_VALID;
|
||||
gen6_gtt_pte_t pte = valid ? GEN6_PTE_VALID : 0;
|
||||
pte |= GEN6_PTE_ADDR_ENCODE(addr);
|
||||
|
||||
switch (level) {
|
||||
@ -105,9 +107,10 @@ static gen6_gtt_pte_t ivb_pte_encode(dma_addr_t addr,
|
||||
#define BYT_PTE_SNOOPED_BY_CPU_CACHES (1 << 2)
|
||||
|
||||
static gen6_gtt_pte_t byt_pte_encode(dma_addr_t addr,
|
||||
enum i915_cache_level level)
|
||||
enum i915_cache_level level,
|
||||
bool valid)
|
||||
{
|
||||
gen6_gtt_pte_t pte = GEN6_PTE_VALID;
|
||||
gen6_gtt_pte_t pte = valid ? GEN6_PTE_VALID : 0;
|
||||
pte |= GEN6_PTE_ADDR_ENCODE(addr);
|
||||
|
||||
/* Mark the page as writeable. Other platforms don't have a
|
||||
@ -122,9 +125,10 @@ static gen6_gtt_pte_t byt_pte_encode(dma_addr_t addr,
|
||||
}
|
||||
|
||||
static gen6_gtt_pte_t hsw_pte_encode(dma_addr_t addr,
|
||||
enum i915_cache_level level)
|
||||
enum i915_cache_level level,
|
||||
bool valid)
|
||||
{
|
||||
gen6_gtt_pte_t pte = GEN6_PTE_VALID;
|
||||
gen6_gtt_pte_t pte = valid ? GEN6_PTE_VALID : 0;
|
||||
pte |= HSW_PTE_ADDR_ENCODE(addr);
|
||||
|
||||
if (level != I915_CACHE_NONE)
|
||||
@ -134,9 +138,10 @@ static gen6_gtt_pte_t hsw_pte_encode(dma_addr_t addr,
|
||||
}
|
||||
|
||||
static gen6_gtt_pte_t iris_pte_encode(dma_addr_t addr,
|
||||
enum i915_cache_level level)
|
||||
enum i915_cache_level level,
|
||||
bool valid)
|
||||
{
|
||||
gen6_gtt_pte_t pte = GEN6_PTE_VALID;
|
||||
gen6_gtt_pte_t pte = valid ? GEN6_PTE_VALID : 0;
|
||||
pte |= HSW_PTE_ADDR_ENCODE(addr);
|
||||
|
||||
switch (level) {
|
||||
@ -236,7 +241,8 @@ static int gen6_ppgtt_enable(struct drm_device *dev)
|
||||
/* PPGTT support for Sandybdrige/Gen6 and later */
|
||||
static void gen6_ppgtt_clear_range(struct i915_address_space *vm,
|
||||
unsigned first_entry,
|
||||
unsigned num_entries)
|
||||
unsigned num_entries,
|
||||
bool use_scratch)
|
||||
{
|
||||
struct i915_hw_ppgtt *ppgtt =
|
||||
container_of(vm, struct i915_hw_ppgtt, base);
|
||||
@ -245,7 +251,7 @@ static void gen6_ppgtt_clear_range(struct i915_address_space *vm,
|
||||
unsigned first_pte = first_entry % I915_PPGTT_PT_ENTRIES;
|
||||
unsigned last_pte, i;
|
||||
|
||||
scratch_pte = vm->pte_encode(vm->scratch.addr, I915_CACHE_LLC);
|
||||
scratch_pte = vm->pte_encode(vm->scratch.addr, I915_CACHE_LLC, true);
|
||||
|
||||
while (num_entries) {
|
||||
last_pte = first_pte + num_entries;
|
||||
@ -282,7 +288,7 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm,
|
||||
dma_addr_t page_addr;
|
||||
|
||||
page_addr = sg_page_iter_dma_address(&sg_iter);
|
||||
pt_vaddr[act_pte] = vm->pte_encode(page_addr, cache_level);
|
||||
pt_vaddr[act_pte] = vm->pte_encode(page_addr, cache_level, true);
|
||||
if (++act_pte == I915_PPGTT_PT_ENTRIES) {
|
||||
kunmap_atomic(pt_vaddr);
|
||||
act_pt++;
|
||||
@ -367,7 +373,7 @@ static int gen6_ppgtt_init(struct i915_hw_ppgtt *ppgtt)
|
||||
}
|
||||
|
||||
ppgtt->base.clear_range(&ppgtt->base, 0,
|
||||
ppgtt->num_pd_entries * I915_PPGTT_PT_ENTRIES);
|
||||
ppgtt->num_pd_entries * I915_PPGTT_PT_ENTRIES, true);
|
||||
|
||||
ppgtt->pd_offset = first_pd_entry_in_global_pt * sizeof(gen6_gtt_pte_t);
|
||||
|
||||
@ -444,7 +450,8 @@ void i915_ppgtt_unbind_object(struct i915_hw_ppgtt *ppgtt,
|
||||
{
|
||||
ppgtt->base.clear_range(&ppgtt->base,
|
||||
i915_gem_obj_ggtt_offset(obj) >> PAGE_SHIFT,
|
||||
obj->base.size >> PAGE_SHIFT);
|
||||
obj->base.size >> PAGE_SHIFT,
|
||||
true);
|
||||
}
|
||||
|
||||
extern int intel_iommu_gfx_mapped;
|
||||
@ -485,15 +492,65 @@ static void undo_idling(struct drm_i915_private *dev_priv, bool interruptible)
|
||||
dev_priv->mm.interruptible = interruptible;
|
||||
}
|
||||
|
||||
void i915_check_and_clear_faults(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct intel_ring_buffer *ring;
|
||||
int i;
|
||||
|
||||
if (INTEL_INFO(dev)->gen < 6)
|
||||
return;
|
||||
|
||||
for_each_ring(ring, dev_priv, i) {
|
||||
u32 fault_reg;
|
||||
fault_reg = I915_READ(RING_FAULT_REG(ring));
|
||||
if (fault_reg & RING_FAULT_VALID) {
|
||||
DRM_DEBUG_DRIVER("Unexpected fault\n"
|
||||
"\tAddr: 0x%08lx\\n"
|
||||
"\tAddress space: %s\n"
|
||||
"\tSource ID: %d\n"
|
||||
"\tType: %d\n",
|
||||
fault_reg & PAGE_MASK,
|
||||
fault_reg & RING_FAULT_GTTSEL_MASK ? "GGTT" : "PPGTT",
|
||||
RING_FAULT_SRCID(fault_reg),
|
||||
RING_FAULT_FAULT_TYPE(fault_reg));
|
||||
I915_WRITE(RING_FAULT_REG(ring),
|
||||
fault_reg & ~RING_FAULT_VALID);
|
||||
}
|
||||
}
|
||||
POSTING_READ(RING_FAULT_REG(&dev_priv->ring[RCS]));
|
||||
}
|
||||
|
||||
void i915_gem_suspend_gtt_mappings(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
/* Don't bother messing with faults pre GEN6 as we have little
|
||||
* documentation supporting that it's a good idea.
|
||||
*/
|
||||
if (INTEL_INFO(dev)->gen < 6)
|
||||
return;
|
||||
|
||||
i915_check_and_clear_faults(dev);
|
||||
|
||||
dev_priv->gtt.base.clear_range(&dev_priv->gtt.base,
|
||||
dev_priv->gtt.base.start / PAGE_SIZE,
|
||||
dev_priv->gtt.base.total / PAGE_SIZE,
|
||||
false);
|
||||
}
|
||||
|
||||
void i915_gem_restore_gtt_mappings(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct drm_i915_gem_object *obj;
|
||||
|
||||
i915_check_and_clear_faults(dev);
|
||||
|
||||
/* First fill our portion of the GTT with scratch pages */
|
||||
dev_priv->gtt.base.clear_range(&dev_priv->gtt.base,
|
||||
dev_priv->gtt.base.start / PAGE_SIZE,
|
||||
dev_priv->gtt.base.total / PAGE_SIZE);
|
||||
dev_priv->gtt.base.total / PAGE_SIZE,
|
||||
true);
|
||||
|
||||
list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
|
||||
i915_gem_clflush_object(obj, obj->pin_display);
|
||||
@ -536,7 +593,7 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm,
|
||||
|
||||
for_each_sg_page(st->sgl, &sg_iter, st->nents, 0) {
|
||||
addr = sg_page_iter_dma_address(&sg_iter);
|
||||
iowrite32(vm->pte_encode(addr, level), >t_entries[i]);
|
||||
iowrite32(vm->pte_encode(addr, level, true), >t_entries[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
@ -548,7 +605,7 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm,
|
||||
*/
|
||||
if (i != 0)
|
||||
WARN_ON(readl(>t_entries[i-1]) !=
|
||||
vm->pte_encode(addr, level));
|
||||
vm->pte_encode(addr, level, true));
|
||||
|
||||
/* This next bit makes the above posting read even more important. We
|
||||
* want to flush the TLBs only after we're certain all the PTE updates
|
||||
@ -560,7 +617,8 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm,
|
||||
|
||||
static void gen6_ggtt_clear_range(struct i915_address_space *vm,
|
||||
unsigned int first_entry,
|
||||
unsigned int num_entries)
|
||||
unsigned int num_entries,
|
||||
bool use_scratch)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = vm->dev->dev_private;
|
||||
gen6_gtt_pte_t scratch_pte, __iomem *gtt_base =
|
||||
@ -573,7 +631,8 @@ static void gen6_ggtt_clear_range(struct i915_address_space *vm,
|
||||
first_entry, num_entries, max_entries))
|
||||
num_entries = max_entries;
|
||||
|
||||
scratch_pte = vm->pte_encode(vm->scratch.addr, I915_CACHE_LLC);
|
||||
scratch_pte = vm->pte_encode(vm->scratch.addr, I915_CACHE_LLC, use_scratch);
|
||||
|
||||
for (i = 0; i < num_entries; i++)
|
||||
iowrite32(scratch_pte, >t_base[i]);
|
||||
readl(gtt_base);
|
||||
@ -594,7 +653,8 @@ static void i915_ggtt_insert_entries(struct i915_address_space *vm,
|
||||
|
||||
static void i915_ggtt_clear_range(struct i915_address_space *vm,
|
||||
unsigned int first_entry,
|
||||
unsigned int num_entries)
|
||||
unsigned int num_entries,
|
||||
bool unused)
|
||||
{
|
||||
intel_gtt_clear_range(first_entry, num_entries);
|
||||
}
|
||||
@ -622,7 +682,8 @@ void i915_gem_gtt_unbind_object(struct drm_i915_gem_object *obj)
|
||||
|
||||
dev_priv->gtt.base.clear_range(&dev_priv->gtt.base,
|
||||
entry,
|
||||
obj->base.size >> PAGE_SHIFT);
|
||||
obj->base.size >> PAGE_SHIFT,
|
||||
true);
|
||||
|
||||
obj->has_global_gtt_mapping = 0;
|
||||
}
|
||||
@ -709,11 +770,11 @@ void i915_gem_setup_global_gtt(struct drm_device *dev,
|
||||
const unsigned long count = (hole_end - hole_start) / PAGE_SIZE;
|
||||
DRM_DEBUG_KMS("clearing unused GTT space: [%lx, %lx]\n",
|
||||
hole_start, hole_end);
|
||||
ggtt_vm->clear_range(ggtt_vm, hole_start / PAGE_SIZE, count);
|
||||
ggtt_vm->clear_range(ggtt_vm, hole_start / PAGE_SIZE, count, true);
|
||||
}
|
||||
|
||||
/* And finally clear the reserved guard page */
|
||||
ggtt_vm->clear_range(ggtt_vm, end / PAGE_SIZE - 1, 1);
|
||||
ggtt_vm->clear_range(ggtt_vm, end / PAGE_SIZE - 1, 1, true);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -604,6 +604,10 @@
|
||||
#define ARB_MODE_SWIZZLE_IVB (1<<5)
|
||||
#define RENDER_HWS_PGA_GEN7 (0x04080)
|
||||
#define RING_FAULT_REG(ring) (0x4094 + 0x100*(ring)->id)
|
||||
#define RING_FAULT_GTTSEL_MASK (1<<11)
|
||||
#define RING_FAULT_SRCID(x) ((x >> 3) & 0xff)
|
||||
#define RING_FAULT_FAULT_TYPE(x) ((x >> 1) & 0x3)
|
||||
#define RING_FAULT_VALID (1<<0)
|
||||
#define DONE_REG 0x40b0
|
||||
#define BSD_HWS_PGA_GEN7 (0x04180)
|
||||
#define BLT_HWS_PGA_GEN7 (0x04280)
|
||||
@ -4279,7 +4283,9 @@
|
||||
#define FDI_RX_CHICKEN(pipe) _PIPE(pipe, _FDI_RXA_CHICKEN, _FDI_RXB_CHICKEN)
|
||||
|
||||
#define SOUTH_DSPCLK_GATE_D 0xc2020
|
||||
#define PCH_DPLUNIT_CLOCK_GATE_DISABLE (1<<30)
|
||||
#define PCH_DPLSUNIT_CLOCK_GATE_DISABLE (1<<29)
|
||||
#define PCH_CPUNIT_CLOCK_GATE_DISABLE (1<<14)
|
||||
#define PCH_LP_PARTITION_LEVEL_DISABLE (1<<12)
|
||||
|
||||
/* CPU: FDI_TX */
|
||||
|
@ -83,8 +83,7 @@ static bool intel_crt_get_hw_state(struct intel_encoder *encoder,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void intel_crt_get_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_config *pipe_config)
|
||||
static unsigned int intel_crt_get_flags(struct intel_encoder *encoder)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
|
||||
struct intel_crt *crt = intel_encoder_to_crt(encoder);
|
||||
@ -102,7 +101,25 @@ static void intel_crt_get_config(struct intel_encoder *encoder,
|
||||
else
|
||||
flags |= DRM_MODE_FLAG_NVSYNC;
|
||||
|
||||
pipe_config->adjusted_mode.flags |= flags;
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void intel_crt_get_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_config *pipe_config)
|
||||
{
|
||||
pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder);
|
||||
}
|
||||
|
||||
static void hsw_crt_get_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_config *pipe_config)
|
||||
{
|
||||
intel_ddi_get_config(encoder, pipe_config);
|
||||
|
||||
pipe_config->adjusted_mode.flags &= ~(DRM_MODE_FLAG_PHSYNC |
|
||||
DRM_MODE_FLAG_NHSYNC |
|
||||
DRM_MODE_FLAG_PVSYNC |
|
||||
DRM_MODE_FLAG_NVSYNC);
|
||||
pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder);
|
||||
}
|
||||
|
||||
/* Note: The caller is required to filter out dpms modes not supported by the
|
||||
@ -799,7 +816,10 @@ void intel_crt_init(struct drm_device *dev)
|
||||
crt->base.mode_set = intel_crt_mode_set;
|
||||
crt->base.disable = intel_disable_crt;
|
||||
crt->base.enable = intel_enable_crt;
|
||||
crt->base.get_config = intel_crt_get_config;
|
||||
if (IS_HASWELL(dev))
|
||||
crt->base.get_config = hsw_crt_get_config;
|
||||
else
|
||||
crt->base.get_config = intel_crt_get_config;
|
||||
if (I915_HAS_HOTPLUG(dev))
|
||||
crt->base.hpd_pin = HPD_CRT;
|
||||
if (HAS_DDI(dev))
|
||||
|
@ -1249,8 +1249,8 @@ static void intel_ddi_hot_plug(struct intel_encoder *intel_encoder)
|
||||
intel_dp_check_link_status(intel_dp);
|
||||
}
|
||||
|
||||
static void intel_ddi_get_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_config *pipe_config)
|
||||
void intel_ddi_get_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_config *pipe_config)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
|
||||
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc);
|
||||
@ -1268,6 +1268,23 @@ static void intel_ddi_get_config(struct intel_encoder *encoder,
|
||||
flags |= DRM_MODE_FLAG_NVSYNC;
|
||||
|
||||
pipe_config->adjusted_mode.flags |= flags;
|
||||
|
||||
switch (temp & TRANS_DDI_BPC_MASK) {
|
||||
case TRANS_DDI_BPC_6:
|
||||
pipe_config->pipe_bpp = 18;
|
||||
break;
|
||||
case TRANS_DDI_BPC_8:
|
||||
pipe_config->pipe_bpp = 24;
|
||||
break;
|
||||
case TRANS_DDI_BPC_10:
|
||||
pipe_config->pipe_bpp = 30;
|
||||
break;
|
||||
case TRANS_DDI_BPC_12:
|
||||
pipe_config->pipe_bpp = 36;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void intel_ddi_destroy(struct drm_encoder *encoder)
|
||||
|
@ -2327,9 +2327,10 @@ static void intel_fdi_normal_train(struct drm_crtc *crtc)
|
||||
FDI_FE_ERRC_ENABLE);
|
||||
}
|
||||
|
||||
static bool pipe_has_enabled_pch(struct intel_crtc *intel_crtc)
|
||||
static bool pipe_has_enabled_pch(struct intel_crtc *crtc)
|
||||
{
|
||||
return intel_crtc->base.enabled && intel_crtc->config.has_pch_encoder;
|
||||
return crtc->base.enabled && crtc->active &&
|
||||
crtc->config.has_pch_encoder;
|
||||
}
|
||||
|
||||
static void ivb_modeset_global_resources(struct drm_device *dev)
|
||||
@ -2979,6 +2980,48 @@ static void ironlake_pch_transcoder_set_timings(struct intel_crtc *crtc,
|
||||
I915_READ(VSYNCSHIFT(cpu_transcoder)));
|
||||
}
|
||||
|
||||
static void cpt_enable_fdi_bc_bifurcation(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
uint32_t temp;
|
||||
|
||||
temp = I915_READ(SOUTH_CHICKEN1);
|
||||
if (temp & FDI_BC_BIFURCATION_SELECT)
|
||||
return;
|
||||
|
||||
WARN_ON(I915_READ(FDI_RX_CTL(PIPE_B)) & FDI_RX_ENABLE);
|
||||
WARN_ON(I915_READ(FDI_RX_CTL(PIPE_C)) & FDI_RX_ENABLE);
|
||||
|
||||
temp |= FDI_BC_BIFURCATION_SELECT;
|
||||
DRM_DEBUG_KMS("enabling fdi C rx\n");
|
||||
I915_WRITE(SOUTH_CHICKEN1, temp);
|
||||
POSTING_READ(SOUTH_CHICKEN1);
|
||||
}
|
||||
|
||||
static void ivybridge_update_fdi_bc_bifurcation(struct intel_crtc *intel_crtc)
|
||||
{
|
||||
struct drm_device *dev = intel_crtc->base.dev;
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
switch (intel_crtc->pipe) {
|
||||
case PIPE_A:
|
||||
break;
|
||||
case PIPE_B:
|
||||
if (intel_crtc->config.fdi_lanes > 2)
|
||||
WARN_ON(I915_READ(SOUTH_CHICKEN1) & FDI_BC_BIFURCATION_SELECT);
|
||||
else
|
||||
cpt_enable_fdi_bc_bifurcation(dev);
|
||||
|
||||
break;
|
||||
case PIPE_C:
|
||||
cpt_enable_fdi_bc_bifurcation(dev);
|
||||
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Enable PCH resources required for PCH ports:
|
||||
* - PCH PLLs
|
||||
@ -2997,6 +3040,9 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
|
||||
|
||||
assert_pch_transcoder_disabled(dev_priv, pipe);
|
||||
|
||||
if (IS_IVYBRIDGE(dev))
|
||||
ivybridge_update_fdi_bc_bifurcation(intel_crtc);
|
||||
|
||||
/* Write the TU size bits before fdi link training, so that error
|
||||
* detection works. */
|
||||
I915_WRITE(FDI_RX_TUSIZE1(pipe),
|
||||
@ -4983,6 +5029,22 @@ static bool i9xx_get_pipe_config(struct intel_crtc *crtc,
|
||||
if (!(tmp & PIPECONF_ENABLE))
|
||||
return false;
|
||||
|
||||
if (IS_G4X(dev) || IS_VALLEYVIEW(dev)) {
|
||||
switch (tmp & PIPECONF_BPC_MASK) {
|
||||
case PIPECONF_6BPC:
|
||||
pipe_config->pipe_bpp = 18;
|
||||
break;
|
||||
case PIPECONF_8BPC:
|
||||
pipe_config->pipe_bpp = 24;
|
||||
break;
|
||||
case PIPECONF_10BPC:
|
||||
pipe_config->pipe_bpp = 30;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
intel_get_pipe_timings(crtc, pipe_config);
|
||||
|
||||
i9xx_get_pfit_config(crtc, pipe_config);
|
||||
@ -5576,48 +5638,6 @@ static bool ironlake_compute_clocks(struct drm_crtc *crtc,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void cpt_enable_fdi_bc_bifurcation(struct drm_device *dev)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
uint32_t temp;
|
||||
|
||||
temp = I915_READ(SOUTH_CHICKEN1);
|
||||
if (temp & FDI_BC_BIFURCATION_SELECT)
|
||||
return;
|
||||
|
||||
WARN_ON(I915_READ(FDI_RX_CTL(PIPE_B)) & FDI_RX_ENABLE);
|
||||
WARN_ON(I915_READ(FDI_RX_CTL(PIPE_C)) & FDI_RX_ENABLE);
|
||||
|
||||
temp |= FDI_BC_BIFURCATION_SELECT;
|
||||
DRM_DEBUG_KMS("enabling fdi C rx\n");
|
||||
I915_WRITE(SOUTH_CHICKEN1, temp);
|
||||
POSTING_READ(SOUTH_CHICKEN1);
|
||||
}
|
||||
|
||||
static void ivybridge_update_fdi_bc_bifurcation(struct intel_crtc *intel_crtc)
|
||||
{
|
||||
struct drm_device *dev = intel_crtc->base.dev;
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
|
||||
switch (intel_crtc->pipe) {
|
||||
case PIPE_A:
|
||||
break;
|
||||
case PIPE_B:
|
||||
if (intel_crtc->config.fdi_lanes > 2)
|
||||
WARN_ON(I915_READ(SOUTH_CHICKEN1) & FDI_BC_BIFURCATION_SELECT);
|
||||
else
|
||||
cpt_enable_fdi_bc_bifurcation(dev);
|
||||
|
||||
break;
|
||||
case PIPE_C:
|
||||
cpt_enable_fdi_bc_bifurcation(dev);
|
||||
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
|
||||
int ironlake_get_lanes_required(int target_clock, int link_bw, int bpp)
|
||||
{
|
||||
/*
|
||||
@ -5811,9 +5831,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
|
||||
&intel_crtc->config.fdi_m_n);
|
||||
}
|
||||
|
||||
if (IS_IVYBRIDGE(dev))
|
||||
ivybridge_update_fdi_bc_bifurcation(intel_crtc);
|
||||
|
||||
ironlake_set_pipeconf(crtc);
|
||||
|
||||
/* Set up the display plane register */
|
||||
@ -5881,6 +5898,23 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
|
||||
if (!(tmp & PIPECONF_ENABLE))
|
||||
return false;
|
||||
|
||||
switch (tmp & PIPECONF_BPC_MASK) {
|
||||
case PIPECONF_6BPC:
|
||||
pipe_config->pipe_bpp = 18;
|
||||
break;
|
||||
case PIPECONF_8BPC:
|
||||
pipe_config->pipe_bpp = 24;
|
||||
break;
|
||||
case PIPECONF_10BPC:
|
||||
pipe_config->pipe_bpp = 30;
|
||||
break;
|
||||
case PIPECONF_12BPC:
|
||||
pipe_config->pipe_bpp = 36;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (I915_READ(PCH_TRANSCONF(crtc->pipe)) & TRANS_ENABLE) {
|
||||
struct intel_shared_dpll *pll;
|
||||
|
||||
@ -8612,6 +8646,9 @@ intel_pipe_config_compare(struct drm_device *dev,
|
||||
PIPE_CONF_CHECK_X(dpll_hw_state.fp0);
|
||||
PIPE_CONF_CHECK_X(dpll_hw_state.fp1);
|
||||
|
||||
if (IS_G4X(dev) || INTEL_INFO(dev)->gen >= 5)
|
||||
PIPE_CONF_CHECK_I(pipe_bpp);
|
||||
|
||||
#undef PIPE_CONF_CHECK_X
|
||||
#undef PIPE_CONF_CHECK_I
|
||||
#undef PIPE_CONF_CHECK_FLAGS
|
||||
|
@ -1401,6 +1401,26 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
|
||||
else
|
||||
pipe_config->port_clock = 270000;
|
||||
}
|
||||
|
||||
if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp &&
|
||||
pipe_config->pipe_bpp > dev_priv->vbt.edp_bpp) {
|
||||
/*
|
||||
* This is a big fat ugly hack.
|
||||
*
|
||||
* Some machines in UEFI boot mode provide us a VBT that has 18
|
||||
* bpp and 1.62 GHz link bandwidth for eDP, which for reasons
|
||||
* unknown we fail to light up. Yet the same BIOS boots up with
|
||||
* 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as
|
||||
* max, not what it tells us to use.
|
||||
*
|
||||
* Note: This will still be broken if the eDP panel is not lit
|
||||
* up by the BIOS, and thus we can't get the mode at module
|
||||
* load.
|
||||
*/
|
||||
DRM_DEBUG_KMS("pipe has %d bpp for eDP panel, overriding BIOS-provided max %d bpp\n",
|
||||
pipe_config->pipe_bpp, dev_priv->vbt.edp_bpp);
|
||||
dev_priv->vbt.edp_bpp = pipe_config->pipe_bpp;
|
||||
}
|
||||
}
|
||||
|
||||
static bool is_edp_psr(struct intel_dp *intel_dp)
|
||||
|
@ -765,6 +765,8 @@ extern void intel_ddi_prepare_link_retrain(struct drm_encoder *encoder);
|
||||
extern bool
|
||||
intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector);
|
||||
extern void intel_ddi_fdi_disable(struct drm_crtc *crtc);
|
||||
extern void intel_ddi_get_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_config *pipe_config);
|
||||
|
||||
extern void intel_display_handle_reset(struct drm_device *dev);
|
||||
extern bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
|
||||
|
@ -698,6 +698,22 @@ static const struct dmi_system_id intel_no_lvds[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Q900"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = intel_no_lvds_dmi_callback,
|
||||
.ident = "Intel D410PT",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "D410PT"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = intel_no_lvds_dmi_callback,
|
||||
.ident = "Intel D425KT",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "D425KT"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = intel_no_lvds_dmi_callback,
|
||||
.ident = "Intel D510MO",
|
||||
|
@ -4759,7 +4759,9 @@ static void cpt_init_clock_gating(struct drm_device *dev)
|
||||
* gating for the panel power sequencer or it will fail to
|
||||
* start up when no ports are active.
|
||||
*/
|
||||
I915_WRITE(SOUTH_DSPCLK_GATE_D, PCH_DPLSUNIT_CLOCK_GATE_DISABLE);
|
||||
I915_WRITE(SOUTH_DSPCLK_GATE_D, PCH_DPLSUNIT_CLOCK_GATE_DISABLE |
|
||||
PCH_DPLUNIT_CLOCK_GATE_DISABLE |
|
||||
PCH_CPUNIT_CLOCK_GATE_DISABLE);
|
||||
I915_WRITE(SOUTH_CHICKEN2, I915_READ(SOUTH_CHICKEN2) |
|
||||
DPLS_EDP_PPS_FIX_DIS);
|
||||
/* The below fixes the weird display corruption, a few pixels shifted
|
||||
|
@ -707,24 +707,37 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
|
||||
switch (connector->connector_type) {
|
||||
case DRM_MODE_CONNECTOR_DVII:
|
||||
case DRM_MODE_CONNECTOR_HDMIB: /* HDMI-B is basically DL-DVI; analog works fine */
|
||||
if ((radeon_connector->audio == RADEON_AUDIO_ENABLE) ||
|
||||
(drm_detect_hdmi_monitor(radeon_connector->edid) &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_AUTO)))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else if (radeon_connector->use_digital)
|
||||
if (radeon_audio != 0) {
|
||||
if (radeon_connector->use_digital &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_ENABLE))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else if (drm_detect_hdmi_monitor(radeon_connector->edid) &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_AUTO))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else if (radeon_connector->use_digital)
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_CRT;
|
||||
} else if (radeon_connector->use_digital) {
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
else
|
||||
} else {
|
||||
return ATOM_ENCODER_MODE_CRT;
|
||||
}
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_DVID:
|
||||
case DRM_MODE_CONNECTOR_HDMIA:
|
||||
default:
|
||||
if ((radeon_connector->audio == RADEON_AUDIO_ENABLE) ||
|
||||
(drm_detect_hdmi_monitor(radeon_connector->edid) &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_AUTO)))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else
|
||||
if (radeon_audio != 0) {
|
||||
if (radeon_connector->audio == RADEON_AUDIO_ENABLE)
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else if (drm_detect_hdmi_monitor(radeon_connector->edid) &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_AUTO))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
} else {
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
}
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_LVDS:
|
||||
return ATOM_ENCODER_MODE_LVDS;
|
||||
@ -732,14 +745,19 @@ atombios_get_encoder_mode(struct drm_encoder *encoder)
|
||||
case DRM_MODE_CONNECTOR_DisplayPort:
|
||||
dig_connector = radeon_connector->con_priv;
|
||||
if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
|
||||
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP))
|
||||
(dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP)) {
|
||||
return ATOM_ENCODER_MODE_DP;
|
||||
else if ((radeon_connector->audio == RADEON_AUDIO_ENABLE) ||
|
||||
(drm_detect_hdmi_monitor(radeon_connector->edid) &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_AUTO)))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else
|
||||
} else if (radeon_audio != 0) {
|
||||
if (radeon_connector->audio == RADEON_AUDIO_ENABLE)
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else if (drm_detect_hdmi_monitor(radeon_connector->edid) &&
|
||||
(radeon_connector->audio == RADEON_AUDIO_AUTO))
|
||||
return ATOM_ENCODER_MODE_HDMI;
|
||||
else
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
} else {
|
||||
return ATOM_ENCODER_MODE_DVI;
|
||||
}
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_eDP:
|
||||
return ATOM_ENCODER_MODE_DP;
|
||||
@ -1655,7 +1673,7 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode)
|
||||
* does the same thing and more.
|
||||
*/
|
||||
if ((rdev->family != CHIP_RV710) && (rdev->family != CHIP_RV730) &&
|
||||
(rdev->family != CHIP_RS880))
|
||||
(rdev->family != CHIP_RS780) && (rdev->family != CHIP_RS880))
|
||||
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0);
|
||||
}
|
||||
if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) {
|
||||
|
@ -1694,6 +1694,7 @@ static int cik_init_microcode(struct radeon_device *rdev)
|
||||
fw_name);
|
||||
release_firmware(rdev->smc_fw);
|
||||
rdev->smc_fw = NULL;
|
||||
err = 0;
|
||||
} else if (rdev->smc_fw->size != smc_req_size) {
|
||||
printk(KERN_ERR
|
||||
"cik_smc: Bogus length %zu in firmware \"%s\"\n",
|
||||
@ -3182,6 +3183,7 @@ int cik_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
|
||||
r = radeon_ib_get(rdev, ring->idx, &ib, NULL, 256);
|
||||
if (r) {
|
||||
DRM_ERROR("radeon: failed to get ib (%d).\n", r);
|
||||
radeon_scratch_free(rdev, scratch);
|
||||
return r;
|
||||
}
|
||||
ib.ptr[0] = PACKET3(PACKET3_SET_UCONFIG_REG, 1);
|
||||
@ -3198,6 +3200,8 @@ int cik_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
|
||||
r = radeon_fence_wait(ib.fence, false);
|
||||
if (r) {
|
||||
DRM_ERROR("radeon: fence wait failed (%d).\n", r);
|
||||
radeon_scratch_free(rdev, scratch);
|
||||
radeon_ib_free(rdev, &ib);
|
||||
return r;
|
||||
}
|
||||
for (i = 0; i < rdev->usec_timeout; i++) {
|
||||
|
@ -113,6 +113,9 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder)
|
||||
u8 *sadb;
|
||||
int sad_count;
|
||||
|
||||
/* XXX: setting this register causes hangs on some asics */
|
||||
return;
|
||||
|
||||
if (!dig->afmt->pin)
|
||||
return;
|
||||
|
||||
|
@ -67,6 +67,9 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder)
|
||||
u8 *sadb;
|
||||
int sad_count;
|
||||
|
||||
/* XXX: setting this register causes hangs on some asics */
|
||||
return;
|
||||
|
||||
list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
|
||||
if (connector->encoder == encoder)
|
||||
radeon_connector = to_radeon_connector(connector);
|
||||
@ -288,6 +291,7 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
|
||||
/* fglrx clears sth in AFMT_AUDIO_PACKET_CONTROL2 here */
|
||||
|
||||
WREG32(HDMI_ACR_PACKET_CONTROL + offset,
|
||||
HDMI_ACR_SOURCE | /* select SW CTS value */
|
||||
HDMI_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */
|
||||
|
||||
evergreen_hdmi_update_ACR(encoder, mode->clock);
|
||||
|
@ -2635,7 +2635,7 @@ int kv_dpm_init(struct radeon_device *rdev)
|
||||
pi->caps_sclk_ds = true;
|
||||
pi->enable_auto_thermal_throttling = true;
|
||||
pi->disable_nb_ps3_in_battery = false;
|
||||
pi->bapm_enable = true;
|
||||
pi->bapm_enable = false;
|
||||
pi->voltage_drop_t = 0;
|
||||
pi->caps_sclk_throttle_low_notification = false;
|
||||
pi->caps_fps = false; /* true? */
|
||||
|
@ -804,6 +804,7 @@ int ni_init_microcode(struct radeon_device *rdev)
|
||||
fw_name);
|
||||
release_firmware(rdev->smc_fw);
|
||||
rdev->smc_fw = NULL;
|
||||
err = 0;
|
||||
} else if (rdev->smc_fw->size != smc_req_size) {
|
||||
printk(KERN_ERR
|
||||
"ni_mc: Bogus length %zu in firmware \"%s\"\n",
|
||||
|
@ -2302,6 +2302,7 @@ int r600_init_microcode(struct radeon_device *rdev)
|
||||
fw_name);
|
||||
release_firmware(rdev->smc_fw);
|
||||
rdev->smc_fw = NULL;
|
||||
err = 0;
|
||||
} else if (rdev->smc_fw->size != smc_req_size) {
|
||||
printk(KERN_ERR
|
||||
"smc: Bogus length %zu in firmware \"%s\"\n",
|
||||
|
@ -309,6 +309,9 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder)
|
||||
u8 *sadb;
|
||||
int sad_count;
|
||||
|
||||
/* XXX: setting this register causes hangs on some asics */
|
||||
return;
|
||||
|
||||
list_for_each_entry(connector, &encoder->dev->mode_config.connector_list, head) {
|
||||
if (connector->encoder == encoder)
|
||||
radeon_connector = to_radeon_connector(connector);
|
||||
|
@ -1272,8 +1272,8 @@ struct radeon_blacklist_clocks
|
||||
struct radeon_clock_and_voltage_limits {
|
||||
u32 sclk;
|
||||
u32 mclk;
|
||||
u32 vddc;
|
||||
u32 vddci;
|
||||
u16 vddc;
|
||||
u16 vddci;
|
||||
};
|
||||
|
||||
struct radeon_clock_array {
|
||||
|
@ -1658,9 +1658,12 @@ radeon_add_atom_connector(struct drm_device *dev,
|
||||
drm_object_attach_property(&radeon_connector->base.base,
|
||||
rdev->mode_info.underscan_vborder_property,
|
||||
0);
|
||||
drm_object_attach_property(&radeon_connector->base.base,
|
||||
rdev->mode_info.audio_property,
|
||||
RADEON_AUDIO_DISABLE);
|
||||
if (radeon_audio != 0)
|
||||
drm_object_attach_property(&radeon_connector->base.base,
|
||||
rdev->mode_info.audio_property,
|
||||
(radeon_audio == 1) ?
|
||||
RADEON_AUDIO_AUTO :
|
||||
RADEON_AUDIO_DISABLE);
|
||||
subpixel_order = SubPixelHorizontalRGB;
|
||||
connector->interlace_allowed = true;
|
||||
if (connector_type == DRM_MODE_CONNECTOR_HDMIB)
|
||||
@ -1754,10 +1757,12 @@ radeon_add_atom_connector(struct drm_device *dev,
|
||||
rdev->mode_info.underscan_vborder_property,
|
||||
0);
|
||||
}
|
||||
if (ASIC_IS_DCE2(rdev)) {
|
||||
if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) {
|
||||
drm_object_attach_property(&radeon_connector->base.base,
|
||||
rdev->mode_info.audio_property,
|
||||
RADEON_AUDIO_DISABLE);
|
||||
rdev->mode_info.audio_property,
|
||||
(radeon_audio == 1) ?
|
||||
RADEON_AUDIO_AUTO :
|
||||
RADEON_AUDIO_DISABLE);
|
||||
}
|
||||
if (connector_type == DRM_MODE_CONNECTOR_DVII) {
|
||||
radeon_connector->dac_load_detect = true;
|
||||
@ -1799,10 +1804,12 @@ radeon_add_atom_connector(struct drm_device *dev,
|
||||
rdev->mode_info.underscan_vborder_property,
|
||||
0);
|
||||
}
|
||||
if (ASIC_IS_DCE2(rdev)) {
|
||||
if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) {
|
||||
drm_object_attach_property(&radeon_connector->base.base,
|
||||
rdev->mode_info.audio_property,
|
||||
RADEON_AUDIO_DISABLE);
|
||||
rdev->mode_info.audio_property,
|
||||
(radeon_audio == 1) ?
|
||||
RADEON_AUDIO_AUTO :
|
||||
RADEON_AUDIO_DISABLE);
|
||||
}
|
||||
subpixel_order = SubPixelHorizontalRGB;
|
||||
connector->interlace_allowed = true;
|
||||
@ -1843,10 +1850,12 @@ radeon_add_atom_connector(struct drm_device *dev,
|
||||
rdev->mode_info.underscan_vborder_property,
|
||||
0);
|
||||
}
|
||||
if (ASIC_IS_DCE2(rdev)) {
|
||||
if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) {
|
||||
drm_object_attach_property(&radeon_connector->base.base,
|
||||
rdev->mode_info.audio_property,
|
||||
RADEON_AUDIO_DISABLE);
|
||||
rdev->mode_info.audio_property,
|
||||
(radeon_audio == 1) ?
|
||||
RADEON_AUDIO_AUTO :
|
||||
RADEON_AUDIO_DISABLE);
|
||||
}
|
||||
connector->interlace_allowed = true;
|
||||
/* in theory with a DP to VGA converter... */
|
||||
|
@ -85,9 +85,8 @@ static int radeon_cs_parser_relocs(struct radeon_cs_parser *p)
|
||||
VRAM, also but everything into VRAM on AGP cards to avoid
|
||||
image corruptions */
|
||||
if (p->ring == R600_RING_TYPE_UVD_INDEX &&
|
||||
p->rdev->family < CHIP_PALM &&
|
||||
(i == 0 || drm_pci_device_is_agp(p->rdev->ddev))) {
|
||||
|
||||
/* TODO: is this still needed for NI+ ? */
|
||||
p->relocs[i].lobj.domain =
|
||||
RADEON_GEM_DOMAIN_VRAM;
|
||||
|
||||
|
@ -153,7 +153,7 @@ int radeon_benchmarking = 0;
|
||||
int radeon_testing = 0;
|
||||
int radeon_connector_table = 0;
|
||||
int radeon_tv = 1;
|
||||
int radeon_audio = 1;
|
||||
int radeon_audio = -1;
|
||||
int radeon_disp_priority = 0;
|
||||
int radeon_hw_i2c = 0;
|
||||
int radeon_pcie_gen2 = -1;
|
||||
@ -196,7 +196,7 @@ module_param_named(connector_table, radeon_connector_table, int, 0444);
|
||||
MODULE_PARM_DESC(tv, "TV enable (0 = disable)");
|
||||
module_param_named(tv, radeon_tv, int, 0444);
|
||||
|
||||
MODULE_PARM_DESC(audio, "Audio enable (1 = enable)");
|
||||
MODULE_PARM_DESC(audio, "Audio enable (-1 = auto, 0 = disable, 1 = enable)");
|
||||
module_param_named(audio, radeon_audio, int, 0444);
|
||||
|
||||
MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = high)");
|
||||
|
@ -476,7 +476,8 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (p->rdev->family < CHIP_PALM && (cmd == 0 || cmd == 0x3) &&
|
||||
/* TODO: is this still necessary on NI+ ? */
|
||||
if ((cmd == 0 || cmd == 0x3) &&
|
||||
(start >> 28) != (p->rdev->uvd.gpu_addr >> 28)) {
|
||||
DRM_ERROR("msg/fb buffer %LX-%LX out of 256MB segment!\n",
|
||||
start, end);
|
||||
|
@ -1681,6 +1681,7 @@ static int si_init_microcode(struct radeon_device *rdev)
|
||||
fw_name);
|
||||
release_firmware(rdev->smc_fw);
|
||||
rdev->smc_fw = NULL;
|
||||
err = 0;
|
||||
} else if (rdev->smc_fw->size != smc_req_size) {
|
||||
printk(KERN_ERR
|
||||
"si_smc: Bogus length %zu in firmware \"%s\"\n",
|
||||
|
@ -212,8 +212,8 @@ int uvd_v1_0_start(struct radeon_device *rdev)
|
||||
/* enable VCPU clock */
|
||||
WREG32(UVD_VCPU_CNTL, 1 << 9);
|
||||
|
||||
/* enable UMC and NC0 */
|
||||
WREG32_P(UVD_LMI_CTRL2, 1 << 13, ~((1 << 8) | (1 << 13)));
|
||||
/* enable UMC */
|
||||
WREG32_P(UVD_LMI_CTRL2, 0, ~(1 << 8));
|
||||
|
||||
/* boot up the VCPU */
|
||||
WREG32(UVD_SOFT_RESET, 0);
|
||||
|
@ -740,9 +740,17 @@ static void vmw_postclose(struct drm_device *dev,
|
||||
struct vmw_fpriv *vmw_fp;
|
||||
|
||||
vmw_fp = vmw_fpriv(file_priv);
|
||||
ttm_object_file_release(&vmw_fp->tfile);
|
||||
if (vmw_fp->locked_master)
|
||||
|
||||
if (vmw_fp->locked_master) {
|
||||
struct vmw_master *vmaster =
|
||||
vmw_master(vmw_fp->locked_master);
|
||||
|
||||
ttm_lock_set_kill(&vmaster->lock, true, SIGTERM);
|
||||
ttm_vt_unlock(&vmaster->lock);
|
||||
drm_master_put(&vmw_fp->locked_master);
|
||||
}
|
||||
|
||||
ttm_object_file_release(&vmw_fp->tfile);
|
||||
kfree(vmw_fp);
|
||||
}
|
||||
|
||||
@ -925,14 +933,13 @@ static void vmw_master_drop(struct drm_device *dev,
|
||||
|
||||
vmw_fp->locked_master = drm_master_get(file_priv->master);
|
||||
ret = ttm_vt_lock(&vmaster->lock, false, vmw_fp->tfile);
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
|
||||
if (unlikely((ret != 0))) {
|
||||
DRM_ERROR("Unable to lock TTM at VT switch.\n");
|
||||
drm_master_put(&vmw_fp->locked_master);
|
||||
}
|
||||
|
||||
ttm_lock_set_kill(&vmaster->lock, true, SIGTERM);
|
||||
ttm_lock_set_kill(&vmaster->lock, false, SIGTERM);
|
||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||
|
||||
if (!dev_priv->enable_fb) {
|
||||
ret = ttm_bo_evict_mm(&dev_priv->bdev, TTM_PL_VRAM);
|
||||
|
@ -970,7 +970,7 @@ void vmw_resource_unreserve(struct vmw_resource *res,
|
||||
if (new_backup)
|
||||
res->backup_offset = new_backup_offset;
|
||||
|
||||
if (!res->func->may_evict)
|
||||
if (!res->func->may_evict || res->id == -1)
|
||||
return;
|
||||
|
||||
write_lock(&dev_priv->resource_lock);
|
||||
|
@ -319,7 +319,7 @@ static s32 item_sdata(struct hid_item *item)
|
||||
|
||||
static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
|
||||
{
|
||||
__u32 raw_value;
|
||||
__s32 raw_value;
|
||||
switch (item->tag) {
|
||||
case HID_GLOBAL_ITEM_TAG_PUSH:
|
||||
|
||||
@ -370,10 +370,11 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
|
||||
return 0;
|
||||
|
||||
case HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT:
|
||||
/* Units exponent negative numbers are given through a
|
||||
* two's complement.
|
||||
* See "6.2.2.7 Global Items" for more information. */
|
||||
raw_value = item_udata(item);
|
||||
/* Many devices provide unit exponent as a two's complement
|
||||
* nibble due to the common misunderstanding of HID
|
||||
* specification 1.11, 6.2.2.7 Global Items. Attempt to handle
|
||||
* both this and the standard encoding. */
|
||||
raw_value = item_sdata(item);
|
||||
if (!(raw_value & 0xfffffff0))
|
||||
parser->global.unit_exponent = hid_snto32(raw_value, 4);
|
||||
else
|
||||
@ -1870,6 +1871,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2, USB_DEVICE_ID_NINTENDO_WIIMOTE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) },
|
||||
{ }
|
||||
};
|
||||
|
@ -633,6 +633,7 @@
|
||||
#define USB_DEVICE_ID_NEXTWINDOW_TOUCHSCREEN 0x0003
|
||||
|
||||
#define USB_VENDOR_ID_NINTENDO 0x057e
|
||||
#define USB_VENDOR_ID_NINTENDO2 0x054c
|
||||
#define USB_DEVICE_ID_NINTENDO_WIIMOTE 0x0306
|
||||
#define USB_DEVICE_ID_NINTENDO_WIIMOTE2 0x0330
|
||||
|
||||
@ -792,6 +793,8 @@
|
||||
#define USB_DEVICE_ID_SYNAPTICS_COMP_TP 0x0009
|
||||
#define USB_DEVICE_ID_SYNAPTICS_WTP 0x0010
|
||||
#define USB_DEVICE_ID_SYNAPTICS_DPAD 0x0013
|
||||
#define USB_DEVICE_ID_SYNAPTICS_LTS1 0x0af8
|
||||
#define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10
|
||||
|
||||
#define USB_VENDOR_ID_THINGM 0x27b8
|
||||
#define USB_DEVICE_ID_BLINK1 0x01ed
|
||||
@ -919,4 +922,7 @@
|
||||
#define USB_VENDOR_ID_PRIMAX 0x0461
|
||||
#define USB_DEVICE_ID_PRIMAX_KEYBOARD 0x4e05
|
||||
|
||||
#define USB_VENDOR_ID_SIS 0x0457
|
||||
#define USB_DEVICE_ID_SIS_TS 0x1013
|
||||
|
||||
#endif
|
||||
|
@ -192,6 +192,7 @@ static int hidinput_setkeycode(struct input_dev *dev,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* hidinput_calc_abs_res - calculate an absolute axis resolution
|
||||
* @field: the HID report field to calculate resolution for
|
||||
@ -234,23 +235,17 @@ __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
|
||||
case ABS_MT_TOOL_Y:
|
||||
case ABS_MT_TOUCH_MAJOR:
|
||||
case ABS_MT_TOUCH_MINOR:
|
||||
if (field->unit & 0xffffff00) /* Not a length */
|
||||
return 0;
|
||||
unit_exponent += hid_snto32(field->unit >> 4, 4) - 1;
|
||||
switch (field->unit & 0xf) {
|
||||
case 0x1: /* If centimeters */
|
||||
if (field->unit == 0x11) { /* If centimeters */
|
||||
/* Convert to millimeters */
|
||||
unit_exponent += 1;
|
||||
break;
|
||||
case 0x3: /* If inches */
|
||||
} else if (field->unit == 0x13) { /* If inches */
|
||||
/* Convert to millimeters */
|
||||
prev = physical_extents;
|
||||
physical_extents *= 254;
|
||||
if (physical_extents < prev)
|
||||
return 0;
|
||||
unit_exponent -= 1;
|
||||
break;
|
||||
default:
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
@ -834,7 +834,8 @@ static void wiimote_init_set_type(struct wiimote_data *wdata,
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (vendor == USB_VENDOR_ID_NINTENDO) {
|
||||
if (vendor == USB_VENDOR_ID_NINTENDO ||
|
||||
vendor == USB_VENDOR_ID_NINTENDO2) {
|
||||
if (product == USB_DEVICE_ID_NINTENDO_WIIMOTE) {
|
||||
devtype = WIIMOTE_DEV_GEN10;
|
||||
goto done;
|
||||
@ -1855,6 +1856,8 @@ static void wiimote_hid_remove(struct hid_device *hdev)
|
||||
static const struct hid_device_id wiimote_hid_devices[] = {
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
|
||||
USB_DEVICE_ID_NINTENDO_WIIMOTE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO2,
|
||||
USB_DEVICE_ID_NINTENDO_WIIMOTE) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO,
|
||||
USB_DEVICE_ID_NINTENDO_WIIMOTE2) },
|
||||
{ }
|
||||
|
@ -110,6 +110,9 @@ static const struct hid_blacklist {
|
||||
{ USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT },
|
||||
{ USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT },
|
||||
{ USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_DUOSENSE, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS1, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS2, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_SIS, USB_DEVICE_ID_SIS_TS, HID_QUIRK_NO_INIT_REPORTS },
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
@ -31,6 +31,17 @@ config INFINIBAND_USER_ACCESS
|
||||
libibverbs, libibcm and a hardware driver library from
|
||||
<http://www.openfabrics.org/git/>.
|
||||
|
||||
config INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
bool "Experimental and unstable ABI for userspace access to flow steering verbs"
|
||||
depends on INFINIBAND_USER_ACCESS
|
||||
depends on STAGING
|
||||
---help---
|
||||
The final ABI for userspace access to flow steering verbs
|
||||
has not been defined. To use the current ABI, *WHICH WILL
|
||||
CHANGE IN THE FUTURE*, say Y here.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config INFINIBAND_USER_MEM
|
||||
bool
|
||||
depends on INFINIBAND_USER_ACCESS != n
|
||||
|
@ -217,7 +217,9 @@ IB_UVERBS_DECLARE_CMD(destroy_srq);
|
||||
IB_UVERBS_DECLARE_CMD(create_xsrq);
|
||||
IB_UVERBS_DECLARE_CMD(open_xrcd);
|
||||
IB_UVERBS_DECLARE_CMD(close_xrcd);
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
IB_UVERBS_DECLARE_CMD(create_flow);
|
||||
IB_UVERBS_DECLARE_CMD(destroy_flow);
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
|
||||
#endif /* UVERBS_H */
|
||||
|
@ -54,7 +54,9 @@ static struct uverbs_lock_class qp_lock_class = { .name = "QP-uobj" };
|
||||
static struct uverbs_lock_class ah_lock_class = { .name = "AH-uobj" };
|
||||
static struct uverbs_lock_class srq_lock_class = { .name = "SRQ-uobj" };
|
||||
static struct uverbs_lock_class xrcd_lock_class = { .name = "XRCD-uobj" };
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
static struct uverbs_lock_class rule_lock_class = { .name = "RULE-uobj" };
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
|
||||
#define INIT_UDATA(udata, ibuf, obuf, ilen, olen) \
|
||||
do { \
|
||||
@ -2599,6 +2601,7 @@ out_put:
|
||||
return ret ? ret : in_len;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
static int kern_spec_to_ib_spec(struct ib_kern_spec *kern_spec,
|
||||
union ib_flow_spec *ib_spec)
|
||||
{
|
||||
@ -2824,6 +2827,7 @@ ssize_t ib_uverbs_destroy_flow(struct ib_uverbs_file *file,
|
||||
|
||||
return ret ? ret : in_len;
|
||||
}
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
|
||||
static int __uverbs_create_xsrq(struct ib_uverbs_file *file,
|
||||
struct ib_uverbs_create_xsrq *cmd,
|
||||
|
@ -115,8 +115,10 @@ static ssize_t (*uverbs_cmd_table[])(struct ib_uverbs_file *file,
|
||||
[IB_USER_VERBS_CMD_CLOSE_XRCD] = ib_uverbs_close_xrcd,
|
||||
[IB_USER_VERBS_CMD_CREATE_XSRQ] = ib_uverbs_create_xsrq,
|
||||
[IB_USER_VERBS_CMD_OPEN_QP] = ib_uverbs_open_qp,
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
[IB_USER_VERBS_CMD_CREATE_FLOW] = ib_uverbs_create_flow,
|
||||
[IB_USER_VERBS_CMD_DESTROY_FLOW] = ib_uverbs_destroy_flow
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
};
|
||||
|
||||
static void ib_uverbs_add_one(struct ib_device *device);
|
||||
@ -605,6 +607,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
|
||||
if (!(file->device->ib_dev->uverbs_cmd_mask & (1ull << hdr.command)))
|
||||
return -ENOSYS;
|
||||
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
if (hdr.command >= IB_USER_VERBS_CMD_THRESHOLD) {
|
||||
struct ib_uverbs_cmd_hdr_ex hdr_ex;
|
||||
|
||||
@ -621,6 +624,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
|
||||
(hdr_ex.out_words +
|
||||
hdr_ex.provider_out_words) * 4);
|
||||
} else {
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
if (hdr.in_words * 4 != count)
|
||||
return -EINVAL;
|
||||
|
||||
@ -628,7 +632,9 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf,
|
||||
buf + sizeof(hdr),
|
||||
hdr.in_words * 4,
|
||||
hdr.out_words * 4);
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
}
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
}
|
||||
|
||||
static int ib_uverbs_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
|
@ -1691,9 +1691,11 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
|
||||
ibdev->ib_dev.create_flow = mlx4_ib_create_flow;
|
||||
ibdev->ib_dev.destroy_flow = mlx4_ib_destroy_flow;
|
||||
|
||||
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
|
||||
ibdev->ib_dev.uverbs_cmd_mask |=
|
||||
(1ull << IB_USER_VERBS_CMD_CREATE_FLOW) |
|
||||
(1ull << IB_USER_VERBS_CMD_DESTROY_FLOW);
|
||||
#endif /* CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING */
|
||||
}
|
||||
|
||||
mlx4_ib_alloc_eqs(dev, ibdev);
|
||||
|
@ -594,7 +594,7 @@ isert_connect_release(struct isert_conn *isert_conn)
|
||||
|
||||
pr_debug("Entering isert_connect_release(): >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
|
||||
|
||||
if (device->use_frwr)
|
||||
if (device && device->use_frwr)
|
||||
isert_conn_free_frwr_pool(isert_conn);
|
||||
|
||||
if (isert_conn->conn_qp) {
|
||||
|
@ -1734,6 +1734,7 @@ EXPORT_SYMBOL_GPL(input_class);
|
||||
*/
|
||||
struct input_dev *input_allocate_device(void)
|
||||
{
|
||||
static atomic_t input_no = ATOMIC_INIT(0);
|
||||
struct input_dev *dev;
|
||||
|
||||
dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL);
|
||||
@ -1743,9 +1744,13 @@ struct input_dev *input_allocate_device(void)
|
||||
device_initialize(&dev->dev);
|
||||
mutex_init(&dev->mutex);
|
||||
spin_lock_init(&dev->event_lock);
|
||||
init_timer(&dev->timer);
|
||||
INIT_LIST_HEAD(&dev->h_list);
|
||||
INIT_LIST_HEAD(&dev->node);
|
||||
|
||||
dev_set_name(&dev->dev, "input%ld",
|
||||
(unsigned long) atomic_inc_return(&input_no) - 1);
|
||||
|
||||
__module_get(THIS_MODULE);
|
||||
}
|
||||
|
||||
@ -2019,7 +2024,6 @@ static void devm_input_device_unregister(struct device *dev, void *res)
|
||||
*/
|
||||
int input_register_device(struct input_dev *dev)
|
||||
{
|
||||
static atomic_t input_no = ATOMIC_INIT(0);
|
||||
struct input_devres *devres = NULL;
|
||||
struct input_handler *handler;
|
||||
unsigned int packet_size;
|
||||
@ -2059,7 +2063,6 @@ int input_register_device(struct input_dev *dev)
|
||||
* If delay and period are pre-set by the driver, then autorepeating
|
||||
* is handled by the driver itself and we don't do it in input.c.
|
||||
*/
|
||||
init_timer(&dev->timer);
|
||||
if (!dev->rep[REP_DELAY] && !dev->rep[REP_PERIOD]) {
|
||||
dev->timer.data = (long) dev;
|
||||
dev->timer.function = input_repeat_key;
|
||||
@ -2073,9 +2076,6 @@ int input_register_device(struct input_dev *dev)
|
||||
if (!dev->setkeycode)
|
||||
dev->setkeycode = input_default_setkeycode;
|
||||
|
||||
dev_set_name(&dev->dev, "input%ld",
|
||||
(unsigned long) atomic_inc_return(&input_no) - 1);
|
||||
|
||||
error = device_add(&dev->dev);
|
||||
if (error)
|
||||
goto err_free_vals;
|
||||
|
@ -786,10 +786,17 @@ static int pxa27x_keypad_probe(struct platform_device *pdev)
|
||||
input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
|
||||
input_set_capability(input_dev, EV_MSC, MSC_SCAN);
|
||||
|
||||
if (pdata)
|
||||
if (pdata) {
|
||||
error = pxa27x_keypad_build_keycode(keypad);
|
||||
else
|
||||
} else {
|
||||
error = pxa27x_keypad_build_keycode_from_dt(keypad);
|
||||
/*
|
||||
* Data that we get from DT resides in dynamically
|
||||
* allocated memory so we need to update our pdata
|
||||
* pointer.
|
||||
*/
|
||||
pdata = keypad->pdata;
|
||||
}
|
||||
if (error) {
|
||||
dev_err(&pdev->dev, "failed to build keycode\n");
|
||||
goto failed_put_clk;
|
||||
|
@ -351,7 +351,9 @@ static void cm109_urb_irq_callback(struct urb *urb)
|
||||
if (status) {
|
||||
if (status == -ESHUTDOWN)
|
||||
return;
|
||||
dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status);
|
||||
dev_err_ratelimited(&dev->intf->dev, "%s: urb status %d\n",
|
||||
__func__, status);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Special keys */
|
||||
@ -418,8 +420,12 @@ static void cm109_urb_ctl_callback(struct urb *urb)
|
||||
dev->ctl_data->byte[2],
|
||||
dev->ctl_data->byte[3]);
|
||||
|
||||
if (status)
|
||||
dev_err(&dev->intf->dev, "%s: urb status %d\n", __func__, status);
|
||||
if (status) {
|
||||
if (status == -ESHUTDOWN)
|
||||
return;
|
||||
dev_err_ratelimited(&dev->intf->dev, "%s: urb status %d\n",
|
||||
__func__, status);
|
||||
}
|
||||
|
||||
spin_lock(&dev->ctl_submit_lock);
|
||||
|
||||
@ -427,7 +433,7 @@ static void cm109_urb_ctl_callback(struct urb *urb)
|
||||
|
||||
if (likely(!dev->shutdown)) {
|
||||
|
||||
if (dev->buzzer_pending) {
|
||||
if (dev->buzzer_pending || status) {
|
||||
dev->buzzer_pending = 0;
|
||||
dev->ctl_urb_pending = 1;
|
||||
cm109_submit_buzz_toggle(dev);
|
||||
|
@ -103,6 +103,7 @@ static const struct alps_model_info alps_model_data[] = {
|
||||
/* Dell Latitude E5500, E6400, E6500, Precision M4400 */
|
||||
{ { 0x62, 0x02, 0x14 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf,
|
||||
ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
|
||||
{ { 0x73, 0x00, 0x14 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_DUALPOINT }, /* Dell XT2 */
|
||||
{ { 0x73, 0x02, 0x50 }, 0x00, ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
|
||||
{ { 0x52, 0x01, 0x14 }, 0x00, ALPS_PROTO_V2, 0xff, 0xff,
|
||||
ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
|
||||
|
@ -223,21 +223,26 @@ static int i8042_flush(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned char data, str;
|
||||
int i = 0;
|
||||
int count = 0;
|
||||
int retval = 0;
|
||||
|
||||
spin_lock_irqsave(&i8042_lock, flags);
|
||||
|
||||
while (((str = i8042_read_status()) & I8042_STR_OBF) && (i < I8042_BUFFER_SIZE)) {
|
||||
udelay(50);
|
||||
data = i8042_read_data();
|
||||
i++;
|
||||
dbg("%02x <- i8042 (flush, %s)\n",
|
||||
data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
|
||||
while ((str = i8042_read_status()) & I8042_STR_OBF) {
|
||||
if (count++ < I8042_BUFFER_SIZE) {
|
||||
udelay(50);
|
||||
data = i8042_read_data();
|
||||
dbg("%02x <- i8042 (flush, %s)\n",
|
||||
data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
|
||||
} else {
|
||||
retval = -EIO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&i8042_lock, flags);
|
||||
|
||||
return i;
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -849,7 +854,7 @@ static int __init i8042_check_aux(void)
|
||||
|
||||
static int i8042_controller_check(void)
|
||||
{
|
||||
if (i8042_flush() == I8042_BUFFER_SIZE) {
|
||||
if (i8042_flush()) {
|
||||
pr_err("No controller found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@ -1031,6 +1031,7 @@ static void wacom_destroy_leds(struct wacom *wacom)
|
||||
}
|
||||
|
||||
static enum power_supply_property wacom_battery_props[] = {
|
||||
POWER_SUPPLY_PROP_SCOPE,
|
||||
POWER_SUPPLY_PROP_CAPACITY
|
||||
};
|
||||
|
||||
@ -1042,6 +1043,9 @@ static int wacom_battery_get_property(struct power_supply *psy,
|
||||
int ret = 0;
|
||||
|
||||
switch (psp) {
|
||||
case POWER_SUPPLY_PROP_SCOPE:
|
||||
val->intval = POWER_SUPPLY_SCOPE_DEVICE;
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CAPACITY:
|
||||
val->intval =
|
||||
wacom->wacom_wac.battery_capacity * 100 / 31;
|
||||
|
@ -2054,6 +2054,12 @@ static const struct wacom_features wacom_features_0x101 =
|
||||
static const struct wacom_features wacom_features_0x10D =
|
||||
{ "Wacom ISDv4 10D", WACOM_PKGLEN_MTTPC, 26202, 16325, 255,
|
||||
0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
static const struct wacom_features wacom_features_0x10E =
|
||||
{ "Wacom ISDv4 10E", WACOM_PKGLEN_MTTPC, 27760, 15694, 255,
|
||||
0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
static const struct wacom_features wacom_features_0x10F =
|
||||
{ "Wacom ISDv4 10F", WACOM_PKGLEN_MTTPC, 27760, 15694, 255,
|
||||
0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
static const struct wacom_features wacom_features_0x4001 =
|
||||
{ "Wacom ISDv4 4001", WACOM_PKGLEN_MTTPC, 26202, 16325, 255,
|
||||
0, MTTPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
|
||||
@ -2248,6 +2254,8 @@ const struct usb_device_id wacom_ids[] = {
|
||||
{ USB_DEVICE_WACOM(0x100) },
|
||||
{ USB_DEVICE_WACOM(0x101) },
|
||||
{ USB_DEVICE_WACOM(0x10D) },
|
||||
{ USB_DEVICE_WACOM(0x10E) },
|
||||
{ USB_DEVICE_WACOM(0x10F) },
|
||||
{ USB_DEVICE_WACOM(0x300) },
|
||||
{ USB_DEVICE_WACOM(0x301) },
|
||||
{ USB_DEVICE_WACOM(0x304) },
|
||||
|
@ -1000,7 +1000,7 @@ static void request_write(struct cached_dev *dc, struct search *s)
|
||||
|
||||
if (bio->bi_rw & REQ_FLUSH) {
|
||||
/* Also need to send a flush to the backing device */
|
||||
struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
|
||||
struct bio *flush = bio_alloc_bioset(GFP_NOIO, 0,
|
||||
dc->disk.bio_split);
|
||||
|
||||
flush->bi_rw = WRITE_FLUSH;
|
||||
|
@ -8111,6 +8111,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
||||
u64 *p;
|
||||
int lo, hi;
|
||||
int rv = 1;
|
||||
unsigned long flags;
|
||||
|
||||
if (bb->shift < 0)
|
||||
/* badblocks are disabled */
|
||||
@ -8125,7 +8126,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
||||
sectors = next - s;
|
||||
}
|
||||
|
||||
write_seqlock_irq(&bb->lock);
|
||||
write_seqlock_irqsave(&bb->lock, flags);
|
||||
|
||||
p = bb->page;
|
||||
lo = 0;
|
||||
@ -8241,7 +8242,7 @@ static int md_set_badblocks(struct badblocks *bb, sector_t s, int sectors,
|
||||
bb->changed = 1;
|
||||
if (!acknowledged)
|
||||
bb->unacked_exist = 1;
|
||||
write_sequnlock_irq(&bb->lock);
|
||||
write_sequnlock_irqrestore(&bb->lock, flags);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
@ -1479,6 +1479,7 @@ static int raid1_spare_active(struct mddev *mddev)
|
||||
}
|
||||
}
|
||||
if (rdev
|
||||
&& rdev->recovery_offset == MaxSector
|
||||
&& !test_bit(Faulty, &rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &rdev->flags)) {
|
||||
count++;
|
||||
|
@ -1782,6 +1782,7 @@ static int raid10_spare_active(struct mddev *mddev)
|
||||
}
|
||||
sysfs_notify_dirent_safe(tmp->replacement->sysfs_state);
|
||||
} else if (tmp->rdev
|
||||
&& tmp->rdev->recovery_offset == MaxSector
|
||||
&& !test_bit(Faulty, &tmp->rdev->flags)
|
||||
&& !test_and_set_bit(In_sync, &tmp->rdev->flags)) {
|
||||
count++;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user