Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1549124 > unrolled thread
| Started by | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| First post | 2017-01-02 12:40 +0100 |
| Last post | 2017-01-03 18:30 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-02 12:40 +0100
Re: [PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-03 17:20 +0100
Re: [PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails Noralf Trønnes <noralf@tronnes.org> - 2017-01-03 18:30 +0100
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-01-02 12:40 +0100 |
| Subject | [PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails |
| Message-ID | <sV985-6ct-13@gated-at.bofh.it> |
Fall back to usual allocation method if DMA coherent allocation fails.
SPI framework will map and use DMA mapped memory when possible.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/staging/fbtft/fbtft-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 226be8c09768..9f024986aff4 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -843,7 +843,8 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
if (dma) {
txbuf = dmam_alloc_coherent(dev, txbuflen,
&par->txbuf.dma, GFP_DMA);
- } else
+ }
+ if (!txbuf)
#endif
{
txbuf = devm_kzalloc(par->info->device,
--
2.11.0
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2017-01-03 17:20 +0100 |
| Subject | Re: [PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails |
| Message-ID | <sVzYB-pP-31@gated-at.bofh.it> |
| In reply to | #1549124 |
On Mon, 2017-01-02 at 13:35 +0200, Andy Shevchenko wrote:
> Fall back to usual allocation method if DMA coherent allocation fails.
>
> SPI framework will map and use DMA mapped memory when possible.
Locally I have re-done DMA approach and thus this patch became optional.
Should I leave or remove it? Opinions?
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/staging/fbtft/fbtft-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/fbtft/fbtft-core.c
> b/drivers/staging/fbtft/fbtft-core.c
> index 226be8c09768..9f024986aff4 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -843,7 +843,8 @@ struct fb_info *fbtft_framebuffer_alloc(struct
> fbtft_display *display,
> if (dma) {
> txbuf = dmam_alloc_coherent(dev, txbuflen,
> &par->txbuf.dma,
> GFP_DMA);
> - } else
> + }
> + if (!txbuf)
> #endif
> {
> txbuf = devm_kzalloc(par->info->device,
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
[toc] | [prev] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-01-03 18:30 +0100 |
| Subject | Re: [PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails |
| Message-ID | <sVB4l-1a8-23@gated-at.bofh.it> |
| In reply to | #1549926 |
Den 03.01.2017 17:12, skrev Andy Shevchenko:
> On Mon, 2017-01-02 at 13:35 +0200, Andy Shevchenko wrote:
>> Fall back to usual allocation method if DMA coherent allocation fails.
>>
>> SPI framework will map and use DMA mapped memory when possible.
> Locally I have re-done DMA approach and thus this patch became optional.
>
> Should I leave or remove it? Opinions?
If we use kmalloc always, then this goes away.
>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> ---
>> drivers/staging/fbtft/fbtft-core.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/fbtft/fbtft-core.c
>> b/drivers/staging/fbtft/fbtft-core.c
>> index 226be8c09768..9f024986aff4 100644
>> --- a/drivers/staging/fbtft/fbtft-core.c
>> +++ b/drivers/staging/fbtft/fbtft-core.c
>> @@ -843,7 +843,8 @@ struct fb_info *fbtft_framebuffer_alloc(struct
>> fbtft_display *display,
>> if (dma) {
>> txbuf = dmam_alloc_coherent(dev, txbuflen,
>> &par->txbuf.dma,
>> GFP_DMA);
>> - } else
>> + }
>> + if (!txbuf)
>> #endif
>> {
>> txbuf = devm_kzalloc(par->info->device,
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web