Devicetree
 help / color / mirror / Atom feed
From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, robh@kernel.org,
	media-ci@linuxtv.org, conor+dt@kernel.org
Subject: Re: [PATCH v10 03/14] media: iris: Add helper to create a context bank device
Date: Mon, 27 Jul 2026 10:14:51 +0530	[thread overview]
Message-ID: <3cbd26d2-fb86-19d2-2104-c10fafe91080@oss.qualcomm.com> (raw)
In-Reply-To: <20260726060308.649101F000E9@smtp.kernel.org>


On 7/26/2026 11:33 AM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] The newly created context bank device is never attached to an IOMMU domain because `of_dma_configure()` is not called.
> --
>
> --- Patch [3]: [PATCH v10 03/14] media: iris: Add helper to create a context bank device ---
> commit 461ae3ede65da976a81591c71089c7621d163869
> Author: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
>
> media: iris: Add helper to create a context bank device
>     
> This commit adds a helper function to create a context bank device for the
> iris driver. The subnode in the device tree is registered as a separate
> device so that it gets its own IOMMU context for mapping pixel/non-pixel
> buffers.
>
>> diff --git a/drivers/media/platform/qcom/iris/iris_resources.c b/drivers/media/platform/qcom/iris/iris_resources.c
>> index 773f6548370a2..a685915a19e9b 100644
>> --- a/drivers/media/platform/qcom/iris/iris_resources.c
>> +++ b/drivers/media/platform/qcom/iris/iris_resources.c
> [ ... ]
>
>> @@ -141,3 +142,30 @@ int iris_disable_unprepare_clock(struct iris_core *core, enum platform_clk_type
>>  
>>  	return 0;
>>  }
> [ ... ]
>
>> +	pdev = platform_device_register_full(&plat_dev_info);
>> +	of_node_put(child_of_node);
>> +	if (IS_ERR(pdev))
>> +		return ERR_CAST(pdev);
>> +
>> +	dma_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
>> +	dma_set_seg_boundary(&pdev->dev, DMA_BIT_MASK(32));
>> +
>> +	return &pdev->dev;
>> +}
> [Severity: High]
> Since this subnode device won't be probed by a driver (due to lacking a
> compatible string), it won't go through the device driver core's
> really_probe() which would automatically call platform_dma_configure().
>
> Will this newly created context bank device fail to attach to an IOMMU domain
> without an explicit call to of_dma_configure() here? If it isn't attached,
> could subsequent dma_map_* calls using this device bypass the IOMMU or fail?

This is not true, please refer the other path

device_add() (called by platform_device_add(), which
platform_device_register_full() invokes) unconditionally calls
bus_notify(dev, BUS_NOTIFY_ADD_DEVICE) in core.c. For any device on a
bus in iommu_buses[] (platform bus included), that fires
iommu_bus_notifier() → iommu_probe_device() → __iommu_probe_device() →
iommu_init_device(), all at device-registration time, independent of any
driver binding. And iommu_init_device() explicitly handles exactly this case
dev->bus->dma_configure(dev);


  reply	other threads:[~2026-07-27  4:44 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26  5:49 [PATCH v10 00/14] media: iris: Add support for glymur platform Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 01/14] dt-bindings: media: qcom,glymur-iris: Add glymur video codec Vishnu Reddy
2026-07-26  6:00   ` sashiko-bot
2026-07-27  4:44     ` Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 02/14] media: iris: Add hooks to initialize and tear down context banks Vishnu Reddy
2026-07-26  6:01   ` sashiko-bot
2026-07-26  5:49 ` [PATCH v10 03/14] media: iris: Add helper to create a context bank device Vishnu Reddy
2026-07-26  6:03   ` sashiko-bot
2026-07-27  4:44     ` Vishnu Reddy [this message]
2026-07-26  5:49 ` [PATCH v10 04/14] media: iris: Add helper to select relevant " Vishnu Reddy
2026-07-26  6:11   ` sashiko-bot
2026-07-26  5:49 ` [PATCH v10 05/14] media: iris: Skip DMA mask setting to core device when IOMMU is not mapped Vishnu Reddy
2026-07-26  6:05   ` sashiko-bot
2026-07-27  4:45     ` Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 06/14] media: iris: Enable Secure PAS support with IOMMU managed by Linux Vishnu Reddy
2026-07-26  6:08   ` sashiko-bot
2026-07-27  4:45     ` Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 07/14] media: iris: Replace enum-indexed clock and power domain tables with per-block structures Vishnu Reddy
2026-07-26  6:06   ` sashiko-bot
2026-07-26  5:49 ` [PATCH v10 08/14] media: iris: Add power sequence for glymur Vishnu Reddy
2026-07-26  6:05   ` sashiko-bot
2026-07-27  4:45     ` Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 09/14] media: iris: Handle CPU_CS_SCIACMDARG3 register write via program bootup registers hook Vishnu Reddy
2026-07-26  6:03   ` sashiko-bot
2026-07-27  4:46     ` Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 10/14] media: iris: Add support to select core for dual core platforms Vishnu Reddy
2026-07-26  6:18   ` sashiko-bot
2026-07-26  5:49 ` [PATCH v10 11/14] media: iris: Add hooks for pixel and non-pixel context banks Vishnu Reddy
2026-07-26  6:03   ` sashiko-bot
2026-07-27  4:46     ` Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 12/14] media: iris: Add platform data for glymur Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 13/14] arm64: dts: qcom: glymur: Add iris video node Vishnu Reddy
2026-07-26  5:49 ` [PATCH v10 14/14] arm64: dts: qcom: glymur-crd: Enable iris video codec node Vishnu Reddy

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=3cbd26d2-fb86-19d2-2104-c10fafe91080@oss.qualcomm.com \
    --to=busanna.reddy@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=media-ci@linuxtv.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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