From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964887AbdACQQz (ORCPT ); Tue, 3 Jan 2017 11:16:55 -0500 Received: from mga11.intel.com ([192.55.52.93]:64738 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759423AbdACQQ2 (ORCPT ); Tue, 3 Jan 2017 11:16:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,455,1477983600"; d="scan'208";a="804680262" Message-ID: <1483459942.9552.215.camel@linux.intel.com> Subject: Re: [PATCH v2 3/6] staging: fbtft: fallback to usual allocation when DMA fails From: Andy Shevchenko To: Noralf =?ISO-8859-1?Q?Tr=F8nnes?= , Greg Kroah-Hartman , devel@driverdev.osuosl.org, Thomas Petazzoni , linux-kernel@vger.kernel.org Date: Tue, 03 Jan 2017 18:12:22 +0200 In-Reply-To: <20170102113534.127692-4-andriy.shevchenko@linux.intel.com> References: <20170102113534.127692-1-andriy.shevchenko@linux.intel.com> <20170102113534.127692-4-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- >  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 Intel Finland Oy