lkml.org 
[lkml]   [2019]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] dmaengine: qcom-bam: fix circular buffer handling
From
Date


On 18/06/2019 17:27, Sricharan R wrote:
> The Macro's expect that buffer size is power of 2. So we are infact passing the actual correct
> size ( MAX_DESCRIPTORS + 1 = 4096)
This will make the circular buffer macros happy but question is that do
we actually have that many descriptor buffers?

This is what is in the driver:

#define BAM_DESC_FIFO_SIZE SZ_32K
#define MAX_DESCRIPTORS (BAM_DESC_FIFO_SIZE / sizeof(struct bam_desc_hw)
- 1)
#define BAM_FIFO_SIZE (SZ_32K - 8)

Wouldn't having MAX_DESCRIPTORS + 1 = 4096 lead to overflow the actual
descriptor memory size of (SZ_32K - 8) ?

--srini

\
 
 \ /
  Last update: 2019-06-18 18:51    [W:0.083 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site