Message ID | 20230603103923.3041723-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 k13csp1580925vqr; Sat, 3 Jun 2023 03:41:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4o0KmSEjzuY8SUBBNeXUOMaXLtA2XPvLgFPFkX8TB+ySDqSy/BAOidEnkbAp0ozrgWWWAd X-Received: by 2002:a54:4593:0:b0:398:1027:4fae with SMTP id z19-20020a544593000000b0039810274faemr2994395oib.25.1685788875937; Sat, 03 Jun 2023 03:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685788875; cv=none; d=google.com; s=arc-20160816; b=ycq/rrteZN2uQp+v6LLSJ3gVoKu/36vpbVbW9waMV3BaTapecKpwmECCljv9JFOMnv uSjm3AIinCmIgLuzfmKAof7uoqnGxYbFmK+OWLHUiWn96qZzEqnhvkU3GbPTqIudJc1W MtPDAZxyZ3+ebIk1btjg6/+2FS7CH6sVD2SXfeHcASWI7frvxbXlZUBO23BbZ+XOFDuI M/dFP9kZe8/S8wLAD5lugCrl+owehJa0PFAQuy+Djyv4iAc6BC799POKD5HHea3oQ6QG sfI5NFhHmx841uoeBLmkkIOT1rVfgDCANQ6S3BDyFKfII2lBWRXvwKILIooyUxxWyvRL S3Og== 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=pToa5MAzPKBAeFJemIJrUDRz7pr8bhZyhajRyrEoVlztZPdqavPV03tKvQBMEGEFV7 oJsRpomOXKaD6yViwbenChEGc6NBsS1oW1gKnbcTuhQ594JZEFCbxImOrn8hz7dJ62AS FhvvpeTDDGkvZjivA83xAooOk8OHpwyA/fXfQrjqC0nMWrf4zFWcIqnv/oo6O3U1rNIn mEKYYSAR8AmTV5+f5TsS5VogtPziPtUfXh96pQCVuEuvS4Ese2PjKLX58IVZTj1Jo2JB mhbi/c4lccKeOue9v8bnxLft8AfKmVgde61gMJZ4gkB5fo0yeobj7Ij9LzV5y1zEUo05 R/vA== 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 t13-20020a170902e84d00b001b0286f2326si2421822plg.453.2023.06.03.03.41.04; Sat, 03 Jun 2023 03:41:15 -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 S231819AbjFCKjk (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Sat, 3 Jun 2023 06:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232498AbjFCKj2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 3 Jun 2023 06:39:28 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6FAC61BB for <linux-kernel@vger.kernel.org>; Sat, 3 Jun 2023 03:39:24 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Cx7+tbGHtkQ+oDAA--.8101S3; Sat, 03 Jun 2023 18:39:23 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxLb9bGHtkMTGHAA--.24004S2; Sat, 03 Jun 2023 18:39:23 +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> 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:39:16 +0800 Message-Id: <20230603103923.3041723-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: AQAAf8BxLb9bGHtkMTGHAA--.24004S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uFyUur4xWryxXrW7ZrW7XFb_yoW8Aw4kpF 47JFyYyry0vrW2kw17AFn5JFy3G3WxWF9Yk3srt3sI9w45AFyjvryDKa15Jr9xXr1fJr12 qr1akry3WF1UArJanT9S1TB71UUUU1DqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bhxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJVW8Jr1l84 ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1U M2kKe7AKxVWUtVW8ZwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zV CFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWrXVW3AwAv7VC2 z280aVAFwI0_Cr0_Gr1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY1x 0262kKe7AKxVW8ZVWrXwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCF I7km07C267AKxVWUtVW8ZwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r 106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AK xVW7JVWDJwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE42xK8VAvwI8IcI k0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWxJVW8Jr1lIxAIcVC2z280aVCY1x0267AKxVW8 JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IUeqNt7UUUUU== 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?1767677756629470086?= |
Series |
drm/etnaviv: add pci device driver support
|
|
Message
Sui Jingfeng
June 3, 2023, 10:39 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