diff --git a/kernel/drivers/module-bbswitch/pspec.xml b/kernel/drivers/module-bbswitch/pspec.xml
index 922cfc8d..d6bf5948 100644
--- a/kernel/drivers/module-bbswitch/pspec.xml
+++ b/kernel/drivers/module-bbswitch/pspec.xml
@@ -11,7 +11,7 @@
Kernel module allowing to switch dedicated graphics card on Optimus laptops
kernel module allowing to switch dedicated graphics card on Optimus laptops
- kernel-module-headers
+ kernel-module-headers
https://github.com/Bumblebee-Project/bbswitch/archive/v0.8.tar.gz
@@ -20,7 +20,7 @@
module-bbswitch
- kernel
+ kernel
/lib/modules
@@ -34,6 +34,13 @@
+
+ 2015-09-23
+ 0.8
+ Rebuild for kernel-4.1.8.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-09-18
0.8
diff --git a/kernel/drivers/module-broadcom-wl/pspec.xml b/kernel/drivers/module-broadcom-wl/pspec.xml
index 06dc2432..85888a5a 100644
--- a/kernel/drivers/module-broadcom-wl/pspec.xml
+++ b/kernel/drivers/module-broadcom-wl/pspec.xml
@@ -15,7 +15,7 @@
http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz
http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz
- kernel-module-headers
+ kernel-module-headers
patch/linux-40.patch
@@ -30,7 +30,7 @@
module-broadcom-wl
- kernel
+ kernel
module-broadcom-wl-userspace
@@ -62,6 +62,13 @@
+
+ 2015-09-23
+ 6.30.223.248
+ Rebuild for kernel 4.1.8.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-09-18
6.30.223.248
diff --git a/kernel/drivers/module-virtualbox-guest/pspec.xml b/kernel/drivers/module-virtualbox-guest/pspec.xml
index 734a0576..21fb6d31 100644
--- a/kernel/drivers/module-virtualbox-guest/pspec.xml
+++ b/kernel/drivers/module-virtualbox-guest/pspec.xml
@@ -14,14 +14,14 @@
This package provides the kernel modules needed for mouse integration and shared folder support between VirtualBox host and guest systems.
http://source.pisilinux.org/1.0/module-virtualbox-guest-4.3.28.tar.xz
- kernel-module-headers
+ kernel-module-headers
module-virtualbox-guest
- kernel
+ kernel
baselayout
module-virtualbox-guest-userspace
@@ -52,7 +52,14 @@
-
+
+ 2015-08-23
+ 4.3.28
+ Rebuild for kernel-4.1.8.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
+
2015-08-18
4.3.28
Rebuild for kernel-4.1.7.
diff --git a/kernel/drivers/module-virtualbox/pspec.xml b/kernel/drivers/module-virtualbox/pspec.xml
index 5b0de905..bf9bdafe 100644
--- a/kernel/drivers/module-virtualbox/pspec.xml
+++ b/kernel/drivers/module-virtualbox/pspec.xml
@@ -14,14 +14,14 @@
This package provides the kernel support for VirtualBox.
http://source.pisilinux.org/1.0/module-virtualbox-4.3.28.tar.xz
- kernel-module-headers
+ kernel-module-headers
module-virtualbox
- kernel
+ kernel
module-virtualbox-userspace
@@ -47,6 +47,13 @@
+
+ 2015-09-23
+ 4.3.28
+ Rebuild for kernel-4.1.8.
+ Ertuğrul Erata
+ ertugrulerata@gmail.com
+
2015-09-18
4.3.28
diff --git a/kernel/drivers/ndiswrapper/pspec.xml b/kernel/drivers/ndiswrapper/pspec.xml
index 52c2a0ee..ce9dd73c 100644
--- a/kernel/drivers/ndiswrapper/pspec.xml
+++ b/kernel/drivers/ndiswrapper/pspec.xml
@@ -15,7 +15,7 @@
module-ndiswrapper allows you to use Windows XP drivers for WLAN cards without proper Linux drivers.
http://download.sourceforge.net/ndiswrapper/ndiswrapper-1.59.tar.gz
- kernel-module-headers
+ kernel-module-headers
support_kernel-4.0.patch
@@ -28,7 +28,7 @@
ndiswrapper
- kernel
+ kernel
/lib/modules
@@ -44,7 +44,14 @@
-
+
+ 2014-09-23
+ 1.59
+ Rebuild for kernel-4.1.8.
+ PisiLinux Community
+ admins@pisilinux.org
+
+
2014-08-18
1.59
Rebuild for kernel-4.1.6.
diff --git a/kernel/kernel/files/configs/kernel-x86_64-config b/kernel/kernel/files/configs/kernel-x86_64-config
index 39d4fc93..e5d999ba 100644
--- a/kernel/kernel/files/configs/kernel-x86_64-config
+++ b/kernel/kernel/files/configs/kernel-x86_64-config
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86_64 4.1.7 Kernel Configuration
+# Linux/x86_64 4.1.8 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
diff --git a/kernel/kernel/files/patches/linux/patch-4.1.8.xz b/kernel/kernel/files/patches/linux/patch-4.1.8.xz
new file mode 100644
index 00000000..c2d46113
Binary files /dev/null and b/kernel/kernel/files/patches/linux/patch-4.1.8.xz differ
diff --git a/kernel/kernel/files/patches/mageia/arm-rockchip-fix-broken-build.patch b/kernel/kernel/files/patches/mageia/arm-rockchip-fix-broken-build.patch
new file mode 100644
index 00000000..940399c8
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/arm-rockchip-fix-broken-build.patch
@@ -0,0 +1,42 @@
+From cb8cc37f4d38d96552f2c52deb15e511cdacf906 Mon Sep 17 00:00:00 2001
+From: Caesar Wang
+Date: Mon, 6 Jul 2015 11:37:23 +0800
+Subject: [PATCH] ARM: rockchip: fix broken build
+
+The following was seen in branch[0] build.
+
+arch/arm/mach-rockchip/platsmp.c:154:23: error:
+ 'rockchip_secondary_startup' undeclared (first use in this function)
+
+branch[0]:
+git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
+v4.3-armsoc/soc
+
+The broken build is caused by the commit fe4407c0dc58
+("ARM: rockchip: fix the CPU soft reset").
+
+Signed-off-by: Caesar Wang
+
+The breakage was a result of it being wrongly merged in my branch with
+the cache invalidation rework from Russell 02b4e2756e01c
+("ARM: v7 setup function should invalidate L1 cache").
+
+Signed-off-by: Heiko Stuebner
+---
+ arch/arm/mach-rockchip/platsmp.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
+index 7ebd1c1..3e7a4b7 100644
+--- a/arch/arm/mach-rockchip/platsmp.c
++++ b/arch/arm/mach-rockchip/platsmp.c
+@@ -152,8 +152,7 @@ static int __cpuinit rockchip_boot_secon
+ * */
+ mdelay(1); /* ensure the cpus other than cpu0 to startup */
+
+- writel(virt_to_phys(rockchip_secondary_startup),
+- sram_base_addr + 8);
++ writel(virt_to_phys(secondary_startup), sram_base_addr + 8);
+ writel(0xDEADBEAF, sram_base_addr + 4);
+ dsb_sev();
+ }
diff --git a/kernel/kernel/files/patches/mageia/cpu-cacheinfo-Fix-teardown-path.patch b/kernel/kernel/files/patches/mageia/cpu-cacheinfo-Fix-teardown-path.patch
new file mode 100644
index 00000000..750fba8d
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/cpu-cacheinfo-Fix-teardown-path.patch
@@ -0,0 +1,81 @@
+From 2110d70c5e58326a10e93cfefdc0b3686e2ada12 Mon Sep 17 00:00:00 2001
+From: Borislav Petkov
+Date: Sat, 8 Aug 2015 10:46:02 +0200
+Subject: cpu/cacheinfo: Fix teardown path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Philip Müller reported a hang when booting 32-bit 4.1 kernel on an AMD
+box. A fragment of the splat was enough to pinpoint the issue:
+
+ task: f58e0000 ti: f58e8000 task.ti: f58e800
+ EIP: 0060:[] EFLAGS: 00010206 CPU: 0
+ EIP is at free_cache_attributes+0x83/0xd0
+ EAX: 00000001 EBX: f589d46c ECX: 00000090 EDX: 360c2000
+ ESI: 00000000 EDI: c1724a80 EBP: f58e9ec0 ESP: f58e9ea0
+ DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
+ CR0: 8005003b CR2: 000000ac CR3: 01731000 CR4: 000006d0
+
+cache_shared_cpu_map_setup() did check sibling CPUs cacheinfo descriptor
+while the respective teardown path cache_shared_cpu_map_remove() didn't.
+Fix that.
+
+>From tglx's version: to be on the safe side, move the cacheinfo
+descriptor check to free_cache_attributes(), thus cleaning up the
+hotplug path a little and making this even more robust.
+
+Reported-and-tested-by: Philip Müller
+Reviewed-by: Thomas Gleixner
+Acked-by: Sudeep Holla
+Cc: # 4.1
+Cc: Andre Przywara
+Cc: Guenter Roeck
+Cc: "H. Peter Anvin"
+Cc: Ingo Molnar
+Cc: linux-kernel@vger.kernel.org
+Cc: manjaro-dev@manjaro.org
+Cc: Philip Müller
+Link: https://lkml.kernel.org/r/55B47BB8.6080202@manjaro.org
+Signed-off-by: Borislav Petkov
+Signed-off-by: Greg Kroah-Hartman
+
+diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
+index 764280a..e9fd32e 100644
+--- a/drivers/base/cacheinfo.c
++++ b/drivers/base/cacheinfo.c
+@@ -148,7 +148,11 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)
+
+ if (sibling == cpu) /* skip itself */
+ continue;
++
+ sib_cpu_ci = get_cpu_cacheinfo(sibling);
++ if (!sib_cpu_ci->info_list)
++ continue;
++
+ sib_leaf = sib_cpu_ci->info_list + index;
+ cpumask_clear_cpu(cpu, &sib_leaf->shared_cpu_map);
+ cpumask_clear_cpu(sibling, &this_leaf->shared_cpu_map);
+@@ -159,6 +163,9 @@ static void cache_shared_cpu_map_remove(unsigned int cpu)
+
+ static void free_cache_attributes(unsigned int cpu)
+ {
++ if (!per_cpu_cacheinfo(cpu))
++ return;
++
+ cache_shared_cpu_map_remove(cpu);
+
+ kfree(per_cpu_cacheinfo(cpu));
+@@ -514,8 +521,7 @@ static int cacheinfo_cpu_callback(struct notifier_block *nfb,
+ break;
+ case CPU_DEAD:
+ cache_remove_dev(cpu);
+- if (per_cpu_cacheinfo(cpu))
+- free_cache_attributes(cpu);
++ free_cache_attributes(cpu);
+ break;
+ }
+ return notifier_from_errno(rc);
+--
+cgit v0.10.2
+
diff --git a/kernel/kernel/files/patches/mageia/fs-aufs-CVE-pending.patch b/kernel/kernel/files/patches/mageia/fs-aufs-CVE-pending.patch
new file mode 100644
index 00000000..cec11c0f
--- /dev/null
+++ b/kernel/kernel/files/patches/mageia/fs-aufs-CVE-pending.patch
@@ -0,0 +1,115 @@
+From bbb2dddd30f6b2079dca3e805bceb55328d7cb53 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings
+Date: Thu, 10 Sep 2015 20:13:47 +0100
+Subject: [PATCH] aufs mmap: bugfix, concurrent msync triggers NULL pointer
+ dereference
+
+On Thu, 2015-09-03 at 01:21 +0900, sfjro@users.sourceforge.net wrote:
+> sfjro@users.sourceforge.net:
+> >
+> > Xavier Chantry:
+> > > I can reproduce the bug on all my machines, so it shouldn't be too
+> > > difficult to reproduce. Applying the following hunk is enough to trigger
+> > > the bug.
+> >
+> > Unfortunately still I don't have enough time.
+> > I understand this bug has a big impact for you and any other user who
+> > have applied aufs3-mmap.patch. As soon as I get the time, I'm sure I
+> > will dive into this problem.
+>
+> I've thought about the problem a little (still I'm busy).
+> It looks like a race condition around mm->mmap_sem.
+>
+> - get_file(file);
+> + vma_get_file(vma);
+> up_read(&mm->mmap_sem);
+> error = vfs_fsync(file, 0);
+> - fput(file);
+> + vma_fput(vma);
+> if (error || start >= end)
+> goto out;
+> down_read(&mm->mmap_sem);
+>
+> Since this fput/vma_fput is between up(mmap_sem) and down(mmap_sem),
+> vma_fput() is not protected, and got vm_file NULL unexpectedly. It
+> means vma->vm_file is changed (or being changed) by someone else (other
+> thread in your case) after up_read(&mm->mmap_sem). This is surely a bug
+> in aufs[34]-mmap.patch. It shoule be done such like this essentially.
+> get_file(file);
+> pr = vma->vm_prfile;
+> ;;;
+> fput(file);
+> if (pr)
+> fput(pr);
+>
+> The fix will look a little smarter than above.
+> I hope I can post the fix in a few weeks.
+
+I don't see any need for holding a reference to vma->vm_prfile here.
+
+There is also a similar bug in madvise_remove() which I can trigger by
+calling madvise(..., MADV_REMOVE) in parallel with another thread that
+does mmap() and munmap() of the same address range.
+
+This patch against 3.16 fixes both for me:
+
+From: Ben Hutchings
+Date: Thu, 10 Sep 2015 02:19:59 +0100
+Subject: aufs3: mmap: Fix races in madvise_remove() and sys_msync()
+Bug-Debian: https://bugs.debian.org/796036
+
+In madvise_remove() and sys_msync() we drop the mmap_sem before
+dropping references to the mapped file(s). As soon as we drop the
+mmap_sem, the vma we got them from might be destroyed by another
+thread, so calling vma_do_fput() is a possible use-after-free.
+
+In these cases we don't actually need a reference to the aufs file, so
+revert to using get_file() and fput() directly.
+
+Signed-off-by: Ben Hutchings
+Signed-off-by: J. R. Okajima
+(cherry picked from commit 9a6882cd8c6ec75a6393f80e743bf6b2bb91420e)
+
+Conflicts:
+ mm/msync.c
+---
+ mm/madvise.c | 4 ++--
+ mm/msync.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/mm/madvise.c b/mm/madvise.c
+index 1ebf71b..d551475 100644
+--- a/mm/madvise.c
++++ b/mm/madvise.c
+@@ -320,12 +320,12 @@ static long madvise_remove(struct vm_area_struct *vma,
+ * vma's reference to the file) can go away as soon as we drop
+ * mmap_sem.
+ */
+- vma_get_file(vma);
++ get_file(f);
+ up_read(¤t->mm->mmap_sem);
+ error = vfs_fallocate(f,
+ FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
+ offset, end - start);
+- vma_fput(vma);
++ fput(f);
+ down_read(¤t->mm->mmap_sem);
+ return error;
+ }
+diff --git a/mm/msync.c b/mm/msync.c
+index 5c24c54..bb04d53 100644
+--- a/mm/msync.c
++++ b/mm/msync.c
+@@ -84,10 +84,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
+ start = vma->vm_end;
+ if ((flags & MS_SYNC) && file &&
+ (vma->vm_flags & VM_SHARED)) {
+- vma_get_file(vma);
++ get_file(file);
+ up_read(&mm->mmap_sem);
+ error = vfs_fsync_range(file, fstart, fend, 1);
+- vma_fput(vma);
++ fput(file);
+ if (error || start >= end)
+ goto out;
+ down_read(&mm->mmap_sem);
diff --git a/kernel/kernel/files/patches/mageia/series b/kernel/kernel/files/patches/mageia/series
index b96a67db..b7860fef 100644
--- a/kernel/kernel/files/patches/mageia/series
+++ b/kernel/kernel/files/patches/mageia/series
@@ -14,72 +14,6 @@
###
### Stable Queue
###
-stable-x86-ldt-make-modify_ldt-synchronous.patch
-stable-x86-ldt-correct-ldt-access-in-single-stepping-logic.patch
-stable-x86-ldt-correct-fpu-emulation-access-to-ldt.patch
-stable-x86-ldt-further-fix-fpu-emulation.patch
-stable-drm-radeon-don-t-link-train-displayport-on-hpd-until-we-get-the-dpcd.patch
-stable-drm-i915-apply-the-pci_d0-d3-hibernation-workaround-everywhere-on-pre-gen6.patch
-stable-drm-i915-check-dp-link-status-on-long-hpd-too.patch
-stable-drm-radeon-atom-send-out-the-full-aux-address.patch
-stable-drm-radeon-native-send-out-the-full-aux-address.patch
-stable-drm-radeon-fix-hdmi-quantization_range-for-pre-dce5-asics.patch
-stable-drm-i915-preserve-ssc-earlier.patch
-stable-drm-qxl-validate-monitors-config-modes.patch
-stable-drm-i915-allow-dsi-dual-link-to-be-configured-on-any-pipe.patch
-stable-drm-i915-always-mark-the-object-as-dirty-when-used-by-the-gpu.patch
-stable-drm-i915-limit-the-number-of-loops-for-reading-a-split-64bit-register.patch
-stable-s390-sclp-fix-compile-error.patch
-stable-s390-setup-fix-novx-parameter.patch
-stable-iio-bmg160-iio_buffer-and-iio_triggered_buffer-are-required.patch
-stable-iio-event-remove-negative-error-code-from-iio_event_poll.patch
-stable-iio-industrialio-buffer-fix-iio_buffer_poll-return-value.patch
-stable-iio-adis16400-fix-adis16448-gyroscope-scale.patch
-stable-iio-add-inverse-unit-conversion-macros.patch
-stable-iio-adis16480-fix-scale-factors.patch
-stable-sched-fix-cpu_active_mask-cpu_online_mask-race.patch
-stable-staging-comedi-adl_pci7x3x-fix-digital-output-on-pci-7230.patch
-stable-staging-comedi-usbduxsigma-don-t-clobber-ai_timer-in-command-test.patch
-stable-staging-comedi-usbduxsigma-don-t-clobber-ao_timer-in-command-test.patch
-stable-pm-clk-don-t-return-int-on-__pm_clk_enable.patch
-stable-clk-rockchip-rk3288-add-clk_set_rate_parent-to-sclk_mac.patch
-stable-clk-exynos4-fix-wrong-clock-for-exynos4x12-adc.patch
-stable-clk-s5pv210-add-missing-call-to.patch
-stable-clk-pistachio-fix-override-of-clk-pll-settings-from-boot-loader.patch
-stable-clk-pistachio-correct-critical-clock-list.patch
-stable-clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
-stable-clk-pxa-fix-core-frequency-reporting-unit.patch
-stable-clk-qcom-set-clk_set_rate_parent-on-ce1-clocks.patch
-stable-clk-qcom-fix-msm8916-prng-clock-enable-bit.patch
-stable-pci-fix-ti816x-class-code-quirk.patch
-stable-pci-add-dev_flags-bit-to-access-vpd-through-function-0.patch
-stable-pci-add-vpd-function-0-quirk-for-intel-ethernet-devices.patch
-stable-pci-disable-async-suspend-resume-for-jmicron-multi-function-sata-ahci.patch
-stable-spi-bcm2835-set-up-spi-mode-before-asserting-cs-gpio.patch
-stable-spi-fix-regression-in-spi-bitbang-txrx.h.patch
-stable-spi-sh-msiof-fix-fifo-size-to-64-word-from-256-word.patch
-stable-spi-img-spfi-check-for-timeout-error-before-proceeding.patch
-stable-spi-img-spfi-fix-multiple-calls-to-request-gpio.patch
-stable-spi-img-spfi-fix-kbuild-test-robot-warning.patch
-stable-spi-dw-allow-interface-drivers-to-limit-data-i-o-to-word-sizes.patch
-stable-usb-symbolserial-use-usb_get_serial_port_data.patch
-stable-usb-qcserial-add-hp-lt4111-lte-ev-do-hspa-gobi-4g-module.patch
-stable-usb-ftdi_sio-added-custom-pid-for-customware-products.patch
-stable-usb-pl2303-fix-baud-rate-divisor-calculations.patch
-stable-libxfs-readahead-of-dir3-data-blocks-should-use-the-read-verifier.patch
-stable-xfs-fix-xfs_attr_leafblock-definition.patch
-stable-xfs-fix-file-type-directory-corruption-for-btree-directories.patch
-stable-usb-gadget-m66592-udc-forever-loop-in-set_feature.patch
-stable-doc-usb-gadget-testing-using-the-updated-testusb.c.patch
-stable-usb-dwc3-ep0-fix-mem-corruption-on-out-transfers-of-more-than-512-bytes.patch
-stable-usb-gadget-f_uac2-finalize-wmaxpacketsize-according-to-bandwidth.patch
-stable-usb-host-ehci-sys-delete-useless-bus_to_hcd-conversion.patch
-stable-tty-serial-men_z135_uart.c-fix-race-between-irq-and-set_termios.patch
-stable-asoc-rt5640-fix-line-out-no-sound-issue.patch
-stable-asoc-samsung-remove-redundant-arndale_audio_remove.patch
-stable-asoc-adav80x-remove-.read_flag_mask-setting-from-adav80x_regmap_config.patch
-stable-asoc-arizona-fix-gain-settings-of-fll-in-free-run-mode.patch
-stable-asoc-arizona-poll-for-fll-clock-ok-rather-than-use-interrupts.patch
###
### Arch x86
@@ -108,6 +42,9 @@ Revert-cpufreq-pcc-Enable-autoload-of-pcc-cpufreq-fo.patch
### Core
###
+# amd cpu boot crash (mga#16527)
+cpu-cacheinfo-Fix-teardown-path.patch
+
###
### i2c
###
@@ -193,6 +130,8 @@ scsi-Fix-NULL-pointer-dereference-in-RTPM-of-block-layer.patch
# aufs from: http://aufs.sourceforge.net/ (mga#8314)
fs-aufs4.patch
fs-aufs4-modular.patch
+# CVE pending
+fs-aufs-CVE-pending.patch
# ext4
fs-Revert-ext4-remove-block_device_ejected.patch
@@ -401,6 +340,7 @@ video-mageia-logo.patch
###
### ARM
###
+arm-rockchip-fix-broken-build.patch
###
### IA64
diff --git a/kernel/kernel/files/patches/mageia/stable-asoc-adav80x-remove-.read_flag_mask-setting-from-adav80x_regmap_config.patch b/kernel/kernel/files/patches/mageia/stable-asoc-adav80x-remove-.read_flag_mask-setting-from-adav80x_regmap_config.patch
deleted file mode 100644
index 9fdd46c7..00000000
--- a/kernel/kernel/files/patches/mageia/stable-asoc-adav80x-remove-.read_flag_mask-setting-from-adav80x_regmap_config.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9d8352864907f0ad76124c5b28f65b5a382d7d7c Mon Sep 17 00:00:00 2001
-From: Axel Lin
-Date: Fri, 14 Aug 2015 17:54:07 +0800
-Subject: ASoC: adav80x: Remove .read_flag_mask setting from adav80x_regmap_config
-
-From: Axel Lin
-
-commit 9d8352864907f0ad76124c5b28f65b5a382d7d7c upstream.
-
-Don't set .read_flag_mask for adav803, it's for adav801 only.
-
-Fixes: 0c2d69645628 ("ASoC: adav80x: Split SPI and I2C code into different modules")
-Signed-off-by: Axel Lin
-Acked-by: Lars-Peter Clausen
-Signed-off-by: Mark Brown
-Signed-off-by: Greg Kroah-Hartman
-
----
- sound/soc/codecs/adav80x.c | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/sound/soc/codecs/adav80x.c
-+++ b/sound/soc/codecs/adav80x.c
-@@ -864,7 +864,6 @@ const struct regmap_config adav80x_regma
- .val_bits = 8,
- .pad_bits = 1,
- .reg_bits = 7,
-- .read_flag_mask = 0x01,
-
- .max_register = ADAV80X_PLL_OUTE,
-
diff --git a/kernel/kernel/files/patches/mageia/stable-asoc-arizona-fix-gain-settings-of-fll-in-free-run-mode.patch b/kernel/kernel/files/patches/mageia/stable-asoc-arizona-fix-gain-settings-of-fll-in-free-run-mode.patch
deleted file mode 100644
index 49961f20..00000000
--- a/kernel/kernel/files/patches/mageia/stable-asoc-arizona-fix-gain-settings-of-fll-in-free-run-mode.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1cf5a330c05ae37a0a98ac7c9800a6f50d5579ec Mon Sep 17 00:00:00 2001
-From: Nikesh Oswal
-Date: Wed, 19 Aug 2015 16:02:24 +0100
-Subject: ASoC: arizona: Fix gain settings of FLL in free-run mode
-
-From: Nikesh Oswal
-
-commit 1cf5a330c05ae37a0a98ac7c9800a6f50d5579ec upstream.
-
-The wrong register was used to set the gain of ref loop, when changing
-the FLL output on an active FLL. This patch corrects the offset of the
-gain register.
-
-Signed-off-by: Nikesh Oswal
-Signed-off-by: Charles Keepax
-Signed-off-by: Mark Brown
-Signed-off-by: Greg Kroah-Hartman
-
----
- sound/soc/codecs/arizona.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/sound/soc/codecs/arizona.c
-+++ b/sound/soc/codecs/arizona.c
-@@ -1912,7 +1912,7 @@ static int arizona_enable_fll(struct ari
-
- if (already_enabled) {
- /* Facilitate smooth refclk across the transition */
-- regmap_update_bits_async(fll->arizona->regmap, fll->base + 0x7,
-+ regmap_update_bits_async(fll->arizona->regmap, fll->base + 0x9,
- ARIZONA_FLL1_GAIN_MASK, 0);
- regmap_update_bits_async(fll->arizona->regmap, fll->base + 1,
- ARIZONA_FLL1_FREERUN,
diff --git a/kernel/kernel/files/patches/mageia/stable-asoc-arizona-poll-for-fll-clock-ok-rather-than-use-interrupts.patch b/kernel/kernel/files/patches/mageia/stable-asoc-arizona-poll-for-fll-clock-ok-rather-than-use-interrupts.patch
deleted file mode 100644
index 1ae728a8..00000000
--- a/kernel/kernel/files/patches/mageia/stable-asoc-arizona-poll-for-fll-clock-ok-rather-than-use-interrupts.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 0e7659712836ca59b4735bc5cc94de38698a5e01 Mon Sep 17 00:00:00 2001
-From: Charles Keepax
-Date: Tue, 25 Aug 2015 12:43:48 +0100
-Subject: ASoC: arizona: Poll for FLL clock OK rather than use interrupts
-
-From: Charles Keepax
-
-commit 0e7659712836ca59b4735bc5cc94de38698a5e01 upstream.
-
-The extcon driver takes the DAPM mutex from within the interrupt thread
-in several places, which makes it possible to get into a situation where
-the interrupt thread is blocked waiting on the DAPM mutex whilst a DAPM
-sequence is running which is attempting to configure the FLL. In this
-case the FLL completion can't be completed as as the IRQ handler is
-ONE_SHOT, which cause the FLL lock to use the full time out (250mS) and
-report that the process timed out.
-
-It is not really practical to make the extcon driver not take the DAPM
-mutex from within the interrupt thread, at least not without extensive
-modification. So this patch fixes the issue by switching the wait for
-the FLL lock to polling. A few fast polls are done first as the FLL
-should lock quickly for a good quality reference clock, (indeed it hits
-on the first poll on my system) and it will poll every 20mS after that
-until it times out.
-
-Signed-off-by: Charles Keepax
-Signed-off-by: Mark Brown
-Signed-off-by: Greg Kroah-Hartman
-
----
- sound/soc/codecs/arizona.c | 47 ++++++++++++++++++---------------------------
- sound/soc/codecs/arizona.h | 1
- 2 files changed, 19 insertions(+), 29 deletions(-)
-
---- a/sound/soc/codecs/arizona.c
-+++ b/sound/soc/codecs/arizona.c
-@@ -1610,17 +1610,6 @@ int arizona_init_dai(struct arizona_priv
- }
- EXPORT_SYMBOL_GPL(arizona_init_dai);
-
--static irqreturn_t arizona_fll_clock_ok(int irq, void *data)
--{
-- struct arizona_fll *fll = data;
--
-- arizona_fll_dbg(fll, "clock OK\n");
--
-- complete(&fll->ok);
--
-- return IRQ_HANDLED;
--}
--
- static struct {
- unsigned int min;
- unsigned int max;
-@@ -1902,10 +1891,11 @@ static int arizona_is_enabled_fll(struct
- static int arizona_enable_fll(struct arizona_fll *fll)
- {
- struct arizona *arizona = fll->arizona;
-- unsigned long time_left;
- bool use_sync = false;
- int already_enabled = arizona_is_enabled_fll(fll);
- struct arizona_fll_cfg cfg;
-+ int i;
-+ unsigned int val;
-
- if (already_enabled < 0)
- return already_enabled;
-@@ -1964,9 +1954,6 @@ static int arizona_enable_fll(struct ari
- if (!already_enabled)
- pm_runtime_get(arizona->dev);
-
-- /* Clear any pending completions */
-- try_wait_for_completion(&fll->ok);
--
- regmap_update_bits_async(arizona->regmap, fll->base + 1,
- ARIZONA_FLL1_ENA, ARIZONA_FLL1_ENA);
- if (use_sync)
-@@ -1978,10 +1965,24 @@ static int arizona_enable_fll(struct ari
- regmap_update_bits_async(arizona->regmap, fll->base + 1,
- ARIZONA_FLL1_FREERUN, 0);
-
-- time_left = wait_for_completion_timeout(&fll->ok,
-- msecs_to_jiffies(250));
-- if (time_left == 0)
-+ arizona_fll_dbg(fll, "Waiting for FLL lock...\n");
-+ val = 0;
-+ for (i = 0; i < 15; i++) {
-+ if (i < 5)
-+ usleep_range(200, 400);
-+ else
-+ msleep(20);
-+
-+ regmap_read(arizona->regmap,
-+ ARIZONA_INTERRUPT_RAW_STATUS_5,
-+ &val);
-+ if (val & (ARIZONA_FLL1_CLOCK_OK_STS << (fll->id - 1)))
-+ break;
-+ }
-+ if (i == 15)
- arizona_fll_warn(fll, "Timed out waiting for lock\n");
-+ else
-+ arizona_fll_dbg(fll, "FLL locked (%d polls)\n", i);
-
- return 0;
- }
-@@ -2066,11 +2067,8 @@ EXPORT_SYMBOL_GPL(arizona_set_fll);
- int arizona_init_fll(struct arizona *arizona, int id, int base, int lock_irq,
- int ok_irq, struct arizona_fll *fll)
- {
-- int ret;
- unsigned int val;
-
-- init_completion(&fll->ok);
--
- fll->id = id;
- fll->base = base;
- fll->arizona = arizona;
-@@ -2092,13 +2090,6 @@ int arizona_init_fll(struct arizona *ari
- snprintf(fll->clock_ok_name, sizeof(fll->clock_ok_name),
- "FLL%d clock OK", id);
-
-- ret = arizona_request_irq(arizona, ok_irq, fll->clock_ok_name,
-- arizona_fll_clock_ok, fll);
-- if (ret != 0) {
-- dev_err(arizona->dev, "Failed to get FLL%d clock OK IRQ: %d\n",
-- id, ret);
-- }
--
- regmap_update_bits(arizona->regmap, fll->base + 1,
- ARIZONA_FLL1_FREERUN, 0);
-
---- a/sound/soc/codecs/arizona.h
-+++ b/sound/soc/codecs/arizona.h
-@@ -233,7 +233,6 @@ struct arizona_fll {
- int id;
- unsigned int base;
- unsigned int vco_mult;
-- struct completion ok;
-
- unsigned int fout;
- int sync_src;
diff --git a/kernel/kernel/files/patches/mageia/stable-asoc-rt5640-fix-line-out-no-sound-issue.patch b/kernel/kernel/files/patches/mageia/stable-asoc-rt5640-fix-line-out-no-sound-issue.patch
deleted file mode 100644
index c26be5c7..00000000
--- a/kernel/kernel/files/patches/mageia/stable-asoc-rt5640-fix-line-out-no-sound-issue.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 9b850ca4f1c5acd7fcbbd4b38a2d27132801a8d5 Mon Sep 17 00:00:00 2001
-From: John Lin
-Date: Tue, 11 Aug 2015 14:27:25 +0800
-Subject: ASoC: rt5640: fix line out no sound issue
-
-From: John Lin
-
-commit 9b850ca4f1c5acd7fcbbd4b38a2d27132801a8d5 upstream.
-
-The power for line out was not turned on when line out is enabled.
-So we add "LOUT amp" widget to turn on the power for line out.
-
-Signed-off-by: John Lin
-Signed-off-by: Mark Brown
-Signed-off-by: Greg Kroah-Hartman
-
----
- sound/soc/codecs/rt5640.c | 40 +++++++++++++++++++++++++++++++++++++---
- 1 file changed, 37 insertions(+), 3 deletions(-)
-
---- a/sound/soc/codecs/rt5640.c
-+++ b/sound/soc/codecs/rt5640.c
-@@ -985,6 +985,35 @@ static int rt5640_hp_event(struct snd_so
- return 0;
- }
-
-+static int rt5640_lout_event(struct snd_soc_dapm_widget *w,
-+ struct snd_kcontrol *kcontrol, int event)
-+{
-+ struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
-+
-+ switch (event) {
-+ case SND_SOC_DAPM_POST_PMU:
-+ hp_amp_power_on(codec);
-+ snd_soc_update_bits(codec, RT5640_PWR_ANLG1,
-+ RT5640_PWR_LM, RT5640_PWR_LM);
-+ snd_soc_update_bits(codec, RT5640_OUTPUT,
-+ RT5640_L_MUTE | RT5640_R_MUTE, 0);
-+ break;
-+
-+ case SND_SOC_DAPM_PRE_PMD:
-+ snd_soc_update_bits(codec, RT5640_OUTPUT,
-+ RT5640_L_MUTE | RT5640_R_MUTE,
-+ RT5640_L_MUTE | RT5640_R_MUTE);
-+ snd_soc_update_bits(codec, RT5640_PWR_ANLG1,
-+ RT5640_PWR_LM, 0);
-+ break;
-+
-+ default:
-+ return 0;
-+ }
-+
-+ return 0;
-+}
-+
- static int rt5640_hp_power_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
- {
-@@ -1180,13 +1209,16 @@ static const struct snd_soc_dapm_widget
- 0, rt5640_spo_l_mix, ARRAY_SIZE(rt5640_spo_l_mix)),
- SND_SOC_DAPM_MIXER("SPOR MIX", SND_SOC_NOPM, 0,
- 0, rt5640_spo_r_mix, ARRAY_SIZE(rt5640_spo_r_mix)),
-- SND_SOC_DAPM_MIXER("LOUT MIX", RT5640_PWR_ANLG1, RT5640_PWR_LM_BIT, 0,
-+ SND_SOC_DAPM_MIXER("LOUT MIX", SND_SOC_NOPM, 0, 0,
- rt5640_lout_mix, ARRAY_SIZE(rt5640_lout_mix)),
- SND_SOC_DAPM_SUPPLY_S("Improve HP Amp Drv", 1, SND_SOC_NOPM,
- 0, 0, rt5640_hp_power_event, SND_SOC_DAPM_POST_PMU),
- SND_SOC_DAPM_PGA_S("HP Amp", 1, SND_SOC_NOPM, 0, 0,
- rt5640_hp_event,
- SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
-+ SND_SOC_DAPM_PGA_S("LOUT amp", 1, SND_SOC_NOPM, 0, 0,
-+ rt5640_lout_event,
-+ SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
- SND_SOC_DAPM_SUPPLY("HP L Amp", RT5640_PWR_ANLG1,
- RT5640_PWR_HP_L_BIT, 0, NULL, 0),
- SND_SOC_DAPM_SUPPLY("HP R Amp", RT5640_PWR_ANLG1,
-@@ -1501,8 +1533,10 @@ static const struct snd_soc_dapm_route r
- {"HP R Playback", "Switch", "HP Amp"},
- {"HPOL", NULL, "HP L Playback"},
- {"HPOR", NULL, "HP R Playback"},
-- {"LOUTL", NULL, "LOUT MIX"},
-- {"LOUTR", NULL, "LOUT MIX"},
-+
-+ {"LOUT amp", NULL, "LOUT MIX"},
-+ {"LOUTL", NULL, "LOUT amp"},
-+ {"LOUTR", NULL, "LOUT amp"},
- };
-
- static const struct snd_soc_dapm_route rt5640_specific_dapm_routes[] = {
diff --git a/kernel/kernel/files/patches/mageia/stable-asoc-samsung-remove-redundant-arndale_audio_remove.patch b/kernel/kernel/files/patches/mageia/stable-asoc-samsung-remove-redundant-arndale_audio_remove.patch
deleted file mode 100644
index ea815142..00000000
--- a/kernel/kernel/files/patches/mageia/stable-asoc-samsung-remove-redundant-arndale_audio_remove.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 14a500fe1396934c6b3ed8f009459a4723da7862 Mon Sep 17 00:00:00 2001
-From: Vaishali Thakkar
-Date: Thu, 20 Aug 2015 22:11:15 +0530
-Subject: ASoC: samsung: Remove redundant arndale_audio_remove
-
-From: Vaishali Thakkar
-
-commit 14a500fe1396934c6b3ed8f009459a4723da7862 upstream.
-
-There is no use of snd_soc_unregister_card in remove function
-as devm_snd_soc_register_card in probe function automatically
-handles it. So, remove use of snd_soc_unregister_card and with
-this change remove arndale_audio_remove as it is now redundant.
-
-Signed-off-by: Vaishali Thakkar
-Signed-off-by: Mark Brown
-Signed-off-by: Greg Kroah-Hartman
-
----
- sound/soc/samsung/arndale_rt5631.c | 10 ----------
- 1 file changed, 10 deletions(-)
-
---- a/sound/soc/samsung/arndale_rt5631.c
-+++ b/sound/soc/samsung/arndale_rt5631.c
-@@ -116,15 +116,6 @@ static int arndale_audio_probe(struct pl
- return ret;
- }
-
--static int arndale_audio_remove(struct platform_device *pdev)
--{
-- struct snd_soc_card *card = platform_get_drvdata(pdev);
--
-- snd_soc_unregister_card(card);
--
-- return 0;
--}
--
- static const struct of_device_id samsung_arndale_rt5631_of_match[] __maybe_unused = {
- { .compatible = "samsung,arndale-rt5631", },
- { .compatible = "samsung,arndale-alc5631", },
-@@ -139,7 +130,6 @@ static struct platform_driver arndale_au
- .of_match_table = of_match_ptr(samsung_arndale_rt5631_of_match),
- },
- .probe = arndale_audio_probe,
-- .remove = arndale_audio_remove,
- };
-
- module_platform_driver(arndale_audio_driver);
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-exynos4-fix-wrong-clock-for-exynos4x12-adc.patch b/kernel/kernel/files/patches/mageia/stable-clk-exynos4-fix-wrong-clock-for-exynos4x12-adc.patch
deleted file mode 100644
index 60bdcac4..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-exynos4-fix-wrong-clock-for-exynos4x12-adc.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From e323d56eb06b266b77c2b430cb5f1977ba549e03 Mon Sep 17 00:00:00 2001
-From: Krzysztof Kozlowski
-Date: Fri, 12 Jun 2015 10:53:25 +0900
-Subject: clk: exynos4: Fix wrong clock for Exynos4x12 ADC
-
-From: Krzysztof Kozlowski
-
-commit e323d56eb06b266b77c2b430cb5f1977ba549e03 upstream.
-
-The TSADC gate clock was used in Exynos4x12 DTSI for exynos-adc driver.
-However TSADC is present only on Exynos4210 so on Trats2 board (with
-Exynos4412 SoC) the exynos-adc driver could not be probed:
- ERROR: could not get clock /adc@126C0000:adc(0)
- exynos-adc 126c0000.adc: failed getting clock, err = -2
- exynos-adc: probe of 126c0000.adc failed with error -2
-
-Instead on Exynos4x12 SoCs the main clock used by Analog to Digital
-Converter is located in different register and it is named in datasheet
-as PCLK_ADC. Regardless of the name the purpose of this PCLK_ADC clock
-is the same as purpose of TSADC from Exynos4210.
-
-The patch adds gate clock for Exynos4x12 using the proper register so
-backward compatibility is preserved. This fixes the probe of exynos-adc
-driver on Exynos4x12 boards and allows accessing sensors connected to it
-on Trats2 board (ntc,ncp15wb473 AP and battery thermistors).
-
-Signed-off-by: Krzysztof Kozlowski
-Fixes: c63c57433003 ("ARM: dts: Add ADC's dt data to read raw data for exynos4x12")
-Reviewed-by: Javier Martinez Canillas
-Acked-by: Tomasz Figa
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/samsung/clk-exynos4.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/clk/samsung/clk-exynos4.c
-+++ b/drivers/clk/samsung/clk-exynos4.c
-@@ -85,6 +85,7 @@
- #define DIV_PERIL4 0xc560
- #define DIV_PERIL5 0xc564
- #define E4X12_DIV_CAM1 0xc568
-+#define E4X12_GATE_BUS_FSYS1 0xc744
- #define GATE_SCLK_CAM 0xc820
- #define GATE_IP_CAM 0xc920
- #define GATE_IP_TV 0xc924
-@@ -1095,6 +1096,7 @@ static struct samsung_gate_clock exynos4
- 0),
- GATE(CLK_PPMUIMAGE, "ppmuimage", "aclk200", E4X12_GATE_IP_IMAGE, 9, 0,
- 0),
-+ GATE(CLK_TSADC, "tsadc", "aclk133", E4X12_GATE_BUS_FSYS1, 16, 0, 0),
- GATE(CLK_MIPI_HSI, "mipi_hsi", "aclk133", GATE_IP_FSYS, 10, 0, 0),
- GATE(CLK_CHIPID, "chipid", "aclk100", E4X12_GATE_IP_PERIR, 0, 0, 0),
- GATE(CLK_SYSREG, "sysreg", "aclk100", E4X12_GATE_IP_PERIR, 1,
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-pistachio-correct-critical-clock-list.patch b/kernel/kernel/files/patches/mageia/stable-clk-pistachio-correct-critical-clock-list.patch
deleted file mode 100644
index b711f795..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-pistachio-correct-critical-clock-list.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From d31ff5f7f3b142b8d1ebb3da89187c54cdf2bc71 Mon Sep 17 00:00:00 2001
-From: "Damien.Horsley"
-Date: Wed, 26 Aug 2015 17:11:40 +0100
-Subject: clk: pistachio: correct critical clock list
-
-From: "Damien.Horsley"
-
-commit d31ff5f7f3b142b8d1ebb3da89187c54cdf2bc71 upstream.
-
-Current critical clock list for pistachio enables
-only mips and sys clocks by default but there are
-also other clocks that are not claimed by anyone and
-needs to be enabled by default.
-
-This patch updates the critical clocks that need
-to be enabled by default.
-
-Add a separate struct to distinguish the critical clocks
-as listed:
-1.) core clocks:
- a.) mips clock
-2.) peripheral system clocks:
- a.) sys clock
- b.) sys_bus clock
- c.) DDR clock
- d.) ROM clock
-
-Fixes: b35d7c33419c("CLK: Pistachio: Register core clocks")
-Reviewed-by: Andrew Bresticker
-Signed-off-by: Ezequiel Garcia
-Signed-off-by: Damien.Horsley
-Signed-off-by: Govindraj Raja
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/pistachio/clk-pistachio.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
---- a/drivers/clk/pistachio/clk-pistachio.c
-+++ b/drivers/clk/pistachio/clk-pistachio.c
-@@ -159,9 +159,15 @@ PNAME(mux_debug) = { "mips_pll_mux", "rp
- "wifi_pll_mux", "bt_pll_mux" };
- static u32 mux_debug_idx[] = { 0x0, 0x1, 0x2, 0x4, 0x8, 0x10 };
-
--static unsigned int pistachio_critical_clks[] __initdata = {
-- CLK_MIPS,
-- CLK_PERIPH_SYS,
-+static unsigned int pistachio_critical_clks_core[] __initdata = {
-+ CLK_MIPS
-+};
-+
-+static unsigned int pistachio_critical_clks_sys[] __initdata = {
-+ PERIPH_CLK_SYS,
-+ PERIPH_CLK_SYS_BUS,
-+ PERIPH_CLK_DDR,
-+ PERIPH_CLK_ROM,
- };
-
- static void __init pistachio_clk_init(struct device_node *np)
-@@ -193,8 +199,8 @@ static void __init pistachio_clk_init(st
-
- pistachio_clk_register_provider(p);
-
-- pistachio_clk_force_enable(p, pistachio_critical_clks,
-- ARRAY_SIZE(pistachio_critical_clks));
-+ pistachio_clk_force_enable(p, pistachio_critical_clks_core,
-+ ARRAY_SIZE(pistachio_critical_clks_core));
- }
- CLK_OF_DECLARE(pistachio_clk, "img,pistachio-clk", pistachio_clk_init);
-
-@@ -261,6 +267,9 @@ static void __init pistachio_clk_periph_
- ARRAY_SIZE(pistachio_periph_gates));
-
- pistachio_clk_register_provider(p);
-+
-+ pistachio_clk_force_enable(p, pistachio_critical_clks_sys,
-+ ARRAY_SIZE(pistachio_critical_clks_sys));
- }
- CLK_OF_DECLARE(pistachio_clk_periph, "img,pistachio-clk-periph",
- pistachio_clk_periph_init);
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-pistachio-fix-override-of-clk-pll-settings-from-boot-loader.patch b/kernel/kernel/files/patches/mageia/stable-clk-pistachio-fix-override-of-clk-pll-settings-from-boot-loader.patch
deleted file mode 100644
index 2264f79c..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-pistachio-fix-override-of-clk-pll-settings-from-boot-loader.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From e53f21c761d141bbcbce06e9ddab3b4e0a828f2c Mon Sep 17 00:00:00 2001
-From: Zdenko Pulitika
-Date: Wed, 26 Aug 2015 17:11:38 +0100
-Subject: clk: pistachio: Fix override of clk-pll settings from boot loader
-
-From: Zdenko Pulitika
-
-commit e53f21c761d141bbcbce06e9ddab3b4e0a828f2c upstream.
-
-PLL enable callbacks are overriding PLL mode (int/frac) and
-Noise reduction (on/off) settings set by the boot loader which
-results in the incorrect clock rate.
-
-PLL mode and noise reduction are defined by the DSMPD and DACPD bits
-of the PLL control register. PLL .enable() callbacks enable PLL
-by deasserting all power-down bits of the PLL control register,
-including DSMPD and DACPD bits, which is not necessary since
-these bits don't actually enable/disable PLL.
-
-This commit fixes the problem by removing DSMPD and DACPD bits
-from the "PLL enable" mask.
-
-Fixes: 43049b0c83f17("CLK: Pistachio: Add PLL driver")
-Reviewed-by: Andrew Bresitcker
-Signed-off-by: Zdenko Pulitika
-Signed-off-by: Govindraj Raja
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/pistachio/clk-pll.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
---- a/drivers/clk/pistachio/clk-pll.c
-+++ b/drivers/clk/pistachio/clk-pll.c
-@@ -115,8 +115,7 @@ static int pll_gf40lp_frac_enable(struct
- u32 val;
-
- val = pll_readl(pll, PLL_CTRL3);
-- val &= ~(PLL_FRAC_CTRL3_PD | PLL_FRAC_CTRL3_DACPD |
-- PLL_FRAC_CTRL3_DSMPD | PLL_FRAC_CTRL3_FOUTPOSTDIVPD |
-+ val &= ~(PLL_FRAC_CTRL3_PD | PLL_FRAC_CTRL3_FOUTPOSTDIVPD |
- PLL_FRAC_CTRL3_FOUT4PHASEPD | PLL_FRAC_CTRL3_FOUTVCOPD);
- pll_writel(pll, val, PLL_CTRL3);
-
-@@ -233,7 +232,7 @@ static int pll_gf40lp_laint_enable(struc
- u32 val;
-
- val = pll_readl(pll, PLL_CTRL1);
-- val &= ~(PLL_INT_CTRL1_PD | PLL_INT_CTRL1_DSMPD |
-+ val &= ~(PLL_INT_CTRL1_PD |
- PLL_INT_CTRL1_FOUTPOSTDIVPD | PLL_INT_CTRL1_FOUTVCOPD);
- pll_writel(pll, val, PLL_CTRL1);
-
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-pxa-fix-core-frequency-reporting-unit.patch b/kernel/kernel/files/patches/mageia/stable-clk-pxa-fix-core-frequency-reporting-unit.patch
deleted file mode 100644
index 6e08e1fe..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-pxa-fix-core-frequency-reporting-unit.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 4b5fb7dc9096d949a22651370bb6bf11f21edb30 Mon Sep 17 00:00:00 2001
-From: Robert Jarzmik
-Date: Sun, 12 Jul 2015 22:49:53 +0200
-Subject: clk: pxa: fix core frequency reporting unit
-
-From: Robert Jarzmik
-
-commit 4b5fb7dc9096d949a22651370bb6bf11f21edb30 upstream.
-
-Legacy drivers which are not yet ported, such as cpufreq-pxa[23]xx, rely
-on pxaXXx_get_clk_frequency_khz() to find the CPU core frequency.
-
-This reporting was broken because the expected unit is kHz and not
-Hz. Fix the reporting for pxa25x, pxa27x and pxa3xx.
-
-Fixes: fe7710fae477 ("clk: add pxa25x clock drivers")
-Fixes: d40670dc6169 ("clk: add pxa27x clock drivers")
-Fixes: 9bbb8a338fb2 ("clk: pxa: add pxa3xx clock driver")
-Signed-off-by: Robert Jarzmik
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/pxa/clk-pxa25x.c | 2 +-
- drivers/clk/pxa/clk-pxa27x.c | 2 +-
- drivers/clk/pxa/clk-pxa3xx.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/clk/pxa/clk-pxa25x.c
-+++ b/drivers/clk/pxa/clk-pxa25x.c
-@@ -79,7 +79,7 @@ unsigned int pxa25x_get_clk_frequency_kh
- clks[3] / 1000000, (clks[3] % 1000000) / 10000);
- }
-
-- return (unsigned int)clks[0];
-+ return (unsigned int)clks[0] / KHz;
- }
-
- static unsigned long clk_pxa25x_memory_get_rate(struct clk_hw *hw,
---- a/drivers/clk/pxa/clk-pxa27x.c
-+++ b/drivers/clk/pxa/clk-pxa27x.c
-@@ -80,7 +80,7 @@ unsigned int pxa27x_get_clk_frequency_kh
- pr_info("System bus clock: %ld.%02ldMHz\n",
- clks[4] / 1000000, (clks[4] % 1000000) / 10000);
- }
-- return (unsigned int)clks[0];
-+ return (unsigned int)clks[0] / KHz;
- }
-
- bool pxa27x_is_ppll_disabled(void)
---- a/drivers/clk/pxa/clk-pxa3xx.c
-+++ b/drivers/clk/pxa/clk-pxa3xx.c
-@@ -78,7 +78,7 @@ unsigned int pxa3xx_get_clk_frequency_kh
- pr_info("System bus clock: %ld.%02ldMHz\n",
- clks[4] / 1000000, (clks[4] % 1000000) / 10000);
- }
-- return (unsigned int)clks[0];
-+ return (unsigned int)clks[0] / KHz;
- }
-
- static unsigned long clk_pxa3xx_ac97_get_rate(struct clk_hw *hw,
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-qcom-fix-msm8916-prng-clock-enable-bit.patch b/kernel/kernel/files/patches/mageia/stable-clk-qcom-fix-msm8916-prng-clock-enable-bit.patch
deleted file mode 100644
index d2d00d7e..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-qcom-fix-msm8916-prng-clock-enable-bit.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1c4b4b0eb1909010b8ebda1ef208bf3ed62e7487 Mon Sep 17 00:00:00 2001
-From: Georgi Djakov
-Date: Tue, 25 Aug 2015 15:27:43 +0300
-Subject: clk: qcom: Fix MSM8916 prng clock enable bit
-
-From: Georgi Djakov
-
-commit 1c4b4b0eb1909010b8ebda1ef208bf3ed62e7487 upstream.
-
-Fix the enable bit of the pseudorandom number generator clock.
-
-Reported-by: Stanimir Varbanov
-Fixes: 3966fab8b6ab "clk: qcom: Add MSM8916 Global Clock Controller support"
-Signed-off-by: Georgi Djakov
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/qcom/gcc-msm8916.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/clk/qcom/gcc-msm8916.c
-+++ b/drivers/clk/qcom/gcc-msm8916.c
-@@ -2278,7 +2278,7 @@ static struct clk_branch gcc_prng_ahb_cl
- .halt_check = BRANCH_HALT_VOTED,
- .clkr = {
- .enable_reg = 0x45004,
-- .enable_mask = BIT(0),
-+ .enable_mask = BIT(8),
- .hw.init = &(struct clk_init_data){
- .name = "gcc_prng_ahb_clk",
- .parent_names = (const char *[]){
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-qcom-set-clk_set_rate_parent-on-ce1-clocks.patch b/kernel/kernel/files/patches/mageia/stable-clk-qcom-set-clk_set_rate_parent-on-ce1-clocks.patch
deleted file mode 100644
index 2e3f0458..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-qcom-set-clk_set_rate_parent-on-ce1-clocks.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From d7a304e9d018c99dda80f4c16ec0fe817b5be4a1 Mon Sep 17 00:00:00 2001
-From: Stephen Boyd
-Date: Tue, 14 Jul 2015 16:57:29 -0700
-Subject: clk: qcom: Set CLK_SET_RATE_PARENT on ce1 clocks
-
-From: Stephen Boyd
-
-commit d7a304e9d018c99dda80f4c16ec0fe817b5be4a1 upstream.
-
-The other ce clocks have the flag set, but ce1 doesn't, so
-clk_set_rate() doesn't propagate up the tree to the ce1_src_clk.
-Set the flag as this is supported.
-
-Reported-by: Bjorn Andersson
-Tested-by: Bjorn Andersson
-Fixes: 02824653200b ("clk: qcom: Add APQ8084 Global Clock Controller support")
-Fixes: d33faa9ead8d ("clk: qcom: Add support for MSM8974's global clock controller (GCC)")
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/qcom/gcc-apq8084.c | 1 +
- drivers/clk/qcom/gcc-msm8974.c | 1 +
- 2 files changed, 2 insertions(+)
-
---- a/drivers/clk/qcom/gcc-apq8084.c
-+++ b/drivers/clk/qcom/gcc-apq8084.c
-@@ -2105,6 +2105,7 @@ static struct clk_branch gcc_ce1_clk = {
- "ce1_clk_src",
- },
- .num_parents = 1,
-+ .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
---- a/drivers/clk/qcom/gcc-msm8974.c
-+++ b/drivers/clk/qcom/gcc-msm8974.c
-@@ -1783,6 +1783,7 @@ static struct clk_branch gcc_ce1_clk = {
- "ce1_clk_src",
- },
- .num_parents = 1,
-+ .flags = CLK_SET_RATE_PARENT,
- .ops = &clk_branch2_ops,
- },
- },
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-rockchip-rk3288-add-clk_set_rate_parent-to-sclk_mac.patch b/kernel/kernel/files/patches/mageia/stable-clk-rockchip-rk3288-add-clk_set_rate_parent-to-sclk_mac.patch
deleted file mode 100644
index 0b070dc1..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-rockchip-rk3288-add-clk_set_rate_parent-to-sclk_mac.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 4791eb61dbe8100ccac59fecfac9d93a15db1447 Mon Sep 17 00:00:00 2001
-From: Heiko Stuebner
-Date: Thu, 18 Jun 2015 16:18:28 +0200
-Subject: clk: rockchip: rk3288: add CLK_SET_RATE_PARENT to sclk_mac
-
-From: Heiko Stuebner
-
-commit 4791eb61dbe8100ccac59fecfac9d93a15db1447 upstream.
-
-The dwmac ethernet controller on the rk3288 supports phys connected
-via rgmii and rmii. With rgmii phys it is expected that the mac clock
-is provided externally while with rmii phys the clock can be external
-but also generated from the plls. In the later case it of course needs
-be at 50MHz, which gets set from the dwmac_rk driver.
-As most devices use a rgmii phy it never surfaced so far that the mac
-clk mux, doesn't go up one lever to the pll clock in the rmii case with
-internal clock generation, as it is missing the CLK_SET_RATE_PARENT flag,
-and thus will not set the correct frequency in most cases.
-
-Fixes: b9e4ba541607 ("clk: rockchip: add clock controller for rk3288")
-Signed-off-by: Heiko Stuebner
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/rockchip/clk-rk3288.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/clk/rockchip/clk-rk3288.c
-+++ b/drivers/clk/rockchip/clk-rk3288.c
-@@ -578,7 +578,7 @@ static struct rockchip_clk_branch rk3288
- COMPOSITE(0, "mac_pll_src", mux_pll_src_npll_cpll_gpll_p, 0,
- RK3288_CLKSEL_CON(21), 0, 2, MFLAGS, 8, 5, DFLAGS,
- RK3288_CLKGATE_CON(2), 5, GFLAGS),
-- MUX(SCLK_MAC, "mac_clk", mux_mac_p, 0,
-+ MUX(SCLK_MAC, "mac_clk", mux_mac_p, CLK_SET_RATE_PARENT,
- RK3288_CLKSEL_CON(21), 4, 1, MFLAGS),
- GATE(SCLK_MACREF_OUT, "sclk_macref_out", "mac_clk", 0,
- RK3288_CLKGATE_CON(5), 3, GFLAGS),
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-s5pv210-add-missing-call-to.patch b/kernel/kernel/files/patches/mageia/stable-clk-s5pv210-add-missing-call-to.patch
deleted file mode 100644
index fb96a551..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-s5pv210-add-missing-call-to.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ba30011577330b7e29ecb5916d89c6db9fbc5b3d Mon Sep 17 00:00:00 2001
-From: Marek Szyprowski
-Date: Wed, 12 Aug 2015 10:58:22 +0200
-Subject: clk: s5pv210: add missing call to
- samsung_clk_of_add_provider()
-
-From: Marek Szyprowski
-
-commit ba30011577330b7e29ecb5916d89c6db9fbc5b3d upstream.
-
-Commit d5e136a21b2028fb1f45143ea7112d5869bfc6c7 ("clk: samsung: Register
-clk provider only after registering its all clocks", merged to v3.17-rc1)
-modified a way that driver registers registers to core framework. This
-change has not been applied to s5pv210 clocks driver, which has been
-merged in parallel to that commit. This patch adds a missing call to
-samsung_clk_of_add_provider(), so the driver is operational again.
-
-Signed-off-by: Marek Szyprowski
-Acked-by: Tomasz Figa
-Signed-off-by: Michael Turquette
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/samsung/clk-s5pv210.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/clk/samsung/clk-s5pv210.c
-+++ b/drivers/clk/samsung/clk-s5pv210.c
-@@ -828,6 +828,8 @@ static void __init __s5pv210_clk_init(st
-
- s5pv210_clk_sleep_init();
-
-+ samsung_clk_of_add_provider(np, ctx);
-+
- pr_info("%s clocks: mout_apll = %ld, mout_mpll = %ld\n"
- "\tmout_epll = %ld, mout_vpll = %ld\n",
- is_s5p6442 ? "S5P6442" : "S5PV210",
diff --git a/kernel/kernel/files/patches/mageia/stable-clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch b/kernel/kernel/files/patches/mageia/stable-clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
deleted file mode 100644
index dcd5f48d..00000000
--- a/kernel/kernel/files/patches/mageia/stable-clk-versatile-off-by-one-in-clk_sp810_timerclken_of_get.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3294bee87091be5f179474f6c39d1d87769635e2 Mon Sep 17 00:00:00 2001
-From: Dan Carpenter
-Date: Wed, 29 Jul 2015 13:17:06 +0300
-Subject: clk: versatile: off by one in clk_sp810_timerclken_of_get()
-
-From: Dan Carpenter
-
-commit 3294bee87091be5f179474f6c39d1d87769635e2 upstream.
-
-The ">" should be ">=" or we end up reading beyond the end of the array.
-
-Fixes: 6e973d2c4385 ('clk: vexpress: Add separate SP810 driver')
-Signed-off-by: Dan Carpenter
-Acked-by: Pawel Moll
-Signed-off-by: Stephen Boyd
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/clk/versatile/clk-sp810.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/versatile/clk-sp810.c
-+++ b/drivers/clk/versatile/clk-sp810.c
-@@ -128,8 +128,8 @@ static struct clk *clk_sp810_timerclken_
- {
- struct clk_sp810 *sp810 = data;
-
-- if (WARN_ON(clkspec->args_count != 1 || clkspec->args[0] >
-- ARRAY_SIZE(sp810->timerclken)))
-+ if (WARN_ON(clkspec->args_count != 1 ||
-+ clkspec->args[0] >= ARRAY_SIZE(sp810->timerclken)))
- return NULL;
-
- return sp810->timerclken[clkspec->args[0]].clk;
diff --git a/kernel/kernel/files/patches/mageia/stable-doc-usb-gadget-testing-using-the-updated-testusb.c.patch b/kernel/kernel/files/patches/mageia/stable-doc-usb-gadget-testing-using-the-updated-testusb.c.patch
deleted file mode 100644
index 0864b1a3..00000000
--- a/kernel/kernel/files/patches/mageia/stable-doc-usb-gadget-testing-using-the-updated-testusb.c.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f811a38300be3cdb603171aea5ad3fb42b71ca53 Mon Sep 17 00:00:00 2001
-From: Peter Chen
-Date: Fri, 31 Jul 2015 16:36:30 +0800
-Subject: doc: usb: gadget-testing: using the updated testusb.c
-
-From: Peter Chen
-
-commit f811a38300be3cdb603171aea5ad3fb42b71ca53 upstream.
-
-testusb.c at http://www.linux-usb.org/usbtest/ is out of date,
-using the one at the kernel source folder.
-
-Signed-off-by: Peter Chen
-Signed-off-by: Felipe Balbi
-Signed-off-by: Greg Kroah-Hartman
-
----
- Documentation/usb/gadget-testing.txt | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
---- a/Documentation/usb/gadget-testing.txt
-+++ b/Documentation/usb/gadget-testing.txt
-@@ -237,9 +237,7 @@ Testing the LOOPBACK function
- -----------------------------
-
- device: run the gadget
--host: test-usb
--
--http://www.linux-usb.org/usbtest/testusb.c
-+host: test-usb (tools/usb/testusb.c)
-
- 8. MASS STORAGE function
- ========================
-@@ -588,9 +586,8 @@ Testing the SOURCESINK function
- -------------------------------
-
- device: run the gadget
--host: test-usb
-+host: test-usb (tools/usb/testusb.c)
-
--http://www.linux-usb.org/usbtest/testusb.c
-
- 16. UAC1 function
- =================
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-i915-allow-dsi-dual-link-to-be-configured-on-any-pipe.patch b/kernel/kernel/files/patches/mageia/stable-drm-i915-allow-dsi-dual-link-to-be-configured-on-any-pipe.patch
deleted file mode 100644
index c545c5a9..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-i915-allow-dsi-dual-link-to-be-configured-on-any-pipe.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 824257857fd81f5e749831ff9cd63566b5a86abe Mon Sep 17 00:00:00 2001
-From: Gaurav K Singh
-Date: Mon, 3 Aug 2015 15:45:32 +0530
-Subject: drm/i915: Allow DSI dual link to be configured on any pipe
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Gaurav K Singh
-
-commit 824257857fd81f5e749831ff9cd63566b5a86abe upstream.
-
-Just like single link MIPI panels, similarly for dual link panels, pipe
-to be configured is based on the DVO port from VBT Block 2. In hardware,
-Port A is mapped with Pipe A and Port C is mapped with Pipe B.
-
-This issue got introduced in -
-
-commit 7e9804fdcffc650515c60f524b8b2076ee59e710
-Author: Jani Nikula
-Date: Fri Jan 16 14:27:23 2015 +0200
-
- drm/i915/dsi: add drm mipi dsi host support
-
-Signed-off-by: Gaurav K Singh
-Reviewed-by: Ville Syrjälä
-Signed-off-by: Jani Nikula
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/i915/intel_dsi.c | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
---- a/drivers/gpu/drm/i915/intel_dsi.c
-+++ b/drivers/gpu/drm/i915/intel_dsi.c
-@@ -1036,11 +1036,7 @@ void intel_dsi_init(struct drm_device *d
- intel_connector->unregister = intel_connector_unregister;
-
- /* Pipe A maps to MIPI DSI port A, pipe B maps to MIPI DSI port C */
-- if (dev_priv->vbt.dsi.config->dual_link) {
-- /* XXX: does dual link work on either pipe? */
-- intel_encoder->crtc_mask = (1 << PIPE_A);
-- intel_dsi->ports = ((1 << PORT_A) | (1 << PORT_C));
-- } else if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIA) {
-+ if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIA) {
- intel_encoder->crtc_mask = (1 << PIPE_A);
- intel_dsi->ports = (1 << PORT_A);
- } else if (dev_priv->vbt.dsi.port == DVO_PORT_MIPIC) {
-@@ -1048,6 +1044,9 @@ void intel_dsi_init(struct drm_device *d
- intel_dsi->ports = (1 << PORT_C);
- }
-
-+ if (dev_priv->vbt.dsi.config->dual_link)
-+ intel_dsi->ports = ((1 << PORT_A) | (1 << PORT_C));
-+
- /* Create a DSI host (and a device) for each port. */
- for_each_dsi_port(port, intel_dsi->ports) {
- struct intel_dsi_host *host;
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-i915-always-mark-the-object-as-dirty-when-used-by-the-gpu.patch b/kernel/kernel/files/patches/mageia/stable-drm-i915-always-mark-the-object-as-dirty-when-used-by-the-gpu.patch
deleted file mode 100644
index 59d9b821..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-i915-always-mark-the-object-as-dirty-when-used-by-the-gpu.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 51bc140431e233284660b1d22c47dec9ecdb521e Mon Sep 17 00:00:00 2001
-From: Chris Wilson
-Date: Mon, 31 Aug 2015 15:10:39 +0100
-Subject: drm/i915: Always mark the object as dirty when used by the GPU
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Chris Wilson
-
-commit 51bc140431e233284660b1d22c47dec9ecdb521e upstream.
-
-There have been many hard to track down bugs whereby userspace forgot to
-flag a write buffer and then cause graphics corruption or a hung GPU
-when that buffer was later purged under memory pressure (as the buffer
-appeared clean, its pages would have been evicted rather than preserved
-and any changes more recent than in the backing storage would be lost).
-In retrospect this is a rare optimisation against memory pressure,
-already the slow path. If we always mark the buffer as dirty when
-accessed by the GPU, anything not used can still be evicted cheaply
-(ideal behaviour for mark-and-sweep eviction) but we do not run the risk
-of corruption. For correct read serialisation, userspace still has to
-notify when the GPU writes to an object. However, there are certain
-situations under which userspace may wish to tell white lies to the
-kernel...
-
-Signed-off-by: Chris Wilson
-Cc: Daniel Vetter
-Cc: Kristian Høgsberg
-Cc: Jesse Barnes
-Cc: "Goel, Akash"
-Cc: Michał Winiarski
-Reviewed-by: Daniel Vetter
-Signed-off-by: Jani Nikula
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
-@@ -1025,6 +1025,7 @@ i915_gem_execbuffer_move_to_active(struc
- u32 old_read = obj->base.read_domains;
- u32 old_write = obj->base.write_domain;
-
-+ obj->dirty = 1; /* be paranoid */
- obj->base.write_domain = obj->base.pending_write_domain;
- if (obj->base.write_domain == 0)
- obj->base.pending_read_domains |= obj->base.read_domains;
-@@ -1032,7 +1033,6 @@ i915_gem_execbuffer_move_to_active(struc
-
- i915_vma_move_to_active(vma, ring);
- if (obj->base.write_domain) {
-- obj->dirty = 1;
- i915_gem_request_assign(&obj->last_write_req, req);
-
- intel_fb_obj_invalidate(obj, ring, ORIGIN_CS);
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-i915-apply-the-pci_d0-d3-hibernation-workaround-everywhere-on-pre-gen6.patch b/kernel/kernel/files/patches/mageia/stable-drm-i915-apply-the-pci_d0-d3-hibernation-workaround-everywhere-on-pre-gen6.patch
deleted file mode 100644
index b425285d..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-i915-apply-the-pci_d0-d3-hibernation-workaround-everywhere-on-pre-gen6.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 54875571bbfde00fc63741715c531cbb5246c3b2 Mon Sep 17 00:00:00 2001
-From: Imre Deak
-Date: Tue, 30 Jun 2015 17:06:47 +0300
-Subject: drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6
-
-From: Imre Deak
-
-commit 54875571bbfde00fc63741715c531cbb5246c3b2 upstream.
-
-commit da2bc1b9db3351addd293e5b82757efe1f77ed1d
-Author: Imre Deak
-Date: Thu Oct 23 19:23:26 2014 +0300
-
- drm/i915: add poweroff_late handler
-
-introduced a regression on old platforms during hibernation. A workaround was
-added in
-
-commit ab3be73fa7b43f4c3648ce29b5fd649ea54d3adb
-Author: Imre Deak
-Date: Mon Mar 2 13:04:41 2015 +0200
-
- drm/i915: gen4: work around hang during hibernation
-
-using an explicit blacklist for the GENs/BIOS vendors where the issue was
-reported. Later there we had reports of the same failure on platforms not on
-this list.
-
-To my best knowledge the correct thing to do is still to put the device to PCI
-D3 state during hibernation, see [1] and [2] for the reasons. This also aligns
-with our future plans to unify more the runtime and system suspend/resume
-paths. Since an exact blacklist seems to be impractical (multiple GENs and
-BIOS vendors are affected) apply the workaround on everything pre GEN6.
-
-[1] http://lists.freedesktop.org/archives/intel-gfx/2015-February/060710.html
-[2] https://lkml.org/lkml/2015/6/22/274
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95061
-Reported-by: Ilya Tumaykin
-Reported-by: Dirk Griesbach
-Reported-by: Pavel Machek
-Reported-by: Mikko Rapeli
-Tested-by: Mikko Rapeli
-Reported-by: Paul Bolle
-Signed-off-by: Imre Deak
-Signed-off-by: Jani Nikula
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/i915/i915_drv.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
---- a/drivers/gpu/drm/i915/i915_drv.c
-+++ b/drivers/gpu/drm/i915/i915_drv.c
-@@ -647,15 +647,18 @@ static int i915_drm_suspend_late(struct
-
- pci_disable_device(drm_dev->pdev);
- /*
-- * During hibernation on some GEN4 platforms the BIOS may try to access
-+ * During hibernation on some platforms the BIOS may try to access
- * the device even though it's already in D3 and hang the machine. So
- * leave the device in D0 on those platforms and hope the BIOS will
-- * power down the device properly. Platforms where this was seen:
-- * Lenovo Thinkpad X301, X61s
-+ * power down the device properly. The issue was seen on multiple old
-+ * GENs with different BIOS vendors, so having an explicit blacklist
-+ * is inpractical; apply the workaround on everything pre GEN6. The
-+ * platforms where the issue was seen:
-+ * Lenovo Thinkpad X301, X61s, X60, T60, X41
-+ * Fujitsu FSC S7110
-+ * Acer Aspire 1830T
- */
-- if (!(hibernation &&
-- drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
-- INTEL_INFO(dev_priv)->gen == 4))
-+ if (!(hibernation && INTEL_INFO(dev_priv)->gen < 6))
- pci_set_power_state(drm_dev->pdev, PCI_D3hot);
-
- return 0;
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-i915-check-dp-link-status-on-long-hpd-too.patch b/kernel/kernel/files/patches/mageia/stable-drm-i915-check-dp-link-status-on-long-hpd-too.patch
deleted file mode 100644
index fd5d79d6..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-i915-check-dp-link-status-on-long-hpd-too.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From d14e7b6d1d8747826cb900db852351c550e00fdd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?=
-Date: Thu, 20 Aug 2015 19:37:29 +0300
-Subject: drm/i915: Check DP link status on long hpd too
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?=
-
-commit d14e7b6d1d8747826cb900db852351c550e00fdd upstream.
-
-We are no longer checkling the DP link status on long hpd. We used to do
-that from the .hot_plug() handler, but it was removed when MST got
-introduced.
-
-If there's no userspace we now fail to retrain the link if the sink
-power is toggled (or cable yanked and replugged), meaning the user is
-left staring at a blank screen. With the retraining put back that should
-be fixed.
-
-Also remove the leftover comment that referred to the old retraining
-from .hot_plug().
-
-Fixes a regression introduced in:
-commit 0e32b39ceed665bfa4a77a4bc307b6652b991632
-Author: Dave Airlie
-Date: Fri May 2 14:02:48 2014 +1000
-
- drm/i915: add DP 1.2 MST support (v0.7)
-
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89453
-Tested-by: Palmer Dabbelt
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91407
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89461
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89594
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85641
-Cc: Dave Airlie
-Signed-off-by: Ville Syrjälä
-Reviewed-by: Daniel Vetter
-Signed-off-by: Jani Nikula
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/i915/intel_dp.c | 11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
-
---- a/drivers/gpu/drm/i915/intel_dp.c
-+++ b/drivers/gpu/drm/i915/intel_dp.c
-@@ -4691,9 +4691,12 @@ intel_dp_hpd_pulse(struct intel_digital_
-
- intel_dp_probe_oui(intel_dp);
-
-- if (!intel_dp_probe_mst(intel_dp))
-+ if (!intel_dp_probe_mst(intel_dp)) {
-+ drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
-+ intel_dp_check_link_status(intel_dp);
-+ drm_modeset_unlock(&dev->mode_config.connection_mutex);
- goto mst_fail;
--
-+ }
- } else {
- if (intel_dp->is_mst) {
- if (intel_dp_check_mst_status(intel_dp) == -EINVAL)
-@@ -4701,10 +4704,6 @@ intel_dp_hpd_pulse(struct intel_digital_
- }
-
- if (!intel_dp->is_mst) {
-- /*
-- * we'll check the link status via the normal hot plug path later -
-- * but for short hpds we should check it now
-- */
- drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
- intel_dp_check_link_status(intel_dp);
- drm_modeset_unlock(&dev->mode_config.connection_mutex);
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-i915-limit-the-number-of-loops-for-reading-a-split-64bit-register.patch b/kernel/kernel/files/patches/mageia/stable-drm-i915-limit-the-number-of-loops-for-reading-a-split-64bit-register.patch
deleted file mode 100644
index 8dd737f1..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-i915-limit-the-number-of-loops-for-reading-a-split-64bit-register.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From acd29f7b22262d9e848393b9b6ae13eb42d22514 Mon Sep 17 00:00:00 2001
-From: Chris Wilson
-Date: Tue, 8 Sep 2015 14:17:13 +0100
-Subject: drm/i915: Limit the number of loops for reading a split 64bit register
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Chris Wilson
-
-commit acd29f7b22262d9e848393b9b6ae13eb42d22514 upstream.
-
-In I915_READ64_2x32 we attempt to read a 64bit register using 2 32bit
-reads. Due to the nature of the registers we try to read in this manner,
-they may increment between the two instruction (e.g. a timestamp
-counter). To keep the result accurate, we repeat the read if we detect
-an overflow (i.e. the upper value varies). However, some hardware is just
-plain flaky and may endless loop as the the upper 32bits are not stable.
-Just give up after a couple of tries and report whatever we read last.
-
-v2: Use the most recent values when erring out on an unstable register.
-
-Reported-by: russianneuromancer@ya.ru
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91906
-Signed-off-by: Chris Wilson
-Cc: Michał Winiarski
-Cc: Daniel Vetter
-Cc: Jani Nikula
-Reviewed-by: Daniel Vetter
-Signed-off-by: Jani Nikula
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/i915/i915_drv.h | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/drivers/gpu/drm/i915/i915_drv.h
-+++ b/drivers/gpu/drm/i915/i915_drv.h
-@@ -3190,13 +3190,13 @@ int intel_freq_opcode(struct drm_i915_pr
- #define I915_READ64(reg) dev_priv->uncore.funcs.mmio_readq(dev_priv, (reg), true)
-
- #define I915_READ64_2x32(lower_reg, upper_reg) ({ \
-- u32 upper, lower, tmp; \
-- tmp = I915_READ(upper_reg); \
-+ u32 upper, lower, old_upper, loop = 0; \
-+ upper = I915_READ(upper_reg); \
- do { \
-- upper = tmp; \
-+ old_upper = upper; \
- lower = I915_READ(lower_reg); \
-- tmp = I915_READ(upper_reg); \
-- } while (upper != tmp); \
-+ upper = I915_READ(upper_reg); \
-+ } while (upper != old_upper && loop++ < 2); \
- (u64)upper << 32 | lower; })
-
- #define POSTING_READ(reg) (void)I915_READ_NOTRACE(reg)
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-i915-preserve-ssc-earlier.patch b/kernel/kernel/files/patches/mageia/stable-drm-i915-preserve-ssc-earlier.patch
deleted file mode 100644
index ba74fa2d..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-i915-preserve-ssc-earlier.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 69f92f67b68ab7028ffe15f0eea76b59f8859383 Mon Sep 17 00:00:00 2001
-From: Lukas Wunner
-Date: Wed, 15 Jul 2015 13:57:35 +0200
-Subject: drm/i915: Preserve SSC earlier
-
-From: Lukas Wunner
-
-commit 69f92f67b68ab7028ffe15f0eea76b59f8859383 upstream.
-
-Commit 92122789b2d6 ("drm/i915: preserve SSC if previously set v3")
-added code to intel_modeset_gem_init to override the SSC status read
-from VBT with the SSC status set by BIOS.
-
-However, intel_modeset_gem_init is invoked *after* intel_modeset_init,
-which calls intel_setup_outputs, which *modifies* SSC status by way of
-intel_init_pch_refclk. So unlike advertised, intel_modeset_gem_init
-doesn't preserve the SSC status set by BIOS but whatever
-intel_init_pch_refclk decided on.
-
-This is a problem on dual gpu laptops such as the MacBook Pro which
-require either a handler to switch DDC lines, or the discrete gpu
-to proxy DDC/AUX communication: Both the handler and the discrete
-gpu may initialize after the i915 driver, and consequently, an LVDS
-connector may initially seem disconnected and the SSC therefore
-is disabled by intel_init_pch_refclk, but on reprobe the connector
-may turn out to be connected and the SSC must then be enabled.
-
-Due to 92122789b2d6 however, the SSC is not enabled on reprobe since
-it is assumed BIOS disabled it while in fact it was disabled by
-intel_init_pch_refclk.
-
-Also, because the SSC status is preserved so late, the preserved value
-only ever gets used on resume but not on panel initialization:
-intel_modeset_init calls intel_init_display which indirectly calls
-intel_panel_use_ssc via multiple subroutines, *before* the BIOS value
-overrides the VBT value in intel_modeset_gem_init (intel_panel_use_ssc
-is the sole user of dev_priv->vbt.lvds_use_ssc).
-
-Fix this by moving the code introduced by 92122789b2d6 from
-intel_modeset_gem_init to intel_modeset_init before the invocation
-of intel_setup_outputs and intel_init_display.
-
-Add a DRM_DEBUG_KMS as suggested way back by Jani:
-http://lists.freedesktop.org/archives/intel-gfx/2014-June/046666.html
-
-Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115
-Tested-by: Paul Hordiienko
- [MBP 6,2 2010 intel ILK + nvidia GT216 pre-retina]
-Tested-by: William Brown
- [MBP 8,2 2011 intel SNB + amd turks pre-retina]
-Tested-by: Lukas Wunner
- [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina]
-Tested-by: Bruno Bierbaumer
- [MBP 11,3 2013 intel HSW + nvidia GK107 retina -- work in progress]
-Fixes: 92122789b2d6 ("drm/i915: preserve SSC if previously set v3")
-Signed-off-by: Lukas Wunner
-Reviewed-by: Jesse Barnes
-Signed-off-by: Jani Nikula
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/i915/intel_display.c | 29 ++++++++++++++++++-----------
- 1 file changed, 18 insertions(+), 11 deletions(-)
-
---- a/drivers/gpu/drm/i915/intel_display.c
-+++ b/drivers/gpu/drm/i915/intel_display.c
-@@ -13781,6 +13781,24 @@ void intel_modeset_init(struct drm_devic
- if (INTEL_INFO(dev)->num_pipes == 0)
- return;
-
-+ /*
-+ * There may be no VBT; and if the BIOS enabled SSC we can
-+ * just keep using it to avoid unnecessary flicker. Whereas if the
-+ * BIOS isn't using it, don't assume it will work even if the VBT
-+ * indicates as much.
-+ */
-+ if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) {
-+ bool bios_lvds_use_ssc = !!(I915_READ(PCH_DREF_CONTROL) &
-+ DREF_SSC1_ENABLE);
-+
-+ if (dev_priv->vbt.lvds_use_ssc != bios_lvds_use_ssc) {
-+ DRM_DEBUG_KMS("SSC %sabled by BIOS, overriding VBT which says %sabled\n",
-+ bios_lvds_use_ssc ? "en" : "dis",
-+ dev_priv->vbt.lvds_use_ssc ? "en" : "dis");
-+ dev_priv->vbt.lvds_use_ssc = bios_lvds_use_ssc;
-+ }
-+ }
-+
- intel_init_display(dev);
- intel_init_audio(dev);
-
-@@ -14266,7 +14284,6 @@ void intel_modeset_setup_hw_state(struct
-
- void intel_modeset_gem_init(struct drm_device *dev)
- {
-- struct drm_i915_private *dev_priv = dev->dev_private;
- struct drm_crtc *c;
- struct drm_i915_gem_object *obj;
- int ret;
-@@ -14275,16 +14292,6 @@ void intel_modeset_gem_init(struct drm_d
- intel_init_gt_powersave(dev);
- mutex_unlock(&dev->struct_mutex);
-
-- /*
-- * There may be no VBT; and if the BIOS enabled SSC we can
-- * just keep using it to avoid unnecessary flicker. Whereas if the
-- * BIOS isn't using it, don't assume it will work even if the VBT
-- * indicates as much.
-- */
-- if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev))
-- dev_priv->vbt.lvds_use_ssc = !!(I915_READ(PCH_DREF_CONTROL) &
-- DREF_SSC1_ENABLE);
--
- intel_modeset_init_hw(dev);
-
- intel_setup_overlay(dev);
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-qxl-validate-monitors-config-modes.patch b/kernel/kernel/files/patches/mageia/stable-drm-qxl-validate-monitors-config-modes.patch
deleted file mode 100644
index 2ee9e873..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-qxl-validate-monitors-config-modes.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From bd3e1c7c6de9f5f70d97cdb6c817151c0477c5e3 Mon Sep 17 00:00:00 2001
-From: Jonathon Jongsma
-Date: Thu, 20 Aug 2015 14:04:32 -0500
-Subject: drm/qxl: validate monitors config modes
-
-From: Jonathon Jongsma
-
-commit bd3e1c7c6de9f5f70d97cdb6c817151c0477c5e3 upstream.
-
-Due to some recent changes in
-drm_helper_probe_single_connector_modes_merge_bits(), old custom modes
-were not being pruned properly. In current kernels,
-drm_mode_validate_basic() is called to sanity-check each mode in the
-list. If the sanity-check passes, the mode's status gets set to to
-MODE_OK. In older kernels this check was not done, so old custom modes
-would still have a status of MODE_UNVERIFIED at this point, and would
-therefore be pruned later in the function.
-
-As a result of this new behavior, the list of modes for a device always
-includes every custom mode ever configured for the device, with the
-largest one listed first. Since desktop environments usually choose the
-first preferred mode when a hotplug event is emitted, this had the
-result of making it very difficult for the user to reduce the size of
-the display.
-
-The qxl driver did implement the mode_valid connector function, but it
-was empty. In order to restore the old behavior where old custom modes
-are pruned, we implement a proper mode_valid function for the qxl
-driver. This function now checks each mode against the last configured
-custom mode and the list of standard modes. If the mode doesn't match
-any of these, its status is set to MODE_BAD so that it will be pruned as
-expected.
-
-Signed-off-by: Jonathon Jongsma
-Signed-off-by: Dave Airlie
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/qxl/qxl_display.c | 66 +++++++++++++++++++++++---------------
- drivers/gpu/drm/qxl/qxl_drv.h | 2 +
- 2 files changed, 42 insertions(+), 26 deletions(-)
-
---- a/drivers/gpu/drm/qxl/qxl_display.c
-+++ b/drivers/gpu/drm/qxl/qxl_display.c
-@@ -160,9 +160,35 @@ static int qxl_add_monitors_config_modes
- *pwidth = head->width;
- *pheight = head->height;
- drm_mode_probed_add(connector, mode);
-+ /* remember the last custom size for mode validation */
-+ qdev->monitors_config_width = mode->hdisplay;
-+ qdev->monitors_config_height = mode->vdisplay;
- return 1;
- }
-
-+static struct mode_size {
-+ int w;
-+ int h;
-+} common_modes[] = {
-+ { 640, 480},
-+ { 720, 480},
-+ { 800, 600},
-+ { 848, 480},
-+ {1024, 768},
-+ {1152, 768},
-+ {1280, 720},
-+ {1280, 800},
-+ {1280, 854},
-+ {1280, 960},
-+ {1280, 1024},
-+ {1440, 900},
-+ {1400, 1050},
-+ {1680, 1050},
-+ {1600, 1200},
-+ {1920, 1080},
-+ {1920, 1200}
-+};
-+
- static int qxl_add_common_modes(struct drm_connector *connector,
- unsigned pwidth,
- unsigned pheight)
-@@ -170,29 +196,6 @@ static int qxl_add_common_modes(struct d
- struct drm_device *dev = connector->dev;
- struct drm_display_mode *mode = NULL;
- int i;
-- struct mode_size {
-- int w;
-- int h;
-- } common_modes[] = {
-- { 640, 480},
-- { 720, 480},
-- { 800, 600},
-- { 848, 480},
-- {1024, 768},
-- {1152, 768},
-- {1280, 720},
-- {1280, 800},
-- {1280, 854},
-- {1280, 960},
-- {1280, 1024},
-- {1440, 900},
-- {1400, 1050},
-- {1680, 1050},
-- {1600, 1200},
-- {1920, 1080},
-- {1920, 1200}
-- };
--
- for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
- mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h,
- 60, false, false, false);
-@@ -823,11 +826,22 @@ static int qxl_conn_get_modes(struct drm
- static int qxl_conn_mode_valid(struct drm_connector *connector,
- struct drm_display_mode *mode)
- {
-+ struct drm_device *ddev = connector->dev;
-+ struct qxl_device *qdev = ddev->dev_private;
-+ int i;
-+
- /* TODO: is this called for user defined modes? (xrandr --add-mode)
- * TODO: check that the mode fits in the framebuffer */
-- DRM_DEBUG("%s: %dx%d status=%d\n", mode->name, mode->hdisplay,
-- mode->vdisplay, mode->status);
-- return MODE_OK;
-+
-+ if(qdev->monitors_config_width == mode->hdisplay &&
-+ qdev->monitors_config_height == mode->vdisplay)
-+ return MODE_OK;
-+
-+ for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
-+ if (common_modes[i].w == mode->hdisplay && common_modes[i].h == mode->vdisplay)
-+ return MODE_OK;
-+ }
-+ return MODE_BAD;
- }
-
- static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
---- a/drivers/gpu/drm/qxl/qxl_drv.h
-+++ b/drivers/gpu/drm/qxl/qxl_drv.h
-@@ -325,6 +325,8 @@ struct qxl_device {
- struct work_struct fb_work;
-
- struct drm_property *hotplug_mode_update_property;
-+ int monitors_config_width;
-+ int monitors_config_height;
- };
-
- /* forward declaration for QXL_INFO_IO */
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-radeon-atom-send-out-the-full-aux-address.patch b/kernel/kernel/files/patches/mageia/stable-drm-radeon-atom-send-out-the-full-aux-address.patch
deleted file mode 100644
index 7c961fcb..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-radeon-atom-send-out-the-full-aux-address.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 3f8340cc72c9a1a4b49bce7802afd7f248400ef5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?=
-Date: Thu, 27 Aug 2015 17:23:31 +0300
-Subject: drm/radeon/atom: Send out the full AUX address
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?=
-
-commit 3f8340cc72c9a1a4b49bce7802afd7f248400ef5 upstream.
-
-AUX addresses are 20 bits long. Send out the entire address instead of
-just the low 16 bits.
-
-Cc: Alex Deucher
-Cc: "Christian König"
-Signed-off-by: Ville Syrjälä
-Signed-off-by: Alex Deucher
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/radeon/atombios_dp.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/gpu/drm/radeon/atombios_dp.c
-+++ b/drivers/gpu/drm/radeon/atombios_dp.c
-@@ -171,8 +171,9 @@ radeon_dp_aux_transfer_atom(struct drm_d
- return -E2BIG;
-
- tx_buf[0] = msg->address & 0xff;
-- tx_buf[1] = msg->address >> 8;
-- tx_buf[2] = msg->request << 4;
-+ tx_buf[1] = (msg->address >> 8) & 0xff;
-+ tx_buf[2] = (msg->request << 4) |
-+ ((msg->address >> 16) & 0xf);
- tx_buf[3] = msg->size ? (msg->size - 1) : 0;
-
- switch (msg->request & ~DP_AUX_I2C_MOT) {
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-radeon-don-t-link-train-displayport-on-hpd-until-we-get-the-dpcd.patch b/kernel/kernel/files/patches/mageia/stable-drm-radeon-don-t-link-train-displayport-on-hpd-until-we-get-the-dpcd.patch
deleted file mode 100644
index fee261a2..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-radeon-don-t-link-train-displayport-on-hpd-until-we-get-the-dpcd.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 924f92bf12bfbef3662619e3ed24a1cea7c1cbcd Mon Sep 17 00:00:00 2001
-From: Stephen Chandler Paul
-Date: Fri, 21 Aug 2015 14:16:12 -0400
-Subject: DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd
-
-From: Stephen Chandler Paul
-
-commit 924f92bf12bfbef3662619e3ed24a1cea7c1cbcd upstream.
-
-Most of the time this isn't an issue since hotplugging an adaptor will
-trigger a crtc mode change which in turn, causes the driver to probe
-every DisplayPort for a dpcd. However, in cases where hotplugging
-doesn't cause a mode change (specifically when one unplugs a monitor
-from a DisplayPort connector, then plugs that same monitor back in
-seconds later on the same port without any other monitors connected), we
-never probe for the dpcd before starting the initial link training. What
-happens from there looks like this:
-
- - GPU has only one monitor connected. It's connected via
- DisplayPort, and does not go through an adaptor of any sort.
-
- - User unplugs DisplayPort connector from GPU.
-
- - Change in HPD is detected by the driver, we probe every
- DisplayPort for a possible connection.
-
- - Probe the port the user originally had the monitor connected
- on for it's dpcd. This fails, and we clear the first (and only
- the first) byte of the dpcd to indicate we no longer have a
- dpcd for this port.
-
- - User plugs the previously disconnected monitor back into the
- same DisplayPort.
-
- - radeon_connector_hotplug() is called before everyone else,
- and tries to handle the link training. Since only the first
- byte of the dpcd is zeroed, the driver is able to complete
- link training but does so against the wrong dpcd, causing it
- to initialize the link with the wrong settings.
-
- - Display stays blank (usually), dpcd is probed after the
- initial link training, and the driver prints no obvious
- messages to the log.
-
-In theory, since only one byte of the dpcd is chopped off (specifically,
-the byte that contains the revision information for DisplayPort), it's
-not entirely impossible that this bug may not show on certain monitors.
-For instance, the only reason this bug was visible on my ASUS PB238
-monitor was due to the fact that this monitor using the enhanced framing
-symbol sequence, the flag for which is ignored if the radeon driver
-thinks that the DisplayPort version is below 1.1.
-
-Signed-off-by: Stephen Chandler Paul
-Reviewed-by: Jerome Glisse
-Signed-off-by: Alex Deucher
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/radeon/radeon_connectors.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/drivers/gpu/drm/radeon/radeon_connectors.c
-+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
-@@ -95,6 +95,11 @@ void radeon_connector_hotplug(struct drm
- if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
- drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
- } else if (radeon_dp_needs_link_train(radeon_connector)) {
-+ /* Don't try to start link training before we
-+ * have the dpcd */
-+ if (!radeon_dp_getdpcd(radeon_connector))
-+ return;
-+
- /* set it to OFF so that drm_helper_connector_dpms()
- * won't return immediately since the current state
- * is ON at this point.
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-radeon-fix-hdmi-quantization_range-for-pre-dce5-asics.patch b/kernel/kernel/files/patches/mageia/stable-drm-radeon-fix-hdmi-quantization_range-for-pre-dce5-asics.patch
deleted file mode 100644
index 90a2ec0c..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-radeon-fix-hdmi-quantization_range-for-pre-dce5-asics.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 86b7709d48f0df8796bddd7e1ce45c6fb7a7c6ec Mon Sep 17 00:00:00 2001
-From: Alex Deucher
-Date: Thu, 27 Aug 2015 09:52:22 -0400
-Subject: drm/radeon: fix HDMI quantization_range for pre-DCE5 asics
-
-From: Alex Deucher
-
-commit 86b7709d48f0df8796bddd7e1ce45c6fb7a7c6ec upstream.
-
-Support for output_csc is only available on DCE5 and newer so
-don't mess with the HDMI quantization_range on pre-DCE5 asics.
-
-bug:
-https://bugs.freedesktop.org/show_bug.cgi?id=83226
-
-Signed-off-by: Alex Deucher
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/radeon/radeon_audio.c | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
-
---- a/drivers/gpu/drm/radeon/radeon_audio.c
-+++ b/drivers/gpu/drm/radeon/radeon_audio.c
-@@ -522,13 +522,15 @@ static int radeon_audio_set_avi_packet(s
- return err;
- }
-
-- if (drm_rgb_quant_range_selectable(radeon_connector_edid(connector))) {
-- if (radeon_encoder->output_csc == RADEON_OUTPUT_CSC_TVRGB)
-- frame.quantization_range = HDMI_QUANTIZATION_RANGE_LIMITED;
-- else
-- frame.quantization_range = HDMI_QUANTIZATION_RANGE_FULL;
-- } else {
-- frame.quantization_range = HDMI_QUANTIZATION_RANGE_DEFAULT;
-+ if (radeon_encoder->output_csc != RADEON_OUTPUT_CSC_BYPASS) {
-+ if (drm_rgb_quant_range_selectable(radeon_connector_edid(connector))) {
-+ if (radeon_encoder->output_csc == RADEON_OUTPUT_CSC_TVRGB)
-+ frame.quantization_range = HDMI_QUANTIZATION_RANGE_LIMITED;
-+ else
-+ frame.quantization_range = HDMI_QUANTIZATION_RANGE_FULL;
-+ } else {
-+ frame.quantization_range = HDMI_QUANTIZATION_RANGE_DEFAULT;
-+ }
- }
-
- err = hdmi_avi_infoframe_pack(&frame, buffer, sizeof(buffer));
diff --git a/kernel/kernel/files/patches/mageia/stable-drm-radeon-native-send-out-the-full-aux-address.patch b/kernel/kernel/files/patches/mageia/stable-drm-radeon-native-send-out-the-full-aux-address.patch
deleted file mode 100644
index d89b354a..00000000
--- a/kernel/kernel/files/patches/mageia/stable-drm-radeon-native-send-out-the-full-aux-address.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 7040c399aea2b0213a9aefd73e507369a6d641d6 Mon Sep 17 00:00:00 2001
-From: Alex Deucher
-Date: Mon, 31 Aug 2015 11:15:05 -0400
-Subject: drm/radeon/native: Send out the full AUX address
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-From: Alex Deucher
-
-commit 7040c399aea2b0213a9aefd73e507369a6d641d6 upstream.
-
-AUX addresses are 20 bits long. Send out the entire address instead of
-just the low 16 bits.
-
-Port of:
-drm/radeon/atom: Send out the full AUX address
-to radeon non-atom aux path
-
-Reviewed-by: Christian König
-Signed-off-by: Alex Deucher
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/gpu/drm/radeon/radeon_dp_auxch.c
-+++ b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
-@@ -116,8 +116,8 @@ radeon_dp_aux_transfer_native(struct drm
- AUX_SW_WR_BYTES(bytes));
-
- /* write the data header into the registers */
-- /* request, addres, msg size */
-- byte = (msg->request << 4);
-+ /* request, address, msg size */
-+ byte = (msg->request << 4) | ((msg->address >> 16) & 0xf);
- WREG32(AUX_SW_DATA + aux_offset[instance],
- AUX_SW_DATA_MASK(byte) | AUX_SW_AUTOINCREMENT_DISABLE);
-
diff --git a/kernel/kernel/files/patches/mageia/stable-iio-add-inverse-unit-conversion-macros.patch b/kernel/kernel/files/patches/mageia/stable-iio-add-inverse-unit-conversion-macros.patch
deleted file mode 100644
index caabd831..00000000
--- a/kernel/kernel/files/patches/mageia/stable-iio-add-inverse-unit-conversion-macros.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From c689a923c867eac40ed3826c1d9328edea8b6bc7 Mon Sep 17 00:00:00 2001
-From: Lars-Peter Clausen
-Date: Wed, 5 Aug 2015 15:38:14 +0200
-Subject: iio: Add inverse unit conversion macros
-
-From: Lars-Peter Clausen
-
-commit c689a923c867eac40ed3826c1d9328edea8b6bc7 upstream.
-
-Add inverse unit conversion macro to convert from standard IIO units to
-units that might be used by some devices.
-
-Those are useful in combination with scale factors that are specified as
-IIO_VAL_FRACTIONAL. Typically the denominator for those specifications will
-contain the maximum raw value the sensor will generate and the numerator
-the value it maps to in a specific unit. Sometimes datasheets specify those
-in different units than the standard IIO units (e.g. degree/s instead of
-rad/s) and so we need to do a unit conversion.
-
-From a mathematical point of view it does not make a difference whether we
-apply the unit conversion to the numerator or the inverse unit conversion
-to the denominator since (x / y) / z = x / (y * z). But as the denominator
-is typically a larger value and we are rounding both the numerator and
-denominator to integer values using the later method gives us a better
-precision (E.g. the relative error is smaller if we round 8000.3 to 8000
-rather than rounding 8.3 to 8).
-
-This is where in inverse unit conversion macros will be used.
-
-Marked for stable as used by some upcoming fixes.
-
-Signed-off-by: Lars-Peter Clausen
-Signed-off-by: Jonathan Cameron
-Signed-off-by: Greg Kroah-Hartman
-
----
- include/linux/iio/iio.h | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
---- a/include/linux/iio/iio.h
-+++ b/include/linux/iio/iio.h
-@@ -642,6 +642,15 @@ int iio_str_to_fixpoint(const char *str,
- #define IIO_DEGREE_TO_RAD(deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)
-
- /**
-+ * IIO_RAD_TO_DEGREE() - Convert rad to degree
-+ * @rad: A value in rad
-+ *
-+ * Returns the given value converted from rad to degree
-+ */
-+#define IIO_RAD_TO_DEGREE(rad) \
-+ (((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL)
-+
-+/**
- * IIO_G_TO_M_S_2() - Convert g to meter / second**2
- * @g: A value in g
- *
-@@ -649,4 +658,12 @@ int iio_str_to_fixpoint(const char *str,
- */
- #define IIO_G_TO_M_S_2(g) ((g) * 980665ULL / 100000ULL)
-
-+/**
-+ * IIO_M_S_2_TO_G() - Convert meter / second**2 to g
-+ * @ms2: A value in meter / second**2
-+ *
-+ * Returns the given value converted from meter / second**2 to g
-+ */
-+#define IIO_M_S_2_TO_G(ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL)
-+
- #endif /* _INDUSTRIAL_IO_H_ */
diff --git a/kernel/kernel/files/patches/mageia/stable-iio-adis16400-fix-adis16448-gyroscope-scale.patch b/kernel/kernel/files/patches/mageia/stable-iio-adis16400-fix-adis16448-gyroscope-scale.patch
deleted file mode 100644
index a04deb53..00000000
--- a/kernel/kernel/files/patches/mageia/stable-iio-adis16400-fix-adis16448-gyroscope-scale.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8166537283b31d7abaae9e56bd48fbbc30cdc579 Mon Sep 17 00:00:00 2001
-From: Lars-Peter Clausen
-Date: Wed, 5 Aug 2015 15:38:13 +0200
-Subject: iio: adis16400: Fix adis16448 gyroscope scale
-
-From: Lars-Peter Clausen
-
-commit 8166537283b31d7abaae9e56bd48fbbc30cdc579 upstream.
-
-Use the correct scale for the adis16448 gyroscope output.
-
-Signed-off-by: Lars-Peter Clausen
-Signed-off-by: Jonathan Cameron
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/iio/imu/adis16400_core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/iio/imu/adis16400_core.c
-+++ b/drivers/iio/imu/adis16400_core.c
-@@ -780,7 +780,7 @@ static struct adis16400_chip_info adis16
- .flags = ADIS16400_HAS_PROD_ID |
- ADIS16400_HAS_SERIAL_NUMBER |
- ADIS16400_BURST_DIAG_STAT,
-- .gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
-+ .gyro_scale_micro = IIO_DEGREE_TO_RAD(40000), /* 0.04 deg/s */
- .accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */
- .temp_scale_nano = 73860000, /* 0.07386 C */
- .temp_offset = 31000000 / 73860, /* 31 C = 0x00 */
diff --git a/kernel/kernel/files/patches/mageia/stable-iio-adis16480-fix-scale-factors.patch b/kernel/kernel/files/patches/mageia/stable-iio-adis16480-fix-scale-factors.patch
deleted file mode 100644
index 0fe17053..00000000
--- a/kernel/kernel/files/patches/mageia/stable-iio-adis16480-fix-scale-factors.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 7abad1063deb0f77d275c61f58863ec319c58c5c Mon Sep 17 00:00:00 2001
-From: Lars-Peter Clausen
-Date: Wed, 5 Aug 2015 15:38:15 +0200
-Subject: iio: adis16480: Fix scale factors
-
-From: Lars-Peter Clausen
-
-commit 7abad1063deb0f77d275c61f58863ec319c58c5c upstream.
-
-The different devices support by the adis16480 driver have slightly
-different scales for the gyroscope and accelerometer channels.
-
-Signed-off-by: Lars-Peter Clausen
-Signed-off-by: Jonathan Cameron
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/iio/imu/adis16480.c | 39 +++++++++++++++++++++++++++++++++------
- 1 file changed, 33 insertions(+), 6 deletions(-)
-
---- a/drivers/iio/imu/adis16480.c
-+++ b/drivers/iio/imu/adis16480.c
-@@ -110,6 +110,10 @@
- struct adis16480_chip_info {
- unsigned int num_channels;
- const struct iio_chan_spec *channels;
-+ unsigned int gyro_max_val;
-+ unsigned int gyro_max_scale;
-+ unsigned int accel_max_val;
-+ unsigned int accel_max_scale;
- };
-
- struct adis16480 {
-@@ -497,19 +501,21 @@ static int adis16480_set_filter_freq(str
- static int adis16480_read_raw(struct iio_dev *indio_dev,
- const struct iio_chan_spec *chan, int *val, int *val2, long info)
- {
-+ struct adis16480 *st = iio_priv(indio_dev);
-+
- switch (info) {
- case IIO_CHAN_INFO_RAW:
- return adis_single_conversion(indio_dev, chan, 0, val);
- case IIO_CHAN_INFO_SCALE:
- switch (chan->type) {
- case IIO_ANGL_VEL:
-- *val = 0;
-- *val2 = IIO_DEGREE_TO_RAD(20000); /* 0.02 degree/sec */
-- return IIO_VAL_INT_PLUS_MICRO;
-+ *val = st->chip_info->gyro_max_scale;
-+ *val2 = st->chip_info->gyro_max_val;
-+ return IIO_VAL_FRACTIONAL;
- case IIO_ACCEL:
-- *val = 0;
-- *val2 = IIO_G_TO_M_S_2(800); /* 0.8 mg */
-- return IIO_VAL_INT_PLUS_MICRO;
-+ *val = st->chip_info->accel_max_scale;
-+ *val2 = st->chip_info->accel_max_val;
-+ return IIO_VAL_FRACTIONAL;
- case IIO_MAGN:
- *val = 0;
- *val2 = 100; /* 0.0001 gauss */
-@@ -674,18 +680,39 @@ static const struct adis16480_chip_info
- [ADIS16375] = {
- .channels = adis16485_channels,
- .num_channels = ARRAY_SIZE(adis16485_channels),
-+ /*
-+ * storing the value in rad/degree and the scale in degree
-+ * gives us the result in rad and better precession than
-+ * storing the scale directly in rad.
-+ */
-+ .gyro_max_val = IIO_RAD_TO_DEGREE(22887),
-+ .gyro_max_scale = 300,
-+ .accel_max_val = IIO_M_S_2_TO_G(21973),
-+ .accel_max_scale = 18,
- },
- [ADIS16480] = {
- .channels = adis16480_channels,
- .num_channels = ARRAY_SIZE(adis16480_channels),
-+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
-+ .gyro_max_scale = 450,
-+ .accel_max_val = IIO_M_S_2_TO_G(12500),
-+ .accel_max_scale = 5,
- },
- [ADIS16485] = {
- .channels = adis16485_channels,
- .num_channels = ARRAY_SIZE(adis16485_channels),
-+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
-+ .gyro_max_scale = 450,
-+ .accel_max_val = IIO_M_S_2_TO_G(20000),
-+ .accel_max_scale = 5,
- },
- [ADIS16488] = {
- .channels = adis16480_channels,
- .num_channels = ARRAY_SIZE(adis16480_channels),
-+ .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
-+ .gyro_max_scale = 450,
-+ .accel_max_val = IIO_M_S_2_TO_G(22500),
-+ .accel_max_scale = 18,
- },
- };
-
diff --git a/kernel/kernel/files/patches/mageia/stable-iio-bmg160-iio_buffer-and-iio_triggered_buffer-are-required.patch b/kernel/kernel/files/patches/mageia/stable-iio-bmg160-iio_buffer-and-iio_triggered_buffer-are-required.patch
deleted file mode 100644
index 7983e463..00000000
--- a/kernel/kernel/files/patches/mageia/stable-iio-bmg160-iio_buffer-and-iio_triggered_buffer-are-required.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 06d2f6ca5a38abe92f1f3a132b331eee773868c3 Mon Sep 17 00:00:00 2001
-From: Markus Pargmann
-Date: Wed, 29 Jul 2015 15:46:03 +0200
-Subject: iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required
-
-From: Markus Pargmann
-
-commit 06d2f6ca5a38abe92f1f3a132b331eee773868c3 upstream.
-
-This patch adds selects for IIO_BUFFER and IIO_TRIGGERED_BUFFER. Without
-IIO_BUFFER, the driver does not compile.
-
-Signed-off-by: Markus Pargmann
-Reviewed-by: Srinivas Pandruvada
-Signed-off-by: Jonathan Cameron
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/iio/gyro/Kconfig | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/iio/gyro/Kconfig
-+++ b/drivers/iio/gyro/Kconfig
-@@ -53,7 +53,8 @@ config ADXRS450
- config BMG160
- tristate "BOSCH BMG160 Gyro Sensor"
- depends on I2C
-- select IIO_TRIGGERED_BUFFER if IIO_BUFFER
-+ select IIO_BUFFER
-+ select IIO_TRIGGERED_BUFFER
- help
- Say yes here to build support for Bosch BMG160 Tri-axis Gyro Sensor
- driver. This driver also supports BMI055 gyroscope.
diff --git a/kernel/kernel/files/patches/mageia/stable-iio-event-remove-negative-error-code-from-iio_event_poll.patch b/kernel/kernel/files/patches/mageia/stable-iio-event-remove-negative-error-code-from-iio_event_poll.patch
deleted file mode 100644
index 3fa720d9..00000000
--- a/kernel/kernel/files/patches/mageia/stable-iio-event-remove-negative-error-code-from-iio_event_poll.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 41d903c00051d8f31c98a8136edbac67e6f8688f Mon Sep 17 00:00:00 2001
-From: Cristina Opriceana
-Date: Mon, 3 Aug 2015 13:00:47 +0300
-Subject: iio: event: Remove negative error code from iio_event_poll
-
-From: Cristina Opriceana
-
-commit 41d903c00051d8f31c98a8136edbac67e6f8688f upstream.
-
-Negative return values are not supported by iio_event_poll since
-its return type is unsigned int.
-
-Fixes: f18e7a068a0a3 ("iio: Return -ENODEV for file operations if the device has been unregistered")
-
-Signed-off-by: Cristina Opriceana
-Signed-off-by: Jonathan Cameron
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/iio/industrialio-event.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/iio/industrialio-event.c
-+++ b/drivers/iio/industrialio-event.c
-@@ -84,7 +84,7 @@ static unsigned int iio_event_poll(struc
- unsigned int events = 0;
-
- if (!indio_dev->info)
-- return -ENODEV;
-+ return events;
-
- poll_wait(filep, &ev_int->wait, wait);
-
diff --git a/kernel/kernel/files/patches/mageia/stable-iio-industrialio-buffer-fix-iio_buffer_poll-return-value.patch b/kernel/kernel/files/patches/mageia/stable-iio-industrialio-buffer-fix-iio_buffer_poll-return-value.patch
deleted file mode 100644
index 4549873a..00000000
--- a/kernel/kernel/files/patches/mageia/stable-iio-industrialio-buffer-fix-iio_buffer_poll-return-value.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1bdc0293901cbea23c6dc29432e81919d4719844 Mon Sep 17 00:00:00 2001
-From: Cristina Opriceana
-Date: Mon, 3 Aug 2015 13:37:40 +0300
-Subject: iio: industrialio-buffer: Fix iio_buffer_poll return value
-
-From: Cristina Opriceana
-
-commit 1bdc0293901cbea23c6dc29432e81919d4719844 upstream.
-
-Change return value to 0 if no device is bound since
-unsigned int cannot support negative error codes.
-
-Fixes: f18e7a068 ("iio: Return -ENODEV for file operations if the
-device has been unregistered")
-
-Signed-off-by: Cristina Opriceana
-Signed-off-by: Jonathan Cameron
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/iio/industrialio-buffer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/iio/industrialio-buffer.c
-+++ b/drivers/iio/industrialio-buffer.c
-@@ -151,7 +151,7 @@ unsigned int iio_buffer_poll(struct file
- struct iio_buffer *rb = indio_dev->buffer;
-
- if (!indio_dev->info)
-- return -ENODEV;
-+ return 0;
-
- poll_wait(filp, &rb->pollq, wait);
- if (iio_buffer_ready(indio_dev, rb, rb->watermark, 0))
diff --git a/kernel/kernel/files/patches/mageia/stable-libxfs-readahead-of-dir3-data-blocks-should-use-the-read-verifier.patch b/kernel/kernel/files/patches/mageia/stable-libxfs-readahead-of-dir3-data-blocks-should-use-the-read-verifier.patch
deleted file mode 100644
index 9c225d16..00000000
--- a/kernel/kernel/files/patches/mageia/stable-libxfs-readahead-of-dir3-data-blocks-should-use-the-read-verifier.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 2f123bce18943fff819bc10f8868ffb9149fc622 Mon Sep 17 00:00:00 2001
-From: "Darrick J. Wong"
-Date: Wed, 19 Aug 2015 10:33:58 +1000
-Subject: libxfs: readahead of dir3 data blocks should use the read verifier
-
-From: "Darrick J. Wong"
-
-commit 2f123bce18943fff819bc10f8868ffb9149fc622 upstream.
-
-In the dir3 data block readahead function, use the regular read
-verifier to check the block's CRC and spot-check the block contents
-instead of directly calling only the spot-checking routine. This
-prevents corrupted directory data blocks from being read into the
-kernel, which can lead to garbage ls output and directory loops (if
-say one of the entries contains slashes and other junk).
-
-Signed-off-by: Darrick J. Wong
-Reviewed-by: Dave Chinner
-Signed-off-by: Dave Chinner
-Signed-off-by: Greg Kroah-Hartman
-
----
- fs/xfs/libxfs/xfs_dir2_data.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/fs/xfs/libxfs/xfs_dir2_data.c
-+++ b/fs/xfs/libxfs/xfs_dir2_data.c
-@@ -252,7 +252,8 @@ xfs_dir3_data_reada_verify(
- return;
- case cpu_to_be32(XFS_DIR2_DATA_MAGIC):
- case cpu_to_be32(XFS_DIR3_DATA_MAGIC):
-- xfs_dir3_data_verify(bp);
-+ bp->b_ops = &xfs_dir3_data_buf_ops;
-+ bp->b_ops->verify_read(bp);
- return;
- default:
- xfs_buf_ioerror(bp, -EFSCORRUPTED);
diff --git a/kernel/kernel/files/patches/mageia/stable-pci-add-dev_flags-bit-to-access-vpd-through-function-0.patch b/kernel/kernel/files/patches/mageia/stable-pci-add-dev_flags-bit-to-access-vpd-through-function-0.patch
deleted file mode 100644
index f7bd065f..00000000
--- a/kernel/kernel/files/patches/mageia/stable-pci-add-dev_flags-bit-to-access-vpd-through-function-0.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 932c435caba8a2ce473a91753bad0173269ef334 Mon Sep 17 00:00:00 2001
-From: Mark Rustad
-Date: Mon, 13 Jul 2015 11:40:02 -0700
-Subject: PCI: Add dev_flags bit to access VPD through function 0
-
-From: Mark Rustad
-
-commit 932c435caba8a2ce473a91753bad0173269ef334 upstream.
-
-Add a dev_flags bit, PCI_DEV_FLAGS_VPD_REF_F0, to access VPD through
-function 0 to provide VPD access on other functions. This is for hardware
-devices that provide copies of the same VPD capability registers in
-multiple functions. Because the kernel expects that each function has its
-own registers, both the locking and the state tracking are affected by VPD
-accesses to different functions.
-
-On such devices for example, if a VPD write is performed on function 0,
-*any* later attempt to read VPD from any other function of that device will
-hang. This has to do with how the kernel tracks the expected value of the
-F bit per function.
-
-Concurrent accesses to different functions of the same device can not only
-hang but also corrupt both read and write VPD data.
-
-When hangs occur, typically the error message:
-
- vpd r/w failed. This is likely a firmware bug on this device.
-
-will be seen.
-
-Never set this bit on function 0 or there will be an infinite recursion.
-
-Signed-off-by: Mark Rustad
-Signed-off-by: Bjorn Helgaas
-Acked-by: Alexander Duyck
-Signed-off-by: Greg Kroah-Hartman
-
----
- drivers/pci/access.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-
- include/linux/pci.h | 2 +
- 2 files changed, 62 insertions(+), 1 deletion(-)
-
---- a/drivers/pci/access.c
-+++ b/drivers/pci/access.c
-@@ -439,6 +439,56 @@ static const struct pci_vpd_ops pci_vpd_
- .release = pci_vpd_pci22_release,
- };
-
-+static ssize_t pci_vpd_f0_read(struct pci_dev *dev, loff_t pos, size_t count,
-+ void *arg)
-+{
-+ struct pci_dev *tdev = pci_get_slot(dev->bus, PCI_SLOT(dev->devfn));
-+ ssize_t ret;
-+
-+ if (!tdev)
-+ return -ENODEV;
-+
-+ ret = pci_read_vpd(tdev, pos, count, arg);
-+ pci_dev_put(tdev);
-+ return ret;
-+}
-+
-+static ssize_t pci_vpd_f0_write(struct pci_dev *dev, loff_t pos, size_t count,
-+ const void *arg)
-+{
-+ struct pci_dev *tdev = pci_get_slot(dev->bus, PCI_SLOT(dev->devfn));
-+ ssize_t ret;
-+
-+ if (!tdev)
-+ return -ENODEV;
-+
-+ ret = pci_write_vpd(tdev, pos, count, arg);
-+ pci_dev_put(tdev);
-+ return ret;
-+}
-+
-+static const struct pci_vpd_ops pci_vpd_f0_ops = {
-+ .read = pci_vpd_f0_read,
-+ .write = pci_vpd_f0_write,
-+ .release = pci_vpd_pci22_release,
-+};
-+
-+static int pci_vpd_f0_dev_check(struct pci_dev *dev)
-+{
-+ struct pci_dev *tdev = pci_get_slot(dev->bus, PCI_SLOT(dev->devfn));
-+ int ret = 0;
-+
-+ if (!tdev)
-+ return -ENODEV;
-+ if (!tdev->vpd || !tdev->multifunction ||
-+ dev->class != tdev->class || dev->vendor != tdev->vendor ||
-+ dev->device != tdev->device)
-+ ret = -ENODEV;
-+
-+ pci_dev_put(tdev);
-+ return ret;
-+}
-+
- int pci_vpd_pci22_init(struct pci_dev *dev)
- {
- struct pci_vpd_pci22 *vpd;
-@@ -447,12 +497,21 @@ int pci_vpd_pci22_init(struct pci_dev *d
- cap = pci_find_capability(dev, PCI_CAP_ID_VPD);
- if (!cap)
- return -ENODEV;
-+ if (dev->dev_flags & PCI_DEV_FLAGS_VPD_REF_F0) {
-+ int ret = pci_vpd_f0_dev_check(dev);
-+
-+ if (ret)
-+ return ret;
-+ }
- vpd = kzalloc(sizeof(*vpd), GFP_ATOMIC);
- if (!vpd)
- return -ENOMEM;
-
- vpd->base.len = PCI_VPD_PCI22_SIZE;
-- vpd->base.ops = &pci_vpd_pci22_ops;
-+ if (dev->dev_flags & PCI_DEV_FLAGS_VPD_REF_F0)
-+ vpd->base.ops = &pci_vpd_f0_ops;
-+ else
-+ vpd->base.ops = &pci_vpd_pci22_ops;
- mutex_init(&vpd->lock);
- vpd->cap = cap;
- vpd->busy = false;
---- a/include/linux/pci.h
-+++ b/include/linux/pci.h
-@@ -180,6 +180,8 @@ enum pci_dev_flags {
- PCI_DEV_FLAGS_NO_BUS_RESET = (__force pci_dev_flags_t) (1 << 6),
- /* Do not use PM reset even if device advertises NoSoftRst- */
- PCI_DEV_FLAGS_NO_PM_RESET = (__force pci_dev_flags_t) (1 << 7),
-+ /* Get VPD from function 0 VPD */
-+ PCI_DEV_FLAGS_VPD_REF_F0 = (__force pci_dev_flags_t) (1 << 8),
- };
-
- enum pci_irq_reroute_variant {
diff --git a/kernel/kernel/files/patches/mageia/stable-pci-add-vpd-function-0-quirk-for-intel-ethernet-devices.patch b/kernel/kernel/files/patches/mageia/stable-pci-add-vpd-function-0-quirk-for-intel-ethernet-devices.patch
deleted file mode 100644
index b31bb387..00000000
--- a/kernel/kernel/files/patches/mageia/stable-pci-add-vpd-function-0-quirk-for-intel-ethernet-devices.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 7aa6ca4d39edf01f997b9e02cf6d2fdeb224f351 Mon Sep 17 00:00:00 2001
-From: Mark Rustad
-Date: Mon, 13 Jul 2015 11:40:07 -0700
-Subject: PCI: Add VPD function 0 quirk for Intel Ethernet devices
-
-From: Mark Rustad
-
-commit 7aa6ca4d39edf01f997b9e02cf6d2fdeb224f351 upstream.
-
-Set the PCI_DEV_FLAGS_VPD_REF_F0 flag on all Intel Ethernet device
-functions other than function 0, so that on multi-function devices, we will
-always read VPD from function 0 instead of from the other functions.
-
-[bhelgaas: changelog]
-Signed-off-by: Mark Rustad