All of lore.kernel.org
 help / color / mirror / Atom feed
From: YoungJun Cho <yj44.cho@samsung.com>
To: Andrzej Hajda <a.hajda@samsung.com>,
	airlied@linux.ie, dri-devel@lists.freedesktop.org
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org, pawel.moll@arm.com,
	ijc+devicetree@hellion.org.uk, sachin.kamat@linaro.org,
	sw0312.kim@samsung.com, kyungmin.park@samsung.com,
	robh+dt@kernel.org, laurent.pinchart@ideasonboard.com,
	galak@codeaurora.org, kgene.kim@samsung.com
Subject: Re: [RFC v2 PATCH 02/14] drm/exynos: dsi: delay setting clocks after reset
Date: Thu, 24 Apr 2014 09:54:01 +0900	[thread overview]
Message-ID: <535860A9.8030003@samsung.com> (raw)
In-Reply-To: <53576DC9.2010601@samsung.com>

Hi Andrzej,

Thank you for the comments.

On 04/23/2014 04:37 PM, Andrzej Hajda wrote:
> On 04/23/2014 05:45 AM, YoungJun Cho wrote:
>> Hi again Andrzej,
>>
>> On 04/23/2014 10:01 AM, YoungJun Cho wrote:
>>> Hi Andrzej
>>>
>>> Thank you for comments.
>>>
>>> On 04/22/2014 09:15 PM, Andrzej Hajda wrote:
>>>> Hi YoungJun,
>>>>
>>>> On 04/21/2014 02:28 PM, YoungJun Cho wrote:
>>>>> Some phy control registers are not kept after software reset.
>>>>> So this patch makes the clocks containing phy control to be set
>>>>> after software reset.
>>>>>
>>>>> Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
>>>>> Acked-by: Inki Dae <inki.dae@samsung.com>
>>>>> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
>>>>> ---
>>>>>    drivers/gpu/drm/exynos/exynos_drm_dsi.c |    2 +-
>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>>>> b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>>>> index 956e5f3..2cf1f0b 100644
>>>>> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>>>> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
>>>>> @@ -946,10 +946,10 @@ static irqreturn_t exynos_dsi_irq(int irq, void
>>>>> *dev_id)
>>>>>
>>>>>    static int exynos_dsi_init(struct exynos_dsi *dsi)
>>>>>    {
>>>>> -    exynos_dsi_enable_clock(dsi);
>>>>>        exynos_dsi_reset(dsi);
>>>>>        enable_irq(dsi->irq);
>>>>>        exynos_dsi_wait_for_reset(dsi);
>>>>> +    exynos_dsi_enable_clock(dsi);
>>>>>        exynos_dsi_init_link(dsi);
>>>>>
>>>>>        return 0;
>>>>
>>>> I have commented it in the previous version of the patchset. I repeat it
>>>> again.
>>>> This is a regression, on exynos4210-trats I have 'timeout waiting for
>>>> reset' message after dpms off, on.
>>>
>>> I'm really sorry for that. I misunderstood last time.
>>>
>>> I think the original codes were correct, because the reset timeout would
>>> be occurred without clock activation.
>>
>> This is not true.
>>
>>>
>>> I'll check and fix again.
>>> (By the way, why am I ok?)
>>
>> I have not verified with exynos4210-trats board yet(I have to get it),
>> but reset timeout is occured in exynos_dsi_wait_for_reset()
>> with &dsi->completed and that is completed by exynos_dsi_irq().
>>
>> And the regulators and clocks are enabled by exynos_dsi_poweron(),
>> NOT by exynos_dsi_enable_clock().
>>
>> So I think the reset timeout is not related with this patch.
>
>
> As far as I remember there were at least two issues with init sequence:
> - spurious irq storm after power on and before reset,
> - irq reset timeouts after reset and without enabled clock.
>
> The current sequence is a result of tests on live hw (documentation were
> not helpful in this case). I think it could be improved little bit more
> by moving exynos_dsi_enable_clock just after enable_irq this will
> eliminate possible timeout when RST_RELEASE irq is signaled but irq is
> still disabled. The sequence should look like below:
>
> 	exynos_dsi_reset(dsi);
> 	enable_irq(dsi->irq);
> 	exynos_dsi_enable_clock(dsi);
> 	exynos_dsi_wait_for_reset(dsi);
> 	exynos_dsi_init_link(dsi);
>
> And PHY related configuration could be put somewhere after
> exynos_dsi_wait_for_reset.
>
> I have tested this sequence on trats, it seems to be OK.

It also works well in Exynos5420 target.

I think it would be better to remove this patch and implement new PHY
control functions with this modification.

Thank you.
Best regards YJ

>
> Regards
> Andrzej
>
>
>>
>> Anyway I need more investigation.
>>
>> Thank you.
>> Best regards YJ
>>
>>>
>>>>
>>>> I will comment your previous answer here to make the discussion easier:
>>>>> As I mentioned in description, it came from phy control registers.
>>>>> Fortunately Exynos4 SoCs are safe, but the DSIM_PHYCTRL_REG,
>>>>> DSIM_PHYTIMING_REG, DSIM_PHYTIMING1_REG and DSIM_PHYTIMING2_REG are
>>>>> affected which are used in exynos_dsi_set_pll() for Exynos5 SoCs.
>>>>>
>>>>> So this patch is required for Exynos5 SoCs.
>>>>
>>>> In the moment this patch is applied exynos_dsi_set_pll do not touch phy
>>>> registers you have mentioned.
>>>> Your change would be more clear if it will be merged together with the
>>>> patch adding PHYCTRL settings.
>>>>
>>>> Anyway, solution is simple - please set PHY registers after reset and
>>>> configure clocks before reset to avoid
>>>> reset timeouts, is there any reason to not do it this way?
>>>
>>> The only reason is that the PHY control is related with PLL control and
>>> that was in exynos_dsi_enable_clock() call path.
>>> So I just wanted to keep current sequence.
>>>
>>> If there is no way to use previous one, I'll consider your approach.
>>>
>>> Thank you.
>>> Best regards YJ
>>>
>>>>
>>>> Regards
>>>> Andrzej
>>>>
>>>
>>> _______________________________________________
>>> dri-devel mailing list
>>> dri-devel@lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>>
>>
>
>

  reply	other threads:[~2014-04-24  0:54 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 12:28 [RFC v2 PATCH 00/14] drm/exynos: support MIPI DSI command mode display YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 01/14] drm/exynos: dsi: move the Eot packets configuration point YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 02/14] drm/exynos: dsi: delay setting clocks after reset YoungJun Cho
2014-04-22 12:15   ` Andrzej Hajda
2014-04-23  1:01     ` YoungJun Cho
2014-04-23  3:45       ` YoungJun Cho
2014-04-23  7:37         ` Andrzej Hajda
2014-04-24  0:54           ` YoungJun Cho [this message]
     [not found] ` <1398083321-8668-1-git-send-email-yj44.cho-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-04-21 12:28   ` [RFC v2 PATCH 03/14] drm/exynos: use wait_event_timeout() for safety usage YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH v2 04/14] ARM: dts: sysreg: add exynos5 compatible to DT bindings YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH v3 05/14] ARM: dts: samsung-fimd: add I80 specific properties YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH v2 06/14] drm/exynos: support MIPI DSI command mode YoungJun Cho
2014-04-21 22:52   ` Laurent Pinchart
2014-04-22  1:06     ` YoungJun Cho
2014-04-22  7:34   ` Thierry Reding
2014-04-23  1:18     ` YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH v2 07/14] ARM: dts: exynos_dsim: add exynos5420 compatible to DT bindings YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 08/14] drm/exynos: dsi: add driver data to support Exynos5420 YoungJun Cho
2014-04-23  8:29   ` Andrzej Hajda
2014-04-24  1:23     ` YoungJun Cho
2014-04-27  1:53       ` YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH v4 09/14] ARM: dts: s6e3fa0: add DT bindings YoungJun Cho
2014-04-22 14:02   ` Andrzej Hajda
2014-04-23  1:26     ` YoungJun Cho
2014-04-23  7:33       ` Thierry Reding
2014-04-23  9:02   ` Andrzej Hajda
2014-04-23 11:34     ` Laurent Pinchart
2014-04-23 12:48       ` Andrzej Hajda
2014-04-23 12:55         ` Laurent Pinchart
2014-04-23 13:33           ` Andrzej Hajda
2014-04-24  3:34             ` YoungJun Cho
2014-04-24  3:15       ` YoungJun Cho
2014-04-24  1:31     ` YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH v3 10/14] drm/panel: add S6E3FA0 driver YoungJun Cho
2014-04-21 23:00   ` Laurent Pinchart
2014-04-22  1:24     ` YoungJun Cho
2014-04-28 15:05       ` Laurent Pinchart
2014-04-28 21:25         ` Thierry Reding
2014-04-29  6:11           ` YoungJun Cho
2014-04-30 18:20           ` Laurent Pinchart
2014-04-29  6:02         ` YoungJun Cho
2014-04-29  8:35           ` YoungJun Cho
2014-04-29 12:45             ` YoungJun Cho
2014-04-23 10:16   ` Andrzej Hajda
2014-04-24  4:04     ` YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 11/14] ARM: dts: exynos4: add system register node YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 12/14] ARM: dts: exynos5: add system register support YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 13/14] ARM: dts: exynos5420: add mipi-phy node YoungJun Cho
2014-04-21 12:28 ` [RFC v2 PATCH 14/14] ARM: dts: exynos5420: add dsi node YoungJun Cho

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=535860A9.8030003@samsung.com \
    --to=yj44.cho@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=sw0312.kim@samsung.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.