Skip to contentSkip to conversation

update v4.7_dma_attrs.patch

PATCH In review Daniel Scheller 3 participants 3 messages Aug 28, 2017 – Sep 1, 2017 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update v4.7_dma_attrs.patch

From: Daniel Scheller <[email protected]>

Fixes apply_patches wrt

commit 5b6f9abe5a49 ("media: vb2: add bidirectional flag in vb2_queue")

---
Tested and verified by Jasmin on 3.13, 3.4 and 2.6.36, and by me on 4.4.

 backports/v4.7_dma_attrs.patch | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
backports/v4.7_dma_attrs.patch +4 -4
index 28d8dbc..40a7e5b 100644
@@ -294,18 +294,18 @@ index 9a144f2..c5e3113 100644
   *		doesn't fill in the @alloc_devs array.
 - * @dma_attrs:	DMA attributes to use for the DMA.
 + * @dma_attrs:	DMA attributes to use for the DMA. May be NULL.
-  * @fileio_read_once:		report EOF after reading the first buffer
-  * @fileio_write_immediately:	queue buffer after each write() call
-  * @allow_zero_bytesused:	allow bytesused == 0 to be passed to the driver
+  * @bidirectional: when this flag is set the DMA direction for the buffers of
+  *		this queue will be overridden with DMA_BIDIRECTIONAL direction.
+  *		This is useful in cases where the hardware (firmware) writes to
 @@ -494,7 +494,7 @@ struct vb2_queue {
  	unsigned int			type;
  	unsigned int			io_modes;
  	struct device			*dev;
 -	unsigned long			dma_attrs;
 +	const struct dma_attrs		*dma_attrs;
+ 	unsigned			bidirectional:1;
  	unsigned			fileio_read_once:1;
  	unsigned			fileio_write_immediately:1;
- 	unsigned			allow_zero_bytesused:1;
 diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h
 index 5604818..df2aabe 100644
 --- a/include/media/videobuf2-dma-contig.h
Signature · 1 line
2.13.5
#1 lore raw

Hi!

To get media-build working again this is needs to be merged also.

BR,
Jasmin

Quoted 42 lines · Daniel Scheller

From: Daniel Scheller <[email protected]>

Fixes apply_patches wrt

commit 5b6f9abe5a49 ("media: vb2: add bidirectional flag in vb2_queue")

---
Tested and verified by Jasmin on 3.13, 3.4 and 2.6.36, and by me on 4.4.

 backports/v4.7_dma_attrs.patch | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
backports/v4.7_dma_attrs.patch +4 -4
index 28d8dbc..40a7e5b 100644
@@ -294,18 +294,18 @@ index 9a144f2..c5e3113 100644
   *		doesn't fill in the @alloc_devs array.
 - * @dma_attrs:	DMA attributes to use for the DMA.
 + * @dma_attrs:	DMA attributes to use for the DMA. May be NULL.
-  * @fileio_read_once:		report EOF after reading the first buffer
-  * @fileio_write_immediately:	queue buffer after each write() call
-  * @allow_zero_bytesused:	allow bytesused == 0 to be passed to the driver
+  * @bidirectional: when this flag is set the DMA direction for the buffers of
+  *		this queue will be overridden with DMA_BIDIRECTIONAL direction.
+  *		This is useful in cases where the hardware (firmware) writes to
 @@ -494,7 +494,7 @@ struct vb2_queue {
  	unsigned int			type;
  	unsigned int			io_modes;
  	struct device			*dev;
 -	unsigned long			dma_attrs;
 +	const struct dma_attrs		*dma_attrs;
+ 	unsigned			bidirectional:1;
  	unsigned			fileio_read_once:1;
  	unsigned			fileio_write_immediately:1;
- 	unsigned			allow_zero_bytesused:1;
 diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h
 index 5604818..df2aabe 100644
 --- a/include/media/videobuf2-dma-contig.h
#2 lore raw
Quoted 3 lines · Jasmin J.

Hi!

To get media-build working again this is needs to be merged also.

I just applied this. I had to wait until the ktime accessor function fixes were merged in the master tree and that got delayed a bit.

Thanks,

Hans

Quoted 48 lines

BR,
Jasmin

Quoted 42 lines · Daniel Scheller

From: Daniel Scheller <[email protected]>

Fixes apply_patches wrt

commit 5b6f9abe5a49 ("media: vb2: add bidirectional flag in vb2_queue")

---
Tested and verified by Jasmin on 3.13, 3.4 and 2.6.36, and by me on 4.4.

 backports/v4.7_dma_attrs.patch | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
backports/v4.7_dma_attrs.patch +4 -4
index 28d8dbc..40a7e5b 100644
@@ -294,18 +294,18 @@ index 9a144f2..c5e3113 100644
   *		doesn't fill in the @alloc_devs array.
 - * @dma_attrs:	DMA attributes to use for the DMA.
 + * @dma_attrs:	DMA attributes to use for the DMA. May be NULL.
-  * @fileio_read_once:		report EOF after reading the first buffer
-  * @fileio_write_immediately:	queue buffer after each write() call
-  * @allow_zero_bytesused:	allow bytesused == 0 to be passed to the driver
+  * @bidirectional: when this flag is set the DMA direction for the buffers of
+  *		this queue will be overridden with DMA_BIDIRECTIONAL direction.
+  *		This is useful in cases where the hardware (firmware) writes to
 @@ -494,7 +494,7 @@ struct vb2_queue {
  	unsigned int			type;
  	unsigned int			io_modes;
  	struct device			*dev;
 -	unsigned long			dma_attrs;
 +	const struct dma_attrs		*dma_attrs;
+ 	unsigned			bidirectional:1;
  	unsigned			fileio_read_once:1;
  	unsigned			fileio_write_immediately:1;
- 	unsigned			allow_zero_bytesused:1;
 diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h
 index 5604818..df2aabe 100644
 --- a/include/media/videobuf2-dma-contig.h