From: Robin Murphy <robin.murphy@arm.com>
To: Andy Yan <andy.yan@rock-chips.com>,
hjc@rock-chips.com, heiko@sntech.de,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/rockchip: Check iommu itself instead of it's parent for device_is_available
Date: Mon, 28 Jun 2021 10:54:21 +0100 [thread overview]
Message-ID: <66fb4977-4e6f-f7ed-0dac-18710ebd782a@arm.com> (raw)
In-Reply-To: <20210627084737.309163-1-andy.yan@rock-chips.com>
On 2021-06-27 09:47, Andy Yan wrote:
> When iommu itself is disabled in dts, we should
> fallback to non-iommu buffer, check iommu parent
> is meanless here.
>
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> ---
>
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> index 212bd87c0c4a..0d20c8cc1ffa 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
> @@ -366,7 +366,7 @@ static int rockchip_drm_platform_of_probe(struct device *dev)
> }
>
> iommu = of_parse_phandle(port->parent, "iommus", 0);
> - if (!iommu || !of_device_is_available(iommu->parent)) {
> + if (!iommu || !of_device_is_available(iommu)) {
Just wondering, could you use device_iommu_mapped() to avoid poking at
the DT at all here, or is it that you need to check remote graph
endpoints whose struct device may not be ready yet?
Robin.
> DRM_DEV_DEBUG(dev,
> "no iommu attached for %pOF, using non-iommu buffers\n",
> port->parent);
>
next prev parent reply other threads:[~2021-06-28 9:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 8:47 Andy Yan
2021-06-28 9:54 ` Robin Murphy [this message]
2021-06-29 11:18 ` Andy Yan
2021-09-21 10:03 ` Heiko Stuebner
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=66fb4977-4e6f-f7ed-0dac-18710ebd782a@arm.com \
--to=robin.murphy@arm.com \
--cc=andy.yan@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/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®