Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2 drm: Omit needless pci_attach_args fro...



details:   https://anonhg.NetBSD.org/src/rev/86c55c2d1d4c
branches:  trunk
changeset: 1028737:86c55c2d1d4c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:53:50 2021 +0000

description:
drm: Omit needless pci_attach_args from our drm_pci_attach.

Can already get it from the struct pci_dev, and this way we can more
easily call it from patched upstream code as i915 will need to do.

diffstat:

 sys/external/bsd/drm2/amdgpu/amdgpu_pci.c         |  6 +++---
 sys/external/bsd/drm2/dist/include/drm/drm_pci.h  |  5 ++---
 sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c |  6 +++---
 sys/external/bsd/drm2/nouveau/nouveau_pci.c       |  6 +++---
 sys/external/bsd/drm2/pci/drm_pci.c               |  8 ++++----
 sys/external/bsd/drm2/radeon/radeon_pci.c         |  6 +++---
 6 files changed, 18 insertions(+), 19 deletions(-)

diffs (158 lines):

diff -r 3c36c4aef4fa -r 86c55c2d1d4c sys/external/bsd/drm2/amdgpu/amdgpu_pci.c
--- a/sys/external/bsd/drm2/amdgpu/amdgpu_pci.c Sun Dec 19 11:53:41 2021 +0000
+++ b/sys/external/bsd/drm2/amdgpu/amdgpu_pci.c Sun Dec 19 11:53:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdgpu_pci.c,v 1.7 2021/12/19 11:05:12 riastradh Exp $ */
+/*     $NetBSD: amdgpu_pci.c,v 1.8 2021/12/19 11:53:50 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdgpu_pci.c,v 1.7 2021/12/19 11:05:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdgpu_pci.c,v 1.8 2021/12/19 11:53:50 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/queue.h>
@@ -170,7 +170,7 @@
        }
 
        /* XXX errno Linux->NetBSD */
-       error = -drm_pci_attach(sc->sc_drm_dev, pa, &sc->sc_pci_dev);
+       error = -drm_pci_attach(sc->sc_drm_dev, &sc->sc_pci_dev);
        if (error) {
                aprint_error_dev(self, "unable to attach drm: %d\n", error);
                goto out;
diff -r 3c36c4aef4fa -r 86c55c2d1d4c sys/external/bsd/drm2/dist/include/drm/drm_pci.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_pci.h  Sun Dec 19 11:53:41 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_pci.h  Sun Dec 19 11:53:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.h,v 1.8 2021/12/19 11:09:47 riastradh Exp $    */
+/*     $NetBSD: drm_pci.h,v 1.9 2021/12/19 11:53:50 riastradh Exp $    */
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -76,8 +76,7 @@
 #ifdef __NetBSD__
 int drm_pci_request_irq(struct drm_device *, int);
 void drm_pci_free_irq(struct drm_device *);
-int drm_pci_attach(struct drm_device *, const struct pci_attach_args *,
-    struct pci_dev *);
+int drm_pci_attach(struct drm_device *, struct pci_dev *);
 void drm_pci_detach(struct drm_device *);
 #endif
 
diff -r 3c36c4aef4fa -r 86c55c2d1d4c sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c
--- a/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Sun Dec 19 11:53:41 2021 +0000
+++ b/sys/external/bsd/drm2/i915drm/i915_pci_autoconf.c Sun Dec 19 11:53:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_pci_autoconf.c,v 1.6 2021/12/19 11:53:02 riastradh Exp $  */
+/*     $NetBSD: i915_pci_autoconf.c,v 1.7 2021/12/19 11:53:51 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.6 2021/12/19 11:53:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_pci_autoconf.c,v 1.7 2021/12/19 11:53:51 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/queue.h>
@@ -189,7 +189,7 @@
        }
 
        /* XXX errno Linux->NetBSD */
-       error = -drm_pci_attach(sc->sc_drm_dev, pa, &sc->sc_pci_dev);
+       error = -drm_pci_attach(sc->sc_drm_dev, &sc->sc_pci_dev);
        if (error) {
                aprint_error_dev(self, "unable to attach drm: %d\n", error);
                return;
diff -r 3c36c4aef4fa -r 86c55c2d1d4c sys/external/bsd/drm2/nouveau/nouveau_pci.c
--- a/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Sun Dec 19 11:53:41 2021 +0000
+++ b/sys/external/bsd/drm2/nouveau/nouveau_pci.c       Sun Dec 19 11:53:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_pci.c,v 1.32 2021/12/19 11:09:48 riastradh Exp $       */
+/*     $NetBSD: nouveau_pci.c,v 1.33 2021/12/19 11:53:51 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.32 2021/12/19 11:09:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.33 2021/12/19 11:53:51 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #if defined(__arm__) || defined(__aarch64__)
@@ -215,7 +215,7 @@
        }
 
        /* XXX errno Linux->NetBSD */
-       error = -drm_pci_attach(sc->sc_drm_dev, pa, &sc->sc_pci_dev);
+       error = -drm_pci_attach(sc->sc_drm_dev, &sc->sc_pci_dev);
        if (error) {
                aprint_error_dev(self, "unable to attach drm: %d\n", error);
                return;
diff -r 3c36c4aef4fa -r 86c55c2d1d4c sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Sun Dec 19 11:53:41 2021 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Sun Dec 19 11:53:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.45 2021/12/19 11:09:48 riastradh Exp $   */
+/*     $NetBSD: drm_pci.c,v 1.46 2021/12/19 11:53:51 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.45 2021/12/19 11:09:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.46 2021/12/19 11:53:51 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -59,10 +59,10 @@
 }
 
 int
-drm_pci_attach(struct drm_device *dev, const struct pci_attach_args *pa,
-    struct pci_dev *pdev)
+drm_pci_attach(struct drm_device *dev, struct pci_dev *pdev)
 {
        device_t self = dev->dev;
+       const struct pci_attach_args *pa = &pdev->pd_pa;
        unsigned int unit;
        int ret;
 
diff -r 3c36c4aef4fa -r 86c55c2d1d4c sys/external/bsd/drm2/radeon/radeon_pci.c
--- a/sys/external/bsd/drm2/radeon/radeon_pci.c Sun Dec 19 11:53:41 2021 +0000
+++ b/sys/external/bsd/drm2/radeon/radeon_pci.c Sun Dec 19 11:53:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_pci.c,v 1.18 2021/12/19 11:05:13 riastradh Exp $        */
+/*     $NetBSD: radeon_pci.c,v 1.19 2021/12/19 11:53:51 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.18 2021/12/19 11:05:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_pci.c,v 1.19 2021/12/19 11:53:51 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "vga.h"
@@ -260,7 +260,7 @@
        }
 
        /* XXX errno Linux->NetBSD */
-       error = -drm_pci_attach(sc->sc_drm_dev, pa, &sc->sc_pci_dev);
+       error = -drm_pci_attach(sc->sc_drm_dev, &sc->sc_pci_dev);
        if (error) {
                aprint_error_dev(self, "unable to attach drm: %d\n", error);
                goto out;



Home | Main Index | Thread Index | Old Index