search for: dma_align

Displaying 9 results from an estimated 9 matches for "dma_align".

2025 Jan 09
1
[PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()
...*file_priv, struct drm_mode_create_dumb *args) { struct zynqmp_dpsub *dpsub = to_zynqmp_dpsub(drm); - unsigned int pitch = DIV_ROUND_UP(args->width * args->bpp, 8); + int ret; /* Enforce the alignment constraints of the DMA engine. */ - args->pitch = ALIGN(pitch, dpsub->dma_align); + ret = drm_mode_size_dumb(drm, args, dpsub->dma_align, 0); + if (ret) + return ret; return drm_gem_dma_dumb_create_internal(file_priv, drm, args); } -- 2.47.1
2025 Jan 15
1
[PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()
...reate_dumb *args) > { > struct zynqmp_dpsub *dpsub = to_zynqmp_dpsub(drm); > - unsigned int pitch = DIV_ROUND_UP(args->width * args->bpp, 8); > + int ret; > > /* Enforce the alignment constraints of the DMA engine. */ > - args->pitch = ALIGN(pitch, dpsub->dma_align); > + ret = drm_mode_size_dumb(drm, args, dpsub->dma_align, 0); > + if (ret) > + return ret; > > return drm_gem_dma_dumb_create_internal(file_priv, drm, args); > } I have some trouble with this one. I have sent a series to add some pixel formats: https://lore.kernel...
2025 Jan 15
1
[PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()
...t;> ????? struct zynqmp_dpsub *dpsub = to_zynqmp_dpsub(drm); >> -??? unsigned int pitch = DIV_ROUND_UP(args->width * args->bpp, 8); >> +??? int ret; >> ? ????? /* Enforce the alignment constraints of the DMA engine. */ >> -??? args->pitch = ALIGN(pitch, dpsub->dma_align); >> +??? ret = drm_mode_size_dumb(drm, args, dpsub->dma_align, 0); >> +??? if (ret) >> +??????? return ret; >> ? ????? return drm_gem_dma_dumb_create_internal(file_priv, drm, args); >> ? } > > I have some trouble with this one. > > I have sent a series...
2025 Jan 15
1
[PATCH v2 25/25] drm/xlnx: Compute dumb-buffer sizes with drm_mode_size_dumb()
...uct zynqmp_dpsub *dpsub = to_zynqmp_dpsub(drm); >>> -??? unsigned int pitch = DIV_ROUND_UP(args->width * args->bpp, 8); >>> +??? int ret; >>> ? ????? /* Enforce the alignment constraints of the DMA engine. */ >>> -??? args->pitch = ALIGN(pitch, dpsub->dma_align); >>> +??? ret = drm_mode_size_dumb(drm, args, dpsub->dma_align, 0); >>> +??? if (ret) >>> +??????? return ret; >>> ? ????? return drm_gem_dma_dumb_create_internal(file_priv, drm, args); >>> ? } >> >> I have some trouble with this one. &gt...
2016 Jun 02
0
[RFC v3 19/45] [media] dma-mapping: Use unsigned long for dma_attrs
..._CPU_SYNC); pages = frame_vector_pages(buf->vec); /* sgt should exist only if vector contains pages... */ BUG_ON(IS_ERR(pages)); @@ -490,9 +487,6 @@ static void *vb2_dc_get_userptr(void *alloc_ctx, unsigned long vaddr, struct sg_table *sgt; unsigned long contig_size; unsigned long dma_align = dma_get_cache_alignment(); - DEFINE_DMA_ATTRS(attrs); - - dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs); /* Only cache aligned DMA transfers are reliable */ if (!IS_ALIGNED(vaddr | size, dma_align)) { @@ -554,7 +548,7 @@ static void *vb2_dc_get_userptr(void *alloc_ctx, unsigned long vadd...
2025 Jan 09
25
[PATCH v2 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation
Dumb-buffer pitch and size is specified by width, height, bits-per-pixel plus various hardware-specific alignments. The calculation of these values is inconsistent and duplicated among drivers. The results for formats with bpp < 8 are incorrect. This series fixes this for most drivers. Default scanline pitch and buffer size are now calculated with the existing 4CC helpers. There is a new
2016 Jun 02
52
[RFC v3 00/45] dma-mapping: Use unsigned long for dma_attrs
Hi, This is third approach (complete this time) for replacing struct dma_attrs with unsigned long. The main patch (2/45) doing the change is split into many subpatches for easier review (3-43). They should be squashed together when applying. *Important:* Patchset is *only* build tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc. Please provide reviewes and tests for other
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...gs.c index d3234fc..862b859 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -174,19 +174,18 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) { /* * set defaults */ q->nr_requests = BLKDEV_MAX_RQ; q->make_request_fn = mfn; blk_queue_dma_alignment(q, 511); blk_queue_congestion_threshold(q); - q->nr_batching = BLK_BATCH_REQ; blk_set_default_limits(&q->limits); /* * by default assume old behaviour and bounce for any highmem page */ blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); } EXPORT_SYMBOL(blk_queue_make_requ...
2012 Apr 20
1
[PATCH] multiqueue: a hodge podge of things
...gs.c index d3234fc..862b859 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -174,19 +174,18 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) { /* * set defaults */ q->nr_requests = BLKDEV_MAX_RQ; q->make_request_fn = mfn; blk_queue_dma_alignment(q, 511); blk_queue_congestion_threshold(q); - q->nr_batching = BLK_BATCH_REQ; blk_set_default_limits(&q->limits); /* * by default assume old behaviour and bounce for any highmem page */ blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH); } EXPORT_SYMBOL(blk_queue_make_requ...