Loading drivers/video/msm/mdss/mdss_mdp.h +1 −0 Original line number Diff line number Diff line Loading @@ -401,6 +401,7 @@ struct mdss_overlay_private { u32 splash_mem_addr; u32 splash_mem_size; u32 sd_enabled; }; struct mdss_mdp_perf_params { Loading drivers/video/msm/mdss/mdss_mdp_overlay.c +65 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ #include <mach/iommu_domains.h> #include <mach/event_timer.h> #include <mach/msm_bus.h> #include <mach/scm.h> #include "mdss.h" #include "mdss_debug.h" #include "mdss_fb.h" Loading @@ -42,12 +42,37 @@ #define PP_CLK_CFG_OFF 0 #define PP_CLK_CFG_ON 1 #define MEM_PROTECT_SD_CTRL 0xF struct sd_ctrl_req { unsigned int enable; } __attribute__ ((__packed__)); static atomic_t ov_active_panels = ATOMIC_INIT(0); static int mdss_mdp_overlay_free_fb_pipe(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_fb_parse_dt(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_splash_parse_dt(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_sd_ctrl(struct msm_fb_data_type *mfd, unsigned int enable) { struct sd_ctrl_req request; unsigned int resp = -1; int ret = 0; request.enable = enable; ret = scm_call(SCM_SVC_MP, MEM_PROTECT_SD_CTRL, &request, sizeof(request), &resp, sizeof(resp)); pr_debug("scm_call MEM_PROTECT_SD_CTRL(%u): ret=%d, resp=%x", enable, ret, resp); if (ret) return ret; return resp; } static int mdss_mdp_overlay_get(struct msm_fb_data_type *mfd, struct mdp_overlay *req) { Loading Loading @@ -849,6 +874,7 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd); struct mdss_mdp_ctl *tmp; int ret; int sd_in_pipe = 0; if (ctl->shared_lock) mutex_lock(ctl->shared_lock); Loading @@ -864,12 +890,40 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, mutex_unlock(ctl->shared_lock); return ret; } /* * check if there is a secure display session */ list_for_each_entry(pipe, &mdp5_data->pipes_used, used_list) { if (pipe->flags & MDP_SECURE_DISPLAY_OVERLAY_SESSION) { sd_in_pipe = 1; pr_debug("Secure pipe: %u : %08X\n", pipe->num, pipe->flags); } } /* * If there is no secure display session and sd_enabled, disable the * secure display session */ if (!sd_in_pipe && mdp5_data->sd_enabled) { if (0 == mdss_mdp_overlay_sd_ctrl(mfd, 0)) mdp5_data->sd_enabled = 0; } if (data) mdss_mdp_set_roi(ctl, data); list_for_each_entry(pipe, &mdp5_data->pipes_used, used_list) { struct mdss_mdp_data *buf; /* * When secure display is enabled, if there is a non secure * display pipe, skip that */ if ((mdp5_data->sd_enabled) && !(pipe->flags & MDP_SECURE_DISPLAY_OVERLAY_SESSION)) { pr_warn("Non secure pipe during secure display: %u: %08X, skip\n", pipe->num, pipe->flags); continue; } /* * When external is connected and no dedicated wfd is present, * reprogram DMA pipe before kickoff to clear out any previous Loading Loading @@ -938,6 +992,16 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, ret = mdss_mdp_display_wait4comp(mdp5_data->ctl); if (ret == 0) { mutex_lock(&mfd->lock); if (!mdp5_data->sd_enabled && sd_in_pipe) { ret = mdss_mdp_overlay_sd_ctrl(mfd, 1); if (ret == 0) mdp5_data->sd_enabled = 1; } mutex_unlock(&mfd->lock); } mdss_fb_update_notify_update(mfd); commit_fail: mdss_mdp_overlay_cleanup(mfd); Loading include/uapi/linux/msm_mdp.h +1 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,7 @@ enum { #define MDP_BACKEND_COMPOSITION 0x00040000 #define MDP_BORDERFILL_SUPPORTED 0x00010000 #define MDP_SECURE_OVERLAY_SESSION 0x00008000 #define MDP_SECURE_DISPLAY_OVERLAY_SESSION 0x00002000 #define MDP_OV_PIPE_FORCE_DMA 0x00004000 #define MDP_MEMORY_ID_TYPE_FB 0x00001000 #define MDP_BWC_EN 0x00000400 Loading Loading
drivers/video/msm/mdss/mdss_mdp.h +1 −0 Original line number Diff line number Diff line Loading @@ -401,6 +401,7 @@ struct mdss_overlay_private { u32 splash_mem_addr; u32 splash_mem_size; u32 sd_enabled; }; struct mdss_mdp_perf_params { Loading
drivers/video/msm/mdss/mdss_mdp_overlay.c +65 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ #include <mach/iommu_domains.h> #include <mach/event_timer.h> #include <mach/msm_bus.h> #include <mach/scm.h> #include "mdss.h" #include "mdss_debug.h" #include "mdss_fb.h" Loading @@ -42,12 +42,37 @@ #define PP_CLK_CFG_OFF 0 #define PP_CLK_CFG_ON 1 #define MEM_PROTECT_SD_CTRL 0xF struct sd_ctrl_req { unsigned int enable; } __attribute__ ((__packed__)); static atomic_t ov_active_panels = ATOMIC_INIT(0); static int mdss_mdp_overlay_free_fb_pipe(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_fb_parse_dt(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_splash_parse_dt(struct msm_fb_data_type *mfd); static int mdss_mdp_overlay_sd_ctrl(struct msm_fb_data_type *mfd, unsigned int enable) { struct sd_ctrl_req request; unsigned int resp = -1; int ret = 0; request.enable = enable; ret = scm_call(SCM_SVC_MP, MEM_PROTECT_SD_CTRL, &request, sizeof(request), &resp, sizeof(resp)); pr_debug("scm_call MEM_PROTECT_SD_CTRL(%u): ret=%d, resp=%x", enable, ret, resp); if (ret) return ret; return resp; } static int mdss_mdp_overlay_get(struct msm_fb_data_type *mfd, struct mdp_overlay *req) { Loading Loading @@ -849,6 +874,7 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, struct mdss_mdp_ctl *ctl = mfd_to_ctl(mfd); struct mdss_mdp_ctl *tmp; int ret; int sd_in_pipe = 0; if (ctl->shared_lock) mutex_lock(ctl->shared_lock); Loading @@ -864,12 +890,40 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, mutex_unlock(ctl->shared_lock); return ret; } /* * check if there is a secure display session */ list_for_each_entry(pipe, &mdp5_data->pipes_used, used_list) { if (pipe->flags & MDP_SECURE_DISPLAY_OVERLAY_SESSION) { sd_in_pipe = 1; pr_debug("Secure pipe: %u : %08X\n", pipe->num, pipe->flags); } } /* * If there is no secure display session and sd_enabled, disable the * secure display session */ if (!sd_in_pipe && mdp5_data->sd_enabled) { if (0 == mdss_mdp_overlay_sd_ctrl(mfd, 0)) mdp5_data->sd_enabled = 0; } if (data) mdss_mdp_set_roi(ctl, data); list_for_each_entry(pipe, &mdp5_data->pipes_used, used_list) { struct mdss_mdp_data *buf; /* * When secure display is enabled, if there is a non secure * display pipe, skip that */ if ((mdp5_data->sd_enabled) && !(pipe->flags & MDP_SECURE_DISPLAY_OVERLAY_SESSION)) { pr_warn("Non secure pipe during secure display: %u: %08X, skip\n", pipe->num, pipe->flags); continue; } /* * When external is connected and no dedicated wfd is present, * reprogram DMA pipe before kickoff to clear out any previous Loading Loading @@ -938,6 +992,16 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd, ret = mdss_mdp_display_wait4comp(mdp5_data->ctl); if (ret == 0) { mutex_lock(&mfd->lock); if (!mdp5_data->sd_enabled && sd_in_pipe) { ret = mdss_mdp_overlay_sd_ctrl(mfd, 1); if (ret == 0) mdp5_data->sd_enabled = 1; } mutex_unlock(&mfd->lock); } mdss_fb_update_notify_update(mfd); commit_fail: mdss_mdp_overlay_cleanup(mfd); Loading
include/uapi/linux/msm_mdp.h +1 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,7 @@ enum { #define MDP_BACKEND_COMPOSITION 0x00040000 #define MDP_BORDERFILL_SUPPORTED 0x00010000 #define MDP_SECURE_OVERLAY_SESSION 0x00008000 #define MDP_SECURE_DISPLAY_OVERLAY_SESSION 0x00002000 #define MDP_OV_PIPE_FORCE_DMA 0x00004000 #define MDP_MEMORY_ID_TYPE_FB 0x00001000 #define MDP_BWC_EN 0x00000400 Loading