Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4759492rwd; Tue, 30 May 2023 09:27:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Vv+0JwTHSXM9u7VD0jsWR/B/YO7oIPIzExIoh2Vo8LkhXK3nIxTRkE//UoE98EGRxwbWC X-Received: by 2002:a17:902:8d8f:b0:1af:9c18:a160 with SMTP id v15-20020a1709028d8f00b001af9c18a160mr2449547plo.17.1685464054316; Tue, 30 May 2023 09:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685464054; cv=none; d=google.com; s=arc-20160816; b=gXnkB2eC/z0PxVsFFvTklnVabjzMg5XbPBXJyjMwL/bsylY5X1wRM2Rb/sHZoj01rq SaG3Ex8DpEMcxrV7DQ4TXsj0e14fHkw0i8brw2VWIE8AQE1cW4C6Vfz/zUOKX8zbkuZm B2VF2Ysu3zZM3O7zeTCDH4W37liHWgs0NAXmpGzj13dGS4in291opeRimhzQDkPLlzv4 LFKzI0psnozxtYTEi+N2BMNlaU75erMGLMWi2vgiDMCDcqGnTRW3cyZl9jlKjnVIRffj EjsrQn4UKz9OSrOqdfAL90dnRd/oqJCVwo2KntbmM0MhD+wWbfCbDpY6SVnTcV/golOV ovjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=wepiGWgqOQXqtIagVdfQn4tRDBFcz2XhJm8B/l0Bmtk=; b=Ou/jClWewoKOG4BniffXUAHTcEcuHEGdBUeDX/B2xSQ1BBiSAVy72ue42tyH5pNVNJ VgDEi2xPcxL+uXpE0ToD6IHsYN3y6EItzLvFUuxs+QMEQ13F0Wku74IyWHPK7jtHzPQa x9aRh0I1V07D7dBVTWIYrlFN2hI8NdUYQvRWqIxkeyz1TBpAPEei0sM9WNf8xvY2O7ag umLTt6m8EXWIBYeNetadBBD/u2YPhh7+hlYB/H/bSJ7gOfcbCEZI//iCgiINwsF6CRnz gpKMoQNnmW3h6guIoJq5+NdpXEZqkWFDmFbvMtzGs5oxC4l803PQ2QGH2Ac23BbXJTkA C/zQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d22-20020a170902b71600b001b03eebfe25si1310175pls.465.2023.05.30.09.27.19; Tue, 30 May 2023 09:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233027AbjE3QG6 (ORCPT + 99 others); Tue, 30 May 2023 12:06:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbjE3QGx (ORCPT ); Tue, 30 May 2023 12:06:53 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE315102 for ; Tue, 30 May 2023 09:06:45 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Bx7OoTH3ZkFKYCAA--.1547S3; Wed, 31 May 2023 00:06:43 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxqrYTH3Zket+AAA--.13773S2; Wed, 31 May 2023 00:06:43 +0800 (CST) From: Sui Jingfeng To: Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, loongson-kernel@lists.loongnix.cn Subject: [PATCH v6 0/6] drm/etnaviv: add pci device driver support Date: Wed, 31 May 2023 00:06:37 +0800 Message-Id: <20230530160643.2344551-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8CxqrYTH3Zket+AAA--.13773S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFyUur4xWryxGF1DtFy3CFg_yoW8Xry5pF 47JFyYyry0vrW7Kw17AFn8XFy3G3WxWF9Yk3srt3sI9w45Ar1jvryDKa15Jr9xJr1fJr42 qrnIkry3WF17ArJanT9S1TB71UUUU1UqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4j6r4UJwAa w2AFwI0_Jw0_GFyle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44 I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Wrv_ZF1lYx0Ex4A2 jsIE14v26F4j6r4UJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_Jw0_GFyl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_Jw0_GFylx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ Ar0_tr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26F4j6r4UJwCI42IY6xAIw20EY4v20xvaj4 0_Jr0_JF4lIxAIcVC2z280aVAFwI0_Cr0_Gr1UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_ Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07jDl1kUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is a Vivante GC1000 (v5037) in LS2K1000 and LS7A1000, this GPU is a PCI device, and it has 2D and 3D cores in the same core. Thus, this patch set is trying to add PCI device driver support to etnaviv. v6: * Fix build issue on system without CONFIG_PCI enabled Sui Jingfeng (6): drm/etnaviv: add a dedicated function to register an irq handler drm/etnaviv: add a dedicated function to get various clocks drm/etnaviv: add dedicated functions to create and destroy platform devices drm/etnaviv: add helpers for private data construction and destruction drm/etnaviv: add driver support for the PCI devices drm/etnaviv: allow usperspace create cached coherent bo drivers/gpu/drm/etnaviv/Kconfig | 9 + drivers/gpu/drm/etnaviv/Makefile | 2 + drivers/gpu/drm/etnaviv/etnaviv_drv.c | 190 ++++++++++++++------ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 7 + drivers/gpu/drm/etnaviv/etnaviv_gem.c | 22 ++- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 9 +- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 185 +++++++++++++------ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 13 ++ drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c | 87 +++++++++ drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h | 12 ++ include/uapi/drm/etnaviv_drm.h | 11 +- 11 files changed, 433 insertions(+), 114 deletions(-) create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h -- 2.25.1