From bae2a99bc330bbbbf567ff8a970065b8813b59e9 Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Wed, 20 Nov 2013 14:02:09 -0800 Subject: [PATCH] video: adf: remove PAGE_SIZE from userspace-facing header Systems may define PAGE_SIZE in userspace limits.h but don't have to. PAGE_SIZE was picked as an arbitrary "reasonable" limit so just use 4096 instead. Change-Id: I9555e39aba64a3a70f61eb6ded2a4129ab236ce0 Signed-off-by: Greg Hackmann --- include/uapi/video/adf.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/uapi/video/adf.h b/include/uapi/video/adf.h index 2ba345ca458b..73cb936e0da9 100644 --- a/include/uapi/video/adf.h +++ b/include/uapi/video/adf.h @@ -22,7 +22,7 @@ #include #define ADF_NAME_LEN 32 -#define ADF_MAX_CUSTOM_DATA_SIZE PAGE_SIZE +#define ADF_MAX_CUSTOM_DATA_SIZE 4096 enum adf_interface_type { ADF_INTF_DSI = 0, @@ -126,7 +126,7 @@ struct adf_buffer_config { __s64 acquire_fence; }; -#define ADF_MAX_BUFFERS (PAGE_SIZE / sizeof(struct adf_buffer_config)) +#define ADF_MAX_BUFFERS (4096 / sizeof(struct adf_buffer_config)) /** * struct adf_post_config - request to flip to a new set of buffers @@ -152,7 +152,7 @@ struct adf_post_config { __s64 complete_fence; }; -#define ADF_MAX_INTERFACES (PAGE_SIZE / sizeof(__u32)) +#define ADF_MAX_INTERFACES (4096 / sizeof(__u32)) /** * struct adf_simple_buffer_allocate - request to allocate a "simple" buffer @@ -233,7 +233,7 @@ struct adf_device_data { size_t custom_data_size; void __user *custom_data; }; -#define ADF_MAX_ATTACHMENTS (PAGE_SIZE / sizeof(struct adf_attachment)) +#define ADF_MAX_ATTACHMENTS (4096 / sizeof(struct adf_attachment)) /** * struct adf_device_data - describes a display interface @@ -273,7 +273,7 @@ struct adf_interface_data { size_t custom_data_size; void __user *custom_data; }; -#define ADF_MAX_MODES (PAGE_SIZE / sizeof(struct drm_mode_modeinfo)) +#define ADF_MAX_MODES (4096 / sizeof(struct drm_mode_modeinfo)) /** * struct adf_overlay_engine_data - describes an overlay engine @@ -293,7 +293,7 @@ struct adf_overlay_engine_data { size_t custom_data_size; void __user *custom_data; }; -#define ADF_MAX_SUPPORTED_FORMATS (PAGE_SIZE / sizeof(__u32)) +#define ADF_MAX_SUPPORTED_FORMATS (4096 / sizeof(__u32)) #define ADF_SET_EVENT _IOW('D', 0, struct adf_set_event) #define ADF_BLANK _IOW('D', 1, __u8) -- 2.34.1