Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6527186rwd; Mon, 19 Jun 2023 08:27:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Olkj3Qkj9xZPhb/+oQkcmt2bvLpjBIDnzry12n0qeIP8VlAiYq262DMTSRFmEqGiHpBjO X-Received: by 2002:a17:903:4293:b0:1a6:b971:faf6 with SMTP id ju19-20020a170903429300b001a6b971faf6mr4955336plb.35.1687188469276; Mon, 19 Jun 2023 08:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687188469; cv=none; d=google.com; s=arc-20160816; b=O3ZY2m2zjw7V3F22agJ/MY8HSb6ZwtSM0Uw9Ms6FT5IU6sXyA7xLxSfx1aW1QvN2Te vnNsAEWdduAs8C7VaZSS4+SMeEeIe/3Z8avaR11t3nmtF2UeyQaDZZzXFcVyYwXCO6oI xnRN2sW1+0McQ3YTVushvZjLrqA6UcETSzX9feEARDWxPQbwWJdo478nk/OJbUBv/DaE uUX/f9VFMPfQHTphHyqjBTrpod3LVwO8G9WPpDTaB3a7LfS3E01aY4bSu2LxHNB80CoQ I7y2c77nc1hPWSm3XOwHX+NB64zFkfg5gaHuFDZbIuzq2epJ9fIBCGkFyFvn2IJR0AO8 Z8sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XwN3PZ1wjLMk6buIa7toS1K6WytwdNPBNwxi1r1rCEk=; b=u2ipqgXPPPhpNZ3Bur1Mo4FCkwuGqgXZEDdWViYEiBOz9haPKlNYw+gx3Na/PQW0um waY91nMcW3EsiIPtTCXb65mT8GWlaFvlYpYb6SA782WSusyX3mX7VXrmAsnvhjr6wDNO bLnvQx/gDiXHIPYkzIN5mKI7E6FP6y0ZB51wD3C0Lk/o7c++Yu2AH2oMr/GhvH3Y4zqT HSwCqJa4RxuLaIx0JCZ8ew1AnQ3cZFuq/H5roHTqkp+mwxNkF55hKWYp1nRAMxufTfG1 ipKZ3NhM1a+lfX5c1v5PK3EfYgFMzkdcEiyhvh9Zz9Nz6FFL9tPTXQwLSYgn6XwxVuV2 Bw9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="Aqig/3zO"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb11-20020a170903338b00b001ae3b512697si32189plb.113.2023.06.19.08.27.34; Mon, 19 Jun 2023 08:27:49 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b="Aqig/3zO"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbjFSPVA (ORCPT + 99 others); Mon, 19 Jun 2023 11:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjFSPU7 (ORCPT ); Mon, 19 Jun 2023 11:20:59 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F40139B; Mon, 19 Jun 2023 08:20:57 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f900cd3f69so21031995e9.0; Mon, 19 Jun 2023 08:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687188056; x=1689780056; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XwN3PZ1wjLMk6buIa7toS1K6WytwdNPBNwxi1r1rCEk=; b=Aqig/3zOeQpdRTYZiGfg/KlTCq7ZXkYHPTrUprvJkAcnmhrvzkYndc+actcCZn8v9X 2jAgfZ6+j2LQzbI2KMlkW9zc67wP+Njjj5WXT/fcUor7xSfh2iImMe9rveB45lqKXZz6 NCI+PbbRlVniN/zbRnUizZFl2zg//nhlmmsTVWYs3BmgF4/pWaEGLIY4f9+OMfYYKNs5 QloNDZMMfkX9Iei7tQIObiHFujbZROhRshzptvE2g55nO6W+F0n9KrSGja3F62W3tJGJ uDTXS/RZrYmtqU+mS5tivEkNnfpK7Y7dWtM1mqnLOgG5XxnDIGy/Hr7uMf/4Sqt52Sst LL1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687188056; x=1689780056; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XwN3PZ1wjLMk6buIa7toS1K6WytwdNPBNwxi1r1rCEk=; b=StLVjwpMd4oarpe1XJnU5oyfgupHdP/2tO+nuK7Tz8QtqCBaHZRZhQqEtH8BEaiYNH G/h5WHSRHCQR41zDi6NXNKnAIIRrbD3V5AhekyYOEncCnV8KGcj8UuarDHqcgib5njxN L8FMdasNCgHBoKqUepsw/dMpKqkuCJEuH3VsqnASCIXYvD+4gBwEfiiYjGJurmcJjNot JmeBftgyk6ouMT12D2casdmAyOQVIzE4TbqYzxBI05fe3BHAOACgi5qwBazQ4NhSjtzt aBGElUOt294c9A9tNvEK6btQc6XJHbSOpPnRVZifh6/VBDnnyDFOn8b+Bpuon/sOfDxm J3/A== X-Gm-Message-State: AC+VfDzusIt6QwI/bk4cBeolYGcbXpPQuGzkfhQ4Y2oxDaB8Yz3X8vVM AM4/XWtn9sFz+rituQ8Qwr6cWRE+x+w= X-Received: by 2002:a05:6000:151:b0:312:74a9:8267 with SMTP id r17-20020a056000015100b0031274a98267mr1127094wrx.9.1687188056191; Mon, 19 Jun 2023 08:20:56 -0700 (PDT) Received: from [192.168.2.177] ([207.188.167.132]) by smtp.gmail.com with ESMTPSA id n13-20020a5d67cd000000b003111fd2e33dsm9946792wrw.30.2023.06.19.08.20.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Jun 2023 08:20:55 -0700 (PDT) Message-ID: <91e84965-f44c-e5a5-67a8-e6d286a6ad99@gmail.com> Date: Mon, 19 Jun 2023 17:20:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v2,3/3] drm/mediatek: dsi: Add dsi cmdq_ctl to send panel initial code Content-Language: en-US, ca-ES, es-ES To: Shuijing Li , chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, angelogioacchino.delregno@collabora.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com, jitao.shi@mediatek.com References: <20230616073659.26536-1-shuijing.li@mediatek.com> <20230616073659.26536-4-shuijing.li@mediatek.com> From: Matthias Brugger In-Reply-To: <20230616073659.26536-4-shuijing.li@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On 16/06/2023 09:36, Shuijing Li wrote: > For mt8188, add dsi cmdq reg control to send long packets to panel > initialization. > > Signed-off-by: Shuijing Li > Signed-off-by: Jitao Shi Reviewed-by: Matthias Brugger > --- > Changes in v2: > use mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE_SEL, CMDQ_SIZE_SEL); directly, > per suggestion from the previous thread: > https://lore.kernel.org/lkml/015f4c60-ed77-9e1f-8a6b-cda6e4f6ac93@gmail.com/ > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c > index 500a3054282d..8b43d9f48178 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -86,6 +86,7 @@ > > #define DSI_CMDQ_SIZE 0x60 > #define CMDQ_SIZE 0x3f > +#define CMDQ_SIZE_SEL BIT(15) > > #define DSI_HSTX_CKL_WC 0x64 > > @@ -178,6 +179,7 @@ struct mtk_dsi_driver_data { > const u32 reg_cmdq_off; > bool has_shadow_ctl; > bool has_size_ctl; > + bool cmdq_long_packet_ctl; > }; > > struct mtk_dsi { > @@ -996,6 +998,8 @@ static void mtk_dsi_cmdq(struct mtk_dsi *dsi, const struct mipi_dsi_msg *msg) > > mtk_dsi_mask(dsi, reg_cmdq_off, cmdq_mask, reg_val); > mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE, cmdq_size); > + if (dsi->driver_data->cmdq_long_packet_ctl) > + mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE_SEL, CMDQ_SIZE_SEL); > } > > static ssize_t mtk_dsi_host_send_cmd(struct mtk_dsi *dsi, > @@ -1200,18 +1204,21 @@ static const struct mtk_dsi_driver_data mt8183_dsi_driver_data = { > .reg_cmdq_off = 0x200, > .has_shadow_ctl = true, > .has_size_ctl = true, > + .cmdq_long_packet_ctl = false, > }; > > static const struct mtk_dsi_driver_data mt8186_dsi_driver_data = { > .reg_cmdq_off = 0xd00, > .has_shadow_ctl = true, > .has_size_ctl = true, > + .cmdq_long_packet_ctl = false, > }; > > static const struct mtk_dsi_driver_data mt8188_dsi_driver_data = { > .reg_cmdq_off = 0xd00, > .has_shadow_ctl = true, > .has_size_ctl = true, > + .cmdq_long_packet_ctl = true, > }; > > static const struct of_device_id mtk_dsi_of_match[] = {