Linux-Tegra Archive mirror
 help / color / mirror / Atom feed
From: "Thierry Reding" <thierry.reding@gmail.com>
To: "Jon Hunter" <jonathanh@nvidia.com>
Cc: "Jason Gunthorpe" <jgg@nvidia.com>,
	<dri-devel@lists.freedesktop.org>, <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH] gpu: host1x: Do not setup DMA for virtual devices
Date: Mon, 08 Apr 2024 17:01:20 +0200	[thread overview]
Message-ID: <D0ETY6KYVYO6.1L2QGS0QIE77O@gmail.com> (raw)
In-Reply-To: <73a71381-7c8c-4d0f-9fa4-3d9511c9bfbe@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 2887 bytes --]

On Wed Apr 3, 2024 at 12:07 PM CEST, Jon Hunter wrote:
> Hi Thierry,
>
> On 15/03/2024 11:25, Jon Hunter wrote:
> > 
> > On 14/03/2024 15:49, Thierry Reding wrote:
> >> From: Thierry Reding <treding@nvidia.com>
> >>
> >> The host1x devices are virtual compound devices and do not perform DMA
> >> accesses themselves, so they do not need to be set up for DMA.
> >>
> >> Ideally we would also not need to set up DMA masks for the virtual
> >> devices, but we currently still need those for legacy support on old
> >> hardware.
> >>
> >> Signed-off-by: Thierry Reding <treding@nvidia.com>
> >> ---
> >>   drivers/gpu/host1x/bus.c | 8 --------
> >>   1 file changed, 8 deletions(-)
> >>
> >> diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
> >> index 783975d1384f..7c52757a89db 100644
> >> --- a/drivers/gpu/host1x/bus.c
> >> +++ b/drivers/gpu/host1x/bus.c
> >> @@ -351,11 +351,6 @@ static int host1x_device_uevent(const struct 
> >> device *dev,
> >>       return 0;
> >>   }
> >> -static int host1x_dma_configure(struct device *dev)
> >> -{
> >> -    return of_dma_configure(dev, dev->of_node, true);
> >> -}
> >> -
> >>   static const struct dev_pm_ops host1x_device_pm_ops = {
> >>       .suspend = pm_generic_suspend,
> >>       .resume = pm_generic_resume,
> >> @@ -369,7 +364,6 @@ const struct bus_type host1x_bus_type = {
> >>       .name = "host1x",
> >>       .match = host1x_device_match,
> >>       .uevent = host1x_device_uevent,
> >> -    .dma_configure = host1x_dma_configure,
> >>       .pm = &host1x_device_pm_ops,
> >>   };
> >> @@ -458,8 +452,6 @@ static int host1x_device_add(struct host1x *host1x,
> >>       device->dev.bus = &host1x_bus_type;
> >>       device->dev.parent = host1x->dev;
> >> -    of_dma_configure(&device->dev, host1x->dev->of_node, true);
> >> -
> >>       device->dev.dma_parms = &device->dma_parms;
> >>       dma_set_max_seg_size(&device->dev, UINT_MAX);
> > 
> > 
> > Tested-by: Jon Hunter <jonathanh@nvidia.com>
> > Acked-by: Jon Hunter <jonathanh@nvidia.com>
>
>
> I don't see this in -next yet?
>
> Ideally, if we don't see any issues with this we should pull this into 
> v6.8.y stable branch because I am now seeing the warning there. Should 
> we apply a fixes tag to this?

I was finally able to run some finally tests on this and pushed it to
drm-misc-fixes, so it should go into linux-next and then Linus' tree
sometime soon.

I decided against adding a Fixes tag because it's difficult to backport
this all the way to the release which contains the commit that added
the issue. Adding a Fixes tag to the commit that ended up exposing the
issue didn't seem right either, so let's get this into mainline first
and then manually ask stable maintainers to pick this up.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-04-08 15:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14 15:49 [PATCH] gpu: host1x: Do not setup DMA for virtual devices Thierry Reding
2024-03-15 11:25 ` Jon Hunter
2024-04-03 10:07   ` Jon Hunter
2024-04-08 15:01     ` Thierry Reding [this message]

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=D0ETY6KYVYO6.1L2QGS0QIE77O@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).