Message ID | 20230603104850.3042011-1-suijingfeng@loongson.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 k13csp1584398vqr; Sat, 3 Jun 2023 03:52:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tsUeNkAyLSKeQ69w0OuMtsBLAmxC1dkJzN/QDz3X2NgIioUWnGxmchqZtz5uvQC/I+UZb X-Received: by 2002:a05:6808:3a91:b0:399:169:75d8 with SMTP id fb17-20020a0568083a9100b00399016975d8mr3169621oib.35.1685789523897; Sat, 03 Jun 2023 03:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685789523; cv=none; d=google.com; s=arc-20160816; b=sWUSUimWADODoemLnAfb/wZW2Mhlg+r1sW2+aGce23eISC6vmP5Hyfer3Vnz1wvcMY 8S+UikdxDhaibu2XV+x8q/Z0nbdiDNkCHAGMd2884/EfE+7P5SMkLaIF+ac4TVsZU19R jm/JzPgKojQ04E+76gq/d9fOyujR3ZSrTAB6BtcjDhiUZ6oT08ZwIOLqPw4H6CrTvud9 5JamA+h+wwQoQyvkGfzE75rPO+gdy4eLT/415KYspTdrBEdB+bV1yQlpcJCGlccqUlxf EW7rV5HyMTCt3dfn7Up7oB3YcepBlHpwWRR/htKvmMTkJmhQWATOsb66arIe0126cGkV dFkQ== 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=aqLPBHeXWM/w81lzYkNHlEz9qhRKdfOvoxVKyAL6qGc=; b=mTFdHWohRRtKoU1uZcxDQqi1x064pW1lXX0EQwK1FQgpGlbzjrRpQVaE2NiHbZYbwq qICbjPY1vxe+w/pCsCV5BpP7qmPqDYghssP43iNQU5IVYs03pFF+iAeNNGnkpza+bt4c bPRjF53LWB5AAOXW+7y/b1LM1RqI6LYANz+mOxLEnA5uiopRnFbKPZB4183dV3luUU9A k5pwVhXsZ85vr2PkGKFWDDeEusUkOlN1udIX69UdXIUmKtLws/ZvUItyEYFQEprumjFL 7yi50zmTLJxs1XqKyJuV2uLzLBVj+6aX24o9mOb3tYr//DTsVLxs8kfC3T7PRm6fCuNt qi0g== 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 q9-20020a170902dac900b001ac4027fa28si2461701plx.618.2023.06.03.03.51.49; Sat, 03 Jun 2023 03:52:03 -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 S237022AbjFCKs7 (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Sat, 3 Jun 2023 06:48:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbjFCKsy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 3 Jun 2023 06:48:54 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 162B61A6 for <linux-kernel@vger.kernel.org>; Sat, 3 Jun 2023 03:48:51 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Dxd_GTGntk1+oDAA--.8539S3; Sat, 03 Jun 2023 18:48:51 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Dx87SSGntkOjOHAA--.20866S2; Sat, 03 Jun 2023 18:48:50 +0800 (CST) From: Sui Jingfeng <suijingfeng@loongson.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, loongson-kernel@lists.loongnix.cn Subject: [PATCH v7 0/7] drm/etnaviv: add pci device driver support Date: Sat, 3 Jun 2023 18:48:43 +0800 Message-Id: <20230603104850.3042011-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: AQAAf8Dx87SSGntkOjOHAA--.20866S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFyUur4xWryxXrW7ZrW7XFb_yoW8Aw4kpF 47JFyYyry0vrW2kw17AFn5JFy3G3WxWF9Yk3srt3sI9w45AFyjvryDKa15Jr9xXr1fJr12 qr1akry3WF1UArJanT9S1TB71UUUU07qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bvxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM2 8EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr1j6F4U JwAaw2AFwI0_GFv_Wryle2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4 CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_ZF0_GryDMcIj 6I8E87Iv67AKxVW8Jr0_Cr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrw ACjcxG6xCI17CEII8vrVW3JVW8Jr1lc7CjxVAaw2AFwI0_GFv_Wryl42xK82IYc2Ij64vI r41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_GFv_Wrylx2IqxVAqx4xG67 AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIY rxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_tr0E3s1lIxAIcVC0I7IYx2IY6xkF7I0E14 v26r4UJVWxJr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r4U JVWxJr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBIdaVFxhVjvjDU0xZFpf9x07 bgXdbUUUUU= 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: <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?1767677591609948747?= X-GMAIL-MSGID: =?utf-8?q?1767678435491297049?= |
Series |
drm/etnaviv: add pci device driver support
|
|
Message
Sui Jingfeng
June 3, 2023, 10:48 a.m. UTC
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