From: Mark yao <mark.yao@rock-chips.com>
To: John Keeping <john@metanate.com>, Chris Zhong <zyw@rock-chips.com>
Cc: linux-rockchip@lists.infradead.org, yzq@rock-chips.com,
dianders@chromium.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, tfiga@chromium.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/7] drm/rockchip: dw-mipi: support HPD poll
Date: Mon, 11 Jul 2016 08:46:53 +0800 [thread overview]
Message-ID: <5782EC7D.3080202@rock-chips.com> (raw)
In-Reply-To: <20160708145211.6bf83d8f.john@metanate.com>
On 2016年07月08日 21:52, John Keeping wrote:
> On Fri, 8 Jul 2016 17:04:59 +0800, Chris Zhong wrote:
>
>> At the first time of bind, there is no any panel attach in mipi. Add a
>> DRM_CONNECTOR_POLL_HPD porperty to detect the panel status, when panel
>> probe, the dw_mipi_dsi_host_attach would be called, then mipi-dsi will
>> trigger a event to notify the drm framework.
>>
>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> Can we do something like this instead? We know that the panel must
> always be attached and this has the advantage that the display size will
> be known when the framebuffer console loads.
>
> -- >8 --
> Subject: [PATCH] drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded
>
> This ensures that the output resolution is known before fbcon loads.
>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
> drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index 6ef5f3be8468..c0499266d116 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -1154,10 +1154,17 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
>
> dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
> dsi->dsi_host.dev = dev;
> - return mipi_dsi_host_register(&dsi->dsi_host);
> + ret = mipi_dsi_host_register(&dsi->dsi_host);
> + if (!ret && !dsi->panel) {
> + mipi_dsi_host_unregister(&dsi->dsi_host);
> + drm_encoder_cleanup(&dsi->encoder);
> + drm_connector_cleanup(&dsi->connector);
> + ret = -EPROBE_DEFER;
Hi John
Do you verify this patch? I do the similar change before, but found
panel can't probe.
mipi_dsi_host_register will call device_add, I think the panel probe
need this.
Seems that mipi panel probe request mipi_dsi_host_register,
mipi_dsi_host_register request panel on your patch, endless loop.
Thanks.
> + }
>
> err_pllref:
> - clk_disable_unprepare(dsi->pllref_clk);
> + if (ret)
> + clk_disable_unprepare(dsi->pllref_clk);
> return ret;
> }
>
>
>
>
--
Mark Yao
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: mark.yao@rock-chips.com (Mark yao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] drm/rockchip: dw-mipi: support HPD poll
Date: Mon, 11 Jul 2016 08:46:53 +0800 [thread overview]
Message-ID: <5782EC7D.3080202@rock-chips.com> (raw)
In-Reply-To: <20160708145211.6bf83d8f.john@metanate.com>
On 2016?07?08? 21:52, John Keeping wrote:
> On Fri, 8 Jul 2016 17:04:59 +0800, Chris Zhong wrote:
>
>> At the first time of bind, there is no any panel attach in mipi. Add a
>> DRM_CONNECTOR_POLL_HPD porperty to detect the panel status, when panel
>> probe, the dw_mipi_dsi_host_attach would be called, then mipi-dsi will
>> trigger a event to notify the drm framework.
>>
>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> Can we do something like this instead? We know that the panel must
> always be attached and this has the advantage that the display size will
> be known when the framebuffer console loads.
>
> -- >8 --
> Subject: [PATCH] drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded
>
> This ensures that the output resolution is known before fbcon loads.
>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
> drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index 6ef5f3be8468..c0499266d116 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -1154,10 +1154,17 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
>
> dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
> dsi->dsi_host.dev = dev;
> - return mipi_dsi_host_register(&dsi->dsi_host);
> + ret = mipi_dsi_host_register(&dsi->dsi_host);
> + if (!ret && !dsi->panel) {
> + mipi_dsi_host_unregister(&dsi->dsi_host);
> + drm_encoder_cleanup(&dsi->encoder);
> + drm_connector_cleanup(&dsi->connector);
> + ret = -EPROBE_DEFER;
Hi John
Do you verify this patch? I do the similar change before, but found
panel can't probe.
mipi_dsi_host_register will call device_add, I think the panel probe
need this.
Seems that mipi panel probe request mipi_dsi_host_register,
mipi_dsi_host_register request panel on your patch, endless loop.
Thanks.
> + }
>
> err_pllref:
> - clk_disable_unprepare(dsi->pllref_clk);
> + if (ret)
> + clk_disable_unprepare(dsi->pllref_clk);
> return ret;
> }
>
>
>
>
--
?ark Yao
WARNING: multiple messages have this Message-ID (diff)
From: Mark yao <mark.yao@rock-chips.com>
To: John Keeping <john@metanate.com>, Chris Zhong <zyw@rock-chips.com>
Cc: dianders@chromium.org, tfiga@chromium.org, heiko@sntech.de,
yzq@rock-chips.com, David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/7] drm/rockchip: dw-mipi: support HPD poll
Date: Mon, 11 Jul 2016 08:46:53 +0800 [thread overview]
Message-ID: <5782EC7D.3080202@rock-chips.com> (raw)
In-Reply-To: <20160708145211.6bf83d8f.john@metanate.com>
On 2016年07月08日 21:52, John Keeping wrote:
> On Fri, 8 Jul 2016 17:04:59 +0800, Chris Zhong wrote:
>
>> At the first time of bind, there is no any panel attach in mipi. Add a
>> DRM_CONNECTOR_POLL_HPD porperty to detect the panel status, when panel
>> probe, the dw_mipi_dsi_host_attach would be called, then mipi-dsi will
>> trigger a event to notify the drm framework.
>>
>> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> Can we do something like this instead? We know that the panel must
> always be attached and this has the advantage that the display size will
> be known when the framebuffer console loads.
>
> -- >8 --
> Subject: [PATCH] drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded
>
> This ensures that the output resolution is known before fbcon loads.
>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
> drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index 6ef5f3be8468..c0499266d116 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -1154,10 +1154,17 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
>
> dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
> dsi->dsi_host.dev = dev;
> - return mipi_dsi_host_register(&dsi->dsi_host);
> + ret = mipi_dsi_host_register(&dsi->dsi_host);
> + if (!ret && !dsi->panel) {
> + mipi_dsi_host_unregister(&dsi->dsi_host);
> + drm_encoder_cleanup(&dsi->encoder);
> + drm_connector_cleanup(&dsi->connector);
> + ret = -EPROBE_DEFER;
Hi John
Do you verify this patch? I do the similar change before, but found
panel can't probe.
mipi_dsi_host_register will call device_add, I think the panel probe
need this.
Seems that mipi panel probe request mipi_dsi_host_register,
mipi_dsi_host_register request panel on your patch, endless loop.
Thanks.
> + }
>
> err_pllref:
> - clk_disable_unprepare(dsi->pllref_clk);
> + if (ret)
> + clk_disable_unprepare(dsi->pllref_clk);
> return ret;
> }
>
>
>
>
--
Mark Yao
next prev parent reply other threads:[~2016-07-11 0:46 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-08 9:04 [PATCH 0/7] Rockchip dw-mipi-dsi driver Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` [PATCH 1/7] dt-bindings: add rk3399 support for dw-mipi-rockchip Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-13 13:49 ` Rob Herring
2016-07-13 13:49 ` Rob Herring
2016-07-13 13:49 ` Rob Herring
2016-07-08 9:04 ` [PATCH 2/7] DRM: mipi: support rk3399 mipi dsi Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` [PATCH 3/7] dt-bindings: add power domain node for dw-mipi-rockchip Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-13 13:50 ` Rob Herring
2016-07-13 13:50 ` Rob Herring
2016-07-13 13:50 ` Rob Herring
2016-07-08 9:04 ` [PATCH 4/7] drm/rockchip: dw-mipi: add dw-mipi power domain support Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` [PATCH 5/7] drm/rockchip: dw-mipi: support HPD poll Chris Zhong
2016-07-08 9:04 ` Chris Zhong
2016-07-08 9:04 ` Chris Zhong
[not found] ` <1467968701-15620-6-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-07-08 13:52 ` John Keeping
2016-07-08 13:52 ` John Keeping
2016-07-08 13:52 ` John Keeping
2016-07-11 0:46 ` Mark yao [this message]
2016-07-11 0:46 ` Mark yao
2016-07-11 0:46 ` Mark yao
2016-07-11 9:20 ` John Keeping
2016-07-11 9:20 ` John Keeping
2016-07-11 9:20 ` John Keeping
2016-07-08 9:05 ` [PATCH 6/7] drm/rockchip: dw-mipi: fix phy clk lane stop state timeout Chris Zhong
2016-07-08 9:05 ` Chris Zhong
2016-07-08 9:05 ` Chris Zhong
2016-07-08 9:05 ` [PATCH 7/7] drm/rockchip: dw-mipi: fix insufficient bandwidth of some panel Chris Zhong
2016-07-08 9:05 ` Chris Zhong
2016-07-08 9:05 ` Chris Zhong
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=5782EC7D.3080202@rock-chips.com \
--to=mark.yao@rock-chips.com \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=john@metanate.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=tfiga@chromium.org \
--cc=yzq@rock-chips.com \
--cc=zyw@rock-chips.com \
/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.