summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2022-11-18 17:13:43 +0100
committerDmitry Osipenko <dmitry.osipenko@collabora.com>2023-02-27 05:10:03 +0100
commit3842d671d7556f33d5909d472954328201b8b530 (patch)
treea721afe0c0b1ead27271094cec4ff2122c8394e1 /include/drm
parentdrm/gem: Add evict() callback to drm_gem_object_funcs (diff)
downloadlinux-3842d671d7556f33d5909d472954328201b8b530.tar.xz
linux-3842d671d7556f33d5909d472954328201b8b530.zip
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: Thomas Zimmermann <tzimmermann@suse.de> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Link: https://lore.kernel.org/all/20230108210445.3948344-5-dmitry.osipenko@collabora.com/
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_gem_shmem_helper.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h
index a2201b2488c5..5994fed5e327 100644
--- a/include/drm/drm_gem_shmem_helper.h
+++ b/include/drm/drm_gem_shmem_helper.h
@@ -61,20 +61,6 @@ struct drm_gem_shmem_object {
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
*/
struct sg_table *sgt;
@@ -98,9 +84,23 @@ struct drm_gem_shmem_object {
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).
*/
- bool map_wc;
+ bool map_wc : 1;
};
#define to_drm_gem_shmem_obj(obj) \