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 Reduce some more cosmetic diffs.



details:   https://anonhg.NetBSD.org/src/rev/8b5c1be8ffc0
branches:  trunk
changeset: 744852:8b5c1be8ffc0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Feb 14 09:39:37 2020 +0000

description:
Reduce some more cosmetic diffs.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_bios.c      |   6 +-
 sys/external/bsd/drm2/dist/drm/i915/intel_crt.c       |   6 +-
 sys/external/bsd/drm2/dist/drm/i915/intel_display.c   |  30 ++++++++----------
 sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c     |   8 ++--
 sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c      |  10 +++---
 sys/external/bsd/drm2/dist/drm/i915/intel_pm.c        |  16 +++------
 sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c      |  12 +-----
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_chan.c |  10 ++---
 8 files changed, 42 insertions(+), 56 deletions(-)

diffs (truncated from 363 to 300 lines):

diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_bios.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_bios.c  Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_bios.c  Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_bios.c,v 1.8 2020/02/14 04:30:05 riastradh Exp $ */
+/*     $NetBSD: intel_bios.c,v 1.9 2020/02/14 09:39:37 riastradh Exp $ */
 
 /*
  * Copyright © 2006 Intel Corporation
@@ -27,7 +27,7 @@
  *
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_bios.c,v 1.8 2020/02/14 04:30:05 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_bios.c,v 1.9 2020/02/14 09:39:37 riastradh Exp $");
 
 #include <linux/dmi.h>
 #include <drm/drm_dp_helper.h>
@@ -1248,7 +1248,7 @@
                        DMI_MATCH(DMI_PRODUCT_NAME, "97027RG"),
                },
        },
-       {       .callback = NULL, }
+       { }
 };
 
 static const struct bdb_header *validate_vbt(const void *base,
diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_crt.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_crt.c   Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_crt.c   Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_crt.c,v 1.7 2020/02/14 04:36:11 riastradh Exp $  */
+/*     $NetBSD: intel_crt.c,v 1.8 2020/02/14 09:39:37 riastradh Exp $  */
 
 /*
  * Copyright © 2006-2007 Intel Corporation
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_crt.c,v 1.7 2020/02/14 04:36:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_crt.c,v 1.8 2020/02/14 09:39:37 riastradh Exp $");
 
 #include <linux/dmi.h>
 #include <linux/i2c.h>
@@ -784,7 +784,7 @@
                        DMI_MATCH(DMI_PRODUCT_NAME, "XPS 8700"),
                },
        },
-       { .callback = NULL }
+       { }
 };
 
 void intel_crt_init(struct drm_device *dev)
diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_display.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_display.c       Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_display.c       Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_display.c,v 1.30 2020/02/14 04:36:11 riastradh Exp $     */
+/*     $NetBSD: intel_display.c,v 1.31 2020/02/14 09:39:37 riastradh Exp $     */
 
 /*
  * Copyright © 2006-2007 Intel Corporation
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.30 2020/02/14 04:36:11 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.31 2020/02/14 09:39:37 riastradh Exp $");
 
 #include <linux/dmi.h>
 #include <linux/module.h>
@@ -2545,8 +2545,7 @@
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
        struct drm_i915_gem_object *obj = NULL;
-       static const struct drm_mode_fb_cmd2 zero_mode_cmd;
-       struct drm_mode_fb_cmd2 mode_cmd = zero_mode_cmd;
+       struct drm_mode_fb_cmd2 mode_cmd = { 0 };
        struct drm_framebuffer *fb = &plane_config->fb->base;
        u32 base_aligned = round_down(plane_config->base, PAGE_SIZE);
        u32 size_aligned = round_up(plane_config->base + plane_config->size,
@@ -8100,7 +8099,7 @@
 {
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
-       u32 val, base;
+       u32 val, base, offset __unused;
        int pipe = crtc->pipe, plane = crtc->plane;
        int fourcc, pixel_format;
        unsigned int aligned_height;
@@ -8133,9 +8132,9 @@
 
        if (INTEL_INFO(dev)->gen >= 4) {
                if (plane_config->tiling)
-                       (void)I915_READ(DSPTILEOFF(plane));
+                       offset = I915_READ(DSPTILEOFF(plane));
                else
-                       (void)I915_READ(DSPLINOFF(plane));
+                       offset = I915_READ(DSPLINOFF(plane));
                base = I915_READ(DSPSURF(plane)) & 0xfffff000;
        } else {
                base = I915_READ(DSPADDR(plane));
@@ -9173,7 +9172,7 @@
 {
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
-       u32 val, base, stride_mult, tiling;
+       u32 val, base, offset __unused, stride_mult, tiling;
        int pipe = crtc->pipe;
        int fourcc, pixel_format;
        unsigned int aligned_height;
@@ -9222,7 +9221,7 @@
        base = I915_READ(PLANE_SURF(pipe, 0)) & 0xfffff000;
        plane_config->base = base;
 
-       (void)I915_READ(PLANE_OFFSET(pipe, 0));
+       offset = I915_READ(PLANE_OFFSET(pipe, 0));
 
        val = I915_READ(PLANE_SIZE(pipe, 0));
        fb->height = ((val >> 16) & 0xfff) + 1;
@@ -9281,7 +9280,7 @@
 {
        struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
-       u32 val, base;
+       u32 val, base, offset __unused;
        int pipe = crtc->pipe;
        int fourcc, pixel_format;
        unsigned int aligned_height;
@@ -9314,12 +9313,12 @@
 
        base = I915_READ(DSPSURF(pipe)) & 0xfffff000;
        if (IS_HASWELL(dev) || IS_BROADWELL(dev)) {
-               (void)I915_READ(DSPOFFSET(pipe));
+               offset = I915_READ(DSPOFFSET(pipe));
        } else {
                if (plane_config->tiling)
-                       (void)I915_READ(DSPTILEOFF(pipe));
+                       offset = I915_READ(DSPTILEOFF(pipe));
                else
-                       (void)I915_READ(DSPLINOFF(pipe));
+                       offset = I915_READ(DSPLINOFF(pipe));
        }
        plane_config->base = base;
 
@@ -10297,8 +10296,7 @@
                                  int depth, int bpp)
 {
        struct drm_i915_gem_object *obj;
-       static const struct drm_mode_fb_cmd2 zero_mode_cmd;
-       struct drm_mode_fb_cmd2 mode_cmd = zero_mode_cmd;
+       struct drm_mode_fb_cmd2 mode_cmd = { 0 };
 
        obj = i915_gem_alloc_object(dev,
                                    intel_framebuffer_size_for_mode(mode, bpp));
@@ -14858,7 +14856,7 @@
                                            DMI_MATCH(DMI_PRODUCT_NAME, ""),
                                },
                        },
-                       { .callback = NULL }  /* terminating entry */
+                       { }  /* terminating entry */
                },
                .hook = quirk_invert_brightness,
        },
diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_fbdev.c Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_fbdev.c,v 1.10 2020/02/14 04:37:09 riastradh Exp $       */
+/*     $NetBSD: intel_fbdev.c,v 1.11 2020/02/14 09:39:37 riastradh Exp $       */
 
 /*
  * Copyright © 2007 David Airlie
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.10 2020/02/14 04:37:09 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.11 2020/02/14 09:39:37 riastradh Exp $");
 
 #include <linux/async.h>
 #include <linux/module.h>
@@ -134,8 +134,7 @@
        struct drm_framebuffer *fb;
        struct drm_device *dev = helper->dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
-       static const struct drm_mode_fb_cmd2 zero_mode_cmd;
-       struct drm_mode_fb_cmd2 mode_cmd = zero_mode_cmd;
+       struct drm_mode_fb_cmd2 mode_cmd = {};
        struct drm_i915_gem_object *obj = NULL;
        int size, ret;
 
@@ -214,6 +213,7 @@
        bool prealloc = false;
 
        mutex_lock(&dev->struct_mutex);
+
        if (intel_fb &&
            (sizes->fb_width > intel_fb->base.width ||
             sizes->fb_height > intel_fb->base.height)) {
diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c  Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c  Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_lvds.c,v 1.8 2020/02/14 04:36:12 riastradh Exp $ */
+/*     $NetBSD: intel_lvds.c,v 1.9 2020/02/14 09:39:37 riastradh Exp $ */
 
 /*
  * Copyright © 2006-2007 Intel Corporation
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_lvds.c,v 1.8 2020/02/14 04:36:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_lvds.c,v 1.9 2020/02/14 09:39:37 riastradh Exp $");
 
 #include <acpi/button.h>
 #include <linux/dmi.h>
@@ -422,7 +422,7 @@
                },
        },
 
-       { .callback = NULL }    /* terminating entry */
+       { }     /* terminating entry */
 };
 
 /*
@@ -784,7 +784,7 @@
                },
        },
 
-       { .callback = NULL }    /* terminating entry */
+       { }     /* terminating entry */
 };
 
 /*
@@ -869,7 +869,7 @@
                        DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"),
                },
        },
-       { .callback = NULL }    /* terminating entry */
+       { }     /* terminating entry */
 };
 
 bool intel_is_dual_link_lvds(struct drm_device *dev)
diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_pm.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c    Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c    Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_pm.c,v 1.22 2020/02/14 04:36:12 riastradh Exp $  */
+/*     $NetBSD: intel_pm.c,v 1.23 2020/02/14 09:39:37 riastradh Exp $  */
 
 /*
  * Copyright © 2012 Intel Corporation
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_pm.c,v 1.22 2020/02/14 04:36:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_pm.c,v 1.23 2020/02/14 09:39:37 riastradh Exp $");
 
 #include <linux/bitops.h>
 #include <linux/cpufreq.h>
@@ -3723,15 +3723,11 @@
        struct drm_device *dev = crtc->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct ilk_wm_maximums max;
-       static const struct ilk_wm_values zero_values;
-       struct ilk_wm_values results = zero_values;
+       struct ilk_wm_values results = {};
        enum intel_ddb_partitioning partitioning;
-       static const struct intel_pipe_wm zero_wm;
-       struct intel_pipe_wm pipe_wm = zero_wm;
-       struct intel_pipe_wm lp_wm_1_2 = zero_wm, lp_wm_5_6 = zero_wm,
-           *best_lp_wm;
-       static const struct intel_wm_config zero_config;
-       struct intel_wm_config config = zero_config;
+       struct intel_pipe_wm pipe_wm = {};
+       struct intel_pipe_wm lp_wm_1_2 = {}, lp_wm_5_6 = {}, *best_lp_wm;
+       struct intel_wm_config config = {};
 
        WARN_ON(cstate->base.active != intel_crtc->active);
 
diff -r 13ddbc613553 -r 8b5c1be8ffc0 sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c  Fri Feb 14 09:38:51 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c  Fri Feb 14 09:39:37 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_sdvo.c,v 1.13 2020/02/14 04:36:12 riastradh Exp $        */
+/*     $NetBSD: intel_sdvo.c,v 1.14 2020/02/14 09:39:38 riastradh Exp $        */
 
 /*
  * Copyright 2006 Dave Airlie <airlied%linux.ie@localhost>
@@ -28,7 +28,7 @@
  *     Eric Anholt <eric%anholt.net@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_sdvo.c,v 1.13 2020/02/14 04:36:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_sdvo.c,v 1.14 2020/02/14 09:39:38 riastradh Exp $");
 



Home | Main Index | Thread Index | Old Index