From patchwork Wed Jul 25 03:56:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10543587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C21B14E2 for ; Wed, 25 Jul 2018 07:06:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5921E28C3A for ; Wed, 25 Jul 2018 07:06:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C93A29441; Wed, 25 Jul 2018 07:06:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0F89128C3A for ; Wed, 25 Jul 2018 07:06:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B9B76E66D; Wed, 25 Jul 2018 07:05:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from giraffe.birch.relay.mailchannels.net (giraffe.birch.relay.mailchannels.net [23.83.209.69]) by gabe.freedesktop.org (Postfix) with ESMTPS id 468776E3B3 for ; Wed, 25 Jul 2018 03:57:09 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 402E6681AD4; Wed, 25 Jul 2018 03:57:08 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.30.57]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id 3B933681E41; Wed, 25 Jul 2018 03:57:07 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [199.195.250.187]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.1); Wed, 25 Jul 2018 03:57:08 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Robust-Chemical: 081819d8132c46c3_1532491028091_1267985775 X-MC-Loop-Signature: 1532491028091:935674406 X-MC-Ingress-Time: 1532491028090 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 64FCB9F7C1; Wed, 25 Jul 2018 03:57:02 +0000 (UTC) From: Icenowy Zheng To: Archit Taneja , Andrzej Hajda , Laurent Pinchart , Neil Armstrong , Maxime Ripard , Jernej Skrabec , Daniel Vetter Subject: [PATCH] drm/bridge/synopsys: dw-hdmi: re-run dw_hdmi_setup when setting mode Date: Wed, 25 Jul 2018 11:56:27 +0800 Message-Id: <20180725035627.58223-1-icenowy@aosc.io> X-Mailman-Approved-At: Wed, 25 Jul 2018 07:05:02 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Icenowy Zheng MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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. Re-run dw_hdmi_setup when setting mode, in order to prevent such situation. Signed-off-by: Icenowy Zheng --- 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); mutex_unlock(&hdmi->mutex); }