Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3370605rwd; Sat, 3 Jun 2023 04:12:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ52hbWipoaYGoTLqXQ2X8dWxiMWio+TsbPY1ciR3diKa4dKHnmDNJmGms/opejqfN2mfHMA X-Received: by 2002:a05:6808:424d:b0:39a:73d6:f34b with SMTP id dp13-20020a056808424d00b0039a73d6f34bmr2966725oib.11.1685790773408; Sat, 03 Jun 2023 04:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685790773; cv=none; d=google.com; s=arc-20160816; b=eR+W85vPLl5zirORxQFLvZhacDYMAa42t3dMhcZi7qSKVl2DmZY4VkZ4cd/SU/8RXE LdbRbSoeQLoUqg+vEXOB1T4tmwivO0iMoj6/72j/xxnrBx4KX7CDk5mmPflDWGJ26ELi yKKHEcDAOGfiXsrkMKonm4d+iyV/6RPWJEr+/S1gbKRFWknWWkP7KYQEveHOjSnRd+YL uOYmrDiQv5uVIsCHyBeOpMOOcs3V+0JtojyAE8fW/sDL9JfKhmWJssQww4cao7DbfCkk AwMAiav//fyIULF2hWUGYb/CF/fl5S/rz/Y20Vd9spMkyssGLCsNAde95sGKh5+WXlpR fJ5w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nh2-20020a17090b364200b002562c9b3e2dsi4196217pjb.96.2023.06.03.04.12.36; Sat, 03 Jun 2023 04:12:53 -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 S230121AbjFCLAL (ORCPT + 99 others); Sat, 3 Jun 2023 07:00:11 -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 ); 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 ; 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 , Christian Gmeiner , Daniel Vetter , Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Sui Jingfeng 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: X-Mailing-List: linux-kernel@vger.kernel.org From: Sui Jingfeng 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 -- 2.25.1