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/include/linux don't provide dev_to_i91...



details:   https://anonhg.NetBSD.org/src/rev/08641fefce00
branches:  trunk
changeset: 992419:08641fefce00
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:18:30 2018 +0000

description:
don't provide dev_to_i915 and ifdef out all users (unused)
provide nsecs_to_jiffies64, hopefully msec_to_jiffies * 10^6
provide BUILD_BUG as a no-op
include linux/err.h instead of matching side-loading, too hard to
figure out what gets it.


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

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_drv.c  |  6 ++++--
 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h  |  4 +++-
 sys/external/bsd/drm2/dist/drm/i915/intel_drv.h |  3 ++-
 sys/external/bsd/drm2/include/asm/bug.h         |  3 ++-
 sys/external/bsd/drm2/include/linux/jiffies.h   |  8 +++++++-
 5 files changed, 18 insertions(+), 6 deletions(-)

diffs (112 lines):

diff -r 39ca026d3313 -r 08641fefce00 sys/external/bsd/drm2/dist/drm/i915/i915_drv.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Mon Aug 27 06:18:17 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.c    Mon Aug 27 06:18:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.c,v 1.7 2018/08/27 04:58:23 riastradh Exp $   */
+/*     $NetBSD: i915_drv.c,v 1.8 2018/08/27 06:18:30 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.7 2018/08/27 04:58:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_drv.c,v 1.8 2018/08/27 06:18:30 riastradh Exp $");
 
 #include <linux/device.h>
 #include <linux/acpi.h>
@@ -1031,6 +1031,7 @@
        drm_put_dev(dev);
 }
 
+#ifndef __NetBSD__
 static int i915_pm_suspend(struct device *dev)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
@@ -1095,6 +1096,7 @@
 
        return i915_drm_resume(drm_dev);
 }
+#endif
 
 static int skl_suspend_complete(struct drm_i915_private *dev_priv)
 {
diff -r 39ca026d3313 -r 08641fefce00 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    Mon Aug 27 06:18:17 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h    Mon Aug 27 06:18:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_drv.h,v 1.13 2018/08/27 06:17:05 riastradh Exp $  */
+/*     $NetBSD: i915_drv.h,v 1.14 2018/08/27 06:18:30 riastradh Exp $  */
 
 /* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
  */
@@ -2026,10 +2026,12 @@
        return dev->dev_private;
 }
 
+#ifndef __NetBSD__
 static inline struct drm_i915_private *dev_to_i915(struct device *dev)
 {
        return to_i915(dev_get_drvdata(dev));
 }
+#endif
 
 static inline struct drm_i915_private *guc_to_i915(struct intel_guc *guc)
 {
diff -r 39ca026d3313 -r 08641fefce00 sys/external/bsd/drm2/dist/drm/i915/intel_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h   Mon Aug 27 06:18:17 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_drv.h   Mon Aug 27 06:18:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_drv.h,v 1.9 2018/08/27 04:58:24 riastradh Exp $  */
+/*     $NetBSD: intel_drv.h,v 1.10 2018/08/27 06:18:30 riastradh Exp $ */
 
 /*
  * Copyright (c) 2006 Dave Airlie <airlied%linux.ie@localhost>
@@ -28,6 +28,7 @@
 #define __INTEL_DRV_H__
 
 #include <linux/async.h>
+#include <linux/err.h>
 #include <linux/i2c.h>
 #include <linux/hdmi.h>
 #include <asm/processor.h>
diff -r 39ca026d3313 -r 08641fefce00 sys/external/bsd/drm2/include/asm/bug.h
--- a/sys/external/bsd/drm2/include/asm/bug.h   Mon Aug 27 06:18:17 2018 +0000
+++ b/sys/external/bsd/drm2/include/asm/bug.h   Mon Aug 27 06:18:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bug.h,v 1.2 2014/03/18 18:20:42 riastradh Exp $        */
+/*     $NetBSD: bug.h,v 1.3 2018/08/27 06:18:30 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
 #define        BUG()                   panic("%s:%d: BUG!", __FILE__, __LINE__)
 #define        BUG_ON(CONDITION)       KASSERT(!(CONDITION))
 
+#define        BUILD_BUG()             do {} while (0)
 #define        BUILD_BUG_ON(CONDITION) CTASSERT(!(CONDITION))
 
 /* XXX Rate limit?  */
diff -r 39ca026d3313 -r 08641fefce00 sys/external/bsd/drm2/include/linux/jiffies.h
--- a/sys/external/bsd/drm2/include/linux/jiffies.h     Mon Aug 27 06:18:17 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/jiffies.h     Mon Aug 27 06:18:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jiffies.h,v 1.6 2014/07/26 14:24:08 riastradh Exp $    */
+/*     $NetBSD: jiffies.h,v 1.7 2018/08/27 06:18:30 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -41,6 +41,12 @@
 /* XXX Er, what?  */
 #define        MAX_JIFFY_OFFSET        ((INT_MAX >> 1) - 1)
 
+static inline uint64_t
+nsecs_to_jiffies64(unsigned int msec)
+{
+       return 1000000*mstohz(msec);
+}
+
 static inline unsigned int
 msecs_to_jiffies(unsigned int msec)
 {



Home | Main Index | Thread Index | Old Index