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

Commit aff602e7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mdss: mdp: Add support for the new scm_call2 API"

parents 16d89e3b a10c4fdc
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ struct msm_mdp_interface mdp5 = {
#define AB_QUOTA 800000000

#define MEM_PROTECT_SD_CTRL 0xF
#define MEM_PROTECT_SD_CTRL_FLAT 0x14

static DEFINE_SPINLOCK(mdp_lock);
static DEFINE_MUTEX(mdp_clk_lock);
@@ -2917,11 +2918,20 @@ int mdss_mdp_secure_display_ctrl(unsigned int enable)
	} __attribute__ ((__packed__)) request;
	unsigned int resp = -1;
	int ret = 0;
	struct scm_desc desc;

	request.enable = enable;
	desc.args[0] = request.enable = enable;
	desc.arginfo = SCM_ARGS(1);

	if (!is_scm_armv8()) {
		ret = scm_call(SCM_SVC_MP, MEM_PROTECT_SD_CTRL,
			&request, sizeof(request), &resp, sizeof(resp));
	} else {
		ret = scm_call2(SCM_SIP_FNID(SCM_SVC_MP,
				MEM_PROTECT_SD_CTRL_FLAT), &desc);
		resp = desc.ret[0];
	}

	pr_debug("scm_call MEM_PROTECT_SD_CTRL(%u): ret=%d, resp=%x",
				enable, ret, resp);
	if (ret)