From patchwork Tue Oct 20 17:42:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11847561 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41C03C4363A for ; Tue, 20 Oct 2020 17:44:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C548B21D6C for ; Tue, 20 Oct 2020 17:44:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZPqiuKVW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="WbHD959s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C548B21D6C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=02tq2QCOonP0TfVuI8HHXP3GQMYv7UYYbj7XJBDE53Y=; b=ZPqiuKVWzmRiOu2QTu0bg/crV xX/dOBWx5Qy6aQz7L2HOMp3iPp2niVuKsnRk/0R4lX5a/71FF2tWfuiBa6tGsMemzT51JMto7xlEX 5ZEVrpJYlQ6Le9cmGmfm7oguWeJEjhPoBB2wOarUdlj3+SdLs5qmWXTEJvu54Knln37kua8hYJZG5 SqKmTYjENp1A8Hvd9pR+LAPVXT+2sJ7OecPnNnlqZxIFhAYR84FcTC61OW/EOpZqu1LYryHQFiGGu qknJERIH+cRzQXjwq1wleCRl7/u9BS73YuPy6BNbum2sPnnsl1iTbstLM+CYlcyvvso/ZHVBD3Zzi 6nViIQD6w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUvfX-0006bD-EP; Tue, 20 Oct 2020 17:43:31 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUvf6-0006Rx-Fm for linux-arm-kernel@lists.infradead.org; Tue, 20 Oct 2020 17:43:07 +0000 Received: by mail-wm1-x342.google.com with SMTP id c77so2706379wmd.4 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=kxqhV1B7nt4oOyyNDQPH9z/oVmSR+Ut0oe1WVGUnNAwwrhlumWa9ZtsVY0kXYvgiye UDnhqH5SyJ4coNEO83C5i4DzTiyx7flWMzmroWrFIKzSWPQAm0CSRbn1Gj/HMnENavkK JoxrXRNHQ9Zh0bwLUsRiAmyfx5+8uivSf2UD2sktCBIhu1j8QXkKJkA58EenjdOY+c7g IsEaHluia3HcfC2jQqsXd3KVKa9J1lfRc9jIC9Llo660FIyrnk8Me9xtABTHmLWuCo8Z 6eqE5JULB7wJJRuMx84E5Or5HOHe1/ZVBiqo/5bLMxR96mlnBKsiGy9wdieJZdJbBeBS h2VQ== X-Gm-Message-State: AOAM530b9Wi1W7XJU8zbMetgjavoxkJY4cccJ8VUlYpS/9rNDgX7opDw JenOzmgeZEPaVULsIYspU0xTuA== X-Google-Smtp-Source: ABdhPJzYZnrg/xFUR1Exo3D3a8p65ayChvkyZu0pYYwQ4gWPnT+Pl6BY9opLW0tRMMKBzlTaAg9jxw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201020_134304_597750_04504386 X-CRM114-Status: GOOD ( 16.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: chunkuang.hu@kernel.org, daniel@ffwll.ch, airlied@linux.ie, Fabien Parent , robh+dt@kernel.org, p.zabel@pengutronix.de, matthias.bgg@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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: