Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758705AbcJRHoi (ORCPT ); Tue, 18 Oct 2016 03:44:38 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33602 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758543AbcJRHob (ORCPT ); Tue, 18 Oct 2016 03:44:31 -0400 Date: Tue, 18 Oct 2016 09:44:24 +0200 From: Daniel Vetter To: Stefan Agner Cc: meng.yi@nxp.com, dri-devel@lists.freedesktop.org, jianwei.wang.chn@gmail.com, linux-kernel@vger.kernel.org, alison.wang@freescale.com Subject: Re: [PATCH v3 5/5] drm/fsl-dcu: only init fbdev if required Message-ID: <20161018074424.GX20761@phenom.ffwll.local> Mail-Followup-To: Stefan Agner , meng.yi@nxp.com, dri-devel@lists.freedesktop.org, jianwei.wang.chn@gmail.com, linux-kernel@vger.kernel.org, alison.wang@freescale.com References: <20161017213321.8074-1-stefan@agner.ch> <20161017213321.8074-6-stefan@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161017213321.8074-6-stefan@agner.ch> X-Operating-System: Linux phenom 4.6.0-1-amd64 User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 45 On Mon, Oct 17, 2016 at 02:33:21PM -0700, Stefan Agner wrote: > There is no need to request a CMA backed framebuffer if fbdev > emulation is not enabled. > > Signed-off-by: Stefan Agner > --- > drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > index e04efbe..3a5880c 100644 > --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c > @@ -87,7 +87,8 @@ static int fsl_dcu_load(struct drm_device *dev, unsigned long flags) > goto done; > dev->irq_enabled = true; > > - fsl_dcu_fbdev_init(dev); > + if (IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)) > + fsl_dcu_fbdev_init(dev); Totally not required, since this will all no-op out. Also, please nuke that fsl_dcu_fbdv_init wrapper seems like pointless indirection. And if there really is an issue with the cma helpers allocating an fb when they should, then the correct fix is to fix that in the helpers, not in the drivers. Nack. -Daniel > > return 0; > done: > -- > 2.10.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch