Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72bd2d17 authored by Naseer Ahmed's avatar Naseer Ahmed Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarBenjamin Chan <bkchan@codeaurora.org>
Signed-off-by: default avatarNaseer Ahmed <naseer@codeaurora.org>
parent 2198278e
Loading
Loading
Loading
Loading
+76 −1
Original line number Diff line number Diff line
@@ -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
**********************************************************************/
@@ -75,6 +84,25 @@ LAYER FLAG CONFIGURATION
/* Flag enabled qseed3 scaling for the current layer */
#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
**********************************************************************/
@@ -296,6 +324,41 @@ struct mdp_output_layer {
	uint32_t			reserved[6];
};

/*
 * 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
@@ -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];
};

/*