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

Commit e3f107e9 authored by Gopikrishnaiah Anandan's avatar Gopikrishnaiah Anandan Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Update the postprocessing ops using mdss revision



Post processing ops for feature is dependent on the mdss revision.
When the probe of mdp post processing driver is called, driver
should hook the function pointers based on the mdss revision.

CRs-Fixed: 985286
Change-Id: I689f291902d45d5333de0b49f51166a1343c3d06
Signed-off-by: default avatarGopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: default avatarPing Li <pingli@codeaurora.org>
parent 7d139340
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -24,13 +24,7 @@ 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

ifeq ($(CONFIG_FB_MSM_MDSS),y)
obj-$(CONFIG_DEBUG_FS) += mdss_debug.o mdss_debug_xlog.o
+4 −5
Original line number Diff line number Diff line
@@ -2217,11 +2217,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");
@@ -2278,6 +2273,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);
+24 −0
Original line number Diff line number Diff line
@@ -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 void *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,
@@ -2027,6 +2029,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 = mdss_mdp_pipe_get(mdata, BIT(PP_BLOCK(block)));
		if (IS_ERR_OR_NULL(pipe)) {
@@ -7304,3 +7307,24 @@ static inline int pp_validate_dspp_mfd_block(struct msm_fb_data_type *mfd,

	return 0;
}

static void *pp_get_driver_ops(struct mdp_pp_driver_ops *ops)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	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);
	    break;
	default:
	    memset(ops, 0, sizeof(struct mdp_pp_driver_ops));
	    break;
	}
	return pp_cfg;
}
+2 −9
Original line number Diff line number Diff line
@@ -165,15 +165,8 @@ struct mdss_pp_res_type {
	void *pp_data_v1_7;
};

#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);


static inline void pp_sts_set_split_bits(u32 *sts, u32 bits)
{
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ static int pp_dither_get_version(u32 *version);
static int pp_hist_lut_get_version(u32 *version);
static void pp_gamut_clock_gating_en(char __iomem *base_addr);

void *pp_get_driver_ops(struct mdp_pp_driver_ops *ops)
void *pp_get_driver_ops_v1_7(struct mdp_pp_driver_ops *ops)
{
	if (!ops) {
		pr_err("PP driver ops invalid %p\n", ops);