Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1222608rwi; Thu, 20 Oct 2022 09:59:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6DSUtwC1raRzvyvBlp6LEYpUW0ZX2CA3AXsCQXqiotAkqkXNUqxCpm8KFVw15V+rdR9N/v X-Received: by 2002:a17:902:ce0e:b0:17d:a730:3835 with SMTP id k14-20020a170902ce0e00b0017da7303835mr15483487plg.131.1666285180632; Thu, 20 Oct 2022 09:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666285180; cv=none; d=google.com; s=arc-20160816; b=Ki0HOWH+cZzQBKFsqkZ3cEj4X4gwxVEYeqIXDrIapHrnud6LuCsb/tNQv+nTFrAR8o ajhWKYncQT3f4KGdTtNsgt6lDQ3iM0RWIiiDf5S8O8+ICZjLhsJuMPsSdFr+a63R8w25 ErbGf4lQxvu8TN/rS9fk05laRElD/y2miyFWIFeZz7pu+5xEGl/UVGLVqflqHuCibK/+ zBqEe02ST6e/X0TdeAp1CxGKa1GvutDecCPXa/6+I3RmLlpNidmWqiwJWK8qg/h1GLAh i0odby41jqe0tXhJxexSt7iMk+ujO98VnfQ2uaqrQlQrHJYDeLxGTwVvjhttFAQwqoCi waFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OJre8KN29d1NkUMRqOSqxQexLqxHmU+GHdpVJfUR2M4=; b=mZ3ZuyZU5lXcAdCk5iyPJyNBFBKD9zVSt7AQxJ1nycz250Y5qW7KKIjshReb12mJjU qhbFC4xO8xUY7r/3ANRKP0L5mvKIGht4ubNgr/aTSB7wJtADrwF40zUukFACjpINp+33 y5TfFrstheZXMAe1WCjv46A3RL0qkDUbPmkb6xE/XKxDJW8XI1/QksEA8ganappFQ+2Q gC1fJP29DVpgStN5zC4PTbZU6/9kQMFL68pHu0DXO3XwabkA5FSgSBGPYO6M36Sh7LEp 3RfZrY2ALRtMfdhQ3FonJ8oOabXbIBwLHJbfDjDWgTwnxzn6OBNJRHjKis6F2eMIDl+4 Z4Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=HxVPgP72; 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=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a170902d2ca00b001842f465c10si26573438plc.438.2022.10.20.09.59.26; Thu, 20 Oct 2022 09:59:40 -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=@collabora.com header.s=mail header.b=HxVPgP72; 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=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230056AbiJTQkg (ORCPT + 99 others); Thu, 20 Oct 2022 12:40:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbiJTQkd (ORCPT ); Thu, 20 Oct 2022 12:40:33 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB82F1382CA for ; Thu, 20 Oct 2022 09:40:29 -0700 (PDT) Received: from notapiano (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7DDA8660247C; Thu, 20 Oct 2022 17:40:26 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666284028; bh=cvM3djFXmy7wP9TkTQGsL5CnoFlBKYQJZrVbENrbUJg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HxVPgP72xkk5pXDKB0rWnF5v2W6J0ELdMBK2J5ULgnVIuKkL2msmdQeA51+5tWcmv Y8ZLEkBLMdkWlLl7UgQk+O09ljGPdB2h7qcnrvuURew/O36BvfyMKDlzNnHrSLSYyE Mi+Qp43rg1cXDRw9I8Dhi7da8bAK7nGxmlM4r7fM756rjS85u9kkzTRqAA7w+XxZnk O9LR0hBz6LcXtw688DI8MrPsIT/oGudBYtRZ3/LGol0Jv4LnuR3Ez8sHprNzN2qd+U uFKskEaJDFlIe1TqaDgUMsg9tO+5lr1PjG5BlwD0EJfjUzzYn6A0xxF3ppxX0FYWgd Z2bKZRHhol5Ow== Date: Thu, 20 Oct 2022 12:40:22 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: xinlei.lee@mediatek.com Cc: matthias.bgg@gmail.com, rex-bc.chen@mediatek.com, angelogioacchino.delregno@collabora.com, jason-jh.lin@mediatek.com, chunkuang.hu@kernel.org, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Project_Global_Chrome_Upstream_Group@mediatek.com, Jitao Shi Subject: Re: [PATCH v12,2/3] drm: mediatek: Set dpi format in mmsys Message-ID: <20221020164022.vtnumo3fob2sh54w@notapiano> References: <1666147936-27368-1-git-send-email-xinlei.lee@mediatek.com> <1666147936-27368-3-git-send-email-xinlei.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1666147936-27368-3-git-send-email-xinlei.lee@mediatek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 Wed, Oct 19, 2022 at 10:52:15AM +0800, xinlei.lee@mediatek.com wrote: [..] > @@ -134,6 +137,7 @@ struct mtk_dpi_yc_limit { > * @yuv422_en_bit: Enable bit of yuv422. > * @csc_enable_bit: Enable bit of CSC. > * @pixels_per_iter: Quantity of transferred pixels per iteration. > + * @edge_cfg_in_mmsys: If the edge configuration for DPI's output needs to be set in MMSYS. As Angelo suggested previously, this could be written slightly shorter as * @edge_cfg_in_mmsys: Edge configuration for DPI output has to be set in MMSYS. > */ [..] > @@ -448,8 +453,12 @@ static void mtk_dpi_dual_edge(struct mtk_dpi *dpi) > mtk_dpi_mask(dpi, DPI_OUTPUT_SETTING, > dpi->output_fmt == MEDIA_BUS_FMT_RGB888_2X12_LE ? > EDGE_SEL : 0, EDGE_SEL); > + if (dpi->conf->edge_cfg_in_mmsys) > + mtk_mmsys_ddp_dpi_fmt_config(dpi->mmsys_dev, MTK_DPI_RGB888_DDR_CON); > } else { > mtk_dpi_mask(dpi, DPI_DDR_SETTING, DDR_EN | DDR_4PHASE, 0); > + if (dpi->conf->edge_cfg_in_mmsys) > + mtk_mmsys_ddp_dpi_fmt_config(dpi->mmsys_dev, MTK_DPI_RGB888_SDR_CON); I know this isn't one of the formats supported by MT8186, but since we're using platform-agnostic formats now... This else branch in theory could also run for a format like MEDIA_BUS_FMT_YUYV8_1X16. Would it make sense to set MTK_DPI_RGB888_SDR_CON in that case? Thanks, N?colas > } [..]