linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	architt@codeaurora.org, inki.dae@samsung.com,
	thierry.reding@gmail.com, hjc@rock-chips.com,
	seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org,
	heiko@sntech.de
Cc: hshi@chromium.org, wzz@rock-chips.com, hl@rock-chips.com,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	dianders@chromium.org, linux-rockchip@lists.infradead.org,
	orjan.eide@arm.com, "Stéphane Marchesin" <marcheu@chromium.org>
Subject: Re: [PATCH v4 15/38] drm/bridge: analogix_dp: Ensure edp is disabled when shutting down the panel
Date: Tue, 6 Mar 2018 09:49:45 +0100	[thread overview]
Message-ID: <4d0e97f2-985c-fe04-9390-45ea60f3d731@collabora.com> (raw)
In-Reply-To: <3b9537bb-0471-775e-d43b-1f1ccd46b94c@samsung.com>

Hi Marek,

On 06/03/18 08:35, Marek Szyprowski wrote:
> Hi All,
> 
> This is the patch, which introduces the issue I've pointed here:
> 
> https://lists.freedesktop.org/archives/dri-devel/2018-March/167794.html
> 
> On 2018-03-05 23:23, Enric Balletbo i Serra wrote:
>> From: Lin Huang <hl@rock-chips.com>
>>
>> When panel is shut down, we should make sure edp can be disabled to avoid
>> undefined behavior.
>>
>> Cc: Stéphane Marchesin <marcheu@chromium.org>
>> Signed-off-by: Lin Huang <hl@rock-chips.com>
>> Signed-off-by: zain wang <wzz@rock-chips.com>
>> Signed-off-by: Sean Paul <seanpaul@chromium.org>
>> Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
>> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
>> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
>> ---
>>
>>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> index 92fb9a072cb6..9b7d530ad24c 100644
>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
>> @@ -1160,6 +1160,12 @@ static int analogix_dp_set_bridge(struct
>> analogix_dp_device *dp)
>>         pm_runtime_get_sync(dp->dev);
>>   +    ret = clk_prepare_enable(dp->clock);
>> +    if (ret < 0) {
>> +        DRM_ERROR("Failed to prepare_enable the clock clk [%d]\n", ret);
>> +        goto out_dp_clk_pre;
>> +    }
>> +
>>       if (dp->plat_data->power_on)
>>           dp->plat_data->power_on(dp->plat_data);
>>   @@ -1191,6 +1197,8 @@ static int analogix_dp_set_bridge(struct
>> analogix_dp_device *dp)
>>       phy_power_off(dp->phy);
>>       if (dp->plat_data->power_off)
>>           dp->plat_data->power_off(dp->plat_data);
>> +    clk_disable_unprepare(dp->clock);
>> +out_dp_clk_pre:
>>       pm_runtime_put_sync(dp->dev);
>>         return ret;
>> @@ -1234,10 +1242,13 @@ static void analogix_dp_bridge_disable(struct
>> drm_bridge *bridge)
>>         disable_irq(dp->irq);
>>       phy_power_off(dp->phy);
>> +    analogix_dp_set_analog_power_down(dp, POWER_ALL, 1);
> 
> In case of Exynos DP, external PHY is used to power the DP block, so no
> register access should be performed after phy_power_off(). Please move
> analogix_dp_set_analog_power_down() before phy_power_off().
> 

Oh, sorry, I missed that change, I'll include in next version, but I will wait a
little bit more before send for if I receive feedback on the others patches.


>>         if (dp->plat_data->power_off)
>>           dp->plat_data->power_off(dp->plat_data);
>>   +    clk_disable_unprepare(dp->clock);
>> +
>>       pm_runtime_put_sync(dp->dev);
>>         ret = analogix_dp_prepare_panel(dp, false, true);
> 
> Best regards
Enric

  reply	other threads:[~2018-03-06  8:49 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180305222337epcas3p22a4f5c32c5622d89f6e649b26c0a6043@epcas3p2.samsung.com>
2018-03-05 22:22 ` [PATCH v4 00/38] DRM Rockchip rk3399 (Kevin) Enric Balletbo i Serra
2018-03-05 22:22   ` [PATCH v4 01/38] drm/bridge: analogix_dp: set psr activate/deactivate when enable/disable bridge Enric Balletbo i Serra
2018-03-08 22:44     ` Heiko Stuebner
2018-03-05 22:22   ` [PATCH v4 02/38] drm/rockchip: Don't use atomic constructs for psr Enric Balletbo i Serra
2018-03-08 22:44     ` Heiko Stuebner
2018-03-05 22:22   ` [PATCH v4 03/38] drm/bridge: analogix_dp: detect Sink PSR state after configuring the PSR Enric Balletbo i Serra
2018-03-08 22:53     ` Heiko Stuebner
2018-03-05 22:22   ` [PATCH v4 04/38] drm/rockchip: Remove analogix psr worker Enric Balletbo i Serra
2018-03-05 22:22   ` [PATCH v4 05/38] drm/bridge: analogix_dp: Don't change psr while bridge is disabled Enric Balletbo i Serra
2018-03-05 22:22   ` [PATCH v4 06/38] drm/rockchip: add mutex vop lock Enric Balletbo i Serra
2018-03-05 22:22   ` [PATCH v4 07/38] drm/bridge: analogix_dp: add fast link train for eDP Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 08/38] drm/rockchip: Only wait for panel ACK on PSR entry Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 09/38] drm/bridge: analogix_dp: Move enable video into config_video() Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 10/38] drm/bridge: analogix_dp: Check AUX_EN status when doing AUX transfer Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 11/38] drm/bridge: analogix_dp: Don't use fast link training when panel just powered up Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 12/38] drm/bridge: analogix_dp: Retry bridge enable when it failed Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 13/38] drm/bridge: analogix_dp: Wait for HPD signal before configuring link Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 14/38] drm/bridge: analogix_dp: Set PD_INC_BG first when powering up edp phy Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 15/38] drm/bridge: analogix_dp: Ensure edp is disabled when shutting down the panel Enric Balletbo i Serra
2018-03-06  7:35     ` Marek Szyprowski
2018-03-06  8:49       ` Enric Balletbo i Serra [this message]
2018-03-05 22:23   ` [PATCH v4 16/38] drm/bridge: analogix_dp: Extend hpd check time to 100ms Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 17/38] drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 18/38] drm/bridge: analogix_dp: Check dpcd write/read status Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 19/38] drm/bridge: analogix_dp: Fix AUX_PD bit for Rockchip Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 20/38] drm/bridge: analogix_dp: Reset aux channel if an error occurred Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 21/38] drm/rockchip: Restore psr->state when enable/disable psr failed Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 22/38] drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 23/38] drm/bridge: analogix_dp: Fix timeout of video streamclk config Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 24/38] drm/bridge: analogix_dp: Fix incorrect operations with register ANALOGIX_DP_FUNC_EN_1 Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 25/38] drm/bridge: analogix_dp: Move fast link training detect to set_bridge Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 26/38] drm/bridge: analogix_dp: Reorder plat_data->power_off to happen sooner Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 27/38] drm/bridge: analogix_dp: Properly log AUX CH errors Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 28/38] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 29/38] drm/rockchip: pre dither down when output bpc is 8bit Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 30/38] drm/bridge: analogix_dp: Split the platform-specific poweron in two parts Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 31/38] drm/rockchip: analogix_dp: Do not call Analogix code before bind Enric Balletbo i Serra
2018-03-05 22:23   ` [PATCH v4 32/38] drm/rockchip: Disable PSR on input events Enric Balletbo i Serra
2018-03-06 10:15   ` [PATCH v4 00/38] DRM Rockchip rk3399 (Kevin) Marek Szyprowski

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=4d0e97f2-985c-fe04-9390-45ea60f3d731@collabora.com \
    --to=enric.balletbo@collabora.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=hl@rock-chips.com \
    --cc=hshi@chromium.org \
    --cc=inki.dae@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=marcheu@chromium.org \
    --cc=orjan.eide@arm.com \
    --cc=seanpaul@chromium.org \
    --cc=tfiga@chromium.org \
    --cc=thierry.reding@gmail.com \
    --cc=wzz@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).