Skip to content

Commit

Permalink
drm: Compact booleans within struct drm_file
Browse files Browse the repository at this point in the history
Replace the sparse array of booleans with a bitfield.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Chris Wilson authored and Dave Airlie committed Nov 6, 2013
1 parent 1020dc6 commit 39868bd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions include/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,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;
Expand All @@ -431,13 +435,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.
*
Expand Down

0 comments on commit 39868bd

Please sign in to comment.