Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1987324imu; Wed, 28 Nov 2018 19:39:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/XYSt2CCggUd+tNKZdXhdwHGVJrzu2UQf8e7jxOnBnd8naHBNGjYyxiEcL0GDMwZCfXe7du X-Received: by 2002:a63:e20a:: with SMTP id q10mr34569487pgh.206.1543462785298; Wed, 28 Nov 2018 19:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543462785; cv=none; d=google.com; s=arc-20160816; b=gHZZRIk4Tdl5vV0GHBKueeGibyQHC21SzL1tRuTO2Mqt4FE5vl9TwXuUMVpQTJ4iEa GyunzFAiNt+6n+M4UFxKrQBEg2xe+JV/JRll9e1c+gci5SJj8HSa/wDUnpZiLAKoyEib nh2r4VyvrocVrcYXF6Sa3X0R/G8WF7BFwBzF3D4r0zlAtK9cks8UJiSDGmnjPOmWGJzA sKdbrVzGxxwmXnRE47AXl3F0dBLt75XNdbSMHbGBI7Ln+NCHp8afZ7BY5cJrAgYoSkw1 zBipRuL7MGhPQSg+cQlqGM+dlEfV7puu3tDfdZP8NLEa9V/WzAuKu1pnUz0xYLWdLF9i NYLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=QlhcRCu6DrbAdA4A+jY0mZicfLrzKQuDSP3JkohIin4=; b=LdcOsUdgZnSYItH+brizTJl0D1UMvgxCk5RzsapHtSYsLTXbqYVQHEVuJHRjEKbAdX ZaNUwx5MBNzUaoDAZIKMSKJK0e1BVTBSsnNavxF5gYQqHrh6VE4y9wpTGb6P6AWkspQe /0JJiy7rT6mDbGPRkl2yGFtCnG4YGzvSdSGAEspnFmBL2jJLD5QuPRfAAWJIWOqRnO/T 8vDhlHFEC5IhRCaGHRHi5yJCmX9uu70qBLeoMaPb/KK5+F8B+HfMSPiYOlLMl5twEo07 6icCLQkkClgCU5/sk9u8x8JlqXCL1EZ9c9d6sHNkJG/DA654vV7rnMRPTHIA+l8lqdPK Fp8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si777644plc.0.2018.11.28.19.39.30; Wed, 28 Nov 2018 19:39:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbeK2Olb (ORCPT + 99 others); Thu, 29 Nov 2018 09:41:31 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:18009 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727098AbeK2Olb (ORCPT ); Thu, 29 Nov 2018 09:41:31 -0500 X-UUID: dc90f1dffdc94b1ba7552a14c28daff8-20181129 X-UUID: dc90f1dffdc94b1ba7552a14c28daff8-20181129 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 578699797; Thu, 29 Nov 2018 11:37:27 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 29 Nov 2018 11:37:19 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 29 Nov 2018 11:37:18 +0800 From: Houlong Wei To: Matthias Brugger CC: Jassi Brar , Rob Herring , Daniel Kurtz , Sascha Hauer , , , , , , Sascha Hauer , "Philipp Zabel" , Nicolas Boichat , "CK HU" , Bibby Hsieh , YT Shen , Daoyuan Huang , "Jiaguang Zhang" , Dennis-YC Hsieh , Monica Wang , Houlong Wei , HS Liao , , , Subject: [PATCH v27 0/2] MediaTek MT8173 CMDQ support Date: Thu, 29 Nov 2018 11:37:07 +0800 Message-ID: <1543462629-32746-1-git-send-email-houlong.wei@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is Mediatek MT8173 Command Queue(CMDQ) driver. The CMDQ is used to help write registers with critical time limitation, such as updating display configuration during the vblank. It controls Global Command Engine (GCE) hardware to achieve this requirement. Changes since v26: -rebase on v4.20-rc1 -add comment to explain why cmdq_buf_size is increased in case of appending command failure Changes since v25: -Replace WARN_ON() with WARN_ONCE() and add debug information. Changes since v24: -move WARN_ON() into cmdq_pkt_append_command() from outside Changes since v23: -rebase on v4.19-rc1 -revise return value of cmdq_mbox_create() -revise cmdq_pkt_create() -add MODULE_LICENSE() for mtk-cmdq-helper.c -adjust functions order in mtk-cmdq.h Changes since v22: -remove properties 'timeout' and 'thread-num' from device tree -move timer from CMDQ driver to CMDQ helper -move dma unmap from CMDQ driver to CMDQ helper -config thread number in CMDQ match table -remove reallocate mechanism and let client specify the cmdq buffer size -let client specify the timeout time Changes since v21: -rebase on v4.18-rc1 -remove subsys code and event id definition from mtk-cmdq-helper.c -add mt8173-gce.h to define the subsys code and envent id Changes since v20: -rebase on v4.15-rc1 -move dma_map_single outside of spinlock Changes since v19: -rebase to v4.10-rc2 Houlong Wei (2): arm64: dts: mt8173: Add GCE node soc: mediatek: Add Mediatek CMDQ helper arch/arm64/boot/dts/mediatek/mt8173.dtsi | 10 + drivers/soc/mediatek/Kconfig | 12 + drivers/soc/mediatek/Makefile | 1 + drivers/soc/mediatek/mtk-cmdq-helper.c | 300 +++++++++++++++++++++++ include/linux/soc/mediatek/mtk-cmdq.h | 133 ++++++++++ 5 files changed, 456 insertions(+) create mode 100644 drivers/soc/mediatek/mtk-cmdq-helper.c create mode 100644 include/linux/soc/mediatek/mtk-cmdq.h -- 2.19.1