From patchwork Thu Dec 5 09:27:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bibby Hsieh X-Patchwork-Id: 11274433 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C8EE139A for ; Thu, 5 Dec 2019 09:28:09 +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 450002464F for ; Thu, 5 Dec 2019 09:28:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 450002464F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 26DE96F618; Thu, 5 Dec 2019 09:28:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by gabe.freedesktop.org (Postfix) with ESMTP id F077A6F60E for ; Thu, 5 Dec 2019 09:27:54 +0000 (UTC) X-UUID: eb2fe78382c244a4997707a24d5447dc-20191205 X-UUID: eb2fe78382c244a4997707a24d5447dc-20191205 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 661074995; Thu, 05 Dec 2019 17:27:52 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 5 Dec 2019 17:27:38 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 5 Dec 2019 17:26:51 +0800 From: Bibby Hsieh To: David Airlie , Matthias Brugger , Daniel Vetter , , Subject: [PATCH v4 0/7] drm/mediatek: fix cursor issue and apply CMDQ in MTK DRM Date: Thu, 5 Dec 2019 17:27:42 +0800 Message-ID: <20191205092749.4021-1-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-Mailman-Original-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=Mfj8Y6YTw3EDfpHo6edh0JvT0lYIs6tmM5slQk6lfwc=; b=JjEk321sniFpSc5vUqdWWbs/WGnJMADMz2LHHJFoVea00QuEk8j576j4V4gX4TvGTApMAhJ9RP7g6sAU0zDf0wPH3P+N9CFBTPfbH5LWrbfxp1cJYUnFFMneBEl54E8syywNy/xzaPVv8UOBl6Ek+9mSYGAdnhIPnLuFD/CH3rs=; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drinkcat@chromium.org, srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, tfiga@chromium.org, Thierry Reding , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The CMDQ (Command Queue) in MT8183 is used to help update all relevant display controller registers with critical time limation. This patch add cmdq interface in ddp_comp interface, let all ddp_comp interface can support cpu/cmdq function at the same time. These patches also can fixup cursor moving is not smooth when heavy load in webgl. This patch depends on ptach: add drm support for MT8183 (https://patchwork.kernel.org/cover/11121519/) support gce on mt8183 platform (https://patchwork.kernel.org/cover/11255147) drm/mediatek: Refactor plane init/check and support rotation (https://pw-emeril.freedesktop.org/series/69015/) drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane (https://lore.kernel.org/patchwork/patch/1154517/) Changes since v3: - remove redundant code and variable Changes since v2: - move some changes to another patch - disable layer in atomic_disable() Changes since v1: - remove redundant code - merge the duplicate code - use async instead of cursor Changes since v0: - remove redundant code - remove patch "drm/mediatek: fix atomic_state reference counting" After remove this patch, the issue we met before is gone. So I do not add any extra code to do something. Bibby Hsieh (7): drm/mediatek: use DRM core's atomic commit helper drm/mediatek: handle events when enabling/disabling crtc drm/mediatek: update cursors by using async atomic update drm/mediatek: disable all the planes in atomic_disable drm/mediatek: remove unused external function drm/mediatek: support CMDQ interface in ddp component drm/mediatek: apply CMDQ control flow drivers/gpu/drm/mediatek/mtk_disp_color.c | 7 +- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 67 ++++---- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 43 ++--- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 165 ++++++++++++++++---- drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 2 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 132 ++++++++++++---- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 47 +++--- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 86 +--------- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 7 - drivers/gpu/drm/mediatek/mtk_drm_plane.c | 47 ++++++ drivers/gpu/drm/mediatek/mtk_drm_plane.h | 2 + 11 files changed, 381 insertions(+), 224 deletions(-)