From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Dave Airlie <airlied@redhat.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 2/3] drm/file: Uncompact the feature flags
Date: Fri, 2 Nov 2018 14:25:42 +0100 [thread overview]
Message-ID: <20181102132543.16486-2-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20181102132543.16486-1-daniel.vetter@ffwll.ch>
This essentially undoes
commit 39868bd7668bd47308b1dfd97c212757caee764f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Oct 29 08:55:58 2013 +0000
drm: Compact booleans within struct drm_file
We do lockless access to these flags everywhere, and it's kinda not a
great idea to mix lockless and bitfields. Aside from that gcc isn't
generating great code for these.
If this ever becomes an issue size-wise, I think we need atomic_t here
and atomic bitflag ops.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
include/drm/drm_file.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
index 26485acc51d7..84ac79219e4c 100644
--- a/include/drm/drm_file.h
+++ b/include/drm/drm_file.h
@@ -164,14 +164,14 @@ struct drm_file {
* See also the :ref:`section on primary nodes and authentication
* <drm_primary_node>`.
*/
- unsigned authenticated :1;
+ bool authenticated;
/**
* @stereo_allowed:
*
* True when the client has asked us to expose stereo 3D mode flags.
*/
- unsigned stereo_allowed :1;
+ bool stereo_allowed;
/**
* @universal_planes:
@@ -179,10 +179,10 @@ struct drm_file {
* True if client understands CRTC primary planes and cursor planes
* in the plane list. Automatically set when @atomic is set.
*/
- unsigned universal_planes:1;
+ bool universal_planes;
/** @atomic: True if client understands atomic properties. */
- unsigned atomic:1;
+ bool atomic;
/**
* @aspect_ratio_allowed:
@@ -190,14 +190,14 @@ struct drm_file {
* True, if client can handle picture aspect ratios, and has requested
* to pass this information along with the mode.
*/
- unsigned aspect_ratio_allowed:1;
+ bool aspect_ratio_allowed;
/**
* @writeback_connectors:
*
* True if client understands writeback connectors
*/
- unsigned writeback_connectors:1;
+ bool writeback_connectors;
/**
* @is_master:
@@ -208,7 +208,7 @@ struct drm_file {
* See also the :ref:`section on primary nodes and authentication
* <drm_primary_node>`.
*/
- unsigned is_master:1;
+ bool is_master;
/**
* @master:
--
2.14.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-11-02 13:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 13:25 [PATCH 1/3] drm/lease: debug output for lease creation Daniel Vetter
2018-11-02 13:25 ` Daniel Vetter [this message]
2018-11-02 17:05 ` [PATCH 2/3] drm/file: Uncompact the feature flags Chris Wilson
2018-11-02 13:25 ` [PATCH 3/3] drm/lease: look at ->universal_planes only once Daniel Vetter
2018-11-02 15:04 ` Keith Packard
2018-11-02 21:46 ` [PATCH] " Daniel Vetter
2018-11-05 10:12 ` Daniel Vetter
2018-11-06 17:23 ` Daniel Vetter
2018-11-02 14:18 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/lease: debug output for lease creation Patchwork
2018-11-02 14:36 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-02 15:02 ` [PATCH 1/3] " Keith Packard
2018-11-02 16:16 ` ✓ Fi.CI.IGT: success for series starting with [1/3] " Patchwork
2018-11-02 22:37 ` ✗ Fi.CI.BAT: failure for series starting with [1/3] drm/lease: debug output for lease creation (rev2) Patchwork
2018-11-05 10:26 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/lease: debug output for lease creation (rev3) Patchwork
2018-11-05 10:43 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-05 11:57 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-11-06 8:46 ` ✓ Fi.CI.IGT: success " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181102132543.16486-2-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--cc=airlied@redhat.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox