Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 01:56:00 UTC 2021

Modified Files:
        src/sys/external/bsd/drm2/dist/include/drm: drmP.h drm_util.h

Log Message:
drm_can_sleep now lives in drm_util.h, move ifdef goo there.

Author: Maya Rashish <m...@netbsd.org>


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.2 -r1.3 \
    src/sys/external/bsd/drm2/dist/include/drm/drm_util.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/include/drm/drmP.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.48 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.49
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.48	Sun Dec 19 01:55:45 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.48 2021/12/19 01:55:45 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.49 2021/12/19 01:56:00 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -955,18 +955,6 @@ extern int drm_pcie_get_speed_cap_mask(s
 extern int drm_platform_init(struct drm_driver *driver, struct platform_device *platform_device);
 extern int drm_platform_set_busid(struct drm_device *d, struct drm_master *m);
 
-/* returns true if currently okay to sleep */
-static __inline__ bool drm_can_sleep(void)
-{
-#ifdef __NetBSD__
-	return false;		/* XXX */
-#else
-	if (in_atomic() || in_dbg_master() || irqs_disabled())
-		return false;
-	return true;
-#endif
-}
-
 #ifdef __NetBSD__
 
 /* XXX This is pretty kludgerific.  */

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_util.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_util.h:1.2 src/sys/external/bsd/drm2/dist/include/drm/drm_util.h:1.3
--- src/sys/external/bsd/drm2/dist/include/drm/drm_util.h:1.2	Sat Dec 18 23:45:46 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_util.h	Sun Dec 19 01:56:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_util.h,v 1.2 2021/12/18 23:45:46 riastradh Exp $	*/
+/*	$NetBSD: drm_util.h,v 1.3 2021/12/19 01:56:00 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -77,9 +77,13 @@
  */
 static inline bool drm_can_sleep(void)
 {
+#ifdef __NetBSD__
+	return false;		/* XXX */
+#else
 	if (in_atomic() || in_dbg_master() || irqs_disabled())
 		return false;
 	return true;
+#endif
 }
 
 #endif

Reply via email to