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/dist/drm Cleanup ifdef goo that got ma...



details:   https://anonhg.NetBSD.org/src/rev/057c4092113e
branches:  trunk
changeset: 1028107:057c4092113e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:53:39 2021 +0000

description:
Cleanup ifdef goo that got mangled.

Endifs without matching ifdefs and so on.


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/drm_fb_helper.c                                                 |  7 ++++---
 sys/external/bsd/drm2/dist/drm/drm_prime.c                                                     |  7 +++----
 sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c                                      |  5 ++---
 sys/external/bsd/drm2/dist/drm/i915/i915_drv.c                                                 |  5 ++---
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c                                            |  7 ++-----
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c |  5 ++---
 6 files changed, 15 insertions(+), 21 deletions(-)

diffs (192 lines):

diff -r ec8e6c7ac6b0 -r 057c4092113e sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
--- a/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Sun Dec 19 01:53:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c    Sun Dec 19 01:53:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_fb_helper.c,v 1.20 2021/12/19 01:03:32 riastradh Exp $     */
+/*     $NetBSD: drm_fb_helper.c,v 1.21 2021/12/19 01:53:39 riastradh Exp $     */
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -30,7 +30,7 @@
  *      Jesse Barnes <jesse.barnes%intel.com@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.20 2021/12/19 01:03:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.21 2021/12/19 01:53:39 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -1825,8 +1825,8 @@
 
        fb_helper->deferred_setup = false;
 
+#ifndef __NetBSD__             /* XXX fb info */
        info = fb_helper->fbdev;
-#ifndef __NetBSD__             /* XXX fb info */
        info->var.pixclock = 0;
        /* Shamelessly allow physical address leaking to userspace */
 #if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM)
@@ -1841,6 +1841,7 @@
         * register the fbdev emulation instance in kernel_fb_helper_list. */
        mutex_unlock(&fb_helper->lock);
 
+#ifndef __NetBSD__             /* XXX fb info */
        ret = register_framebuffer(info);
        if (ret < 0)
                return ret;
diff -r ec8e6c7ac6b0 -r 057c4092113e sys/external/bsd/drm2/dist/drm/drm_prime.c
--- a/sys/external/bsd/drm2/dist/drm/drm_prime.c        Sun Dec 19 01:53:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_prime.c        Sun Dec 19 01:53:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_prime.c,v 1.11 2021/12/19 01:16:36 riastradh Exp $ */
+/*     $NetBSD: drm_prime.c,v 1.12 2021/12/19 01:53:39 riastradh Exp $ */
 
 /*
  * Copyright © 2012 Red Hat
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_prime.c,v 1.11 2021/12/19 01:16:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_prime.c,v 1.12 2021/12/19 01:53:39 riastradh Exp $");
 
 #include <linux/export.h>
 #include <linux/dma-buf.h>
@@ -418,7 +418,6 @@
                } else {
                        rb = rb->rb_left;
                }
-#endif
        }
 #endif
 }
@@ -1180,8 +1179,8 @@
 }
 EXPORT_SYMBOL(drm_gem_prime_import);
 
+#ifdef __NetBSD__
 /**
-#ifdef __NetBSD__
 
 struct sg_table *
 drm_prime_bus_dmamem_to_sg(bus_dma_tag_t dmat, const bus_dma_segment_t *segs,
diff -r ec8e6c7ac6b0 -r 057c4092113e sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c
--- a/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Sun Dec 19 01:53:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Sun Dec 19 01:53:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_panel.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $        */
+/*     $NetBSD: intel_panel.c,v 1.3 2021/12/19 01:53:39 riastradh Exp $        */
 
 /*
  * Copyright © 2006-2010 Intel Corporation
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.3 2021/12/19 01:53:39 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -699,7 +699,6 @@
        level = intel_panel_compute_brightness(connector, level);
        panel->backlight.set(conn_state, level);
 }
-#endif
 
 /* set backlight brightness to level in range [0..max], assuming hw min is
  * respected.
diff -r ec8e6c7ac6b0 -r 057c4092113e sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Sun Dec 19 01:53:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Sun Dec 19 01:53:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.c,v 1.21 2021/12/19 01:24:25 riastradh Exp $  */
+/*     $NetBSD: i915_drv.c,v 1.22 2021/12/19 01:53:39 riastradh Exp $  */
 
 /* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-
  */
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.21 2021/12/19 01:24:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.22 2021/12/19 01:53:39 riastradh Exp $");
 
 #include <linux/acpi.h>
 #include <linux/device.h>
@@ -1967,7 +1967,6 @@
        struct pci_dev *pdev = dev_priv->drm.pdev;
        int ret;
 
-#ifndef __NetBSD__             /* pmf handles this for us.  */
        /*
         * We have a resume ordering issue with the snd-hda driver also
         * requiring our device to be power up. Due to the lack of a
diff -r ec8e6c7ac6b0 -r 057c4092113e sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c       Sun Dec 19 01:53:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c       Sun Dec 19 01:53:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_bo.c,v 1.16 2021/12/18 23:45:32 riastradh Exp $        */
+/*     $NetBSD: nouveau_bo.c,v 1.17 2021/12/19 01:53:39 riastradh Exp $        */
 
 /*
  * Copyright 2007 Dave Airlied
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_bo.c,v 1.16 2021/12/18 23:45:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_bo.c,v 1.17 2021/12/19 01:53:39 riastradh Exp $");
 
 #include <linux/dma-mapping.h>
 #include <linux/swiotlb.h>
@@ -1739,7 +1739,6 @@
                ttm_dma->dma_address[i] = addr;
        }
        return 0;
-#endif
 }
 
 static void
@@ -1749,7 +1748,6 @@
        struct nouveau_drm *drm;
        struct device *dev;
        unsigned i;
-#endif
        bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
 
        if (slave)
@@ -1784,7 +1782,6 @@
        }
 
        ttm_pool_unpopulate(ttm);
-#endif
 }
 
 #ifdef __NetBSD__
diff -r ec8e6c7ac6b0 -r 057c4092113e sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c    Sun Dec 19 01:53:29 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c    Sun Dec 19 01:53:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_subdev_instmem_gk20a.c,v 1.5 2021/12/18 23:45:40 riastradh Exp $  */
+/*     $NetBSD: nouveau_nvkm_subdev_instmem_gk20a.c,v 1.6 2021/12/19 01:53:40 riastradh Exp $  */
 
 /*
  * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
@@ -44,7 +44,7 @@
  * goes beyond a certain threshold. At the moment this limit is 1MB.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_gk20a.c,v 1.5 2021/12/18 23:45:40 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_instmem_gk20a.c,v 1.6 2021/12/19 01:53:40 riastradh Exp $");
 
 #include "priv.h"
 
@@ -184,7 +184,6 @@
                   imem->vaddr_max);
 }
 
-#endif /* __NetBSD__ */
 
 /*
  * Must be called while holding gk20a_instmem::lock



Home | Main Index | Thread Index | Old Index