From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2345FECAAD8 for ; Fri, 23 Sep 2022 09:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231310AbiIWJQr (ORCPT ); Fri, 23 Sep 2022 05:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231273AbiIWJQk (ORCPT ); Fri, 23 Sep 2022 05:16:40 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7357D12EDA8 for ; Fri, 23 Sep 2022 02:16:39 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id E438D6601BDF; Fri, 23 Sep 2022 10:16:36 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663924598; bh=COcbVBmwh8xUSsJeO6kEeMrbFW6tyt7j4/rcy5e8aTk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ifBr8/l2q7/LqvQpfV2K/U2NRx0B+a7wLFHep1xJ/4F+w9SovfhlhasDI8SugMkVq ZhpDjSAJEY2cXK1CJb+ivJcRpW1UL/IS0Ymg/IlzIoSw07gFdM0qv5iUKSoIX3G6vo Liq01thJUcoX4g7TU12sbvsPqC0yn4jk4VijGpIgQ+4c1+6OrOV0odFuE0ysi91v7u Pj/YIOnEn1hpnyMnw696McjHHTSRZMm5RODGCQ7zXKlj1+QhU0gy5eLkw1vtGVymeO yHOhEY34MmsnE0E5e2bo2S0IMf4Dmy6Y4wAGcIB2hVRzm4AtSIN1n1DvZjSuUgXmLZ f9XjR8vev2nXg== Message-ID: Date: Fri, 23 Sep 2022 11:16:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v8,2/3]drm: mediatek: Adjust the dpi output format to MT8186 Content-Language: en-US To: xinlei.lee@mediatek.com, matthias.bgg@gmail.com, jason-jh.lin@mediatek.com, rex-bc.chen@mediatek.com, ck.hu@mediatek.com, p.zabel@pengutronix.de, airlied@linux.ie, daniel@ffwll.ch Cc: 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@mediatek.com References: <1663850702-26529-1-git-send-email-xinlei.lee@mediatek.com> <1663850702-26529-3-git-send-email-xinlei.lee@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <1663850702-26529-3-git-send-email-xinlei.lee@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 22/09/22 14:45, xinlei.lee@mediatek.com ha scritto: > From: Xinlei Lee > > Due to the mt8186 hardware changes, we need to modify the dpi output > format corresponding to the mmsys register(mmsys_base+0x400). > > Because different sink ICs may support other output formats. > The current DRM architecture supports retrieving the output format of > all bridges (eg dpi is implemented via DRM's .atomic_check and > .atomic_get_output_bus_fmts and .atomic_get_input_bus_fmts). > If no unified output format is found, the default soc format > (MEDIA_BUS_FMT_RGB888_2X12_LE in mt8186) is used. > > Therefore, if there are other format sink ICs (RGB888_DDR/RGB888_SDR) in > the future, the sink IC needs to add the func implementation mentioned > above needs to be added. > And the drm architecture will select the appropriate format to change > the dpi output. > > Co-developed-by: Jitao Shi > Signed-off-by: Jitao Shi > Signed-off-by: Xinlei Lee > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c > index 630a4e301ef6..bd1870a8504a 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > > #include