From patchwork Thu Feb 15 10:11:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?U2hhd24gU3VuZyAo5a6L5a2d6KyZKQ==?= X-Patchwork-Id: 20420 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp292874dyb; Thu, 15 Feb 2024 02:12:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVD7UERMAcLXEooKa2zYrFFASqnYCEa/INBt8Vvhzj3wHQFZjS6bQxStUb4FDjBZAhZByoG03/m8ttM0BmrksEQCm/NRQ== X-Google-Smtp-Source: AGHT+IFzxeShcx9k7qWXIufpUkfDZmNgUpA+iYcwVLdSKV7YlyMEgpJXRHkL8tPxPBJcJt4GCEux X-Received: by 2002:a05:6512:3710:b0:511:86c9:9c81 with SMTP id z16-20020a056512371000b0051186c99c81mr1087043lfr.43.1707991941288; Thu, 15 Feb 2024 02:12:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707991941; cv=pass; d=google.com; s=arc-20160816; b=N8ZTuXj36Mnu+1tyNGmIJZ6Vw4t3Apf9XEcvaacz33LSU9ME0D7GNSZlv7LVNgmfxE zC074sEH3oWH2SRYqpSyg7DwSBkMUmOlPzebT5TLla4EJH9U35FePsv6g0PYmDlxSVEp 8r9GgcR6o6zH6x1Iu/U7PFTFvpEquGtdNFywD8unKPQLxeARbYhdQ5TNMnFYJU5YtS4G G7LHuvGqsyuCKY/ew43WqtEGK09cYWPewxWjplf65T90AZkHZZkKMhuswskWLm5m119l KkV7Zq7dxc3rjyY4olUTnjHzFcbP7zrc2NOmfT0JyOPJhmRBw5bXZJFguL9zZbzalq12 uV+w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=XOJkWQuYj8nCONUrUw96w7cCOMuC7FXFo4cEfRB5HGg=; fh=Wq0/RrkVdfhvfiZbv7wnNC8K9kwvrgONKlU0Yf3EnM0=; b=u5aB61uoz0ZQf+J+biUR/vqia5kmzs06xlEzZEt7032aUL+ghKkHcZ64ryFRAX9mYE zc6SqO+ukwtMScZk/uLKG9qAQKUuFHbsqFD0ZAEfqsoQwhDc5xEk7dLo8I4uVy2BBNw9 dueLlkjG82Fyikw/BR7E22eLxqOBHBQWnuxejoe6MqtNpHKH/rRb1CezCvnDsDueF6Nx pvX6ahfPc71x8GzYZW3vQPMeBmPwKSDu2L7lDNbCKrRRHshoGnDBpEq5UqD1lAP7q9zF 3arl2OxLLkN/J3sZH8DPawKjFO95mLV/2y9xVAbRX67BBbud+t05h6WEnf7pyjvJ1glQ dBYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oMbC1yy+; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-66596-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66596-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g14-20020a1709061c8e00b00a3d6c76bfd6si472631ejh.864.2024.02.15.02.12.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 02:12:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66596-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=oMbC1yy+; arc=pass (i=1 spf=pass spfdomain=mediatek.com dkim=pass dkdomain=mediatek.com dmarc=pass fromdomain=mediatek.com); spf=pass (google.com: domain of linux-kernel+bounces-66596-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66596-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 208131F244D4 for ; Thu, 15 Feb 2024 10:12:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 337FC69E17; Thu, 15 Feb 2024 10:11:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="oMbC1yy+" Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A87F469D0A for ; Thu, 15 Feb 2024 10:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707991888; cv=none; b=Mp1iwC7kZ+u4gr4I/b7/uVqkF1aEduXg3XQpZJPEWd81uNijNEELD3zY44QvVYc5OOlkPxzBNB7RmAERBBGIAGn73KtqLuuYSEpM+bfOoabq6VXwT8y7205IfPvCRQfY5eXcdU1JUOErA5xSIgAIZvOQo6X4pqvGP85zItJ9ZKw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707991888; c=relaxed/simple; bh=NhFPS1m85CKoyLdaTCdWnl7gsjOetzEaQ+SLACmYOIY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=LXC5duG86PtpvjnbbESEuToLuvjBjrK3inLzAxOYxkP496ihHWZfxlaKRwm4RrVqiJoeFUGVRLRI//2YT11kA+RRkLUkKfbtpnac5Fo+7kuEiXTn0SKGkouQyQzdwG1CrOxjvNcOZeGHGWE82pap3tUx4MZ0bHZVjGieWYCapLs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=oMbC1yy+; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com X-UUID: 91e8cbc2cbea11ee9e680517dc993faa-20240215 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=XOJkWQuYj8nCONUrUw96w7cCOMuC7FXFo4cEfRB5HGg=; b=oMbC1yy+BJvyJ2JVBRW60MimjBV9AI17enxm+I8CJruSociS50XHneIfR2IUNm+7+cUZ1uvG7F8eJkRwmchjkmecvq9tGM/d68Epqd0gORkQ/xZnYrC/4m09WXABpUQh6RL/cgU7V2ANi1sPbDl0k+pSFIJtEqGqFMJED/B+okQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.37,REQID:dfc447f9-b73a-44a7-bb09-241cf3ac133c,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6f543d0,CLOUDID:4d636b80-4f93-4875-95e7-8c66ea833d57,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,RT: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 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 91e8cbc2cbea11ee9e680517dc993faa-20240215 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 21792639; Thu, 15 Feb 2024 18:11:22 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) 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; Thu, 15 Feb 2024 18:11:21 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 15 Feb 2024 18:11:21 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , Chun-Kuang Hu CC: Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Bibby Hsieh , CK Hu , Sean Paul , Fei Shao , Jason Chen , "Nancy . Lin" , , , , , Hsiao Chien Sung Subject: [PATCH v5 00/13] Support IGT in display driver Date: Thu, 15 Feb 2024 18:11:06 +0800 Message-ID: <20240215101119.12629-1-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MTK: N X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790959357897841749 X-GMAIL-MSGID: 1790959357897841749 From: Hsiao Chien Sung This series is based on 20240207021510.24035-2-shawn.sung@mediatek.com. This series adds support for running IGT (Intel GPU Tool) tests with MediaTek display driver. The following changes will be applied: 1. Add a new API for creating GCE thread loop to retrieve CRCs from the hardware component 2. Support hardware CRC calculation in both VDOSYS0 and VDOSYS1 3. Support alpha blending in both VDOSYS0 and VDOSYS1 Changes in v5: - Add more descriptions to the codes - Add DRM mode configs to the driver data - Squash and rearrange the commits Changes in v4: - Separate the patch into smaller ones - Change the title of some patches - Revert the changes that are not related to the series Changes in v3: - Modify the dt-binding document of Mediatek OVL - Set DRM mode configs accroding to the hardware capabilities - Replace cmdq_pkt_jump_absolute() with cmdq_pkt_jump() Changes in v2: - Simplify CMDQ by adding commands that are currently used only - Integrate CRC related codes into new APIs for Mixer and OVL to reuse - Add CPU version CRC retrieval when CMDQ is disabled Hsiao Chien Sung (13): soc: mediatek: Disable 9-bit alpha in ETHDR drm/mediatek: Add OVL compatible name for MT8195 drm/mediatek: Add missing plane settings when async update drm/mediatek: Fix errors when reporting rotation capability drm/mediatek: Set DRM mode configs accordingly drm/mediatek: Turn off the layers with zero width or height drm/mediatek: Support alpha blending in display driver drm/mediatek: Support alpha blending in OVL drm/mediatek: Support alpha blending in Mixer drm/mediatek: Support CRC in display driver drm/mediatek: Support CRC in OVL drm/mediatek: Support CRC in OVL adaptor drm/mediatek: Add comments for the structures drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 320 ++++++++++++++++-- .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 32 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 261 +++++++++++++- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 39 +++ drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 7 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 35 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 27 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.h | 20 ++ drivers/gpu/drm/mediatek/mtk_drm_plane.c | 15 +- drivers/gpu/drm/mediatek/mtk_ethdr.c | 106 +++++- drivers/gpu/drm/mediatek/mtk_ethdr.h | 5 + drivers/soc/mediatek/mtk-mmsys.c | 1 + 13 files changed, 828 insertions(+), 47 deletions(-) --- 2.18.0