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/include/drm Move drm_file ifdef g...



details:   https://anonhg.NetBSD.org/src/rev/64ec17355e6e
branches:  trunk
changeset: 1028131:64ec17355e6e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:56:50 2021 +0000

description:
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 <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/include/drm/drmP.h     |  85 +----------------------
 sys/external/bsd/drm2/dist/include/drm/drm_file.h |   9 ++-
 2 files changed, 9 insertions(+), 85 deletions(-)

diffs (132 lines):

diff -r 4044cb25ad6e -r 64ec17355e6e sys/external/bsd/drm2/dist/include/drm/drmP.h
--- a/sys/external/bsd/drm2/dist/include/drm/drmP.h     Sun Dec 19 01:56:42 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drmP.h     Sun Dec 19 01:56:50 2021 +0000
@@ -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 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
  *
diff -r 4044cb25ad6e -r 64ec17355e6e sys/external/bsd/drm2/dist/include/drm/drm_file.h
--- a/sys/external/bsd/drm2/dist/include/drm/drm_file.h Sun Dec 19 01:56:42 2021 +0000
+++ b/sys/external/bsd/drm2/dist/include/drm/drm_file.h Sun Dec 19 01:56:50 2021 +0000
@@ -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_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 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:



Home | Main Index | Thread Index | Old Index