From bc08a547f8be8000d253ab2904740f8af01c735e Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Fri, 28 Aug 2020 14:25:16 -0700 Subject: [PATCH 1/2] dt-bindings: Document the qcom,vmid-cp-camera-preview-ro property Document the qcom,vmid-cp-camera-preview-ro secure buffer property. This property is used to communicate to the secure buffer driver that buffers accessible to VMID_CP_CAMERA_PREVIEW should be mapped with read-only permissions. Change-Id: Ib867fd2a060448fc6996fddde6367fa4e6c1d5d8 --- bindings/soc/qcom/qcom,secure-buffer.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/soc/qcom/qcom,secure-buffer.yaml b/bindings/soc/qcom/qcom,secure-buffer.yaml index f4fc40003f2b..acf73ff89425 100644 --- a/bindings/soc/qcom/qcom,secure-buffer.yaml +++ b/bindings/soc/qcom/qcom,secure-buffer.yaml @@ -19,6 +19,12 @@ properties: items: - const: qcom,secure-buffer + qcom,vmid-cp-camera-preview-ro: + $ref: /schemas/types.yaml#/definitions/flag + description: + Buffers accessible to VMID_CP_CAMERA_PREVIEW must be mapped with + read-only permissions. + required: - compatible From 098d3b54d098f4171d7d72fd0debfe57c71665fe Mon Sep 17 00:00:00 2001 From: "Isaac J. Manjarres" Date: Fri, 28 Aug 2020 14:29:47 -0700 Subject: [PATCH 2/2] ARM: dts: msm: Enable qcom,vmid-cp-camera-preview-ro on Lahaina The secure camera preview pipeline on Lahaina has buffers that are shared by the display and secure camera hardware. On older architecture, the buffers were not shareable, as the display hardware needed write-access to the buffer, which could compromise the integrity of the data populated by the secure camera hardware. The display hardware on Lahaina has been upgraded, such that it no longer needs write-access to the buffer, which allows the buffer to be shared between both peripherals. Thus, ensure that the mappings for the display hardware on Lahaina are read-only, so that the integrity of the contents of the buffer cannot be compromised. Change-Id: Ib1f867e49455799acd8797a9d26a9243fb0546e7 --- qcom/lahaina.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/qcom/lahaina.dtsi b/qcom/lahaina.dtsi index aaa56c2436d4..6737fffeb8d3 100644 --- a/qcom/lahaina.dtsi +++ b/qcom/lahaina.dtsi @@ -2738,6 +2738,7 @@ qcom-secure-buffer { compatible = "qcom,secure-buffer"; + qcom,vmid-cp-camera-preview-ro; }; qcom-mem-buf {