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

Commit 06f25a82 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of kernel.lnx.4.4-161115.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1087395   Ib43bdbc1ac51334bcd930657c99f7a0aa255255a   clk: msm: mdss: fix potential use of un-initialized vari
1085169 1086278   I67e08d3491fbb7c0960c463cc8f979238b89d818   mdss: display-port: add support to configure stream attr
1062506   I36fd45efe1aa9437d5551002fc75a5f37d9cef79   msm: mdss: dp: handle fast attention events
1084634   I932a58fc633918b151959fcbe320668a87dbc49c   msm: sde: add buf_finish callback to clear last fd
1085169   I391ee35fa20cfade89773ecb565b220cc6249b8d   msm: mdss: hdcp2p2: check for valid keys before authenti
1085169   Ia69987c0e15ec5f15a07ca3a0e44174ab6e5feb9   msm: mdss: dp: select pin assignment D for multi-functio

Change-Id: I9deaf7b62fdf15bd1d6862708ba755abdb51be74
CRs-Fixed: 1062506, 1085169, 1084634, 1087395, 1086278
parents 124459b2 24d0c1f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -468,9 +468,10 @@
		reg =	<0xc990000 0xa84>,
			<0xc011000 0x910>,
			<0x1fcb200 0x050>,
			<0xc8c2200 0x1a0>,
			<0x780000 0x621c>,
			<0xc9e1000 0x02c>;
		reg-names = "dp_ctrl", "dp_phy", "tcsr_regs",
		reg-names = "dp_ctrl", "dp_phy", "tcsr_regs", "dp_mmss_cc",
				"qfprom_physical","hdcp_physical";

		clocks = <&clock_mmss clk_mmss_mnoc_ahb_clk>,
+1 −1
Original line number Diff line number Diff line
@@ -733,7 +733,7 @@ unsigned long dp_vco_get_rate(struct clk *c)
{
	struct dp_pll_vco_clk *vco = mdss_dp_to_vco_clk(c);
	int rc;
	u32 div, hsclk_div, link2xclk_div;
	u32 div, hsclk_div, link2xclk_div = 0;
	u64 vco_rate;
	struct mdss_pll_resources *pll = vco->priv;

+17 −1
Original line number Diff line number Diff line
@@ -205,18 +205,34 @@ static void dsi_pll_calc_dec_frac(struct dsi_pll_cobalt *pll,
	struct dsi_pll_regs *regs = &pll->reg_setup;
	u64 target_freq;
	u64 fref = rsc->vco_ref_clk_rate;
	u32 computed_output_div, div_log;
	u32 computed_output_div, div_log = 0;
	u64 pll_freq;
	u64 divider;
	u64 dec, dec_multiple;
	u32 frac;
	u64 multiplier;
	u32 i;

	target_freq = rsc->vco_current_rate;
	pr_debug("target_freq = %llu\n", target_freq);

	if (config->div_override) {
		computed_output_div = config->output_div;

		/*
		 * Computed_output_div = 2 ^ div_log
		 * To get div_log from output div just get the index of the
		 * 1 bit in the value.
		 * div_log ranges from 0-3. so check the 4 lsbs
		 */

		for (i = 0; i < 4; i++) {
			if (computed_output_div & (1 << i)) {
				div_log = i;
				break;
			}
		}

	} else {
		if (target_freq < MHZ_375) {
			computed_output_div = 8;
+34 −0
Original line number Diff line number Diff line
@@ -304,6 +304,39 @@ static void sde_rotator_buf_queue(struct vb2_buffer *vb)
	v4l2_m2m_buf_queue(ctx->fh.m2m_ctx, vbuf);
}

/*
 * sde_rotator_buf_finish - vb2_ops buf_finish to finalize buffer before going
 *				back to user space
 * @vb: Pointer to vb2 buffer struct.
 */
static void sde_rotator_buf_finish(struct vb2_buffer *vb)
{
	struct sde_rotator_ctx *ctx = vb2_get_drv_priv(vb->vb2_queue);
	int i;

	SDEDEV_DBG(ctx->rot_dev->dev,
			"buf_finish t:%d i:%d s:%d m:%u np:%d up:%lu\n",
			vb->type, vb->index, vb->state,
			vb->vb2_queue->memory,
			vb->num_planes,
			vb->planes[0].m.userptr);

	if (vb->vb2_queue->memory != VB2_MEMORY_USERPTR)
		return;

	/*
	 * We use userptr to tunnel fd, and fd can be the same across qbuf
	 * even though the underlying buffer is different.  Since vb2 layer
	 * optimizes memory mapping for userptr by first checking if userptr
	 * has changed, it will not trigger put_userptr if fd value does
	 * not change.  In order to force buffer release, we need to clear
	 * userptr when the current buffer is done and ready to go back to
	 * user mode. Since 0 is a valid fd, reset userptr to -1 instead.
	 */
	for (i = 0; i < vb->num_planes; i++)
		vb->planes[i].m.userptr = ~0;
}

/*
 * sde_rotator_return_all_buffers - Return all buffers with the given status.
 * @q: Pointer to vb2 buffer queue struct.
@@ -460,6 +493,7 @@ static struct vb2_ops sde_rotator_vb2_q_ops = {
	.stop_streaming  = sde_rotator_stop_streaming,
	.wait_prepare	 = vb2_ops_wait_prepare,
	.wait_finish	 = vb2_ops_wait_finish,
	.buf_finish      = sde_rotator_buf_finish,
};

/*
+56 −3
Original line number Diff line number Diff line
@@ -255,6 +255,15 @@ struct __attribute__ ((__packed__)) hdcp_version_rsp {
	uint32_t appversion;
};

struct __attribute__ ((__packed__)) hdcp_verify_key_req {
	uint32_t commandid;
};

struct __attribute__ ((__packed__)) hdcp_verify_key_rsp {
	uint32_t status;
	uint32_t commandId;
};

struct __attribute__ ((__packed__)) hdcp_lib_init_req_v1 {
	uint32_t commandid;
};
@@ -794,6 +803,48 @@ exit:
	return rc;
}

static int hdcp_lib_verify_keys(struct hdcp_lib_handle *handle)
{
	int rc = -EINVAL;
	struct hdcp_verify_key_req *req_buf;
	struct hdcp_verify_key_rsp *rsp_buf;

	if (!handle) {
		pr_err("invalid input\n");
		goto exit;
	}

	if (!(handle->hdcp_state & HDCP_STATE_APP_LOADED)) {
		pr_err("app not loaded\n");
		goto exit;
	}

	req_buf = (struct hdcp_verify_key_req *)handle->qseecom_handle->sbuf;
	req_buf->commandid = HDCP_TXMTR_VERIFY_KEY;

	rsp_buf = (struct hdcp_verify_key_rsp *)
	    (handle->qseecom_handle->sbuf +
	     QSEECOM_ALIGN(sizeof(struct hdcp_verify_key_req)));

	rc = qseecom_send_command(handle->qseecom_handle,
				  req_buf,
				  QSEECOM_ALIGN(sizeof
						(struct hdcp_verify_key_req)),
				  rsp_buf,
				  QSEECOM_ALIGN(sizeof
						(struct hdcp_verify_key_rsp)));

	if (rc < 0) {
		pr_err("qseecom cmd failed err = %d\n", rc);
		goto exit;
	}

	return rsp_buf->status;
exit:
	return rc;
}


static int hdcp_app_init_legacy(struct hdcp_lib_handle *handle)
{
	int rc = 0;
@@ -1456,11 +1507,13 @@ static bool hdcp_lib_client_feature_supported(void *phdcpcontext)

	rc = hdcp_lib_library_load(handle);
	if (!rc) {
		if (!hdcp_lib_verify_keys(handle)) {
			pr_debug("HDCP2p2 supported\n");
			handle->feature_supported = true;
		hdcp_lib_library_unload(handle);
			supported = true;
		}
		hdcp_lib_library_unload(handle);
	}
exit:
	return supported;
}
Loading