Re: [PATCH 3/3] dw_dmac: set default alignment
On Fri, Jul 13, 2012 at 1:30 PM, viresh kumar wrote: > Sorry, got confused now. What works without this patch? And what doesn't work > without it? It seems this patch is redundant. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] dw_dmac: set default alignment
On 13/07/12 11:04, Andy Shevchenko wrote: > On Fri, Jul 13, 2012 at 11:56 AM, viresh kumar wrote: >> I wanted to ask, will normal memcpy for anybody will work with unaligned >> addresses >> with this patch? I believe they will. > Hmm... I just rechecked and it seems it works without this patch. I > didn't remember why this patch still in my pool. Sorry, got confused now. What works without this patch? And what doesn't work without it? -- Viresh -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] dw_dmac: set default alignment
On Fri, Jul 13, 2012 at 11:56 AM, viresh kumar wrote: > I wanted to ask, will normal memcpy for anybody will work with unaligned > addresses > with this patch? I believe they will. Hmm... I just rechecked and it seems it works without this patch. I didn't remember why this patch still in my pool. -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] dw_dmac: set default alignment
On 13/07/12 09:45, Andy Shevchenko wrote: >> > To understand it more, what does this mean? We will not support >> > transfers with unaligned >> > addresses/length to word size? > The dmatest module uses those constants to get source, destination > addresses and length of the test data aligned. On the other hand we > can't use unaligned address in LLI because of the hardware restriction > (2 bits are used for choosing AHB master). To be clear, we can't use unaligned address of an LLI struct, but src/dest address inside LLI can be unaligned. I wanted to ask, will normal memcpy for anybody will work with unaligned addresses with this patch? I believe they will. -- Viresh -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] dw_dmac: set default alignment
On Fri, Jul 13, 2012 at 11:26 AM, viresh kumar wrote: > It would be nice to keep spear-devel in cc, as this is the second > platform that uses this driver. I used to get the list of recipients via get_maintainer script. Will try to not forget about that address in the future. >> The default values are filled to support at least mem-to-mem tests provided >> by >> dmatest module. It makes sense to choose the 4 bytes (2 least significant >> bits) >> alignment by the default. >> diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c >> index 3d061c6..2a19ab6 100644 >> --- a/drivers/dma/dw_dmac.c >> +++ b/drivers/dma/dw_dmac.c >> @@ -1485,6 +1485,12 @@ static int __devinit dw_probe(struct platform_device >> *pdev) >> dw->dma.device_tx_status = dwc_tx_status; >> dw->dma.device_issue_pending = dwc_issue_pending; >> >> + /* Set default alignment */ >> + dw->dma.copy_align = 2; >> + dw->dma.xor_align = 2; >> + dw->dma.pq_align = 2; >> + dw->dma.fill_align = 2; > > To understand it more, what does this mean? We will not support > transfers with unaligned > addresses/length to word size? The dmatest module uses those constants to get source, destination addresses and length of the test data aligned. On the other hand we can't use unaligned address in LLI because of the hardware restriction (2 bits are used for choosing AHB master). -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 3/3] dw_dmac: set default alignment
It would be nice to keep spear-devel in cc, as this is the second platform that uses this driver. On Fri, Jul 13, 2012 at 9:09 AM, Andy Shevchenko wrote: > The default values are filled to support at least mem-to-mem tests provided by > dmatest module. It makes sense to choose the 4 bytes (2 least significant > bits) > alignment by the default. > > Signed-off-by: Andy Shevchenko > --- > drivers/dma/dw_dmac.c |6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c > index 3d061c6..2a19ab6 100644 > --- a/drivers/dma/dw_dmac.c > +++ b/drivers/dma/dw_dmac.c > @@ -1485,6 +1485,12 @@ static int __devinit dw_probe(struct platform_device > *pdev) > dw->dma.device_tx_status = dwc_tx_status; > dw->dma.device_issue_pending = dwc_issue_pending; > > + /* Set default alignment */ > + dw->dma.copy_align = 2; > + dw->dma.xor_align = 2; > + dw->dma.pq_align = 2; > + dw->dma.fill_align = 2; To understand it more, what does this mean? We will not support transfers with unaligned addresses/length to word size? -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/