Skip to contentSkip to conversation

media_build: fixes wrt the ddbridge code bump

PATCH New Daniel Scheller 1 participant 4 messages Aug 20, 2017 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

cover media_build: fixes wrt the ddbridge code bump

From: Daniel Scheller <[email protected]>

Hans,

these are the patches I've carried around in my media_build fork wrt ddbridge testing, which obviously should go into upstream, now that the patches got merged. Things worked pretty well at least up to (down to) Kernel 3.13 on Ubuntu Trusty, guess some more things need to be added for even older kernels, but your daily build will probably tell :) Verified myself against 4.4 (Ubuntu Xenial).

Daniel Scheller (3):
[media_build] fix pr_fmt patch wrt the ddbridge code bump [media_build] patch pci_alloc_irq_vectors() for ddbridge aswell [media_build] add compat for __GFP_RETRY_MAYFAIL

 backports/pr_fmt.patch                     |  6 +++---
 backports/v4.7_pci_alloc_irq_vectors.patch | 13 +++++++++++++
 v4l/compat.h                               |  4 ++++
 3 files changed, 20 insertions(+), 3 deletions(-)
Signature · 1 line
2.13.0
#1 lore raw

PATCH 1/3 fix pr_fmt patch wrt the ddbridge code bump

From: Daniel Scheller <[email protected]>

---
 backports/pr_fmt.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
backports/pr_fmt.patch +3 -3
index 7bfe547..09ca713 100644
@@ -607,10 +607,10 @@ index 6777926f20f2..74358ade87f2 100644
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  
  #include <linux/pci.h>
-diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
+diff --git a/drivers/media/pci/ddbridge/ddbridge-main.c b/drivers/media/pci/ddbridge/ddbridge-main.c
 index 32f4d3746c8e..660898d16268 100644
---- a/drivers/media/pci/ddbridge/ddbridge-core.c
-+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
+--- a/drivers/media/pci/ddbridge/ddbridge-main.c
++++ b/drivers/media/pci/ddbridge/ddbridge-main.c
 @@ -17,6 +17,7 @@
   * http://www.gnu.org/copyleft/gpl.html
   */
Signature · 1 line
2.13.0
#2 lore raw

PATCH 2/3 patch pci_alloc_irq_vectors() for ddbridge aswell

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

---
 backports/v4.7_pci_alloc_irq_vectors.patch | 13 +++++++++++++
 1 file changed, 13 insertions(+)
backports/v4.7_pci_alloc_irq_vectors.patch +13 -0
index 64867fa..e15d521 100644
@@ -42,3 +42,16 @@ index 00f773e..ed00dc9 100644
  	/* omnitek dma */
  	int dma_channels;
  	int first_fifo_channel;
+diff --git a/drivers/media/pci/ddbridge/ddbridge.c b/drivers/media/pci/ddbridge/ddbridge.c
+index fab421f..031288a 100644
+--- a/drivers/media/pci/ddbridge/ddbridge-main.c
++++ b/drivers/media/pci/ddbridge/ddbridge-main.c
+@@ -109,7 +109,7 @@ static void ddb_irq_msi(struct ddb *dev, int nr)
+ 	int stat;
+ 
+ 	if (msi && pci_msi_enabled()) {
+-		stat = pci_alloc_irq_vectors(dev->pdev, 1, nr, PCI_IRQ_MSI);
++		stat = pci_enable_msi_range(dev->pdev, 1, nr);
+ 		if (stat >= 1) {
+ 			dev->msi = stat;
+ 			dev_info(dev->dev, "using %d MSI interrupt(s)\n",
Signature · 1 line
2.13.0
#3 lore raw

PATCH 3/3 add compat for __GFP_RETRY_MAYFAIL

In reply to Daniel Scheller

From: Daniel Scheller <[email protected]>

required for building ddbridge on <4.13-rc1 wrt

commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic")

---
 v4l/compat.h | 4 ++++
 1 file changed, 4 insertions(+)
v4l/compat.h +4 -0
index b5b0846..a28ce76 100644
@@ -2099,4 +2099,8 @@ static inline int pm_runtime_get_if_in_use(struct device *dev)
 }
 #endif
 
+#ifndef __GFP_RETRY_MAYFAIL
+#define __GFP_RETRY_MAYFAIL __GFP_REPEAT
+#endif
+
 #endif /*  _COMPAT_H */
Signature · 1 line
2.13.0