[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180813114945eucas1p1e9d900848b4256341fe93278f4fa6f67~Kb0nDRoKq0841508415eucas1p1p@eucas1p1.samsung.com>
Date: Mon, 13 Aug 2018 13:49:43 +0200
From: Andrzej Hajda <a.hajda@...sung.com>
To: Icenowy Zheng <icenowy@...c.io>,
Archit Taneja <architt@...eaurora.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Neil Armstrong <narmstrong@...libre.com>,
Maxime Ripard <maxime.ripard@...tlin.com>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Daniel Vetter <daniel.vetter@...ll.ch>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/bridge/synopsys: dw-hdmi: re-run dw_hdmi_setup when
setting mode
On 25.07.2018 05:56, Icenowy Zheng wrote:
> Currently dw_hdmi_setup is only run when the dw-hdmi bridge is enabled,
> with the mode set last time.
>
> When the bridge is enabled before any mode is set (this may happen when
> booting), the mode won't be set at all, some setup steps will be
> skipped or fail, and the HDMI output may not work.
I guess, it should not happen. Could you show the stack-trace.
>
> Re-run dw_hdmi_setup when setting mode, in order to prevent such
> situation.
mode_set is run with hardware disabled, thus usually it should not touch
hardware.
>
> Signed-off-by: Icenowy Zheng <icenowy@...c.io>
> ---
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 5971976284bf..e2f832182afe 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2007,6 +2007,7 @@ static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge,
>
> /* Store the display mode for plugin/DKMS poweron events */
> memcpy(&hdmi->previous_mode, mode, sizeof(hdmi->previous_mode));
> + dw_hdmi_setup(hdmi, mode);
This hdmi->previous_mode also looks strange, it is current mode and
moreover it is always available from crtc state, there is no point in
copying it to private field.
Regards
Andrzej
>
> mutex_unlock(&hdmi->mutex);
> }
Powered by blists - more mailing lists