Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4310021pxj; Tue, 25 May 2021 05:17:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEwp4GwfZQ+k1D10t/QYDXcziowD4QbhaPJVjdn/225NYgmlxTpGELdxglwaCJWG+uoHQ/ X-Received: by 2002:a17:907:37b:: with SMTP id rs27mr29359054ejb.287.1621945049164; Tue, 25 May 2021 05:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621945049; cv=none; d=google.com; s=arc-20160816; b=neTL5KPUdnieH15yFeWD3MgCoD4qqBmeTxMWTHJjmgok3w4vSPgLS9XHV5RvPa3XyR PxfccpZ01JiunI1cKPzpEXzdg3s64GEZkvGVxjQd3+z9nXOjNhZHpJT1xf0E42ErcWbU nDdLOGIN1x9qsJ5C31b08hsWHvjrKTcYZUPghVRLEcRtAhaccvXci2ZZzrxFNUs52ofL tJ2tejYFBI1b+aBSNtp5/3IPsmoFIeRoPHZNbxJRYPtJIkeDk6gfYviATeWweQPCB9dF zZsWwLlMZJnXDyFgAPEXJCBQD+d9ARe98HGd3g1PsNCR0/yAms/Qt+iTny2lU8Naj1A1 lQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=VQw5/fQNDWmjL1yvgnxGW/FC0MDvaAAz0jhPL+DEPC4=; b=OAkMy7Oy3EE8WliJCx1LA31b7Tcv/tgVK/G6qlIS1aq+L7SOfM4r0BGCZ2F7QoZHRd 4oBqGITX1EvzLeSeY0kDASpDZHSdxcDtgyTBRgQYYKiY8Ego6uz7ytVV+HOouFHont2K 4gcN4a6MA63lzyja2DC5gIDEBd4dpiucrwu9x2e4RAUchIUanVixx4FKZ6qGY2ZYUx7c LOAjynuFBVkeJrRdV0iW5I+WHfKm9uAuNzK11mtTX3SlhBj3Scg2Yq/oPdEhrXbHdKvg pdaAwu1J3ekSX2FFQN7YsvAyNzF/vNRFPlKd8u1JfNbLpe22po8I2Hjk5jqJkjafTGrr zkPw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si19652286edj.328.2021.05.25.05.17.02; Tue, 25 May 2021 05:17:29 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232408AbhEYMQi (ORCPT + 99 others); Tue, 25 May 2021 08:16:38 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:37888 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232281AbhEYMQe (ORCPT ); Tue, 25 May 2021 08:16:34 -0400 X-UUID: a44b703372804068bf0c60f5bfe076c5-20210525 X-UUID: a44b703372804068bf0c60f5bfe076c5-20210525 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1469816558; Tue, 25 May 2021 20:14:58 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs05n1.mediatek.inc (172.21.101.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 May 2021 20:14:57 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 25 May 2021 20:14:57 +0800 From: Rex-BC Chen To: , CC: , , , , , Rex-BC Chen , Jitao Shi Subject: [v4,PATCH 2/3] drm/mediatek: config driver data to support dual edge sample Date: Tue, 25 May 2021 20:14:47 +0800 Message-ID: <20210525121448.30075-3-rex-bc.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210525121448.30075-1-rex-bc.chen@mediatek.com> References: <20210525121448.30075-1-rex-bc.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add output_fmts and num_output_fmts value for all configuration. Signed-off-by: Jitao Shi Signed-off-by: Rex-BC Chen --- drivers/gpu/drm/mediatek/mtk_dpi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index d3b883c97aaf..d6a422986efc 100644 --- a/drivers/gpu/drm/mediatek/mtk_dpi.c +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c @@ -695,10 +695,21 @@ static unsigned int mt8183_calculate_factor(int clock) return 2; } +static const u32 mt8173_output_fmts[] = { +MEDIA_BUS_FMT_RGB888_1X24, +}; + +static const u32 mt8183_output_fmts[] = { +MEDIA_BUS_FMT_RGB888_2X12_LE, +MEDIA_BUS_FMT_RGB888_2X12_BE, +}; + static const struct mtk_dpi_conf mt8173_conf = { .cal_factor = mt8173_calculate_factor, .reg_h_fre_con = 0xe0, .max_clock_khz = 300000, + .output_fmts = mt8173_output_fmts, + .num_output_fmts = ARRAY_SIZE(mt8173_output_fmts), }; static const struct mtk_dpi_conf mt2701_conf = { @@ -706,18 +717,24 @@ static const struct mtk_dpi_conf mt2701_conf = { .reg_h_fre_con = 0xb0, .edge_sel_en = true, .max_clock_khz = 150000, + .output_fmts = mt8173_output_fmts, + .num_output_fmts = ARRAY_SIZE(mt8173_output_fmts), }; static const struct mtk_dpi_conf mt8183_conf = { .cal_factor = mt8183_calculate_factor, .reg_h_fre_con = 0xe0, .max_clock_khz = 100000, + .output_fmts = mt8183_output_fmts, + .num_output_fmts = ARRAY_SIZE(mt8183_output_fmts), }; static const struct mtk_dpi_conf mt8192_conf = { .cal_factor = mt8183_calculate_factor, .reg_h_fre_con = 0xe0, .max_clock_khz = 150000, + .output_fmts = mt8173_output_fmts, + .num_output_fmts = ARRAY_SIZE(mt8173_output_fmts), }; static int mtk_dpi_probe(struct platform_device *pdev) -- 2.18.0