All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-samsung-soc@vger.kernel.org
Subject: Re: drm/exynos: consider deferred probe case
Date: Wed, 11 Jun 2014 15:12:37 +0900	[thread overview]
Message-ID: <5397F355.4060105@samsung.com> (raw)
In-Reply-To: <20140610123837.GA7854@mwanda>


Hello Dan,

On 2014년 06월 10일 21:38, Dan Carpenter wrote:
> Hello Inki Dae,
> 
> The patch df5225bc9a87: "drm/exynos: consider deferred probe case"
> from May 29, 2014, leads to the following static checker warning:
> 
> 	drivers/gpu/drm/exynos/exynos_drm_fimd.c:996 fimd_probe()
> 	warn: 'ctx->display' isn't an ERR_PTR
> 
> drivers/gpu/drm/exynos/exynos_drm_fimd.c
>    994  
>    995          ctx->display = exynos_dpi_probe(dev);
>    996          if (IS_ERR(ctx->display))
>    997                  return PTR_ERR(ctx->display);
>    998  
> 
> Smatch is complaining because my config has CONFIG_DRM_EXYNOS_DPI
> disabled.
> 
> 1) If CONFIG_DRM_EXYNOS_DPI isn't enabled, we still return "0".  That
> will cause a Sparse warning.
>

It would be no problem. This code will return PTR_ERR(ctx->dislay) only
in case that dpi module is enabled.

> 2) Also there are still a number of checks for "if (ctx->display)".
> Those things are weird to me, are those checks to see
> CONFIG_DRM_EXYNOS_DPI is enabled or are they checking that
> exynos_dpi_probe() succeeded?
> 

Right. crtc driver, fimd, needs encoder/connector objects. In Exynos drm
case, encoder/connector can be created by dpi module for parallel panel,
by dsi module for mipi dsi based panel, or by dp module for eDP based panel.

So if some board has a parallel panel, encoder/connector objects will be
created by dpi module, and then fimd module will refer to ctx->display
object to control the parallel panel device. Otherwise, dsi or dp
modules will create encoder/connector objects in its driver, and one of
them will use its own display object to control corresponding panel device.

Thanks,
Inki Dae

> regards,
> dan carpenter
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2014-06-11  6:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 12:38 drm/exynos: consider deferred probe case Dan Carpenter
2014-06-11  6:12 ` Inki Dae [this message]
2014-06-11  6:36   ` [patch] drm/exynos: change zero to NULL for sparse Dan Carpenter
2014-06-11  6:36     ` Dan Carpenter
2014-06-18  5:06     ` Inki Dae
2014-06-18  5:06       ` Inki Dae

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=5397F355.4060105@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.