Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4663887pxu; Wed, 21 Oct 2020 02:00:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvpSFG49DqPpq/6E8BF/Da6r1l60TZRvh5owH1uRTIoakBo2YgK4b7QfeCfgAkvUADSPPs X-Received: by 2002:a17:906:280a:: with SMTP id r10mr2408668ejc.58.1603270816737; Wed, 21 Oct 2020 02:00:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603270816; cv=none; d=google.com; s=arc-20160816; b=BbnMqueZsAKza910dfeDQFE64PzquoIundxBmqPUO/RrxY3N6kAqTmbxRAgU2yMtV/ Bpglde1oPVWV/0H9z5jv3GrPVNrew2bybHBnpArsxKcejq43ggTKBSKn0lpuGNnGS6NR Nfmo9Ute/I57lbQ9aax4Bay73Ea0SDnDt38ZGCAW0xqsa93bZP4V6HxATUEdhcRCX8ax 6V5hjTLl2rKfCYRiRcCliCPHOuEqQgCJm9t3FDVFNdKbxcEXfLCqovyJVdYP4a3T4ttf JxVNKVbXJ3ZjwrqULtG25okVqqzLy4t7ErQExekLWVCbvWM5b8SDOCYJEgS7QyW7UzG3 MqAg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tBhINe5+YmVPHfb1/p3z/ZugBR00FYyA2WW1AgRCGAM=; b=Ws3MSqXmw6Wft2PRp8gR1ejBf1sltkwLTTfqq9Owl4HMn1RYCE4nBlPdzJ8o80PEl9 gGygzTN+zU1wZ5/nTfz0VWoL3J0NAQ6S96slQ+Wc9qBWqlCipx5K+CtW9Odo35tsLT0D z6yxcdEnZackyWg9mVG6slz5L7yfL8jYvIHHAg0O8OT3mhrYk/kOrthdmKgRknfDlQxz KAbY4RI6tHP0xEp27lC0ZsWc1dobhrnsOhABm3KvJaDXt6XDX9MCox2bv2EqG1wMIMTI 4BP8swFHXiszXT6JAs2s58TaTfufIT9VDY1Rkx4I1PsEvES6+s7AylejbLDagIs35TNW YuZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=WbHD959s; 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 s21si890607eju.119.2020.10.21.01.59.54; Wed, 21 Oct 2020 02:00:16 -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=WbHD959s; 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 S2437227AbgJTRnI (ORCPT + 99 others); Tue, 20 Oct 2020 13:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437217AbgJTRnF (ORCPT ); Tue, 20 Oct 2020 13:43:05 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3231C0613D4 for ; Tue, 20 Oct 2020 10:43:04 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id a72so2705626wme.5 for ; Tue, 20 Oct 2020 10:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tBhINe5+YmVPHfb1/p3z/ZugBR00FYyA2WW1AgRCGAM=; b=WbHD959s2sqRdOZIhuLjT2Bq0V9cHBGUM6oT9iAegHQsQ+NASd6sENwppAqbr4Aoju nx2mJZJa/SiVwmMqJQAUM6ktcpeVWNJ2NtRR+IjvbJF0dvxDCBbvCYBD3j5lRtQGCnts EeC4nyMrnqSwmfzfLQuvSWY8Vo2I6I766NCOwnNT52Aq8ka8jUDgLkG8sr1xEPnNSO9x 2QJwoYC4uhbNJFSLbBNr3FR1JY6T/tNfwoY9g5jp08J6Gjxp3bhlsu2xVxDukEL8SVhI c8jPjI0t01rU7NJCIYkxPF6B3R6mvCBkIQCc/ex2IUXOxCO9ihFdQrjBOs7JaNAhmFBH i4zg== 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=tBhINe5+YmVPHfb1/p3z/ZugBR00FYyA2WW1AgRCGAM=; b=g3mq8eZ3PzMSpz2beBAbqJMzNaslrx7hUCKWybhMD6DXFwu86ZExfJOnOQvMJE6cH+ mvfRTgXIh97hwj56VQGAUPvGCEGZ0EP0ll2wt3AXWb2XFg46nQ2k9Nb/N/IdNI/yIKAD KwU5OOt2e7qSnBynNS9ZVF24ni3cw6MvJIrv6LaWEbLQU7YO64MPRYTqaNXBBJGzJ4pk mTG5wDN/OYHE8mnnFdRzD+oXw9xpLIzeUGAGtWAwVKQ7uELOvAMxBwd/LRsSus1x6Dew 8MoEAuI9aP58mQiTv4NJDV6uVqOqdw/H6f1+89keUQwwKVMueGMD6LNw/79WIXxsFQMP 6u9Q== X-Gm-Message-State: AOAM530LGY+lAAZRlNUV6sBjkn4IVCxDaizieZtOBONOapMXLegJlGuE 9jHsyUnOdpd/YwfJoPrZA0K5Yw== X-Received: by 2002:a05:600c:4107:: with SMTP id j7mr3965065wmi.44.1603215783589; Tue, 20 Oct 2020 10:43:03 -0700 (PDT) Received: from localhost.localdomain (199.170.185.81.rev.sfr.net. [81.185.170.199]) by smtp.gmail.com with ESMTPSA id v123sm3297756wme.7.2020.10.20.10.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 10:43:03 -0700 (PDT) From: Fabien Parent To: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: matthias.bgg@gmail.com, robh+dt@kernel.org, daniel@ffwll.ch, airlied@linux.ie, p.zabel@pengutronix.de, chunkuang.hu@kernel.org, Fabien Parent Subject: [PATCH 4/8] drm/mediatek: dsi: add pdata variable to start clk in HS mode Date: Tue, 20 Oct 2020 19:42:49 +0200 Message-Id: <20201020174253.3757771-5-fparent@baylibre.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020174253.3757771-1-fparent@baylibre.com> References: <20201020174253.3757771-1-fparent@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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/mediatek/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