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

Commit 32befa25 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of kernel.lnx.4.4-170630.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
2061287   Ie157a930c7eb310829766319e0af742114337e6c   soc: qcom: glink: Remove magic number logic
2047102   I5aacf772c93eb134a3e48c79b3fbdaefd8378581   scsi: ufs: Unblock UFS while ICE HW configuration
1026701   Ied9381e7cbc22882d7d51e0470468f47fd548f32   msm: mdss: Allow post-processing clean-up for primary di
2059742   I15998780b602e325a90e7c8c303cd442c5381fe8   soc: qcom: glink: Move get reference to valid location
2056170   I1c8aa298af4afc7e42d0c8a3690f7d3360e37647   ARM: dts: msm: Add non-removable ufs property for SDM630
2062307   I694299646f62ab29aeff49d4e3749d7858381db4   msm: mdss: Correct PP register programming deferring
2038086   Ia9fdfd5a766add2f8d99003b0c2bfe7d34d57a09   msm: camera: Use mutex lock to avoid race condition

Change-Id: I78b04814d06223a2e53ae8a05d8188cf6e3d83aa
CRs-Fixed: 2038086, 2056170, 2047102, 2062307, 2059742, 1026701, 2061287
parents e2c78069 c1a5075d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@

		lanes-per-direction = <1>;

		non-removable;
		qcom,msm-bus,name = "ufs1";
		qcom,msm-bus,num-cases = <12>;
		qcom,msm-bus,num-paths = <2>;
+3 −0
Original line number Diff line number Diff line
@@ -125,6 +125,9 @@ static int qti_ice_setting_config(struct request *req,
		return -EPERM;
	}

	if (!setting)
		return -EINVAL;

	if ((short)(crypto_data->key_index) >= 0) {

		memcpy(&setting->crypto_data, crypto_data,
+16 −3
Original line number Diff line number Diff line
@@ -749,9 +749,13 @@ static int msm_fd_s_fmt_vid_out(struct file *file,
static int msm_fd_reqbufs(struct file *file,
	void *fh, struct v4l2_requestbuffers *req)
{
	int ret;
	struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh);

	return vb2_reqbufs(&ctx->vb2_q, req);
	mutex_lock(&ctx->fd_device->recovery_lock);
	ret = vb2_reqbufs(&ctx->vb2_q, req);
	mutex_unlock(&ctx->fd_device->recovery_lock);
	return ret;
}

/*
@@ -763,9 +767,14 @@ static int msm_fd_reqbufs(struct file *file,
static int msm_fd_qbuf(struct file *file, void *fh,
	struct v4l2_buffer *pb)
{
	int ret;
	struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh);

	return vb2_qbuf(&ctx->vb2_q, pb);
	mutex_lock(&ctx->fd_device->recovery_lock);
	ret = vb2_qbuf(&ctx->vb2_q, pb);
	mutex_unlock(&ctx->fd_device->recovery_lock);
	return ret;

}

/*
@@ -777,9 +786,13 @@ static int msm_fd_qbuf(struct file *file, void *fh,
static int msm_fd_dqbuf(struct file *file,
	void *fh, struct v4l2_buffer *pb)
{
	int ret;
	struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh);

	return vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK);
	mutex_lock(&ctx->fd_device->recovery_lock);
	ret = vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK);
	mutex_unlock(&ctx->fd_device->recovery_lock);
	return ret;
}

/*
+11 −31
Original line number Diff line number Diff line
@@ -170,17 +170,15 @@ out:
static void ufs_qcom_ice_cfg_work(struct work_struct *work)
{
	unsigned long flags;
	struct ice_data_setting ice_set;
	struct ufs_qcom_host *qcom_host =
		container_of(work, struct ufs_qcom_host, ice_cfg_work);
	struct request *req_pending = NULL;

	if (!qcom_host->ice.vops->config_start)
		return;

	spin_lock_irqsave(&qcom_host->ice_work_lock, flags);
	req_pending = qcom_host->req_pending;
	if (!req_pending) {
	if (!qcom_host->req_pending) {
		qcom_host->work_pending = false;
		spin_unlock_irqrestore(&qcom_host->ice_work_lock, flags);
		return;
	}
@@ -189,24 +187,15 @@ static void ufs_qcom_ice_cfg_work(struct work_struct *work)
	/*
	 * config_start is called again as previous attempt returned -EAGAIN,
	 * this call shall now take care of the necessary key setup.
	 * 'ice_set' will not actually be used, instead the next call to
	 * config_start() for this request, in the normal call flow, will
	 * succeed as the key has now been setup.
	 */
	qcom_host->ice.vops->config_start(qcom_host->ice.pdev,
		qcom_host->req_pending, &ice_set, false);
		qcom_host->req_pending, NULL, false);

	spin_lock_irqsave(&qcom_host->ice_work_lock, flags);
	qcom_host->req_pending = NULL;
	qcom_host->work_pending = false;
	spin_unlock_irqrestore(&qcom_host->ice_work_lock, flags);

	/*
	 * Resume with requests processing. We assume config_start has been
	 * successful, but even if it wasn't we still must resume in order to
	 * allow for the request to be retried.
	 */
	ufshcd_scsi_unblock_requests(qcom_host->hba);

}

/**
@@ -285,18 +274,14 @@ int ufs_qcom_ice_req_setup(struct ufs_qcom_host *qcom_host,
			 * requires a non-atomic context, this means we should
			 * call the function again from the worker thread to do
			 * the configuration. For this request the error will
			 * propagate so it will be re-queued and until the
			 * configuration is is completed we block further
			 * request processing.
			 * propagate so it will be re-queued.
			 */
			if (err == -EAGAIN) {
				dev_dbg(qcom_host->hba->dev,
					"%s: scheduling task for ice setup\n",
					__func__);

				if (!qcom_host->req_pending) {
					ufshcd_scsi_block_requests(
						qcom_host->hba);
				if (!qcom_host->work_pending) {
					qcom_host->req_pending = cmd->request;

					if (!schedule_work(
@@ -307,10 +292,9 @@ int ufs_qcom_ice_req_setup(struct ufs_qcom_host *qcom_host,
						&qcom_host->ice_work_lock,
						flags);

						ufshcd_scsi_unblock_requests(
							qcom_host->hba);
						return err;
					}
					qcom_host->work_pending = true;
				}

			} else {
@@ -409,9 +393,7 @@ int ufs_qcom_ice_cfg_start(struct ufs_qcom_host *qcom_host,
			 * requires a non-atomic context, this means we should
			 * call the function again from the worker thread to do
			 * the configuration. For this request the error will
			 * propagate so it will be re-queued and until the
			 * configuration is is completed we block further
			 * request processing.
			 * propagate so it will be re-queued.
			 */
			if (err == -EAGAIN) {

@@ -419,9 +401,8 @@ int ufs_qcom_ice_cfg_start(struct ufs_qcom_host *qcom_host,
					"%s: scheduling task for ice setup\n",
					__func__);

				if (!qcom_host->req_pending) {
					ufshcd_scsi_block_requests(
						qcom_host->hba);
				if (!qcom_host->work_pending) {

					qcom_host->req_pending = cmd->request;
					if (!schedule_work(
						&qcom_host->ice_cfg_work)) {
@@ -431,10 +412,9 @@ int ufs_qcom_ice_cfg_start(struct ufs_qcom_host *qcom_host,
						&qcom_host->ice_work_lock,
						flags);

						ufshcd_scsi_unblock_requests(
							qcom_host->hba);
						return err;
					}
					qcom_host->work_pending = true;
				}

			} else {
+1 −0
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ struct ufs_qcom_host {
	struct work_struct ice_cfg_work;
	struct request *req_pending;
	struct ufs_vreg *vddp_ref_clk;
	bool work_pending;
};

static inline u32
Loading