From patchwork Mon Aug 13 21:30:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10564837 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 365BC14E2 for ; Mon, 13 Aug 2018 21:31:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2CBC297B5 for ; Mon, 13 Aug 2018 21:31:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C45C5297AD; Mon, 13 Aug 2018 21:31:30 +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 73B7B297B5 for ; Mon, 13 Aug 2018 21:31:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EC906E0F6; Mon, 13 Aug 2018 21:31:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc44.google.com (mail-yw1-xc44.google.com [IPv6:2607:f8b0:4864:20::c44]) by gabe.freedesktop.org (Postfix) with ESMTPS id DCB296E0F6 for ; Mon, 13 Aug 2018 21:31:27 +0000 (UTC) Received: by mail-yw1-xc44.google.com with SMTP id q129-v6so14705483ywg.8 for ; Mon, 13 Aug 2018 14:31:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8PT/JJ+NjxPI/HRe8gI/q36iuXytoo66i8xydny+No4=; b=DhuosFPz4JjfUrQf2EvjQBv8WY3HTtA+b7tZLKgp/fAz5A/PKg8vYNbHvV+mGjYX2a e9XWBerhGPK/2Y6kSlFV/i+ZBZCUtwHcv3Wn5y4l+GUEzLcIo60oIOQD1odbXTITThvq 4VojW8IjoPVzmPAPsr3Xqhy/NoEbdiSRl3pgp28rmAIAN7sf2v/d316BDMZpRBYdQz6F NEi3A/tpV2I1CIWwk+rK/IdXpVh3qGgkd2GX51QHafQoXlxw5g+eY3PCuuvHYBQD5/jE hgyFrfkLQKcvl3KoUeA0Bf3y8H+0Or9Xs1lo3R8ZyzECn6OCaDnJsCTfBzLRiLTPS1jK x92w== X-Gm-Message-State: AOUpUlGglwCKJfzXBb9RTl2HYZYp8eV+LRXnMyV1ZMESvTO7pGPAp8+l AvCQYCeTP0XwpEt3DM8V5jLhunoQqs4= X-Google-Smtp-Source: AA+uWPw+TxyBW99CdX6/5Y8Z28R37WNcJDbfKTazUJButAbMcTZyWxGFqH/BGyytHu49CLHgEq9qAw== X-Received: by 2002:a25:e44:: with SMTP id 65-v6mr10021212ybo.491.1534195887078; Mon, 13 Aug 2018 14:31:27 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id m82-v6sm26715319ywm.19.2018.08.13.14.31.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 14:31:26 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 4/7] drm/bridge: ti-sn65dsi86: Move panel_prepare() to pre_enable() Date: Mon, 13 Aug 2018 17:30:43 -0400 Message-Id: <20180813213058.184821-5-sean@poorly.run> X-Mailer: git-send-email 2.18.0.597.ga71716f1ad-goog In-Reply-To: <20180813213058.184821-1-sean@poorly.run> References: <20180813213058.184821-1-sean@poorly.run> MIME-Version: 1.0 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: Sandeep Panda , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul prepare() is the old-timey way to say pre_enable(). It should be called before modeset. This fixes an issue where the panel on cheza must have the regulator always-on/boot-on for it to work. Changes in v3: - Added to the set Cc: Sandeep Panda Signed-off-by: Sean Paul Reviewed-by: Sandeep Panda --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 501f4a81ea5ab..d2119ab546147 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -457,8 +457,6 @@ static void ti_sn_bridge_enable(struct drm_bridge *bridge) struct ti_sn_bridge *pdata = bridge_to_ti_sn_bridge(bridge); unsigned int val; - drm_panel_prepare(pdata->panel); - /* DSI_A lane config */ val = CHA_DSI_LANES(4 - pdata->dsi->lanes); regmap_update_bits(pdata->regmap, SN_DSI_LANES_REG, @@ -511,6 +509,8 @@ static void ti_sn_bridge_pre_enable(struct drm_bridge *bridge) /* in case drm_panel is connected then HPD is not supported */ regmap_update_bits(pdata->regmap, SN_HPD_DISABLE_REG, HPD_DISABLE, HPD_DISABLE); + + drm_panel_prepare(pdata->panel); } static void ti_sn_bridge_post_disable(struct drm_bridge *bridge)