public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Cc: andersson@kernel.org, konradybcio@kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	linux-media@vger.kernel.org, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
	linux-remoteproc@vger.kernel.org, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	robin.clark@oss.qualcomm.com, sean@poorly.run,
	akhilpo@oss.qualcomm.com, lumag@kernel.org,
	abhinav.kumar@linux.dev, jesszhan0024@gmail.com,
	marijn.suijten@somainline.org, airlied@gmail.com,
	simona@ffwll.ch, vikash.garodia@oss.qualcomm.com,
	dikshita.agarwal@oss.qualcomm.com, bod@kernel.org,
	mchehab@kernel.org, elder@kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, jjohnson@kernel.org,
	mathieu.poirier@linaro.org, trilokkumar.soni@oss.qualcomm.com,
	pavan.kondeti@oss.qualcomm.com, jorge.ramirez@oss.qualcomm.com,
	tonyh@qti.qualcomm.com, vignesh.viswanathan@oss.qualcomm.com,
	srinivas.kandagatla@oss.qualcomm.com,
	amirreza.zarrabi@oss.qualcomm.com, jens.wiklander@linaro.org,
	op-tee@lists.trustedfirmware.org, apurupa@qti.qualcomm.com,
	skare@qti.qualcomm.com, linux-kernel@vger.kernel.org,
	Sumit Garg <sumit.garg@oss.qualcomm.com>
Subject: Re: [PATCH v4 11/15] media: qcom: Switch to generic PAS TZ APIs
Date: Fri, 1 May 2026 18:56:50 +0530	[thread overview]
Message-ID: <afSqGp-yzZip7q-j@sumit-xelite> (raw)
In-Reply-To: <20260428193714.sg5n3tntww2nuquu@hu-mojha-hyd.qualcomm.com>

On Wed, Apr 29, 2026 at 01:07:14AM +0530, Mukesh Ojha wrote:
> On Mon, Apr 27, 2026 at 03:25:59PM +0530, Sumit Garg wrote:
> > From: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > 
> > Switch qcom media client drivers over to generic PAS TZ APIs. Generic PAS
> > TZ service allows to support multiple TZ implementation backends like QTEE
> > based SCM PAS service, OP-TEE based PAS service and any further future TZ
> > backend service.
> > 
> > Along with that pass proper PAS ID to set_remote_state API. As per testing
> > the SCM backend just ignores it while OP-TEE makes use of it to for proper
> > book keeping purpose.
> 
> When we use 'Along with' or 'while at it', patch is doing two things and
> not one.

Okay, I will split this into 2.

> 
> > 
> > Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
> > ---
> >  drivers/media/platform/qcom/iris/Kconfig      | 25 ++++++++++---------
> >  .../media/platform/qcom/iris/iris_firmware.c  |  9 ++++---
> >  drivers/media/platform/qcom/venus/Kconfig     |  1 +
> >  drivers/media/platform/qcom/venus/firmware.c  | 11 ++++----
> >  4 files changed, 25 insertions(+), 21 deletions(-)
> > 
> > diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platform/qcom/iris/Kconfig
> > index 3c803a05305a..f54b759c18aa 100644
> > --- a/drivers/media/platform/qcom/iris/Kconfig
> > +++ b/drivers/media/platform/qcom/iris/Kconfig
> > @@ -1,13 +1,14 @@
> >  config VIDEO_QCOM_IRIS
> > -        tristate "Qualcomm iris V4L2 decoder driver"
> > -        depends on VIDEO_DEV
> > -        depends on ARCH_QCOM || COMPILE_TEST
> > -        select V4L2_MEM2MEM_DEV
> > -        select QCOM_MDT_LOADER if ARCH_QCOM
> > -        select QCOM_SCM
> > -        select VIDEOBUF2_DMA_CONTIG
> > -        help
> > -          This is a V4L2 driver for Qualcomm iris video accelerator
> > -          hardware. It accelerates decoding operations on various
> > -          Qualcomm SoCs.
> > -          To compile this driver as a module choose m here.
> > +	tristate "Qualcomm iris V4L2 decoder driver"
> > +	depends on VIDEO_DEV
> > +	depends on ARCH_QCOM || COMPILE_TEST
> > +	select V4L2_MEM2MEM_DEV
> > +	select QCOM_MDT_LOADER if ARCH_QCOM
> > +	select QCOM_SCM
> > +	select QCOM_PAS
> > +	select VIDEOBUF2_DMA_CONTIG
> > +	help
> > +	  This is a V4L2 driver for Qualcomm iris video accelerator
> > +	  hardware. It accelerates decoding operations on various
> > +	  Qualcomm SoCs.
> > +	  To compile this driver as a module choose m here.
> 
> Here, Space replaced by Tabs just for one line.., should be fine.

Yeah, spaces aren't meant here.

> 
> 
> > diff --git a/drivers/media/platform/qcom/iris/iris_firmware.c b/drivers/media/platform/qcom/iris/iris_firmware.c
> > index 5f408024e967..856fa6a79064 100644
> > --- a/drivers/media/platform/qcom/iris/iris_firmware.c
> > +++ b/drivers/media/platform/qcom/iris/iris_firmware.c
> > @@ -4,6 +4,7 @@
> >   */
> >  
> >  #include <linux/firmware.h>
> > +#include <linux/firmware/qcom/qcom_pas.h>
> >  #include <linux/firmware/qcom/qcom_scm.h>
> >  #include <linux/of_address.h>
> >  #include <linux/of_reserved_mem.h>
> > @@ -79,7 +80,7 @@ int iris_fw_load(struct iris_core *core)
> >  		return -ENOMEM;
> >  	}
> >  
> > -	ret = qcom_scm_pas_auth_and_reset(core->iris_platform_data->pas_id);
> > +	ret = qcom_pas_auth_and_reset(core->iris_platform_data->pas_id);
> >  	if (ret)  {
> >  		dev_err(core->dev, "auth and reset failed: %d\n", ret);
> >  		return ret;
> > @@ -93,7 +94,7 @@ int iris_fw_load(struct iris_core *core)
> >  						     cp_config->cp_nonpixel_size);
> >  		if (ret) {
> >  			dev_err(core->dev, "qcom_scm_mem_protect_video_var failed: %d\n", ret);
> > -			qcom_scm_pas_shutdown(core->iris_platform_data->pas_id);
> > +			qcom_pas_shutdown(core->iris_platform_data->pas_id);
> >  			return ret;
> >  		}
> >  	}
> > @@ -103,10 +104,10 @@ int iris_fw_load(struct iris_core *core)
> >  
> >  int iris_fw_unload(struct iris_core *core)
> >  {
> > -	return qcom_scm_pas_shutdown(core->iris_platform_data->pas_id);
> > +	return qcom_pas_shutdown(core->iris_platform_data->pas_id);
> >  }
> >  
> >  int iris_set_hw_state(struct iris_core *core, bool resume)
> >  {
> > -	return qcom_scm_set_remote_state(resume, 0);
> > +	return qcom_pas_set_remote_state(resume, core->irisi_platform_data->pas_id);
> 
> 
> Should be a separate change for qcom_pas_set_remote_state()
> 
> >  }
> > diff --git a/drivers/media/platform/qcom/venus/Kconfig b/drivers/media/platform/qcom/venus/Kconfig
> > index ffb731ecd48c..574172724e8f 100644
> > --- a/drivers/media/platform/qcom/venus/Kconfig
> > +++ b/drivers/media/platform/qcom/venus/Kconfig
> > @@ -6,6 +6,7 @@ config VIDEO_QCOM_VENUS
> >  	select OF_DYNAMIC if ARCH_QCOM
> >  	select QCOM_MDT_LOADER if ARCH_QCOM
> >  	select QCOM_SCM
> > +	select QCOM_PAS
> >  	select VIDEOBUF2_DMA_CONTIG
> >  	select V4L2_MEM2MEM_DEV
> >  	help
> > diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
> > index 1de7436713ed..3c0727ea137d 100644
> > --- a/drivers/media/platform/qcom/venus/firmware.c
> > +++ b/drivers/media/platform/qcom/venus/firmware.c
> > @@ -12,6 +12,7 @@
> >  #include <linux/of_reserved_mem.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/of_device.h>
> > +#include <linux/firmware/qcom/qcom_pas.h>
> >  #include <linux/firmware/qcom/qcom_scm.h>
> >  #include <linux/sizes.h>
> >  #include <linux/soc/qcom/mdt_loader.h>
> > @@ -58,7 +59,7 @@ int venus_set_hw_state(struct venus_core *core, bool resume)
> >  	int ret;
> >  
> >  	if (core->use_tz) {
> > -		ret = qcom_scm_set_remote_state(resume, 0);
> > +		ret = qcom_pas_set_remote_state(resume, VENUS_PAS_ID);
> 
> This too..
> 
> >  		if (resume && ret == -EINVAL)
> >  			ret = 0;
> >  		return ret;
> > @@ -218,7 +219,7 @@ int venus_boot(struct venus_core *core)
> >  	int ret;
> >  
> >  	if (!IS_ENABLED(CONFIG_QCOM_MDT_LOADER) ||
> > -	    (core->use_tz && !qcom_scm_is_available()))
> > +	    (core->use_tz && !qcom_pas_is_available()))
> >  		return -EPROBE_DEFER;
> >  
> >  	ret = of_property_read_string_index(dev->of_node, "firmware-name", 0,
> > @@ -236,7 +237,7 @@ int venus_boot(struct venus_core *core)
> >  	core->fw.mem_phys = mem_phys;
> >  
> >  	if (core->use_tz)
> > -		ret = qcom_scm_pas_auth_and_reset(VENUS_PAS_ID);
> > +		ret = qcom_pas_auth_and_reset(VENUS_PAS_ID);
> >  	else
> >  		ret = venus_boot_no_tz(core, mem_phys, mem_size);
> >  
> > @@ -259,7 +260,7 @@ int venus_boot(struct venus_core *core)
> >  						     res->cp_nonpixel_start,
> >  						     res->cp_nonpixel_size);
> >  		if (ret) {
> > -			qcom_scm_pas_shutdown(VENUS_PAS_ID);
> > +			qcom_pas_shutdown(VENUS_PAS_ID);
> >  			dev_err(dev, "set virtual address ranges fail (%d)\n",
> >  				ret);
> >  			return ret;
> > @@ -274,7 +275,7 @@ int venus_shutdown(struct venus_core *core)
> >  	int ret;
> >  
> >  	if (core->use_tz)
> > -		ret = qcom_scm_pas_shutdown(VENUS_PAS_ID);
> > +		ret = qcom_pas_shutdown(VENUS_PAS_ID);
> >  	else
> >  		ret = venus_shutdown_no_tz(core);
> >  
> > -- 
> > 2.51.0
> 
> with above change
> 
> Reviewed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
> 

Thanks.

-Sumit

  reply	other threads:[~2026-05-01 13:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27  9:55 [PATCH v4 00/15] firmware: qcom: Add OP-TEE PAS service support Sumit Garg
2026-04-27  9:55 ` [PATCH v4 01/15] arm64: dts: qcom: kodiak: Add EL2 overlay Sumit Garg
2026-04-27  9:55 ` [PATCH v4 02/15] firmware: qcom: Add a generic PAS service Sumit Garg
2026-04-28 21:11   ` Mukesh Ojha
2026-05-01 13:33     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 03/15] firmware: qcom_scm: Migrate to " Sumit Garg
2026-04-29 10:48   ` Mukesh Ojha
2026-05-01 13:41     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 04/15] firmware: qcom: Add a PAS TEE service Sumit Garg
2026-04-29 13:20   ` Mukesh Ojha
2026-05-01 13:54     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 05/15] remoteproc: qcom_q6v5_pas: Switch over to generic PAS TZ APIs Sumit Garg
2026-04-29 13:25   ` Mukesh Ojha
2026-05-01 13:57     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 06/15] remoteproc: qcom_q6v5_mss: Switch " Sumit Garg
2026-04-29 13:31   ` Mukesh Ojha
2026-05-01 13:58     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 07/15] soc: qcom: mdtloader: " Sumit Garg
2026-04-29 13:42   ` Mukesh Ojha
2026-05-01 13:59     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 08/15] remoteproc: qcom_wcnss: " Sumit Garg
2026-04-29 13:43   ` Mukesh Ojha
2026-04-27  9:55 ` [PATCH v4 09/15] remoteproc: qcom: Select QCOM_PAS generic service Sumit Garg
2026-04-29 13:52   ` Mukesh Ojha
2026-05-01 14:08     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 10/15] drm/msm: Switch to generic PAS TZ APIs Sumit Garg
2026-04-29 13:59   ` Mukesh Ojha
2026-05-01 14:11     ` Sumit Garg
2026-04-27  9:55 ` [PATCH v4 11/15] media: qcom: " Sumit Garg
2026-04-28 19:37   ` Mukesh Ojha
2026-05-01 13:26     ` Sumit Garg [this message]
2026-04-27  9:56 ` [PATCH v4 12/15] net: ipa: " Sumit Garg
2026-04-28 16:54   ` Alex Elder
2026-04-27  9:56 ` [PATCH v4 13/15] wifi: ath12k: " Sumit Garg
2026-04-27  9:56 ` [PATCH v4 14/15] firmware: qcom_scm: Remove SCM PAS wrappers Sumit Garg
2026-04-29 14:04   ` Mukesh Ojha
2026-04-27  9:56 ` [PATCH v4 15/15] MAINTAINERS: Add maintainer entry for Qualcomm PAS TZ service Sumit Garg
2026-04-29  6:59 ` [PATCH v4 00/15] firmware: qcom: Add OP-TEE PAS service support Mukesh Ojha
2026-05-01 13:34   ` Sumit Garg

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=afSqGp-yzZip7q-j@sumit-xelite \
    --to=sumit.garg@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=akhilpo@oss.qualcomm.com \
    --cc=amirreza.zarrabi@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=apurupa@qti.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=bod@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=edumazet@google.com \
    --cc=elder@kernel.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jens.wiklander@linaro.org \
    --cc=jesszhan0024@gmail.com \
    --cc=jjohnson@kernel.org \
    --cc=jorge.ramirez@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mchehab@kernel.org \
    --cc=mukesh.ojha@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.kondeti@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=skare@qti.qualcomm.com \
    --cc=srinivas.kandagatla@oss.qualcomm.com \
    --cc=sumit.garg@oss.qualcomm.com \
    --cc=tonyh@qti.qualcomm.com \
    --cc=trilokkumar.soni@oss.qualcomm.com \
    --cc=vignesh.viswanathan@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