mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	 Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	 Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	 Abhinav Kumar <abhinav.kumar@linux.dev>,
	Bryan O'Donoghue <bod@kernel.org>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-media@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	 Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>,
	 Jorge Ramirez-Ortiz <jorge.ramirez.ortiz@gmail.com>,
	 Sumit Garg <sumit.garg@oss.qualcomm.com>
Subject: [PATCH v2 0/3] media: qcom: Skip SCM secure memory protection with OP-TEE PAS backend
Date: Tue, 27 Oct 2026 18:09:02 +0530	[thread overview]
Message-ID: <20261027-pas-video-v2-0-5b52bca5add6@oss.qualcomm.com> (raw)

The Qualcomm peripheral authentication service (PAS) can be serviced by
either the SCM (TrustZone) backend or, on OP-TEE based platforms, by the
OP-TEE backend. qcom_scm_mem_protect_video_var() is only implemented by
the SCM backend; with OP-TEE the TEE itself owns secure memory
protection and does not service this call. Issuing it unconditionally on
an OP-TEE backend fails firmware bring-up for the venus and iris video
codecs.

Patch 1 adds an optional PAS op along with a generic
qcom_pas_mem_protect_video_var() wrapper. The SCM backend maps it to the
existing SCM call, while backends that leave it unset get a no-op.
Patch 2 switches the venus and iris drivers to the new API, so that they
stay agnostic of the active PAS backend, and drops their Kconfig
dependency on QCOM_SCM. Patch 3 folds the SCM call into the SCM PAS
backend and drops its export.

No functional change is intended for the SCM backend.

Changes in v2:
- Dropped the qcom_pas_get_backend() helper and the backend name
  matching in the video drivers, as suggested by Konrad and Vikash.
- Stubbed the video memory protection call via the generic PAS layer
  instead, with the SCM backend reusing the existing abstraction.
- Dropped the QCOM_SCM Kconfig selection from the venus and iris drivers.
- Added patch 3 to drop the export of qcom_scm_mem_protect_video_var().
- Link to v1: https://lore.kernel.org/all/20260911-video-optee-pas-v1-v1-0-7bbddaaac5ba@kernel.org/

---
Sumit Garg (3):
      firmware: qcom: pas: Add optional video memory protection op
      media: qcom: Use PAS API for video memory protection
      firmware: qcom: scm: Drop export of qcom_scm_mem_protect_video_var()

 drivers/firmware/qcom/qcom_pas.c                 | 27 +++++++++++++
 drivers/firmware/qcom/qcom_pas.h                 |  5 +++
 drivers/firmware/qcom/qcom_scm.c                 | 48 ++++++++++++------------
 drivers/media/platform/qcom/iris/Kconfig         |  1 -
 drivers/media/platform/qcom/iris/iris_firmware.c |  5 +--
 drivers/media/platform/qcom/venus/Kconfig        |  1 -
 drivers/media/platform/qcom/venus/firmware.c     |  3 +-
 include/linux/firmware/qcom/qcom_pas.h           |  2 +
 include/linux/firmware/qcom/qcom_scm.h           |  2 -
 9 files changed, 61 insertions(+), 33 deletions(-)
---
base-commit: 75a4de0d94f62bce938ebcacd8a7a8ed35a0439b
change-id: 20261027-pas-video-65c73f482b20

Best regards,
-- 
Sumit Garg <sumit.garg@oss.qualcomm.com>


             reply	other threads:[~2026-10-27 12:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 12:39 Sumit Garg [this message]
2026-10-27 12:39 ` [PATCH v2 1/3] firmware: qcom: pas: Add optional video memory protection op Sumit Garg
2026-10-27 15:58   ` Konrad Dybcio
2026-10-27 12:39 ` [PATCH v2 2/3] media: qcom: Use PAS API for video memory protection Sumit Garg
2026-10-27 15:59   ` Konrad Dybcio
2026-10-27 12:39 ` [PATCH v2 3/3] firmware: qcom: scm: Drop export of qcom_scm_mem_protect_video_var() Sumit Garg
2026-10-27 15:59   ` Konrad Dybcio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261027-pas-video-v2-0-5b52bca5add6@oss.qualcomm.com \
    --to=sumit.garg@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=andersson@kernel.org \
    --cc=bod@kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=jorge.ramirez.ortiz@gmail.com \
    --cc=jorge.ramirez@oss.qualcomm.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sumit.garg@oss.qualcomm.com \
    --cc=vikash.garodia@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®