Loading drivers/video/msm/mdss/Makefile +2 −6 Original line number Diff line number Diff line Loading @@ -24,13 +24,9 @@ mdss-mdp-objs += mdss_mdp_wfd.o obj-$(CONFIG_FB_MSM_MDSS) += mdss-mdp.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_mdp_debug.o ifeq ($(CONFIG_ARCH_MSM8996),y) mdss-mdp-objs += mdss_mdp_pp_v1_7.o endif ifeq ($(CONFIG_ARCH_MSM8937),y) mdss-mdp-objs += mdss_mdp_pp_v1_7.o endif mdss-mdp-objs += mdss_mdp_pp_v3.o mdss-mdp-objs += mdss_mdp_pp_common.o ifeq ($(CONFIG_FB_MSM_MDSS),y) obj-$(CONFIG_DEBUG_FS) += mdss_debug.o mdss_debug_xlog.o Loading drivers/video/msm/mdss/mdss_mdp.c +4 −5 Original line number Diff line number Diff line Loading @@ -2256,11 +2256,6 @@ static int mdss_mdp_probe(struct platform_device *pdev) pr_err("unable to initialize mdss mdp resources\n"); goto probe_done; } rc = mdss_mdp_pp_init(&pdev->dev); if (rc) { pr_err("unable to initialize mdss pp resources\n"); goto probe_done; } rc = mdss_mdp_bus_scale_register(mdata); if (rc) { pr_err("unable to register bus scaling\n"); Loading Loading @@ -2317,6 +2312,10 @@ static int mdss_mdp_probe(struct platform_device *pdev) mdss_mdp_footswitch_ctrl_splash(true); mdss_hw_init(mdata); rc = mdss_mdp_pp_init(&pdev->dev); if (rc) pr_err("unable to initialize mdss pp resources\n"); /* Restoring Secure configuration during boot-up */ if (mdss_mdp_req_init_restore_cfg(mdata)) __mdss_restore_sec_cfg(mdata); Loading drivers/video/msm/mdss/mdss_mdp_pp.c +47 −9 Original line number Diff line number Diff line Loading @@ -506,6 +506,8 @@ static inline int pp_validate_dspp_mfd_block(struct msm_fb_data_type *mfd, static int pp_mfd_release_all(struct msm_fb_data_type *mfd); static int pp_mfd_ad_release_all(struct msm_fb_data_type *mfd); static int mdss_mdp_ad_ipc_reset(struct msm_fb_data_type *mfd); static int pp_get_driver_ops(struct mdp_pp_driver_ops *ops); static u32 last_sts, last_state; static inline void mdss_mdp_pp_get_dcm_state(struct mdss_mdp_pipe *pipe, Loading Loading @@ -2047,6 +2049,7 @@ static int pp_hist_setup(u32 *op, u32 block, struct mdss_mdp_mixer *mix) goto error; } } else if (PP_LOCAT(block) == MDSS_PP_SSPP_CFG && (pp_driver_ops.is_sspp_hist_supp) && (pp_driver_ops.is_sspp_hist_supp())) { pipe = __get_hist_pipe(PP_BLOCK(block)); if (IS_ERR_OR_NULL(pipe)) { Loading Loading @@ -2790,7 +2793,6 @@ int mdss_mdp_pp_init(struct device *dev) struct mdss_data_type *mdata = mdss_mdp_get_mdata(); struct mdss_mdp_pipe *vig; struct pp_hist_col_info *hist; void *ret_ptr = NULL; u32 ctl_off = 0; if (!mdata) Loading @@ -2812,17 +2814,13 @@ int mdss_mdp_pp_init(struct device *dev) if (mdss_mdp_pp_dt_parse(dev)) pr_info("No PP info in device tree\n"); ret_ptr = pp_get_driver_ops(&pp_driver_ops); if (IS_ERR(ret_ptr)) { ret = pp_get_driver_ops(&pp_driver_ops); if (ret) { pr_err("pp_get_driver_ops failed, ret=%d\n", (int) PTR_ERR(ret_ptr)); ret = PTR_ERR(ret_ptr); ret); goto pp_exit; } else { mdss_pp_res->pp_data_res = ret_ptr; pp_ops = pp_driver_ops.pp_ops; } pp_ops = pp_driver_ops.pp_ops; hist = devm_kzalloc(dev, sizeof(struct pp_hist_col_info) * mdata->ndspp, Loading Loading @@ -7296,3 +7294,43 @@ static inline int pp_validate_dspp_mfd_block(struct msm_fb_data_type *mfd, return 0; } static int pp_get_driver_ops(struct mdp_pp_driver_ops *ops) { struct mdss_data_type *mdata = mdss_mdp_get_mdata(); int ret = 0; void *pp_cfg = NULL; switch (mdata->mdp_rev) { case MDSS_MDP_HW_REV_107: case MDSS_MDP_HW_REV_107_1: case MDSS_MDP_HW_REV_107_2: case MDSS_MDP_HW_REV_114: case MDSS_MDP_HW_REV_115: case MDSS_MDP_HW_REV_116: pp_cfg = pp_get_driver_ops_v1_7(ops); if (IS_ERR_OR_NULL(pp_cfg)) ret = -EINVAL; else mdss_pp_res->pp_data_v1_7 = pp_cfg; break; case MDSS_MDP_HW_REV_300: case MDSS_MDP_HW_REV_301: pp_cfg = pp_get_driver_ops_v3(ops); if (IS_ERR_OR_NULL(pp_cfg)) { ret = -EINVAL; } else { mdss_pp_res->pp_data_v1_7 = pp_cfg; /* Currently all caching data is used from v17 for V3 * hence setting the pointer to NULL. Will be used if we * have to add any caching specific to V3. */ mdss_pp_res->pp_data_v3 = NULL; } break; default: memset(ops, 0, sizeof(struct mdp_pp_driver_ops)); break; } return ret; } drivers/video/msm/mdss/mdss_mdp_pp.h +6 −11 Original line number Diff line number Diff line Loading @@ -158,22 +158,17 @@ struct mdss_pp_res_type { /* physical info */ struct pp_hist_col_info *dspp_hist; /* * The pp_data_res will be a pointer to newer MDP revisions of the * The pp_data_v1_7 will be a pointer to newer MDP revisions of the * pp_res, which will hold the cfg_payloads of each feature in a single * struct. */ void *pp_data_res; void *pp_data_v1_7; void *pp_data_v3; }; #if defined(CONFIG_ARCH_MSM8996) || defined(CONFIG_ARCH_MSM8937) void *pp_get_driver_ops(struct mdp_pp_driver_ops *ops); #else static inline void *pp_get_driver_ops(struct mdp_pp_driver_ops *ops) { memset(ops, 0, sizeof(struct mdp_pp_driver_ops)); return NULL; } #endif void *pp_get_driver_ops_v1_7(struct mdp_pp_driver_ops *ops); void *pp_get_driver_ops_v3(struct mdp_pp_driver_ops *ops); static inline void pp_sts_set_split_bits(u32 *sts, u32 bits) { Loading drivers/video/msm/mdss/mdss_mdp_pp_cache_config.c +19 −19 Original line number Diff line number Diff line Loading @@ -112,12 +112,12 @@ static int pp_hist_lut_cache_params_v1_7(struct mdp_hist_lut_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->ops & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -295,12 +295,12 @@ int pp_dither_cache_params_v1_7(struct mdp_dither_cfg_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if ((config->flags & MDSS_PP_SPLIT_MASK) == MDSS_PP_SPLIT_MASK) { pr_warn("Can't set both split bits\n"); Loading Loading @@ -397,11 +397,11 @@ static int pp_gamut_cache_params_v1_7(struct mdp_gamut_cfg_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->flags & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -646,12 +646,12 @@ static int pp_pcc_cache_params_v1_7(struct mdp_pcc_cfg_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->ops & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -744,11 +744,11 @@ static int pp_igc_lut_cache_params_v1_7(struct mdp_igc_lut_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->ops & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -1019,7 +1019,7 @@ static int pp_pgc_lut_cache_params_v1_7(struct mdp_pgc_lut_data *config, pr_err("invalid disp_num %d\n", disp_num); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (!res_cache) { pr_err("invalid resource payload\n"); return -EINVAL; Loading Loading @@ -1139,12 +1139,12 @@ static int pp_pa_cache_params_v1_7(struct mdp_pa_v2_cfg_data *config, return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("Invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("Invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->flags & MDP_PP_OPS_READ) { pr_err("Read op is not supported\n"); return -EINVAL; Loading Loading
drivers/video/msm/mdss/Makefile +2 −6 Original line number Diff line number Diff line Loading @@ -24,13 +24,9 @@ mdss-mdp-objs += mdss_mdp_wfd.o obj-$(CONFIG_FB_MSM_MDSS) += mdss-mdp.o obj-$(CONFIG_FB_MSM_MDSS) += mdss_mdp_debug.o ifeq ($(CONFIG_ARCH_MSM8996),y) mdss-mdp-objs += mdss_mdp_pp_v1_7.o endif ifeq ($(CONFIG_ARCH_MSM8937),y) mdss-mdp-objs += mdss_mdp_pp_v1_7.o endif mdss-mdp-objs += mdss_mdp_pp_v3.o mdss-mdp-objs += mdss_mdp_pp_common.o ifeq ($(CONFIG_FB_MSM_MDSS),y) obj-$(CONFIG_DEBUG_FS) += mdss_debug.o mdss_debug_xlog.o Loading
drivers/video/msm/mdss/mdss_mdp.c +4 −5 Original line number Diff line number Diff line Loading @@ -2256,11 +2256,6 @@ static int mdss_mdp_probe(struct platform_device *pdev) pr_err("unable to initialize mdss mdp resources\n"); goto probe_done; } rc = mdss_mdp_pp_init(&pdev->dev); if (rc) { pr_err("unable to initialize mdss pp resources\n"); goto probe_done; } rc = mdss_mdp_bus_scale_register(mdata); if (rc) { pr_err("unable to register bus scaling\n"); Loading Loading @@ -2317,6 +2312,10 @@ static int mdss_mdp_probe(struct platform_device *pdev) mdss_mdp_footswitch_ctrl_splash(true); mdss_hw_init(mdata); rc = mdss_mdp_pp_init(&pdev->dev); if (rc) pr_err("unable to initialize mdss pp resources\n"); /* Restoring Secure configuration during boot-up */ if (mdss_mdp_req_init_restore_cfg(mdata)) __mdss_restore_sec_cfg(mdata); Loading
drivers/video/msm/mdss/mdss_mdp_pp.c +47 −9 Original line number Diff line number Diff line Loading @@ -506,6 +506,8 @@ static inline int pp_validate_dspp_mfd_block(struct msm_fb_data_type *mfd, static int pp_mfd_release_all(struct msm_fb_data_type *mfd); static int pp_mfd_ad_release_all(struct msm_fb_data_type *mfd); static int mdss_mdp_ad_ipc_reset(struct msm_fb_data_type *mfd); static int pp_get_driver_ops(struct mdp_pp_driver_ops *ops); static u32 last_sts, last_state; static inline void mdss_mdp_pp_get_dcm_state(struct mdss_mdp_pipe *pipe, Loading Loading @@ -2047,6 +2049,7 @@ static int pp_hist_setup(u32 *op, u32 block, struct mdss_mdp_mixer *mix) goto error; } } else if (PP_LOCAT(block) == MDSS_PP_SSPP_CFG && (pp_driver_ops.is_sspp_hist_supp) && (pp_driver_ops.is_sspp_hist_supp())) { pipe = __get_hist_pipe(PP_BLOCK(block)); if (IS_ERR_OR_NULL(pipe)) { Loading Loading @@ -2790,7 +2793,6 @@ int mdss_mdp_pp_init(struct device *dev) struct mdss_data_type *mdata = mdss_mdp_get_mdata(); struct mdss_mdp_pipe *vig; struct pp_hist_col_info *hist; void *ret_ptr = NULL; u32 ctl_off = 0; if (!mdata) Loading @@ -2812,17 +2814,13 @@ int mdss_mdp_pp_init(struct device *dev) if (mdss_mdp_pp_dt_parse(dev)) pr_info("No PP info in device tree\n"); ret_ptr = pp_get_driver_ops(&pp_driver_ops); if (IS_ERR(ret_ptr)) { ret = pp_get_driver_ops(&pp_driver_ops); if (ret) { pr_err("pp_get_driver_ops failed, ret=%d\n", (int) PTR_ERR(ret_ptr)); ret = PTR_ERR(ret_ptr); ret); goto pp_exit; } else { mdss_pp_res->pp_data_res = ret_ptr; pp_ops = pp_driver_ops.pp_ops; } pp_ops = pp_driver_ops.pp_ops; hist = devm_kzalloc(dev, sizeof(struct pp_hist_col_info) * mdata->ndspp, Loading Loading @@ -7296,3 +7294,43 @@ static inline int pp_validate_dspp_mfd_block(struct msm_fb_data_type *mfd, return 0; } static int pp_get_driver_ops(struct mdp_pp_driver_ops *ops) { struct mdss_data_type *mdata = mdss_mdp_get_mdata(); int ret = 0; void *pp_cfg = NULL; switch (mdata->mdp_rev) { case MDSS_MDP_HW_REV_107: case MDSS_MDP_HW_REV_107_1: case MDSS_MDP_HW_REV_107_2: case MDSS_MDP_HW_REV_114: case MDSS_MDP_HW_REV_115: case MDSS_MDP_HW_REV_116: pp_cfg = pp_get_driver_ops_v1_7(ops); if (IS_ERR_OR_NULL(pp_cfg)) ret = -EINVAL; else mdss_pp_res->pp_data_v1_7 = pp_cfg; break; case MDSS_MDP_HW_REV_300: case MDSS_MDP_HW_REV_301: pp_cfg = pp_get_driver_ops_v3(ops); if (IS_ERR_OR_NULL(pp_cfg)) { ret = -EINVAL; } else { mdss_pp_res->pp_data_v1_7 = pp_cfg; /* Currently all caching data is used from v17 for V3 * hence setting the pointer to NULL. Will be used if we * have to add any caching specific to V3. */ mdss_pp_res->pp_data_v3 = NULL; } break; default: memset(ops, 0, sizeof(struct mdp_pp_driver_ops)); break; } return ret; }
drivers/video/msm/mdss/mdss_mdp_pp.h +6 −11 Original line number Diff line number Diff line Loading @@ -158,22 +158,17 @@ struct mdss_pp_res_type { /* physical info */ struct pp_hist_col_info *dspp_hist; /* * The pp_data_res will be a pointer to newer MDP revisions of the * The pp_data_v1_7 will be a pointer to newer MDP revisions of the * pp_res, which will hold the cfg_payloads of each feature in a single * struct. */ void *pp_data_res; void *pp_data_v1_7; void *pp_data_v3; }; #if defined(CONFIG_ARCH_MSM8996) || defined(CONFIG_ARCH_MSM8937) void *pp_get_driver_ops(struct mdp_pp_driver_ops *ops); #else static inline void *pp_get_driver_ops(struct mdp_pp_driver_ops *ops) { memset(ops, 0, sizeof(struct mdp_pp_driver_ops)); return NULL; } #endif void *pp_get_driver_ops_v1_7(struct mdp_pp_driver_ops *ops); void *pp_get_driver_ops_v3(struct mdp_pp_driver_ops *ops); static inline void pp_sts_set_split_bits(u32 *sts, u32 bits) { Loading
drivers/video/msm/mdss/mdss_mdp_pp_cache_config.c +19 −19 Original line number Diff line number Diff line Loading @@ -112,12 +112,12 @@ static int pp_hist_lut_cache_params_v1_7(struct mdp_hist_lut_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->ops & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -295,12 +295,12 @@ int pp_dither_cache_params_v1_7(struct mdp_dither_cfg_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if ((config->flags & MDSS_PP_SPLIT_MASK) == MDSS_PP_SPLIT_MASK) { pr_warn("Can't set both split bits\n"); Loading Loading @@ -397,11 +397,11 @@ static int pp_gamut_cache_params_v1_7(struct mdp_gamut_cfg_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->flags & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -646,12 +646,12 @@ static int pp_pcc_cache_params_v1_7(struct mdp_pcc_cfg_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->ops & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -744,11 +744,11 @@ static int pp_igc_lut_cache_params_v1_7(struct mdp_igc_lut_data *config, pr_err("invalid config block %d\n", config->block); return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->ops & MDP_PP_OPS_READ) { pr_err("read op is not supported\n"); return -EINVAL; Loading Loading @@ -1019,7 +1019,7 @@ static int pp_pgc_lut_cache_params_v1_7(struct mdp_pgc_lut_data *config, pr_err("invalid disp_num %d\n", disp_num); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (!res_cache) { pr_err("invalid resource payload\n"); return -EINVAL; Loading Loading @@ -1139,12 +1139,12 @@ static int pp_pa_cache_params_v1_7(struct mdp_pa_v2_cfg_data *config, return -EINVAL; } if (!mdss_pp_res->pp_data_res) { pr_err("Invalid pp_data_res %p\n", mdss_pp_res->pp_data_res); if (!mdss_pp_res->pp_data_v1_7) { pr_err("Invalid pp_data_v1_7 %p\n", mdss_pp_res->pp_data_v1_7); return -EINVAL; } res_cache = mdss_pp_res->pp_data_res; res_cache = mdss_pp_res->pp_data_v1_7; if (config->flags & MDP_PP_OPS_READ) { pr_err("Read op is not supported\n"); return -EINVAL; Loading