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

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

Merge "msm: camera: cpp: Ignore TNR buffer for 8992"

parents 18bb2054 29a663c2
Loading
Loading
Loading
Loading
+41 −19
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@
#define STRIPE_BASE_FW_1_6_0	464
#define STRIPE_BASE_FW_1_8_0	493

#define PLANE_BASE_FW_1_8_0	478

/* dump the frame command before writing to the hardware */
#define  MSM_CPP_DUMP_FRM_CMD 0
@@ -120,6 +121,21 @@ struct msm_cpp_timer_t {

struct msm_cpp_timer_t cpp_timer;

static int msm_cpp_is_tnr_enabled(struct cpp_device *cpp_dev,
	uint32_t *cpp_frame_msg)
{
	if (cpp_frame_msg && cpp_dev) {
		if (((cpp_dev->fw_version & 0xffff0000) ==
			CPP_FW_VERSION_1_8_0) &&
			((cpp_frame_msg[PLANE_BASE_FW_1_8_0] & 0x40) ||
			(cpp_frame_msg[PLANE_BASE_FW_1_8_0 + 5] & 0x40) ||
			(cpp_frame_msg[PLANE_BASE_FW_1_8_0 + 10] & 0x40))) {
			return 1;
		}
	}
	return 0;
}

static void msm_queue_init(struct msm_device_queue *queue, const char *name)
{
	CPP_DBG("E\n");
@@ -1606,6 +1622,7 @@ static int msm_cpp_cfg_frame(struct cpp_device *cpp_dev,
				(uint32_t) out_phyaddr1;
		}
	} else {
		if (msm_cpp_is_tnr_enabled(cpp_dev, cpp_frame_msg)) {
			tnr_scratch_buffer0 = msm_cpp_fetch_buffer_info(cpp_dev,
				&new_frame->tnr_scratch_buffer_info[0],
				((new_frame->identity >> 16) & 0xFFFF),
@@ -1627,6 +1644,11 @@ static int msm_cpp_cfg_frame(struct cpp_device *cpp_dev,
				rc = -EINVAL;
				goto phyaddr_err;
			}
		} else {
			 tnr_scratch_buffer0 = 0;
			 tnr_scratch_buffer1 = 0;
		}

		num_stripes = ((cpp_frame_msg[9] >> 20) & 0x3FF) +
			((cpp_frame_msg[9] >> 10) & 0x3FF) +
			(cpp_frame_msg[9] & 0x3FF);