summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2016-03-01 17:49:00 -0800
committerKyle Yan <kyan@codeaurora.org>2016-04-28 16:43:17 -0700
commit356be485d085cd276c1041f70c16390be019b6c1 (patch)
tree95a1f3e687f4dd532d0556def03fc422443743fc /include/uapi/linux
parent40783c97f5d6f398e253a3a00a0bb213bc925b4a (diff)
msm: mdss: Adding interface for supporting destination scaler.
MSM mdss 3xx hardware supports destination scaling for upscaling the layer mixer output to the panel resolution. This change adds the new interface to support the user space client using this feature. CRs-Fixed: 988990 Change-Id: Ie267f0fd81cd8cf04a5c1f1c6a8c48d456a3035e Signed-off-by: Benjamin Chan <bkchan@codeaurora.org> Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/msm_mdp_ext.h77
1 files changed, 76 insertions, 1 deletions
diff --git a/include/uapi/linux/msm_mdp_ext.h b/include/uapi/linux/msm_mdp_ext.h
index 00e8a873816b..7bb87155bfcc 100644
--- a/include/uapi/linux/msm_mdp_ext.h
+++ b/include/uapi/linux/msm_mdp_ext.h
@@ -30,6 +30,15 @@
#define MSMFB_MDP_SET_CFG _IOW(MDP_IOCTL_MAGIC, 130, \
struct mdp_set_cfg)
+/*
+ * To allow proper structure padding for 64bit/32bit target
+ */
+#ifdef __LP64
+#define MDP_LAYER_COMMIT_V1_PAD 3
+#else
+#define MDP_LAYER_COMMIT_V1_PAD 4
+#endif
+
/**********************************************************************
LAYER FLAG CONFIGURATION
**********************************************************************/
@@ -76,6 +85,25 @@ LAYER FLAG CONFIGURATION
#define MDP_LAYER_ENABLE_QSEED3_SCALE 0x800
/**********************************************************************
+DESTINATION SCALER FLAG CONFIGURATION
+**********************************************************************/
+
+/* Enable/disable Destination scaler */
+#define MDP_DESTSCALER_ENABLE 0x1
+
+/*
+ * Indicating mdp_destination_scaler_data contains
+ * Scaling parameter update. Can be set anytime.
+ */
+#define MDP_DESTSCALER_SCALE_UPDATE 0x2
+
+/*
+ * Indicating mdp_destination_scaler_data contains
+ * Detail enhancement setting update. Can be set anytime.
+ */
+#define MDP_DESTSCALER_ENHANCER_UPDATE 0x4
+
+/**********************************************************************
VALIDATE/COMMIT FLAG CONFIGURATION
**********************************************************************/
@@ -297,6 +325,41 @@ struct mdp_output_layer {
};
/*
+ * Destination scaling info structure holds setup paramaters for upscaling
+ * setting in the destination scaling block.
+ */
+struct mdp_destination_scaler_data {
+ /*
+ * Flag to switch between mode for destination scaler. Please Refer to
+ * destination scaler flag config for all possible setting.
+ */
+ uint32_t flags;
+
+ /*
+ * Destination scaler selection index. Client provides the index in
+ * validate and commit call.
+ */
+ uint32_t dest_scaler_ndx;
+
+ /*
+ * LM width configuration per Destination scaling updates
+ */
+ uint32_t lm_width;
+
+ /*
+ * LM height configuration per Destination scaling updates
+ */
+ uint32_t lm_height;
+
+ /*
+ * The scaling parameters for all the mode except disable. For
+ * disabling the scaler, there is no need to provide the scale.
+ * A userspace pointer points to struct mdp_scale_data_v2.
+ */
+ uint64_t __user scale;
+};
+
+/*
* Commit structure holds layer stack send by client for validate and commit
* call. If layers are different between validate and commit call then commit
* call will also do validation. In such case, commit may fail.
@@ -362,8 +425,20 @@ struct mdp_layer_commit_v1 {
*/
int retire_fence;
+ /*
+ * Scaler data and control for setting up destination scaler.
+ * A userspace pointer that points to a list of
+ * struct mdp_destination_scaler_data.
+ */
+ void __user *dest_scaler;
+
+ /*
+ * Represents number of Destination scaler data provied by userspace.
+ */
+ uint32_t dest_scaler_cnt;
+
/* 32-bits reserved value for future usage. */
- uint32_t reserved[6];
+ uint32_t reserved[MDP_LAYER_COMMIT_V1_PAD];
};
/*