Commit 3842d671 authored by Dmitry Osipenko's avatar Dmitry Osipenko

drm/shmem-helper: Put booleans in the end of struct drm_gem_shmem_object

Group all 1-bit boolean members of struct drm_gem_shmem_object in the end
of the structure, allowing compiler to pack data better and making code to
look more consistent.
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Suggested-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Link: https://lore.kernel.org/all/20230108210445.3948344-5-dmitry.osipenko@collabora.com/
parent 7eabaa89
...@@ -60,20 +60,6 @@ struct drm_gem_shmem_object { ...@@ -60,20 +60,6 @@ struct drm_gem_shmem_object {
*/ */
struct list_head madv_list; struct list_head madv_list;
/**
* @pages_mark_dirty_on_put:
*
* Mark pages as dirty when they are put.
*/
unsigned int pages_mark_dirty_on_put : 1;
/**
* @pages_mark_accessed_on_put:
*
* Mark pages as accessed when they are put.
*/
unsigned int pages_mark_accessed_on_put : 1;
/** /**
* @sgt: Scatter/gather table for imported PRIME buffers * @sgt: Scatter/gather table for imported PRIME buffers
*/ */
...@@ -97,10 +83,24 @@ struct drm_gem_shmem_object { ...@@ -97,10 +83,24 @@ struct drm_gem_shmem_object {
*/ */
unsigned int vmap_use_count; unsigned int vmap_use_count;
/**
* @pages_mark_dirty_on_put:
*
* Mark pages as dirty when they are put.
*/
bool pages_mark_dirty_on_put : 1;
/**
* @pages_mark_accessed_on_put:
*
* Mark pages as accessed when they are put.
*/
bool pages_mark_accessed_on_put : 1;
/** /**
* @map_wc: map object write-combined (instead of using shmem defaults). * @map_wc: map object write-combined (instead of using shmem defaults).
*/ */
bool map_wc; bool map_wc : 1;
}; };
#define to_drm_gem_shmem_obj(obj) \ #define to_drm_gem_shmem_obj(obj) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment