aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hackmann <ghackmann@google.com>2013-11-20 14:02:09 -0800
committerGreg Hackmann <ghackmann@google.com>2013-11-20 14:42:55 -0800
commitb95f5c534f2ca5c2dfd341732afadce10b306ecd (patch)
tree8b01d70a9a3db50b9bccc6e1fe5a0df6755aa264
parent47128ea67fb2978b432c488bd1babb3e4eb16805 (diff)
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 <ghackmann@google.com>
-rw-r--r--include/uapi/video/adf.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/uapi/video/adf.h b/include/uapi/video/adf.h
index 2ba345ca458..73cb936e0da 100644
--- a/include/uapi/video/adf.h
+++ b/include/uapi/video/adf.h
@@ -22,7 +22,7 @@
#include <drm/drm_mode.h>
#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)