mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Stefan Agner <stefan@agner.ch>
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
Date: Tue, 18 Oct 2016 09:44:24 +0200	[thread overview]
Message-ID: <20161018074424.GX20761@phenom.ffwll.local> (raw)
In-Reply-To: <20161017213321.8074-6-stefan@agner.ch>

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 <stefan@agner.ch>
> ---
>  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

  reply	other threads:[~2016-10-18  7:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17 21:33 [PATCH v3 0/5] drm/fsl-dcu: initialization fixes Stefan Agner
2016-10-17 21:33 ` [PATCH v3 1/5] drm/fsl-dcu: enable TCON bypass mode by default Stefan Agner
2016-10-19  9:35   ` Meng Yi
2016-10-20  0:01     ` Stefan Agner
2016-10-17 21:33 ` [PATCH v3 2/5] drm/fsl-dcu: do not transfer registers on plane init Stefan Agner
2016-10-17 21:33 ` [PATCH v3 3/5] drm/fsl-dcu: do not transfer registers in mode_set_nofb Stefan Agner
2016-10-17 21:33 ` [PATCH v3 4/5] drm/fsl-dcu: enable pixel clock when enabling CRTC Stefan Agner
2016-10-17 21:33 ` [PATCH v3 5/5] drm/fsl-dcu: only init fbdev if required Stefan Agner
2016-10-18  7:44   ` Daniel Vetter [this message]
2016-10-18 17:42     ` Stefan Agner
2016-10-19  7:42       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161018074424.GX20761@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alison.wang@freescale.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jianwei.wang.chn@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meng.yi@nxp.com \
    --cc=stefan@agner.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome