Message ID | 20230918084207.23604-6-shawn.sung@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp2519917vqi; Mon, 18 Sep 2023 02:06:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEv/+uWKWDzgKSwpcjrOasj9ENzee8mSWPiN+aBx11lsCLBwkjKPDFgEpB/jg5aFPxMVCmS X-Received: by 2002:a05:6a00:1acd:b0:68b:e29c:b61 with SMTP id f13-20020a056a001acd00b0068be29c0b61mr8282714pfv.19.1695027990238; Mon, 18 Sep 2023 02:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695027990; cv=none; d=google.com; s=arc-20160816; b=nx/WhnRHZ0/jHIdHlJwfX6GtIWRPM8o4LNuXZlGiE2hvvfiFRM1vsnTgk5+vPu40cQ +IhmZ+6duuW4vc5XwKCJijr+1FV7Z7WFlxZJdXWX63UWBAHSUyBKIDydr/Y6EuFrlrTF gaboURYgfoeg8t4hAv0EeYVaw95zbqHk033BjpN/XvtHxBdQce8VImxeBiOmiZ/g9DvK ES6rS67unL+hs9k7B5QbmXuoKd517jt7qV6LiKzSGGJqfpJ0aDJW3d0o5MNwyEL0XhUv UTlYdr2VdWgTZHzOhXPm1lwI5T6OBua7nTCS378OsouKcp/41XtNRZc/4IHDd89BuRia c56A== 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:dkim-signature; bh=72eVayWVp8rYcnVKWBje8fRu/Ay09M8ccvdljh1dMk4=; fh=zj/1xCYHHy/mPJj+kFbga0zHrcDizctVV21xrPlQjYA=; b=KOVmRh0OQcVFE6KReHGTLoQFK0rjyteeMzlnpaPvThi/pFQ+QGvFUqkhClG6I4ZCfb x5UDA8m23fZABZH2RHZAp6wStkjCwegyxErv7ukrSy2TcmbmGmdl1Og5zObwmW3Dq2f7 rXa983pSZZ/IZufgjwLnP1Pf7tYb5eVBUBHpPyaxWK4VpVBbRzQdTQVIurDQ9LGP4QLl 0tcCERFO35VBsh2d5aRGWOXiIheE8je6Ptpely9sxmZ1p278v9ulkxmQgnM3AQlfXKpJ UzYQGs0GbIyUHWCe+nJDQ3waiJ3j/4WUH8DooaoxInP74jb6nWmjNcCAlk7OfQ7IVgU5 QxyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PqMdtJYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id a14-20020a63e84e000000b00577461b010fsi7865592pgk.685.2023.09.18.02.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 02:06:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=PqMdtJYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 56C288108355; Mon, 18 Sep 2023 01:43:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240812AbjIRInA (ORCPT <rfc822;kernel.ruili@gmail.com> + 27 others); Mon, 18 Sep 2023 04:43:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240716AbjIRImb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 18 Sep 2023 04:42:31 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 687349D for <linux-kernel@vger.kernel.org>; Mon, 18 Sep 2023 01:42:18 -0700 (PDT) X-UUID: 42b1b1b055ff11ee8051498923ad61e6-20230918 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=72eVayWVp8rYcnVKWBje8fRu/Ay09M8ccvdljh1dMk4=; b=PqMdtJYmOh+fNAqeSrd+qfoLPzpkAGLCG7KwFBPibIdOrkUQ5zFzhwRfmkVnS88PCH6di6ZbIS/cbyKt2IQrsvQqAfhFP88KPg29yLRTVyBDiPHCeVUP4YhL6e70SfIsw8gMooQ7A4gnnKIwfJr2dvSCoh6esufmXJk0zXo0jwI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.31,REQID:d9f6cd49-985a-4f04-b2e3-f942c3bafced,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:0ad78a4,CLOUDID:99efd2ef-9a6e-4c39-b73e-f2bc08ca3dc5,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 42b1b1b055ff11ee8051498923ad61e6-20230918 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from <shawn.sung@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 115661417; Mon, 18 Sep 2023 16:42:11 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 18 Sep 2023 16:42:11 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 18 Sep 2023 16:42:11 +0800 From: Hsiao Chien Sung <shawn.sung@mediatek.com> To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Chun-Kuang Hu <chunkuang.hu@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com> CC: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de>, Chen-Yu Tsai <wenst@chromium.org>, CK Hu <ck.hu@mediatek.com>, <dri-devel@lists.freedesktop.org>, <linux-mediatek@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, Hsiao Chien Sung <shawn.sung@mediatek.com> Subject: [PATCH v2 05/11] drm/mediatek: Adjust DRM mode configs for IGT Date: Mon, 18 Sep 2023 16:42:01 +0800 Message-ID: <20230918084207.23604-6-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230918084207.23604-1-shawn.sung@mediatek.com> References: <20230918084207.23604-1-shawn.sung@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 18 Sep 2023 01:43:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777365670163494613 X-GMAIL-MSGID: 1777365670163494613 |
Series |
Support IGT in display driver
|
|
Commit Message
Shawn Sung (宋孝謙)
Sept. 18, 2023, 8:42 a.m. UTC
IGT (Intel GPU Tool) could commit the following planes
during the test:
kms_plane:
The sub-tests pixel-format-* will create planes with
size of 1 or 4512 pixels, these size will be rejected
by the original mode configs.
Adjust minimum and maximum value of both plane width
and height.
kms_cursor_crc:
If cursor_width and cursor_height is not defined,
IGT uses min_width and min_height as the limitation
when creating cursor plane so sub-tests like
cursor-rapid-movement will be skipped.
Set cursor_width and cursor_height to 512 pixel can
solve the problem.
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
---
drivers/gpu/drm/mediatek/mtk_drm_drv.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Comments
Hi, Hsiao-chien: On Mon, 2023-09-18 at 16:42 +0800, Hsiao Chien Sung wrote: > IGT (Intel GPU Tool) could commit the following planes > during the test: > > kms_plane: > > The sub-tests pixel-format-* will create planes with > size of 1 or 4512 pixels, these size will be rejected > by the original mode configs. > Adjust minimum and maximum value of both plane width > and height. > > kms_cursor_crc: > > If cursor_width and cursor_height is not defined, > IGT uses min_width and min_height as the limitation > when creating cursor plane so sub-tests like > cursor-rapid-movement will be skipped. > Set cursor_width and cursor_height to 512 pixel can > solve the problem. > > Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com> > --- > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c > b/drivers/gpu/drm/mediatek/mtk_drm_drv.c > index 7759a06e5c0e..62581b2a470b 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c > @@ -429,16 +429,18 @@ static int mtk_drm_kms_init(struct drm_device > *drm) > if (ret) > goto put_mutex_dev; > > - drm->mode_config.min_width = 64; > - drm->mode_config.min_height = 64; > + drm->mode_config.min_width = 1; > + drm->mode_config.min_height = 1; > > /* > * set max width and height as default value(4096x4096). > * this value would be used to check framebuffer size > limitation > * at drm_mode_addfb(). > */ > - drm->mode_config.max_width = 4096; > - drm->mode_config.max_height = 4096; > + drm->mode_config.max_width = 8191; > + drm->mode_config.max_height = 8191; > + drm->mode_config.cursor_width = 512; > + drm->mode_config.cursor_height = 512; All the setting depend on the hardware limitation. This driver support mt8173, mt8183, .... Please make sure all SoC support this modification. Or you just modify this for the SoC you have test. I do not like the title mention about IGT. I think this title should be "align mode_config to hardware limitation". Regards, CK > drm->mode_config.funcs = &mtk_drm_mode_config_funcs; > drm->mode_config.helper_private = &mtk_drm_mode_config_helpers; >
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 7759a06e5c0e..62581b2a470b 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -429,16 +429,18 @@ static int mtk_drm_kms_init(struct drm_device *drm) if (ret) goto put_mutex_dev; - drm->mode_config.min_width = 64; - drm->mode_config.min_height = 64; + drm->mode_config.min_width = 1; + drm->mode_config.min_height = 1; /* * set max width and height as default value(4096x4096). * this value would be used to check framebuffer size limitation * at drm_mode_addfb(). */ - drm->mode_config.max_width = 4096; - drm->mode_config.max_height = 4096; + drm->mode_config.max_width = 8191; + drm->mode_config.max_height = 8191; + drm->mode_config.cursor_width = 512; + drm->mode_config.cursor_height = 512; drm->mode_config.funcs = &mtk_drm_mode_config_funcs; drm->mode_config.helper_private = &mtk_drm_mode_config_helpers;