Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-17 08:22:40 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-17 08:22:40 +0200
commitbc6b5a0c1fb501b36696e3a7e61babed8b847bb4 (patch)
treed2c059aab7bd720cb4dd0bdafc54e483dc543f6a
parent9469c52ad1abf31194cbb180fdef0a3ff2eda45e (diff)
parent0a74943b6a1c57903c435b71688dd617c0f3f635 (diff)
Merge branch 'users/tiwai/SLE15-SP1/for-next' into SLE15-SP1SLE15-SP1
Pull assorted fixes from Takashi Iwai
-rw-r--r--patches.drivers/ALSA-usb-audio-fix-Line6-Helix-audio-format-rates.patch97
-rw-r--r--patches.drm/drm-msm-mdp5-Fix-mdp5_cfg_init-error-return.patch39
-rw-r--r--patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch55
-rw-r--r--series.conf3
4 files changed, 194 insertions, 0 deletions
diff --git a/patches.drivers/ALSA-usb-audio-fix-Line6-Helix-audio-format-rates.patch b/patches.drivers/ALSA-usb-audio-fix-Line6-Helix-audio-format-rates.patch
new file mode 100644
index 0000000000..5e60dbd502
--- /dev/null
+++ b/patches.drivers/ALSA-usb-audio-fix-Line6-Helix-audio-format-rates.patch
@@ -0,0 +1,97 @@
+From d4bd30532688558a7de70f0c8edd2a7a25c3963f Mon Sep 17 00:00:00 2001
+From: Nicola Lunghi <nick83ola@gmail.com>
+Date: Sun, 7 Jul 2019 09:27:34 +0100
+Subject: [PATCH] ALSA: usb-audio: fix Line6 Helix audio format rates
+Git-commit: d4bd30532688558a7de70f0c8edd2a7a25c3963f
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+Line6 Helix and HX stomp devices don't support retrieving
+the number of clock sample rate.
+
+Add a quirk to set it to 48Khz by default.
+
+[ fixed wrong variable initialization changes by tiwai ]
+
+Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ sound/usb/format.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 43 insertions(+), 3 deletions(-)
+
+diff --git a/sound/usb/format.c b/sound/usb/format.c
+index 3ee7d6f853b7..c391ae03a07b 100644
+--- a/sound/usb/format.c
++++ b/sound/usb/format.c
+@@ -298,6 +298,33 @@ static int parse_uac2_sample_rate_range(struct snd_usb_audio *chip,
+ return nr_rates;
+ }
+
++/* Line6 Helix series don't support the UAC2_CS_RANGE usb function
++ * call. Return a static table of known clock rates.
++ */
++static int line6_parse_audio_format_rates_quirk(struct snd_usb_audio *chip,
++ struct audioformat *fp)
++{
++ switch (chip->usb_id) {
++ case USB_ID(0x0E41, 0x4241): /* Line6 Helix */
++ case USB_ID(0x0E41, 0x4242): /* Line6 Helix Rack */
++ case USB_ID(0x0E41, 0x4244): /* Line6 Helix LT */
++ case USB_ID(0x0E41, 0x4246): /* Line6 HX-Stomp */
++ /* supported rates: 48Khz */
++ kfree(fp->rate_table);
++ fp->rate_table = kmalloc(sizeof(int), GFP_KERNEL);
++ if (!fp->rate_table)
++ return -ENOMEM;
++ fp->nr_rates = 1;
++ fp->rate_min = 48000;
++ fp->rate_max = 48000;
++ fp->rates = SNDRV_PCM_RATE_48000;
++ fp->rate_table[0] = 48000;
++ return 0;
++ }
++
++ return -ENODEV;
++}
++
+ /*
+ * parse the format descriptor and stores the possible sample rates
+ * on the audioformat table (audio class v2 and v3).
+@@ -307,7 +334,7 @@ static int parse_audio_format_rates_v2v3(struct snd_usb_audio *chip,
+ {
+ struct usb_device *dev = chip->dev;
+ unsigned char tmp[2], *data;
+- int nr_triplets, data_size, ret = 0;
++ int nr_triplets, data_size, ret = 0, ret_l6;
+ int clock = snd_usb_clock_find_source(chip, fp->protocol,
+ fp->clock, false);
+
+@@ -326,9 +353,22 @@ static int parse_audio_format_rates_v2v3(struct snd_usb_audio *chip,
+ tmp, sizeof(tmp));
+
+ if (ret < 0) {
+- dev_err(&dev->dev,
+- "%s(): unable to retrieve number of sample rates (clock %d)\n",
++ /* line6 helix devices don't support UAC2_CS_CONTROL_SAM_FREQ call */
++ ret_l6 = line6_parse_audio_format_rates_quirk(chip, fp);
++ if (ret_l6 == -ENODEV) {
++ /* no line6 device found continue showing the error */
++ dev_err(&dev->dev,
++ "%s(): unable to retrieve number of sample rates (clock %d)\n",
++ __func__, clock);
++ goto err;
++ }
++ if (ret_l6 == 0) {
++ dev_info(&dev->dev,
++ "%s(): unable to retrieve number of sample rates: set it to a predefined value (clock %d).\n",
+ __func__, clock);
++ return 0;
++ }
++ ret = ret_l6;
+ goto err;
+ }
+
+--
+2.16.4
+
diff --git a/patches.drm/drm-msm-mdp5-Fix-mdp5_cfg_init-error-return.patch b/patches.drm/drm-msm-mdp5-Fix-mdp5_cfg_init-error-return.patch
new file mode 100644
index 0000000000..37ca0495b1
--- /dev/null
+++ b/patches.drm/drm-msm-mdp5-Fix-mdp5_cfg_init-error-return.patch
@@ -0,0 +1,39 @@
+From fc19cbb785d7bbd1a1af26229b5240a3ab332744 Mon Sep 17 00:00:00 2001
+From: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
+Date: Tue, 21 May 2019 08:00:30 -0700
+Subject: [PATCH] drm/msm/mdp5: Fix mdp5_cfg_init error return
+Git-commit: fc19cbb785d7bbd1a1af26229b5240a3ab332744
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+If mdp5_cfg_init fails because of an unknown major version, a null pointer
+dereference occurs. This is because the caller of init expects error
+pointers, but init returns NULL on error. Fix this by returning the
+expected values on error.
+
+Fixes: 2e362e1772b8 (drm/msm/mdp5: introduce mdp5_cfg module)
+Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
+Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
+index ea8f7d7daf7f..52e23780fce1 100644
+--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
++++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
+@@ -721,7 +721,7 @@ struct mdp5_cfg_handler *mdp5_cfg_init(struct mdp5_kms *mdp5_kms,
+ if (cfg_handler)
+ mdp5_cfg_destroy(cfg_handler);
+
+- return NULL;
++ return ERR_PTR(ret);
+ }
+
+ static struct mdp5_cfg_platform *mdp5_get_config(struct platform_device *dev)
+--
+2.16.4
+
diff --git a/patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch b/patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch
new file mode 100644
index 0000000000..54bac97f85
--- /dev/null
+++ b/patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch
@@ -0,0 +1,55 @@
+From 9c002bb66f5bd8b8f470926489a115b7f486f501 Mon Sep 17 00:00:00 2001
+From: Logan Gunthorpe <logang@deltatee.com>
+Date: Tue, 2 Jul 2019 11:35:44 -0600
+Subject: [PATCH] PCI/P2PDMA: Fix missing check for dma_virt_ops
+Git-commit: 9c002bb66f5bd8b8f470926489a115b7f486f501
+Patch-mainline: v5.3-rc1
+References: bsc#1111666
+
+Drivers that use dma_virt_ops were meant to be rejected when testing
+compatibility for P2PDMA.
+
+This check got inadvertently dropped in one of the later versions of the
+original patchset, so add it back.
+
+Fixes: 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory")
+Link: https://lore.kernel.org/r/20190702173544.21950-1-logang@deltatee.com
+Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
+Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/pci/p2pdma.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
+index 742928d0053e..1940a7a0a684 100644
+--- a/drivers/pci/p2pdma.c
++++ b/drivers/pci/p2pdma.c
+@@ -468,6 +468,14 @@ int pci_p2pdma_distance_many(struct pci_dev *provider, struct device **clients,
+ return -1;
+
+ for (i = 0; i < num_clients; i++) {
++ if (IS_ENABLED(CONFIG_DMA_VIRT_OPS) &&
++ clients[i]->dma_ops == &dma_virt_ops) {
++ if (verbose)
++ dev_warn(clients[i],
++ "cannot be used for peer-to-peer DMA because the driver makes use of dma_virt_ops\n");
++ return -1;
++ }
++
+ pci_client = find_parent_pci_dev(clients[i]);
+ if (!pci_client) {
+ if (verbose)
+@@ -732,7 +740,7 @@ int pci_p2pdma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+ * p2pdma mappings are not compatible with devices that use
+ * dma_virt_ops. If the upper layers do the right thing
+ * this should never happen because it will be prevented
+- * by the check in pci_p2pdma_add_client()
++ * by the check in pci_p2pdma_distance_many()
+ */
+ if (WARN_ON_ONCE(IS_ENABLED(CONFIG_DMA_VIRT_OPS) &&
+ dev->dma_ops == &dma_virt_ops))
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 47344d8467..108dddc14c 100644
--- a/series.conf
+++ b/series.conf
@@ -47649,6 +47649,7 @@
patches.drivers/media-v4l2-Test-type-instead-of-cfg-type-in-v4l2_ctr.patch
patches.drivers/ALSA-hda-realtek-Headphone-Mic-can-t-record-after-S3.patch
patches.drivers/ALSA-usb-audio-Fix-parse-of-UAC2-Extension-Units.patch
+ patches.drivers/ALSA-usb-audio-fix-Line6-Helix-audio-format-rates.patch
patches.drivers/ASoC-add-support-for-Conexant-CX2072X-CODEC
patches.drivers/ASoC-Intel-Add-machine-driver-for-Cherrytrail-CX2072
patches.drivers/ASoC-cx2072x-fix-integer-overflow-on-unsigned-int-mu.patch
@@ -47739,6 +47740,8 @@
patches.drivers/tools-power-x86-A-tool-to-validate-Intel-Speed-Selec.patch
patches.drm/drm-amd-display-Make-some-functions-static.patch
patches.drm/drm-atmel-hlcdc-revert-shift-by-8.patch
+ patches.drm/drm-msm-mdp5-Fix-mdp5_cfg_init-error-return.patch
+ patches.fixes/PCI-P2PDMA-Fix-missing-check-for-dma_virt_ops.patch
# davem/net-next
patches.drivers/cxgb4-Enable-hash-filter-with-offload.patch