aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_mode_config.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2017-07-23 20:46:39 -0700
committerDaniel Stone <daniels@collabora.com>2017-08-01 17:50:06 +0100
commitdb1689aa61bd1efb5ce9b896e7aa860a85b7f1b6 (patch)
tree0f9f810ae07e0eeed4f483ab5c5200265c748931 /drivers/gpu/drm/drm_mode_config.c
parentdrm: Plumb modifiers through plane init (diff)
downloadlinux-dev-db1689aa61bd1efb5ce9b896e7aa860a85b7f1b6.tar.xz
linux-dev-db1689aa61bd1efb5ce9b896e7aa860a85b7f1b6.zip
drm: Create a format/modifier blob
Updated blob layout (Rob, Daniel, Kristian, xerpi) v2: * Removed __packed, and alignment (.+) * Fix indent in drm_format_modifier fields (Liviu) * Remove duplicated modifier > 64 check (Liviu) * Change comment about modifier (Liviu) * Remove arguments to blob creation, use plane instead (Liviu) * Fix data types (Ben) * Make the blob part of uapi (Daniel) v3: Remove unused ret field. Change i, and j to unsigned int (Emil) v4: Use plane->modifier_count instead of recounting (Daniel) v5: Rename modifiers to modifiers_property (Ville) Use sizeof(__u32) instead to reflect UAPI nature (Ville) Make BUILD_BUG_ON for blob header size Cc: Rob Clark <robdclark@gmail.com> Cc: Kristian H. Kristensen <hoegsberg@gmail.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Daniel Stone <daniels@collabora.com> (v2) Reviewed-by: Liviu Dudau <liviu@dudau.co.uk> (v2) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v3) Signed-off-by: Daniel Stone <daniels@collabora.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170724034641.13369-2-ben@bwidawsk.net
Diffstat (limited to 'drivers/gpu/drm/drm_mode_config.c')
-rw-r--r--drivers/gpu/drm/drm_mode_config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index d9862259a2a7..74f6ff5df656 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -337,6 +337,13 @@ static int drm_mode_create_standard_properties(struct drm_device *dev)
return -ENOMEM;
dev->mode_config.gamma_lut_size_property = prop;
+ prop = drm_property_create(dev,
+ DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_BLOB,
+ "IN_FORMATS", 0);
+ if (!prop)
+ return -ENOMEM;
+ dev->mode_config.modifiers_property = prop;
+
return 0;
}