Skip to content

Commit

Permalink
mdss: Add MDP_SMP_FORCE_ALLOC mdp flag
Browse files Browse the repository at this point in the history
MDP_SMP_FORCE_ALLOC flag is used to allow SMP
allocations even when there is mismatch between
allocated and requested SMPs for a pipe.
User space can make use of this flag in extreme scenarios
where SMP allocations need to pass like GPU composition
and playback of protected  or secure videos.

Change-Id: I369b4361e7e2bbfc8150add467678c4ef8d5cfb6
Signed-off-by: Justin Philip <[email protected]>
  • Loading branch information
Justin Philip authored and erikcas committed Feb 19, 2015
1 parent 793dc4a commit e776111
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/video/msm/mdss/mdss_mdp_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,8 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
if (pipe->mixer_left->type == MDSS_MDP_MIXER_TYPE_WRITEBACK)
wb_mixer = 1;

/*
* Don't want to allow SMP changes for backend composition pipes
* inorder to preserve SMPs as much as possible.
* On the contrary for non backend composition pipes we should
* allow SMP allocations to prevent composition failures.
*/
force_alloc = !(pipe->flags & MDP_BACKEND_COMPOSITION);
force_alloc = pipe->flags & MDP_SMP_FORCE_ALLOC;

mutex_lock(&mdss_mdp_smp_lock);
if (!is_unused_smp_allowed()) {
for (i = (MAX_PLANES - 1); i >= ps.num_planes; i--) {
Expand Down
1 change: 1 addition & 0 deletions include/uapi/linux/msm_mdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ enum {
#define MDP_MEMORY_ID_TYPE_FB 0x00001000
#define MDP_BWC_EN 0x00000400
#define MDP_DECIMATION_EN 0x00000800
#define MDP_SMP_FORCE_ALLOC 0x00200000
#define MDP_TRANSP_NOP 0xffffffff
#define MDP_ALPHA_NOP 0xff

Expand Down

0 comments on commit e776111

Please sign in to comment.