[PATCH 2/2] drm: Compact booleans within struct drm_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Replace the sparse array of booleans with a bitfield.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 include/drm/drmP.h | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 3a90857bd0ee..02c685f70a72 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -412,8 +412,12 @@ struct drm_prime_file_private {
 
 /** File private data */
 struct drm_file {
-	int always_authenticated;
-	int authenticated;
+	unsigned always_authenticated :1;
+	unsigned authenticated :1;
+	unsigned is_master :1; /* this file private is a master for a minor */
+	/* true when the client has asked us to expose stereo 3D mode flags */
+	unsigned stereo_allowed :1;
+
 	struct pid *pid;
 	kuid_t uid;
 	drm_magic_t magic;
@@ -430,13 +434,8 @@ struct drm_file {
 	struct file *filp;
 	void *driver_priv;
 
-	int is_master; /* this file private is a master for a minor */
 	struct drm_master *master; /* master this node is currently associated with
 				      N.B. not always minor->master */
-
-	/* true when the client has asked us to expose stereo 3D mode flags */
-	bool stereo_allowed;
-
 	/**
 	 * fbs - List of framebuffers associated with this file.
 	 *
-- 
1.8.4.rc3

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux