Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5794797pxu; Thu, 22 Oct 2020 11:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8fgqGx6ttvbrtoETGGsuBM9TBgfcfWljZ2ZhNdlMp3jar/BEaz8VgPVcYl1Pr/eOlY4r8 X-Received: by 2002:a17:906:c2d8:: with SMTP id ch24mr3418550ejb.239.1603390301488; Thu, 22 Oct 2020 11:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603390301; cv=none; d=google.com; s=arc-20160816; b=fxVorxW1slBBmm+9qTW5iWNRRLCrsQggSt0bEtGVDrS8WuAxculTHqu7rs64hfWjsA Tk3MOYARq/OxaBJqVsGmjLs55dwu9uh5KToPMXpzviv+SFhh3Sdwy2/6h5V29cm0osdr WUd6KXDXypOepEQGJa0KifvrxmQKytweRcxNorISGYiYARJjjm1pLwW8KPhqpWXstifV R+wtZXNaVR0V4ZmgRcJKYwZ1DeY8m/sCvwvXKi8X0y2Enk28ldGUMEtyyhd8NRDwtu6l Ebhg/ft7PGlgf1IC94Po/LNbgv4Vh+xsm1LC2AWDtgoTPhJ0sSw11In8NOZBbi/vOgZe Mb+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kojjrYIgLi9atE3HNeKW+cJYZwBv9lJxNp3JGQTWaRE=; b=mgaM4M6RfR7PriQSoth3LIDGphANfmHtWFRTUXupLAJoMM/3FiyjFNpwEexuejTaLP WV3+Z2pkHvypdwnRQt44M9Pp2Z0CZ+c8v8HPIsgUW2aludbgCwf0UE72ioJYTIrsDYoK 1mk+4RS1cZFf+5r5u3QJtJmF64jBPBkJQLLf3RpkKoR8V4lw886olIEF1IYLx4pXb4Z0 TDnoTL3AQLj2kCIhON1doCHjWnioakR4xcCtfpolYTyTQyyyBN01MCQ95TgoEeF4DIlT Nl7Cc/W9KsuwXrEtaXMsLqVnaXeCAEQmT8RC4WBxW9Ake/gAA4Viv9DKyITqyk2Ye7aE jr5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=K5mKBqv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si1433914ejf.423.2020.10.22.11.11.19; Thu, 22 Oct 2020 11:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=K5mKBqv7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2902024AbgJVQtH (ORCPT + 99 others); Thu, 22 Oct 2020 12:49:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2898045AbgJVQtG (ORCPT ); Thu, 22 Oct 2020 12:49:06 -0400 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E1E4C0613CE for ; Thu, 22 Oct 2020 09:49:06 -0700 (PDT) Received: by mail-io1-xd41.google.com with SMTP id b15so2324811iod.13 for ; Thu, 22 Oct 2020 09:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kojjrYIgLi9atE3HNeKW+cJYZwBv9lJxNp3JGQTWaRE=; b=K5mKBqv7cFoRmE22R/SIBPXgp7gvRB4sBDus74dJx6EmpRVudHOEVDoogQnspJqgXK H1+0glvjt/unvvGqucop/d2nz3n2nfx33WbtnVA4BnPNI3dcL6JkqJ0qQt6UpV8EKYPJ rWS6KSPUHGtGC3xjgm5Cw4sKACUyGO902TBx2Y/N6g9Y56VbPw0jbMXl344rCGF9OZig Hv/Dp4/6U4Cdajs5wMQNivLMVRiVubZij2UhC7tylU1qo6fpuSee2/6nhkK7heeaHm59 7Xp9pYjYEPMby7cdkhG6LVymKnqxEu/fvw0AQke7RKF7pfK1vx8NMgnB0ynKi+oPPaE3 wI/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kojjrYIgLi9atE3HNeKW+cJYZwBv9lJxNp3JGQTWaRE=; b=GiNXFZEZG5sOV3Co0hCI338YhG7UR8jSgGiR0vbb+J00LlYocBbJjMF/kvyC0HKcDx ehdqnsL0eCCTW1QvCcoeqd3NlerUAVUr2YEryrxX2FEovN7SLjKVN2U8sla2gtuhVjaQ pIjiaxkbAt7+ZEU4qp7IEmLYKutAiQSaDPb1hv6ERf7Uc51G05kUmY0+cfbllsEeoYZ/ L8aMXy5aNVCvfbEvG2WzYE/OXLlVpPCDodNGwuzpCieiVtRMcb+46IzANuN9zYqEDIqQ 1H4CIZfonYhQA5Qosck04k3ZWCo2Zc8eF8L8+T1OxGZjEuHvW1UiAfD/vPhhpNO3ACiT Bf3w== X-Gm-Message-State: AOAM530TqaMrbSyDuniq9z4yXY5bYMsI4dOhvK6yRg6p0QubaGZpTN8X QlCz95Y7+8fblJzVuykQCfXWdKEEXm6kWfXSt9x9yA== X-Received: by 2002:a5e:c112:: with SMTP id v18mr2520610iol.195.1603385345691; Thu, 22 Oct 2020 09:49:05 -0700 (PDT) MIME-Version: 1.0 References: <20201020174253.3757771-1-fparent@baylibre.com> <20201020174253.3757771-5-fparent@baylibre.com> In-Reply-To: From: Fabien Parent Date: Thu, 22 Oct 2020 18:48:54 +0200 Message-ID: Subject: Re: [PATCH 4/8] drm/mediatek: dsi: add pdata variable to start clk in HS mode To: Chun-Kuang Hu Cc: "moderated list:ARM/Mediatek SoC support" , Linux ARM , linux-kernel , DTML , DRI Development , Matthias Brugger , Rob Herring , Daniel Vetter , David Airlie , Philipp Zabel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chun-Kuang, On Wed, Oct 21, 2020 at 7:07 PM Chun-Kuang Hu wro= te: > > Hi, Fabien: > > Fabien Parent =E6=96=BC 2020=E5=B9=B410=E6=9C=8821= =E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8A=E5=8D=881:43=E5=AF=AB=E9=81=93=EF=BC= =9A > > > > On MT8167, DSI seems to work fine only if we start the clk in HS mode. > > If we don't start the clk in HS but try to switch later to HS, the > > display does not work. > > > > This commit adds a platform data variable to be used to start the > > DSI clk in HS mode at power on. > > This patch looks like a hack patch. If you cowork with Mediatek, > please find out the correct solution or give a reasonable explanation. > If you could not get help from Mediatek, I would wait for comment on > this patch. It seems that this workaround is because of a specific display and not because of a specific issue of the MT8167 DSI IP. I will drop this patch in v2. > Regards, > Chun-Kuang. > > > > > Signed-off-by: Fabien Parent > > --- > > drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/media= tek/mtk_dsi.c > > index 4a188a942c38..461643c05689 100644 > > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > > @@ -175,6 +175,7 @@ struct mtk_dsi_driver_data { > > const u32 reg_cmdq_off; > > bool has_shadow_ctl; > > bool has_size_ctl; > > + bool use_hs_on_power_on; > > }; > > > > struct mtk_dsi { > > @@ -671,7 +672,7 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) > > > > mtk_dsi_clk_ulp_mode_leave(dsi); > > mtk_dsi_lane0_ulp_mode_leave(dsi); > > - mtk_dsi_clk_hs_mode(dsi, 0); > > + mtk_dsi_clk_hs_mode(dsi, !!dsi->driver_data->use_hs_on_power_on= ); > > > > return 0; > > err_disable_engine_clk: > > -- > > 2.28.0 > >