Message ID | 20230603105943.3042766-1-15330273260@189.cn |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1596657vqr; Sat, 3 Jun 2023 04:18:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ovW5TfurExmyLZNmpdeLc2d0EDgvpT19B2nJm15Tcpj19GHD3ScWhYhqu9aeEIqs/EQIh X-Received: by 2002:a05:6870:822a:b0:19d:cf95:ca9 with SMTP id n42-20020a056870822a00b0019dcf950ca9mr4950863oae.54.1685791091503; Sat, 03 Jun 2023 04:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685791091; cv=none; d=google.com; s=arc-20160816; b=pg2iMUgOnZo9smkjs1/cIUhpsYbu4MuxjInb6BJu1z7W57XuHengul49Y5jNnzkEW/ i2a5MBU4AnKjScOnIiLVB5mJjDMmLhdgQR98gIfhVoFQQsD4kU2H7k83DpBcgPD0wqKk PPMnYW31dlVniWyhQu7Otz68VRnJuKJ6/AQwEsBViA0xZs5kHWEUNYqKt0CIodi/K6DG VML/EqBo5PbM+P/A1aC9KfLOGs0h9Jc8D/RHXWfoWw5B6OR3v2UvaktY114Op9cPCMMz +ATvPdP1hD3umi1NxIg+f/3ufR8KzEikYsDiKBtF7EFwraGWCEIi84lHhFIQaOgYsNGp 1zig== 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:sender:hmm_source_type :hmm_attache_num:hmm_source_ip; bh=Yrux0smzsR8wO2Phcg+JxysNaBVlYiFJwwQHknAPuWY=; b=cYfrYSV/D96mQ+XY1trGrWE6kCN29sIB7gOFCdcD29/2vUcreXExO/lxI4FkwqGe9p e6lX+NAQjq26OZzwTUTvX0sgs6priT+oYfCjI/OacgewzIUKawgdWWKVrbRvuoKFkTR8 Xd76+506q4Ibyy51MM6SO9yRI2of5X6qa4J3lHNPs2qsFewg08WsdGbkfufjNNu0ly2l UQy0ZtGDZO1N1/U+11QRTHS2sirtB7jdJ1lkwRJtrcG5nLpNhsRlYxAjI6hnegNf5OST AL3V/8v7VXyXKAlddM/iAzVeVwchUBq8Y2WDPXXD7Tx9esw3IfJwhKZzAYvSwi2Xu1eN yDwA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k197-20020a633dce000000b005030eb175d1si2571684pga.107.2023.06.03.04.17.57; Sat, 03 Jun 2023 04:18:11 -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 S230294AbjFCLAM (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Sat, 3 Jun 2023 07:00:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbjFCLAK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 3 Jun 2023 07:00:10 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0C1DC133 for <linux-kernel@vger.kernel.org>; Sat, 3 Jun 2023 04:00:06 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.43:51732.1826327623 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-114.242.206.180 (unknown [10.64.8.43]) by 189.cn (HERMES) with SMTP id 24BF31002B2; Sat, 3 Jun 2023 19:00:03 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-75648544bd-7vx9t with ESMTP id 706082b12ee64e49a7c70ff2f70429ec for l.stach@pengutronix.de; Sat, 03 Jun 2023 19:00:05 CST X-Transaction-ID: 706082b12ee64e49a7c70ff2f70429ec X-Real-From: 15330273260@189.cn X-Receive-IP: 114.242.206.180 X-MEDUSA-Status: 0 Sender: 15330273260@189.cn From: Sui Jingfeng <15330273260@189.cn> To: Lucas Stach <l.stach@pengutronix.de>, Christian Gmeiner <christian.gmeiner@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Bjorn Helgaas <bhelgaas@google.com> Cc: linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Sui Jingfeng <suijingfeng@loongson.cn> Subject: [PATCH v7 0/7] drm/etnaviv: add pci device driver support Date: Sat, 3 Jun 2023 18:59:36 +0800 Message-Id: <20230603105943.3042766-1-15330273260@189.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-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767680079303041975?= X-GMAIL-MSGID: =?utf-8?q?1767680079303041975?= |
Series |
drm/etnaviv: add pci device driver support
|
|
Message
Sui Jingfeng
June 3, 2023, 10:59 a.m. UTC
From: Sui Jingfeng <suijingfeng@loongson.cn>
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
v7:
* Add a separate patch for the platform driver rearrangement (Bjorn)
* Switch to runtime check if the GPU is dma coherent or not (Lucas)
* Add ETNAVIV_PARAM_GPU_COHERENT to allow userspace to query (Lucas)
* Remove etnaviv_gpu.no_clk member (Lucas)
* Various Typos and coding style fixed (Bjorn)
Sui Jingfeng (7):
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: allow bypass component framework
drm/etnaviv: add driver support for the PCI devices
drm/etnaviv: add support for the dma coherent device
drivers/gpu/drm/etnaviv/Kconfig | 9 +
drivers/gpu/drm/etnaviv/Makefile | 2 +
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 228 +++++++++++++++-----
drivers/gpu/drm/etnaviv/etnaviv_drv.h | 10 +
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 22 +-
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 7 +-
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 170 ++++++++++-----
drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 9 +
drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c | 75 +++++++
drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h | 9 +
include/uapi/drm/etnaviv_drm.h | 1 +
11 files changed, 422 insertions(+), 120 deletions(-)
create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c
create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h
Comments
Hi, Sorry for sending duplicated patches. Please don't get angry by me. I'm just sending a patch set, which contain 7 patch. The command is as following: git send-email V7/ --to "Lucas Stach <l.stach@pengutronix.de>" --to "Christian Gmeiner <christian.gmeiner@gmail.com>" --to "Daniel Vetter <daniel@ffwll.ch>" --to "Bjorn Helgaas <bhelgaas@google.com>" --cc "linux-kernel@vger.kernel.org" --cc "etnaviv@lists.freedesktop.org" --cc "dri-devel@lists.freedesktop.org" --cc "loongson-kernel@lists.loongnix.cn" After run the above about command with my company's mailbox, the termial report "Too many commands" which cause the last few patch of the whole patch set did not get send out(get lost). Then, I changed to another mail to send the patch with the same command, then its works finally. Please don't get angry by me. Thanks. On 2023/6/3 18:59, Sui Jingfeng wrote: > From: Sui Jingfeng <suijingfeng@loongson.cn> > > 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 > v7: > * Add a separate patch for the platform driver rearrangement (Bjorn) > * Switch to runtime check if the GPU is dma coherent or not (Lucas) > * Add ETNAVIV_PARAM_GPU_COHERENT to allow userspace to query (Lucas) > * Remove etnaviv_gpu.no_clk member (Lucas) > * Various Typos and coding style fixed (Bjorn) > > Sui Jingfeng (7): > 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: allow bypass component framework > drm/etnaviv: add driver support for the PCI devices > drm/etnaviv: add support for the dma coherent device > > drivers/gpu/drm/etnaviv/Kconfig | 9 + > drivers/gpu/drm/etnaviv/Makefile | 2 + > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 228 +++++++++++++++----- > drivers/gpu/drm/etnaviv/etnaviv_drv.h | 10 + > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 22 +- > drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 7 +- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 170 ++++++++++----- > drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 9 + > drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c | 75 +++++++ > drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h | 9 + > include/uapi/drm/etnaviv_drm.h | 1 + > 11 files changed, 422 insertions(+), 120 deletions(-) > create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c > create mode 100644 drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h >