Skip to contentSkip to conversation

media: xilinx: Use dmaengine_get_copy_align() accessor

PATCH In review [email protected] 3 participants 3 messages Nov 11 – Nov 12

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: xilinx: Use dmaengine_get_copy_align() accessor

From: Frank Li <[email protected]>

Replace direct access to dma->dma->device->copy_align with the dmaengine_get_copy_align() accessor function.

Prepare move struct dma_device to private.

---
 drivers/media/platform/xilinx/xilinx-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/xilinx/xilinx-dma.c +1 -1
index ece2116639fc0..e01bb40bc39c7 100644
@@ -710,7 +710,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
 		goto error;
 	}
 
-	dma->align = 1 << dma->dma->device->copy_align;
+	dma->align = 1 << dmaengine_get_copy_align(dma->dma);
 
 	ret = video_register_device(&dma->video, VFL_TYPE_VIDEO, -1);
 	if (ret < 0) {
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Wed, Nov 11, 2026 at 12:13:24PM -0500, [email protected] wrote:

From: Frank Li <[email protected]>

Replace direct access to dma->dma->device->copy_align with the dmaengine_get_copy_align() accessor function.

Prepare move struct dma_device to private.

I didn't see a rationale in the commit that introduced dmaengine_get_copy_align(), and I then saw it here. Without knowing much about the greater plan of making dma_device private, this patch looks OK.

Tomi, will you handle this with any other ongoing work on media/platform/xilinx/, or should it get merged separately ?

Quoted 18 lines
---
 drivers/media/platform/xilinx/xilinx-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/xilinx/xilinx-dma.c +1 -1
index ece2116639fc0..e01bb40bc39c7 100644
@@ -710,7 +710,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
 		goto error;
 	}
 
-	dma->align = 1 << dma->dma->device->copy_align;
+	dma->align = 1 << dmaengine_get_copy_align(dma->dma);
 
 	ret = video_register_device(&dma->video, VFL_TYPE_VIDEO, -1);
 	if (ret < 0) {
Signature · 3 lines
Regards,

Laurent Pinchart
Reviewed-by
#2 lore raw

Hi,

Quoted 13 lines · Laurent Pinchart
Quoted 6 lines · On Wed, Nov 11, 2026 at 12:13:24PM -0500, [email protected] wrote:

From: Frank Li <[email protected]>

Replace direct access to dma->dma->device->copy_align with the dmaengine_get_copy_align() accessor function.

Prepare move struct dma_device to private.

I didn't see a rationale in the commit that introduced dmaengine_get_copy_align(), and I then saw it here. Without knowing much about the greater plan of making dma_device private, this patch looks OK.

Quoted 4 lines

Tomi, will you handle this with any other ongoing work on media/platform/xilinx/, or should it get merged separately ?

This can be merged separately, I don't have any series that I would be sending in the near term future.

Tomi

Quoted 19 lines
Quoted 18 lines
---
  drivers/media/platform/xilinx/xilinx-dma.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/xilinx/xilinx-dma.c +1 -1
index ece2116639fc0..e01bb40bc39c7 100644
@@ -710,7 +710,7 @@ int xvip_dma_init(struct xvip_composite_device *xdev, struct xvip_dma *dma,
  		goto error;
  	}
 
-	dma->align = 1 << dma->dma->device->copy_align;
+	dma->align = 1 << dmaengine_get_copy_align(dma->dma);
 
  	ret = video_register_device(&dma->video, VFL_TYPE_VIDEO, -1);
  	if (ret < 0) {