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

Commit 1ea44107 authored by Krishnankutty Kolathappilly's avatar Krishnankutty Kolathappilly
Browse files

msm: cpp: Add support for updating buffer distance for metadata.



Set group buffer command is not updating metadata address for
different planes. Add the change to update the metadata address
for all planes and all buffers in the batch. This changes the
offset for the duplicate frame indicator and length of the command.
Update the  device tree and documentation with new values.

Change-Id: I67afffcb6e118274aa7ce4546a6bad56e52b14f5
Signed-off-by: default avatarKrishnankutty Kolathappilly <kkolatha@codeaurora.org>
parent 77813844
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -118,8 +118,8 @@ Example:
			qcom,we-mmu-pf-ptr-off = <12>;
			qcom,dup-we-mmu-pf-ptr-off = <17>;
			qcom,ref-we-mmu-pf-ptr-off = <22>;
			qcom,set-group-buffer-len = <91>;
			qcom,dup-frame-indicator-off = <48>;
			qcom,set-group-buffer-len = <135>;
			qcom,dup-frame-indicator-off = <70>;

		};
	};
+2 −2
Original line number Diff line number Diff line
@@ -621,8 +621,8 @@
			qcom,we-mmu-pf-ptr-off = <12>;
			qcom,dup-we-mmu-pf-ptr-off = <17>;
			qcom,ref-we-mmu-pf-ptr-off = <22>;
			qcom,set-group-buffer-len = <91>;
			qcom,dup-frame-indicator-off = <48>;
			qcom,set-group-buffer-len = <135>;
			qcom,dup-frame-indicator-off = <70>;
		};
	};

+7 −5
Original line number Diff line number Diff line
@@ -2035,7 +2035,7 @@ static int32_t msm_cpp_set_group_buffer(struct cpp_device *cpp_dev,
	unsigned long out_phyaddr0, out_phyaddr1, distance;
	int32_t rc = 0;
	uint32_t set_group_buffer_len, set_group_buffer_len_bytes,
		dup_frame_off, ubwc_enabled, i = 0;
		dup_frame_off, ubwc_enabled, j, i = 0;

	do {
		if (new_frame->batch_info.batch_mode != BATCH_MODE_VIDEO) {
@@ -2111,11 +2111,13 @@ static int32_t msm_cpp_set_group_buffer(struct cpp_device *cpp_dev,
			}
			distance = out_phyaddr1 - out_phyaddr0;
			out_phyaddr0 = out_phyaddr1;
			for (j = 0; j < PAYLOAD_NUM_PLANES; j++)
				*ptr++ = distance;

			if (ubwc_enabled) {
				for (j = 0; j < PAYLOAD_NUM_PLANES; j++)
					*ptr++ = distance;
			*ptr++ = distance;
			if (ubwc_enabled)
				*ptr++ = distance;
			}
		}
		if (rc)
			break;