From patchwork Mon Oct 25 16:14:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SmFzb24tSkggTGluICjmnpfnnb/npaUp?= X-Patchwork-Id: 12582475 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39B42C433F5 for ; Mon, 25 Oct 2021 17:24:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2C6B60F6F for ; Mon, 25 Oct 2021 17:24:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F2C6B60F6F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 000EC6E0D5; Mon, 25 Oct 2021 17:24:29 +0000 (UTC) Received: from mailgw02.mediatek.com (unknown [1.203.163.81]) by gabe.freedesktop.org (Postfix) with ESMTP id E7DA66E0D5 for ; Mon, 25 Oct 2021 17:22:14 +0000 (UTC) X-UUID: d64a063f3166418085dfc46272b90698-20211026 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=WElT1Lx8LbA8icMNDDxrAWleUDCbW6En04tUFvAKKaE=; b=XLJwcASPFmt8n8yJBwHrr/R1lycEqRksKoA3+Kuug69tnU5k8ROpTQRuyynj4qkgNJCCLXiVUeEfhKfofKSm7qDSpM2l1pRTp+auCziFyL6h06jZGnKTy3jqwdeAoOfR+/vhvJrjjTkd9A2PxKUGKxNtuO/m9HA1qodtofcnTgE=; X-UUID: d64a063f3166418085dfc46272b90698-20211026 Received: from mtkexhb02.mediatek.inc [(172.27.7.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1201599510; Tue, 26 Oct 2021 00:14:36 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Tue, 26 Oct 2021 00:14:35 +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, 26 Oct 2021 00:14:35 +0800 From: jason-jh.lin To: Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , "Jassi Brar" , Yongqiang Niu CC: David Airlie , Daniel Vetter , "jason-jh . lin" , , , , , , , , Subject: [PATCH v3 0/5] CMDQ refinement of Mediatek DRM driver Date: Tue, 26 Oct 2021 00:14:29 +0800 Message-ID: <20211025161434.2641-1-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" These refinements include using standard mailbox callback interface, timeout detection, and a fixed cmdq_handle. Change in v3: 1. Revert "drm/mediatek: clear pending flag when cmdq packet is done" and add it after the CMDQ refinement pathes. 2. Change the remove of struct cmdq_client to remove the pointer of struct cmdq_client. 3. Fix pkt buf alloc once but free many times. Changes in v2: 1. Define mtk_drm_cmdq_pkt_create() and mtk_drm_cmdq_pkt_destroy() when CONFIG_MTK_CMDQ is reachable. Chun-Kuang Hu (4): drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb drm/mediatek: Remove the pointer of struct cmdq_client drm/mediatek: Detect CMDQ execution timeout drm/mediatek: Add cmdq_handle in mtk_crtc Yongqiang Niu (1): drm/mediatek: clear pending flag when cmdq packet is done. drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 171 ++++++++++++++++++++---- 1 file changed, 147 insertions(+), 24 deletions(-)