Message ID | 20221115083918.23192-1-r-ravikumar@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2593271wru; Tue, 15 Nov 2022 00:43:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf4IBtWv6Bgd4ZnLakhdu6Ldp0yPBALKtC7F4Cp34aicGcMHpdXZXBx8d128SeXxGe8uwrCl X-Received: by 2002:aa7:90cf:0:b0:563:4643:db33 with SMTP id k15-20020aa790cf000000b005634643db33mr17274356pfk.22.1668501786406; Tue, 15 Nov 2022 00:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668501786; cv=none; d=google.com; s=arc-20160816; b=Rf073F8bVJbKgCWFEKL9rF0CWS0YR4VdmrsqcEKczDiaP+FSZ52VitEyEJ+0Ht04Jl ZkNVOeJAdnpY9TWR1j+UhFpZh9Hr4VbRD/almvqB4Vvm880DpjqK0uMtzSiPC+gorqjf /iYAb+RL8unUh7Toz75LMf3TptKEp5wmdX424cwcTyOtXM/Qc0gRoy4pIvRyOQSfRN9u j33GOphDol+x1QUXkz0lfOmig85aru8kH/ATwa5apACdGX47KqCsQhiCT/OJLm1X8TNb geJrHPGS/cxpKDdXVDk4QvpEJLC11T2M75XI5Ki7Nxhkv4hSVNCnkXQwgLjaHQdPqFWJ fyaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=yKC6E4hT91afjosovCDsP6rLhDJyelPpRXQXl4YPz8s=; b=DOVpqfcsd6d4Bqp6SCwZ7F/eTLgv5ubPrhBGwUa3qz5rKXsyd6Q/SU4foORi5KwQn1 7k+i0bBIGOUZ7eVEOcVp0/UfjO0V74GnFNpkIJu1dzpK3t9BTeiqTneLMkMMCcW8H0IR 1tmd/CTtSah04Yq1mqe5qYzwLrpaseelXzAZWrZHr+9JNI9zcm5vOcukXrBQErd+jeH/ c7iGD4mfsh6bMTDftedoOwsSB5bQ8jov7kmG24t8o4PV+LpXin0FaUmik3GIWOj9FL9f 5gD0zIBqdDLxcKPJex+D3eet3M0WVJwIt2LXTaNMUTGGxioA1D9qcI1Rmz21EQEjvul7 Z6wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jjbRR2dG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c5-20020a170903234500b00178386d88c6si12806246plh.186.2022.11.15.00.42.52; Tue, 15 Nov 2022 00:43:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jjbRR2dG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232686AbiKOIjl (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Tue, 15 Nov 2022 03:39:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230120AbiKOIjj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 15 Nov 2022 03:39:39 -0500 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3ADC5582 for <linux-kernel@vger.kernel.org>; Tue, 15 Nov 2022 00:39:37 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AF8dMlM108203; Tue, 15 Nov 2022 02:39:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1668501562; bh=yKC6E4hT91afjosovCDsP6rLhDJyelPpRXQXl4YPz8s=; h=From:To:CC:Subject:Date; b=jjbRR2dGloRFw0iG0t/ZmgLq5X9rQmlpQntJ4NztfrbJkubyIvqZXgif6zk1uztSI 2ofUZJB5zBn8OZ8EQZMZiCnUxsCPHpuHpXjH+0qR4JDEWfaVUYOFNMJh7SHgp6mSej pk64XRk9t0Goo5bvLZwUbhj0ngnRwvML4aPGqoU0= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AF8dMbe046360 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Nov 2022 02:39:22 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6; Tue, 15 Nov 2022 02:39:22 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.6 via Frontend Transport; Tue, 15 Nov 2022 02:39:22 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AF8dL05029656; Tue, 15 Nov 2022 02:39:21 -0600 From: Rahul T R <r-ravikumar@ti.com> To: <dri-devel@lists.freedesktop.org> CC: <andrzej.hajda@intel.com>, <neil.armstrong@linaro.org>, <robert.foss@linaro.org>, <Laurent.pinchart@ideasonboard.com>, <jonas@kwiboo.se>, <jernej.skrabec@gmail.com>, <airlied@gmail.com>, <daniel@ffwll.ch>, <p.zabel@pengutronix.de>, <tomi.valkeinen@ideasonboard.com>, <linux-kernel@vger.kernel.org>, <jpawar@cadence.com>, <sjakhade@cadence.com>, Rahul T R <r-ravikumar@ti.com> Subject: [PATCH] drm/bridge: cdns-dsi: Fix issue with phy init Date: Tue, 15 Nov 2022 14:09:18 +0530 Message-ID: <20221115083918.23192-1-r-ravikumar@ti.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749550929076975471?= X-GMAIL-MSGID: =?utf-8?q?1749550929076975471?= |
Series |
drm/bridge: cdns-dsi: Fix issue with phy init
|
|
Commit Message
Rahul T R
Nov. 15, 2022, 8:39 a.m. UTC
Phy is not being initialized after suspend resume. Fix this by setting
phy_initialized flag to false in suspend callback
Signed-off-by: Rahul T R <r-ravikumar@ti.com>
---
drivers/gpu/drm/bridge/cdns-dsi.c | 1 +
1 file changed, 1 insertion(+)
Comments
Hi, On 15/11/2022 10:39, Rahul T R wrote: > Phy is not being initialized after suspend resume. Fix this by setting > phy_initialized flag to false in suspend callback > > Signed-off-by: Rahul T R <r-ravikumar@ti.com> > --- > drivers/gpu/drm/bridge/cdns-dsi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c > index 20bece84ff8c..1a988f53424a 100644 > --- a/drivers/gpu/drm/bridge/cdns-dsi.c > +++ b/drivers/gpu/drm/bridge/cdns-dsi.c > @@ -1187,6 +1187,7 @@ static int __maybe_unused cdns_dsi_suspend(struct device *dev) > clk_disable_unprepare(dsi->dsi_p_clk); > reset_control_assert(dsi->dsi_p_rst); > dsi->link_initialized = false; > + dsi->phy_initialized = false; > return 0; > } > I'm not familiar with the IP, but the code related to enable/disable looks a bit odd. Why does cdns_dsi_bridge_enable() do: cdns_dsi_hs_init(dsi); cdns_dsi_init_link(dsi); but then in cdns_dsi_bridge_pre_enable(): cdns_dsi_init_link(dsi); cdns_dsi_hs_init(dsi); Doesn't the order matter? Why are the same functions called in both places? cdns_dsi_hs_init() seems to do enabling, like locking the PLL. But there's no counterpart, hs_uninit(). I see cdns_dsi_bridge_disable() doing some clearing of the registers, so perhaps that's where the disabling happens. But cdns_dsi_hs_init() is called from the pre-enable, and post-disable doesn't do anything else but pm_runtime_put(). More or less the same comments apply to cdns_dsi_init_link(), but it's a bit worse as it's also called in cdns_dsi_transfer(), and then there's no uninit counterpart that I can see. Well, maybe both functions are only doing configuration, not enabling this as such, and so it's fine to just turn off the IP without any uninit step. If that's the case, then probably this patch is fine. Tomi
diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c index 20bece84ff8c..1a988f53424a 100644 --- a/drivers/gpu/drm/bridge/cdns-dsi.c +++ b/drivers/gpu/drm/bridge/cdns-dsi.c @@ -1187,6 +1187,7 @@ static int __maybe_unused cdns_dsi_suspend(struct device *dev) clk_disable_unprepare(dsi->dsi_p_clk); reset_control_assert(dsi->dsi_p_rst); dsi->link_initialized = false; + dsi->phy_initialized = false; return 0; }