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 merge in old drm



details:   https://anonhg.NetBSD.org/src/rev/0f874aa939dd
branches:  trunk
changeset: 364180:0f874aa939dd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:16:50 2018 +0000

description:
merge in old drm

better match linux del_timer_sync by returning something
(XXX return value?)


Author: coypu <coypu%sdf.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c |  12 +++++++++---
 sys/external/bsd/drm2/dist/drm/i915/intel_panel.c    |   8 ++++++--
 sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c     |   5 +++--
 sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c   |  12 ++++++++++--
 sys/external/bsd/drm2/include/linux/time.h           |   4 +++-
 sys/external/bsd/drm2/include/linux/timer.h          |   7 ++++---
 6 files changed, 35 insertions(+), 13 deletions(-)

diffs (206 lines):

diff -r ca4b34faf4d0 -r 0f874aa939dd sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c      Mon Aug 27 06:16:37 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_opregion.c      Mon Aug 27 06:16:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_opregion.c,v 1.9 2018/08/27 04:58:24 riastradh Exp $     */
+/*     $NetBSD: intel_opregion.c,v 1.10 2018/08/27 06:16:50 riastradh Exp $    */
 
 /*
  * Copyright 2008 Intel Corporation <hong.liu%intel.com@localhost>
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.9 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.10 2018/08/27 06:16:50 riastradh Exp $");
 
 #include <linux/printk.h>
 #include <linux/acpi.h>
@@ -446,10 +446,12 @@
 
        DRM_DEBUG_DRIVER("bclp = 0x%08x\n", bclp);
 
+#ifndef __NetBSD__ /* XXX backlight */
        if (acpi_video_get_backlight_type() == acpi_backlight_native) {
                DRM_DEBUG_KMS("opregion backlight request ignored\n");
                return 0;
        }
+#endif
 
        if (!(bclp & ASLE_BCLP_VALID))
                return ASLC_BACKLIGHT_FAILED;
@@ -664,6 +666,7 @@
 
        return ret;
 }
+#endif
 
 static struct notifier_block intel_opregion_notifier = {
        .notifier_call = intel_opregion_video_event,
@@ -1007,8 +1010,11 @@
 #ifdef CONFIG_ACPI
        INIT_WORK(&opregion->asle_work, asle_work);
 #endif
-
+#ifdef __NetBSD__
+       base = acpi_os_ioremap(asls, OPREGION_SIZE);
+#else
        base = memremap(asls, OPREGION_SIZE, MEMREMAP_WB);
+#endif
        if (!base)
                return -ENOMEM;
 
diff -r ca4b34faf4d0 -r 0f874aa939dd sys/external/bsd/drm2/dist/drm/i915/intel_panel.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Mon Aug 27 06:16:37 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Mon Aug 27 06:16:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_panel.c,v 1.7 2018/08/27 04:58:24 riastradh Exp $        */
+/*     $NetBSD: intel_panel.c,v 1.8 2018/08/27 06:16:50 riastradh Exp $        */
 
 /*
  * Copyright © 2006-2010 Intel Corporation
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.7 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.8 2018/08/27 06:16:50 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -862,8 +862,10 @@
 
        mutex_lock(&dev_priv->backlight_lock);
 
+#ifndef __NetBSD__             /* XXX backlight */
        if (panel->backlight.device)
                panel->backlight.device->props.power = FB_BLANK_POWERDOWN;
+#endif
        panel->backlight.enabled = false;
        panel->backlight.disable(connector);
 
@@ -1141,8 +1143,10 @@
 
        panel->backlight.enable(connector);
        panel->backlight.enabled = true;
+#ifndef __NetBSD__             /* XXX backlight */
        if (panel->backlight.device)
                panel->backlight.device->props.power = FB_BLANK_UNBLANK;
+#endif
 
        mutex_unlock(&dev_priv->backlight_lock);
 }
diff -r ca4b34faf4d0 -r 0f874aa939dd sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c  Mon Aug 27 06:16:37 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c  Mon Aug 27 06:16:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_sdvo.c,v 1.9 2018/08/27 04:58:24 riastradh Exp $ */
+/*     $NetBSD: intel_sdvo.c,v 1.10 2018/08/27 06:16:50 riastradh Exp $        */
 
 /*
  * Copyright 2006 Dave Airlie <airlied%linux.ie@localhost>
@@ -28,11 +28,12 @@
  *     Eric Anholt <eric%anholt.net@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_sdvo.c,v 1.9 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_sdvo.c,v 1.10 2018/08/27 06:16:50 riastradh Exp $");
 
 #include <linux/i2c.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <linux/export.h>
 #include <linux/bitops.h>
 #include <linux/module.h>
diff -r ca4b34faf4d0 -r 0f874aa939dd sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c        Mon Aug 27 06:16:37 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c        Mon Aug 27 06:16:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_sprite.c,v 1.3 2018/08/27 04:58:24 riastradh Exp $       */
+/*     $NetBSD: intel_sprite.c,v 1.4 2018/08/27 06:16:50 riastradh Exp $       */
 
 /*
  * Copyright © 2011 Intel Corporation
@@ -32,7 +32,7 @@
  * support.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.3 2018/08/27 04:58:24 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.4 2018/08/27 06:16:50 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc.h>
@@ -90,8 +90,12 @@
        enum pipe pipe = crtc->pipe;
        long timeout = msecs_to_jiffies_timeout(1);
        int scanline, min, max, vblank_start;
+#ifdef __NetBSD__
+       drm_waitqueue_t *wq = drm_crtc_vblank_waitqueue(&crtc->base);
+#else
        wait_queue_head_t *wq = drm_crtc_vblank_waitqueue(&crtc->base);
        DEFINE_WAIT(wait);
+#endif
 
        vblank_start = adjusted_mode->crtc_vblank_start;
        if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -113,6 +117,9 @@
        crtc->debug.max_vbl = max;
        trace_i915_pipe_update_start(crtc);
 
+#ifdef __NetBSD__
+       panic("XXX");
+#else
        for (;;) {
                /*
                 * prepare_to_wait() has a memory barrier, which guarantees
@@ -139,6 +146,7 @@
        }
 
        finish_wait(wq, &wait);
+#endif
 
        drm_crtc_vblank_put(&crtc->base);
 
diff -r ca4b34faf4d0 -r 0f874aa939dd sys/external/bsd/drm2/include/linux/time.h
--- a/sys/external/bsd/drm2/include/linux/time.h        Mon Aug 27 06:16:37 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/time.h        Mon Aug 27 06:16:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: time.h,v 1.3 2014/07/16 20:56:25 riastradh Exp $       */
+/*     $NetBSD: time.h,v 1.4 2018/08/27 06:16:50 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,6 +34,8 @@
 
 #include <sys/time.h>
 
+#define NSEC_PER_MSEC  1000000L
+
 /*
  * XXX get_seconds as implemented by Linux is a Y2038 bug waiting to
  * happen on 32-bit systems because it returns unsigned long.  Some
diff -r ca4b34faf4d0 -r 0f874aa939dd sys/external/bsd/drm2/include/linux/timer.h
--- a/sys/external/bsd/drm2/include/linux/timer.h       Mon Aug 27 06:16:37 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/timer.h       Mon Aug 27 06:16:50 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: timer.h,v 1.5 2014/08/26 17:26:05 riastradh Exp $      */
+/*     $NetBSD: timer.h,v 1.6 2018/08/27 06:16:50 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -89,11 +89,12 @@
        callout_stop(&timer->tl_callout);
 }
 
-static inline void
+static inline bool
 del_timer_sync(struct timer_list *timer)
 {
 
-       callout_halt(&timer->tl_callout, NULL);
+       /* XXX return values? */
+       return callout_halt(&timer->tl_callout, NULL);
 }
 
 static inline bool



Home | Main Index | Thread Index | Old Index