Message ID | 20230603103742.3041649-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 k13csp1580102vqr; Sat, 3 Jun 2023 03:38:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VsCxjBeZ/gfXnu2oT89KCP79kp3uEYKPehDhhu3URtwmAi6CuhlH7HgLtu3jciPlhytqU X-Received: by 2002:a05:6358:2904:b0:127:bde8:eeb0 with SMTP id y4-20020a056358290400b00127bde8eeb0mr16743871rwb.27.1685788718779; Sat, 03 Jun 2023 03:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685788718; cv=none; d=google.com; s=arc-20160816; b=Y46r694Z5jCKsfVzHhXDOKoHXHPaN6mlgxSdA8HLGc2M3ZiPJKO8i2xsgem9V+Sxqm +lZ/JH2KcThDsZSN5/Sqyw5jpP/jNgX57vnEHUKh/zs+XbHk2Lumu38YbKViOEGS5JqU ++krnSlteUkPbrtVQIr5xTvHtJeQqfIcf4dpNCeqMamijiNxnzLKAWcYJl6j907sBi7N XayO4JFh4Xh1UwvMdQ8IQqk66k/Eo34ckVUSqAykVekBe99tEGReNIFWdk/kP4ReZ+3R OUisThY5spMRaHIOSlk04AqLjaS2bhXJZ5MWWjSlYi7ChrcfF5U82zJcXDpny2xgzYyz Rrhw== 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=Lwq58wFZTbd2Kp9Sy+aUYyQwQZoBxl/bCcZmqcEB3lICGXXVA8G3Mxq/qX7iFLHy3e kmmXgn4q3pcLjuNfTEYqZpF7U511VfwGiNEzYeiH9mABFm6fP7ymPDHmGe9ZLsg9VWlC F5v76Gw7NmRiUUSDJQi03oXQjhk1Xrh5KJf+3HfHMmxULUUYqA5TJoWNlUUd05/T2GVd vHEAfH7E4MBjzhWKS3siK+fPkB1vWnO+HY3xRjoDKmxfqGrLWGQNvXC3AFPDkn1QYeVY bIPfNQRzJmWXK/rpVJnpFIMlcgkUQOBB0JVm4J87PWLBxks96yJue9zemUw1TlmfG3XV sZkQ== 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 h5-20020aa796c5000000b0064f3917aedesi2273389pfq.176.2023.06.03.03.38.26; Sat, 03 Jun 2023 03:38:38 -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 S230170AbjFCKh6 (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Sat, 3 Jun 2023 06:37:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbjFCKhr (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 3 Jun 2023 06:37:47 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 103811B3 for <linux-kernel@vger.kernel.org>; Sat, 3 Jun 2023 03:37:43 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Cx5fD2F3tk_OkDAA--.8508S3; Sat, 03 Jun 2023 18:37:42 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxJLH2F3tkkzCHAA--.22741S2; Sat, 03 Jun 2023 18:37:42 +0800 (CST) From: Sui Jingfeng <suijingfeng@loongson.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>, Bjorn Helgaas <bhelgaas@google.com>, Li Yi <liyi@loongson.cn> 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:37:35 +0800 Message-Id: <20230603103742.3041649-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: AQAAf8CxJLH2F3tkkzCHAA--.22741S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFyUur4xWryxXrW7ZrW7XFb_yoW8Aw4kpF 47JFyYyry0vrW2kw17AFn5JFy3G3WxWF9Yk3srt3sI9w45AFyjvryDKa15Jr9xXr1fJr12 qr1akry3WF1UArJanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bSxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q6rW5McIj6I8E 87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4U JbIYCTnIWIevJa73UjIFyTuYvjxU4eMKDUUUU 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?1767677591609948747?= |
Series |
drm/etnaviv: add pci device driver support
|
|
Message
Sui Jingfeng
June 3, 2023, 10:37 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