Message ID | 20240815085725.2740390-3-quic_mdalam@quicinc.com |
---|---|
State | New |
Headers | show |
Series | Add cmd descriptor support | expand |
On 15/08/2024 10:57, Md Sadre Alam wrote: > bam having locking and unlocking mechanism of bam pipes. > Upon encountering a descriptor with Lock bit set, the > BAM will lock all other pipes not related to the current > pipe group, and keep handling the current pipe only until > it sees the Un-Lock set , then it will release all locked > pipes. The actual locking is done on the new descriptor > fetching for publishing, i.e. locked pipe will not fetch > new descriptors even if it got event/events adding more > descriptors for this pipe. > > Adding the bam_pipe_lock flag in bam driver to handle > Lock and Un-Lock bit set on command descriptor. > > Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> > --- > > Change in [v2] > > * Added bam_pipe_lock dt property > > Change in [v1] > > * This patch was not included in [v1] > > drivers/dma/qcom/bam_dma.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c > index 5e7d332731e0..1ac7e250bdaa 100644 > --- a/drivers/dma/qcom/bam_dma.c > +++ b/drivers/dma/qcom/bam_dma.c > @@ -389,6 +389,7 @@ struct bam_device { > u32 ee; > bool controlled_remotely; > bool powered_remotely; > + bool bam_pipe_lock; There is no user of this property. It's just no-op. Split your code into logical chunks, but logical chunk is not "I add field to structure which is not used". Best regards, Krzysztof
On 8/17/2024 2:38 PM, Krzysztof Kozlowski wrote: > On 15/08/2024 10:57, Md Sadre Alam wrote: >> bam having locking and unlocking mechanism of bam pipes. >> Upon encountering a descriptor with Lock bit set, the >> BAM will lock all other pipes not related to the current >> pipe group, and keep handling the current pipe only until >> it sees the Un-Lock set , then it will release all locked >> pipes. The actual locking is done on the new descriptor >> fetching for publishing, i.e. locked pipe will not fetch >> new descriptors even if it got event/events adding more >> descriptors for this pipe. >> >> Adding the bam_pipe_lock flag in bam driver to handle >> Lock and Un-Lock bit set on command descriptor. >> >> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> >> --- >> >> Change in [v2] >> >> * Added bam_pipe_lock dt property >> >> Change in [v1] >> >> * This patch was not included in [v1] >> >> drivers/dma/qcom/bam_dma.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c >> index 5e7d332731e0..1ac7e250bdaa 100644 >> --- a/drivers/dma/qcom/bam_dma.c >> +++ b/drivers/dma/qcom/bam_dma.c >> @@ -389,6 +389,7 @@ struct bam_device { >> u32 ee; >> bool controlled_remotely; >> bool powered_remotely; >> + bool bam_pipe_lock; > > There is no user of this property. It's just no-op. Split your code into > logical chunks, but logical chunk is not "I add field to structure which > is not used". Ok ,will squash this patch accordingly. > > > Best regards, > Krzysztof >
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 5e7d332731e0..1ac7e250bdaa 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c @@ -389,6 +389,7 @@ struct bam_device { u32 ee; bool controlled_remotely; bool powered_remotely; + bool bam_pipe_lock; u32 active_channels; const struct reg_offset_data *layout; @@ -1272,6 +1273,9 @@ static int bam_dma_probe(struct platform_device *pdev) bdev->powered_remotely = of_property_read_bool(pdev->dev.of_node, "qcom,powered-remotely"); + bdev->bam_pipe_lock = of_property_read_bool(pdev->dev.of_node, + "qcom,bam_pipe_lock"); + if (bdev->controlled_remotely || bdev->powered_remotely) bdev->bamclk = devm_clk_get_optional(bdev->dev, "bam_clk"); else
bam having locking and unlocking mechanism of bam pipes. Upon encountering a descriptor with Lock bit set, the BAM will lock all other pipes not related to the current pipe group, and keep handling the current pipe only until it sees the Un-Lock set , then it will release all locked pipes. The actual locking is done on the new descriptor fetching for publishing, i.e. locked pipe will not fetch new descriptors even if it got event/events adding more descriptors for this pipe. Adding the bam_pipe_lock flag in bam driver to handle Lock and Un-Lock bit set on command descriptor. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> --- Change in [v2] * Added bam_pipe_lock dt property Change in [v1] * This patch was not included in [v1] drivers/dma/qcom/bam_dma.c | 4 ++++ 1 file changed, 4 insertions(+)