Message ID | 20230329205129.1513734-1-15330273260@189.cn |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp691440vqo; Wed, 29 Mar 2023 14:15:55 -0700 (PDT) X-Google-Smtp-Source: AK7set/xYUym0GpBHjo6OwVdmVbQ/EYFvNVECj4hcv2OwUT+iPz5Ot8vroaT+mj542ocMVra90ed X-Received: by 2002:a05:6a20:4fa7:b0:d8:ad79:e517 with SMTP id gh39-20020a056a204fa700b000d8ad79e517mr16656292pzb.30.1680124555617; Wed, 29 Mar 2023 14:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680124555; cv=none; d=google.com; s=arc-20160816; b=x2FFbZHcIKpWSFkvuNw7sXlcvh2ohAQBNLHM8aEa5qdFT1CTPMjzQ2jA+QEfCT5352 WSJ9yG94TTFGB/PuglkF7tmvlO1dQioPUshsUZZFq8qUi6LkrZKARX3+npIAIUrehqd3 H74ZV2RaoslxsorCNmmToSze0MdMocsVulenZ+QtXq9VUbKiwHxzez6KCFdpSKHGHntv nacjH5lO41TsTuEBb/HhpsJOaWXXm4F/yGbYXqU2mCskqaHz5lABrZKpXMiKVUg1Fzur CRb4HB4+bIS6LgrzY4INgZ+j1bhva++3kgihr2LjZe2+DV1drGhv1iyfQe7TlDo85oyU z0bQ== 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=tQlN7LpkWClON5wpkhglvz1veVH290ULL3ZzP6TsEUI=; b=MxJPwH69QH3vt5pgMaNIFnMkEPLXVMQYe9MSt3r2JDVd5uTVmUB+hQTXDPyccNMFPG gV04TalAOdT9k1QqaEnHQIm+N5A3I76eqkKGv+dMZ7FOzoGKA6pmYndskDbTdwHCc9Ih 0dAeVbvy/6xlaBG2mNE/1Riv4svV1l2Edn2+O2WR1GPzG5C/mYHDWQgg6ZyUag0Pof9I orNv0QZi6B71s1AP4i1/JGvbWGcgLNEMK76OUpisLQB+F4N3vqCqOfo03R3N/W2mjsRu iwxQ/iK5fiE3c4MG2S6drUi0gOCn/acbZSKRqmB9QEphvG38+J+hspQj7NyjdtoReRiJ Kshw== 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 d6-20020a631d46000000b0050bf5a814a8si23581174pgm.403.2023.03.29.14.15.40; Wed, 29 Mar 2023 14:15:55 -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 S229832AbjC2Uvt (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Wed, 29 Mar 2023 16:51:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjC2Uvp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Mar 2023 16:51:45 -0400 Received: from 189.cn (ptr.189.cn [183.61.185.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CAD834C13 for <linux-kernel@vger.kernel.org>; Wed, 29 Mar 2023 13:51:43 -0700 (PDT) HMM_SOURCE_IP: 10.64.8.43:36106.2084148567 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 0E05D1002AA; Thu, 30 Mar 2023 04:51:41 +0800 (CST) Received: from ([114.242.206.180]) by gateway-151646-dep-7b48884fd-tj646 with ESMTP id f17e6a1ddc374f8faad910570955c89e for l.stach@pengutronix.de; Thu, 30 Mar 2023 04:51:42 CST X-Transaction-ID: f17e6a1ddc374f8faad910570955c89e 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>, Russell King <linux+etnaviv@armlinux.org.uk>, Christian Gmeiner <christian.gmeiner@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Li Yi <liyi@loongson.cn> Cc: linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Sui Jingfeng <suijingfeng@loongson.cn> Subject: [PATCH v3 0/6] drm/etnaviv: add pci device driver support Date: Thu, 30 Mar 2023 04:51:23 +0800 Message-Id: <20230329205129.1513734-1-15330273260@189.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,FROM_LOCAL_DIGITS,FROM_LOCAL_HEX,SPF_HELO_PASS,SPF_PASS 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?1761738286107076271?= X-GMAIL-MSGID: =?utf-8?q?1761738286107076271?= |
Series |
drm/etnaviv: add pci device driver support
|
|
Message
Sui Jingfeng
March 29, 2023, 8:51 p.m. UTC
From: Sui Jingfeng <suijingfeng@loongson.cn>
There is a Vivante GC1000(v5037) in LS2K1000 and LS7A1000, the gpu is a
PCI device and it has 2D and 3D core in the same gpu device. Therefore,
this patch trying to add PCI device driver support on the great works
already done by etnaviv folks.
LS7A1000 is a bridge chip for LS3A5000(4 core 2.5Ghz loongarch cpu) and
LS3A4000(4 core 1.8gHz Mips64r5 cpu), While LS2K1000 is just a slow SoC
(2 core 1.0Ghz mips64r2). Loongson CPU support cached coherent caching
mode, both the GPU and DC device snoop CPU cache by default firmware
configuration.
Sui Jingfeng (6):
drm/etnaviv: add a dedicate function to register irq handler for the
gpu
drm/etnaviv: add a dedicate function to get clock
drm/etnaviv: add dedicate functions to create and destroy platform
device
drm/etnaviv: add helpers for private data construction and destruction
drm/etnaviv: expand driver support for the pci devices
drm/etnaviv: allow usperspace create cached coherent bo
drivers/gpu/drm/etnaviv/Makefile | 1 +
drivers/gpu/drm/etnaviv/etnaviv_drv.c | 183 +++++++++++++------
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 | 88 ++++++++++
drivers/gpu/drm/etnaviv/etnaviv_pci_drv.h | 10 ++
include/uapi/drm/etnaviv_drm.h | 11 +-
10 files changed, 415 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