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

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

Log Message:
Move drm_file ifdef goo to the one defined in drm_file.h.

drm_lock_data is defined in drm_auth.h and already has the
ifdef goo.

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


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/external/bsd/drm2/dist/include/drm/drmP.h
cvs rdiff -u -r1.4 -r1.5 \
    src/sys/external/bsd/drm2/dist/include/drm/drm_file.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.54 src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.55
--- src/sys/external/bsd/drm2/dist/include/drm/drmP.h:1.54	Sun Dec 19 01:56:42 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drmP.h	Sun Dec 19 01:56:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drmP.h,v 1.54 2021/12/19 01:56:42 riastradh Exp $	*/
+/*	$NetBSD: drmP.h,v 1.55 2021/12/19 01:56:50 riastradh Exp $	*/
 
 /*
  * Internal Header for the Direct Rendering Manager
@@ -159,89 +159,6 @@ struct drm_prime_file_private {
 	struct mutex lock;
 };
 
-/** File private data */
-struct drm_file {
-	unsigned authenticated :1;
-	/* Whether we're master for a minor. Protected by master_mutex */
-	unsigned is_master :1;
-	/* true when the client has asked us to expose stereo 3D mode flags */
-	unsigned stereo_allowed :1;
-	/*
-	 * true if client understands CRTC primary planes and cursor planes
-	 * in the plane list
-	 */
-	unsigned universal_planes:1;
-	/* true if client understands atomic properties */
-	unsigned atomic:1;
-	/*
-	 * This client is allowed to gain master privileges for @master.
-	 * Protected by struct drm_device::master_mutex.
-	 */
-	unsigned allowed_master:1;
-
-#ifndef __NetBSD__
-	struct pid *pid;
-	kuid_t uid;
-#endif
-	drm_magic_t magic;
-	struct list_head lhead;
-	struct drm_minor *minor;
-	unsigned long lock_count;
-
-	/** Mapping of mm object handles to object pointers. */
-	struct idr object_idr;
-	/** Lock for synchronization of access to object_idr. */
-	spinlock_t table_lock;
-
-	struct file *filp;
-	void *driver_priv;
-
-	struct drm_master *master; /* master this node is currently associated with
-				      N.B. not always minor->master */
-	/**
-	 * fbs - List of framebuffers associated with this file.
-	 *
-	 * Protected by fbs_lock. Note that the fbs list holds a reference on
-	 * the fb object to prevent it from untimely disappearing.
-	 */
-	struct list_head fbs;
-	struct mutex fbs_lock;
-
-	/** User-created blob properties; this retains a reference on the
-	 *  property. */
-	struct list_head blobs;
-
-#ifdef __NetBSD__
-	drm_waitqueue_t event_wait;
-	struct selinfo event_selq;
-#else
-	wait_queue_head_t event_wait;
-#endif
-	struct list_head event_list;
-	int event_space;
-
-	struct drm_prime_file_private prime;
-};
-
-/**
- * Lock data.
- */
-struct drm_lock_data {
-	struct drm_hw_lock *hw_lock;	/**< Hardware lock */
-	/** Private of lock holder's file (NULL=kernel) */
-	struct drm_file *file_priv;
-#ifdef __NetBSD__
-	drm_waitqueue_t lock_queue;	/**< Queue of blocked processes */
-#else
-	wait_queue_head_t lock_queue;	/**< Queue of blocked processes */
-#endif
-	unsigned long lock_time;	/**< Time of last lock in jiffies */
-	spinlock_t spinlock;
-	uint32_t kernel_waiters;
-	uint32_t user_waiters;
-	int idle_has_lock;
-};
-
 /**
  * struct drm_master - drm master structure
  *

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_file.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.4 src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.5
--- src/sys/external/bsd/drm2/dist/include/drm/drm_file.h:1.4	Sun Dec 19 00:58:04 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_file.h	Sun Dec 19 01:56:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_file.h,v 1.4 2021/12/19 00:58:04 riastradh Exp $	*/
+/*	$NetBSD: drm_file.h,v 1.5 2021/12/19 01:56:50 riastradh Exp $	*/
 
 /*
  * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
@@ -230,8 +230,10 @@ struct drm_file {
 	 */
 	struct drm_master *master;
 
+#ifndef __NetBSD__
 	/** @pid: Process that opened this file. */
 	struct pid *pid;
+#endif
 
 	/** @magic: Authentication magic, see @authenticated. */
 	drm_magic_t magic;
@@ -299,7 +301,12 @@ struct drm_file {
 	struct list_head blobs;
 
 	/** @event_wait: Waitqueue for new events added to @event_list. */
+#ifdef __NetBSD__
+	drm_waitqueue_t event_wait;
+	struct selinfo event_selq;
+#else
 	wait_queue_head_t event_wait;
+#endif
 
 	/**
 	 * @pending_event_list:

Reply via email to