All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@bootlin.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 06/12] drm/sun4i: sun6i_mipi_dsi: Probe tcon0 during dsi_bind
Date: Mon, 19 Nov 2018 09:38:33 +0100	[thread overview]
Message-ID: <20181119083833.d7ysiv3tenabtrdj@flea> (raw)
In-Reply-To: <20181116163916.29621-7-jagan@amarulasolutions.com>

On Fri, Nov 16, 2018 at 10:09:10PM +0530, Jagan Teki wrote:
> Probe tcon0 during dsi_bind, so-that the tcon attributes like
> divider value, clock rate can get whenever it need.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++++++
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> index d60955880c43..66a01061e51d 100644
> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> @@ -25,6 +25,7 @@
>  #include <drm/drm_panel.h>
>  
>  #include "sun4i_drv.h"
> +#include "sun4i_tcon.h"
>  #include "sun6i_mipi_dsi.h"
>  
>  #include <video/mipi_display.h>
> @@ -1007,6 +1008,7 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
>  	struct drm_device *drm = data;
>  	struct sun4i_drv *drv = drm->dev_private;
>  	struct sun6i_dsi *dsi = dev_get_drvdata(dev);
> +	struct sun4i_tcon *tcon0 = sun4i_get_tcon0(drm);
>  	int ret;
>  
>  	if (!dsi->panel)
> @@ -1014,6 +1016,11 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
>  
>  	dsi->drv = drv;
>  
> +	if (!tcon0)
> +		return -EPROBE_DEFER;

You can't fall in that condition. The component framework won't call
bind unless every components have been probed.

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181119/da3b971c/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
To: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
Cc: Maarten Lankhorst
	<maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Sean Paul <sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>,
	Jernej Skrabec <jernej.skrabec-gGgVlfcn5nU@public.gmane.org>,
	Vasily Khoruzhick
	<anarsoul-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Michael Trimarchi
	<michael-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>,
	TL Lim <tllim-F7SikzrIcFYdnm+yROfE0A@public.gmane.org>,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org
Subject: Re: [PATCH v2 06/12] drm/sun4i: sun6i_mipi_dsi: Probe tcon0 during dsi_bind
Date: Mon, 19 Nov 2018 09:38:33 +0100	[thread overview]
Message-ID: <20181119083833.d7ysiv3tenabtrdj@flea> (raw)
In-Reply-To: <20181116163916.29621-7-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

On Fri, Nov 16, 2018 at 10:09:10PM +0530, Jagan Teki wrote:
> Probe tcon0 during dsi_bind, so-that the tcon attributes like
> divider value, clock rate can get whenever it need.
> 
> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> ---
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++++++
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> index d60955880c43..66a01061e51d 100644
> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> @@ -25,6 +25,7 @@
>  #include <drm/drm_panel.h>
>  
>  #include "sun4i_drv.h"
> +#include "sun4i_tcon.h"
>  #include "sun6i_mipi_dsi.h"
>  
>  #include <video/mipi_display.h>
> @@ -1007,6 +1008,7 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
>  	struct drm_device *drm = data;
>  	struct sun4i_drv *drv = drm->dev_private;
>  	struct sun6i_dsi *dsi = dev_get_drvdata(dev);
> +	struct sun4i_tcon *tcon0 = sun4i_get_tcon0(drm);
>  	int ret;
>  
>  	if (!dsi->panel)
> @@ -1014,6 +1016,11 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
>  
>  	dsi->drv = drv;
>  
> +	if (!tcon0)
> +		return -EPROBE_DEFER;

You can't fall in that condition. The component framework won't call
bind unless every components have been probed.

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>,
	Rob Herring <robh+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Icenowy Zheng <icenowy@aosc.io>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Michael Trimarchi <michael@amarulasolutions.com>,
	TL Lim <tllim@pine64.org>,
	linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com
Subject: Re: [PATCH v2 06/12] drm/sun4i: sun6i_mipi_dsi: Probe tcon0 during dsi_bind
Date: Mon, 19 Nov 2018 09:38:33 +0100	[thread overview]
Message-ID: <20181119083833.d7ysiv3tenabtrdj@flea> (raw)
In-Reply-To: <20181116163916.29621-7-jagan@amarulasolutions.com>

[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]

On Fri, Nov 16, 2018 at 10:09:10PM +0530, Jagan Teki wrote:
> Probe tcon0 during dsi_bind, so-that the tcon attributes like
> divider value, clock rate can get whenever it need.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 +++++++
>  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> index d60955880c43..66a01061e51d 100644
> --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> @@ -25,6 +25,7 @@
>  #include <drm/drm_panel.h>
>  
>  #include "sun4i_drv.h"
> +#include "sun4i_tcon.h"
>  #include "sun6i_mipi_dsi.h"
>  
>  #include <video/mipi_display.h>
> @@ -1007,6 +1008,7 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
>  	struct drm_device *drm = data;
>  	struct sun4i_drv *drv = drm->dev_private;
>  	struct sun6i_dsi *dsi = dev_get_drvdata(dev);
> +	struct sun4i_tcon *tcon0 = sun4i_get_tcon0(drm);
>  	int ret;
>  
>  	if (!dsi->panel)
> @@ -1014,6 +1016,11 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master,
>  
>  	dsi->drv = drv;
>  
> +	if (!tcon0)
> +		return -EPROBE_DEFER;

You can't fall in that condition. The component framework won't call
bind unless every components have been probed.

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2018-11-19  8:38 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 16:39 [PATCH v2 00/12] drm/sun4i: Allwinner MIPI-DSI Burst mode support Jagan Teki
2018-11-16 16:39 ` Jagan Teki
2018-11-16 16:39 ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 01/12] drm/sun4i: sun6i_mipi_dsi: Compute burst mode loop N1 instruction delay Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-19  8:27   ` Maxime Ripard
2018-11-19  8:27     ` Maxime Ripard
2018-11-19  8:27     ` Maxime Ripard
2018-11-19 10:58     ` Jagan Teki
2018-11-19 10:58       ` Jagan Teki
2018-11-20 13:23       ` Maxime Ripard
2018-11-20 13:23         ` Maxime Ripard
2018-11-20 13:23         ` Maxime Ripard
2018-11-20 13:36         ` Jagan Teki
2018-11-20 13:36           ` Jagan Teki
2018-11-20 15:58           ` Maxime Ripard
2018-11-20 15:58             ` Maxime Ripard
2018-11-20 15:58             ` Maxime Ripard
2018-11-20 16:01             ` Vasily Khoruzhick
2018-11-20 16:01               ` Vasily Khoruzhick
2018-11-20 16:19             ` Jagan Teki
2018-11-20 16:19               ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 02/12] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 03/12] drm/sun4i: sun6i_mipi_dsi: Setup burst mode timings Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-19  8:30   ` Maxime Ripard
2018-11-19  8:30     ` Maxime Ripard
2018-11-19  8:30     ` Maxime Ripard
2018-11-19 11:00     ` Jagan Teki
2018-11-19 11:00       ` Jagan Teki
2018-11-19 11:00       ` Jagan Teki
2018-11-20 15:45       ` Maxime Ripard
2018-11-20 15:45         ` Maxime Ripard
2018-11-20 15:45         ` Maxime Ripard
2018-11-20 16:22         ` Jagan Teki
2018-11-20 16:22           ` Jagan Teki
2018-11-20 16:22           ` Jagan Teki
2018-11-27 10:07           ` Maxime Ripard
2018-11-27 10:07             ` Maxime Ripard
2018-11-27 10:07             ` Maxime Ripard
2018-11-16 16:39 ` [PATCH v2 04/12] drm/sun4i: sun6i_mipi_dsi: Simplify drq set to support all modes Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-19  8:32   ` Maxime Ripard
2018-11-19  8:32     ` Maxime Ripard
2018-11-19  8:32     ` Maxime Ripard
2018-11-19 11:22     ` Jagan Teki
2018-11-19 11:22       ` Jagan Teki
2018-11-20 14:32       ` Maxime Ripard
2018-11-20 14:32         ` Maxime Ripard
2018-11-20 14:32         ` Maxime Ripard
2018-11-20 14:48         ` Jagan Teki
2018-11-20 14:48           ` Jagan Teki
2018-11-20 14:48           ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 05/12] drm/sun4i: tcon: Export get tcon0 routine Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-19  8:34   ` Maxime Ripard
2018-11-19  8:34     ` Maxime Ripard
2018-11-19  8:34     ` Maxime Ripard
2018-11-16 16:39 ` [PATCH v2 06/12] drm/sun4i: sun6i_mipi_dsi: Probe tcon0 during dsi_bind Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-19  8:38   ` Maxime Ripard [this message]
2018-11-19  8:38     ` Maxime Ripard
2018-11-19  8:38     ` Maxime Ripard
2018-11-19 11:36     ` Jagan Teki
2018-11-19 11:36       ` Jagan Teki
2018-11-19 11:36       ` Jagan Teki
2018-11-20 15:44       ` Maxime Ripard
2018-11-20 15:44         ` Maxime Ripard
2018-11-20 15:44         ` Maxime Ripard
2018-11-16 16:39 ` [PATCH v2 07/12] drm/sun4i: sun6i_mipi_dsi: Setup burst mode Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 08/12] drm/sun4i: sun6i_mipi_dsi: Enable 2byte trail for 4-lane " Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 09/12] drm/sun4i: sun6i_mipi_dsi: Enable burst mode HBP, HSA_HSE Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 10/12] dt-bindings: panel: Add Feiyang FY07024DI26A30-D MIPI-DSI LCD panel Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39 ` [PATCH v2 11/12] drm/panel: " Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-12-10 16:12   ` Jagan Teki
2018-12-10 16:12     ` Jagan Teki
2018-12-10 16:12     ` Jagan Teki
2018-12-13 15:07   ` Sean Paul
2018-12-13 15:07     ` Sean Paul
2018-12-13 15:07     ` Sean Paul
2018-12-13 19:26     ` Jagan Teki
2018-12-13 19:26       ` Jagan Teki
2018-12-13 19:55       ` Sean Paul
2018-12-13 19:55         ` Sean Paul
2018-12-13 19:55         ` Sean Paul
2018-12-14 11:05         ` Jagan Teki
2018-12-14 11:05           ` Jagan Teki
2018-12-14 11:05           ` Jagan Teki
2018-12-14 14:15           ` Sean Paul
2018-12-14 14:15             ` Sean Paul
2018-12-14 14:15             ` Sean Paul
2018-11-16 16:39 ` [PATCH v2 12/12][DO NOT MERGE] arm64: allwinner: a64: pine64-lts: Enable Feiyang FY07024DI26A30-D DSI panel Jagan Teki
2018-11-16 16:39   ` Jagan Teki
2018-11-16 16:39   ` Jagan Teki

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=20181119083833.d7ysiv3tenabtrdj@flea \
    --to=maxime.ripard@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.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.