All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: Remove redundant of_dma_configure() call
@ 2018-09-12 16:47 Robin Murphy
  2018-09-26 14:10 ` Thierry Reding
  0 siblings, 1 reply; 4+ messages in thread
From: Robin Murphy @ 2018-09-12 16:47 UTC (permalink / raw)
  To: thierry.reding; +Cc: linux-tegra, Mikko Perttunen, dri-devel

Now that the Host1x bus_type implements a .dma_configure callback,
subdevices should automatically get configured for DMA as their drivers
bind, so there's no need to also force it at device creation time.

CC: Thierry Reding <thierry.reding@gmail.com>
CC: Mikko Perttunen <cyndis@kapsi.fi>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---

I *believe* my reasoning is correct here, but please shout if it's not.

 drivers/gpu/host1x/bus.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c
index 815bdb42e3f0..24f60e34cdf1 100644
--- a/drivers/gpu/host1x/bus.c
+++ b/drivers/gpu/host1x/bus.c
@@ -421,8 +421,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);
-
 	err = host1x_device_parse_dt(device, driver);
 	if (err < 0) {
 		kfree(device);
-- 
2.19.0.dirty

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpu: host1x: Remove redundant of_dma_configure() call
  2018-09-12 16:47 [PATCH] gpu: host1x: Remove redundant of_dma_configure() call Robin Murphy
@ 2018-09-26 14:10 ` Thierry Reding
  2018-09-26 14:13   ` Thierry Reding
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2018-09-26 14:10 UTC (permalink / raw)
  To: Robin Murphy; +Cc: linux-tegra, Mikko Perttunen, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 618 bytes --]

On Wed, Sep 12, 2018 at 05:47:54PM +0100, Robin Murphy wrote:
> Now that the Host1x bus_type implements a .dma_configure callback,
> subdevices should automatically get configured for DMA as their drivers
> bind, so there's no need to also force it at device creation time.
> 
> CC: Thierry Reding <thierry.reding@gmail.com>
> CC: Mikko Perttunen <cyndis@kapsi.fi>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> 
> I *believe* my reasoning is correct here, but please shout if it's not.
> 
>  drivers/gpu/host1x/bus.c | 2 --
>  1 file changed, 2 deletions(-)

Applied, thanks.

Thierry

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

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpu: host1x: Remove redundant of_dma_configure() call
  2018-09-26 14:10 ` Thierry Reding
@ 2018-09-26 14:13   ` Thierry Reding
  2018-09-26 14:29     ` Robin Murphy
  0 siblings, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2018-09-26 14:13 UTC (permalink / raw)
  To: Robin Murphy; +Cc: linux-tegra, Mikko Perttunen, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 975 bytes --]

On Wed, Sep 26, 2018 at 04:10:54PM +0200, Thierry Reding wrote:
> On Wed, Sep 12, 2018 at 05:47:54PM +0100, Robin Murphy wrote:
> > Now that the Host1x bus_type implements a .dma_configure callback,
> > subdevices should automatically get configured for DMA as their drivers
> > bind, so there's no need to also force it at device creation time.
> > 
> > CC: Thierry Reding <thierry.reding@gmail.com>
> > CC: Mikko Perttunen <cyndis@kapsi.fi>
> > Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> > ---
> > 
> > I *believe* my reasoning is correct here, but please shout if it's not.
> > 
> >  drivers/gpu/host1x/bus.c | 2 --
> >  1 file changed, 2 deletions(-)
> 
> Applied, thanks.

Actually I was a little too quick on the trigger there. I don't think we
can remove this here because the of_dma_configure() in this call
configures the logical "compound" child device, whereas the
.dma_configure callback configures the physical device.

Thierry

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

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gpu: host1x: Remove redundant of_dma_configure() call
  2018-09-26 14:13   ` Thierry Reding
@ 2018-09-26 14:29     ` Robin Murphy
  0 siblings, 0 replies; 4+ messages in thread
From: Robin Murphy @ 2018-09-26 14:29 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra, Mikko Perttunen, dri-devel

On 26/09/18 15:13, Thierry Reding wrote:
> On Wed, Sep 26, 2018 at 04:10:54PM +0200, Thierry Reding wrote:
>> On Wed, Sep 12, 2018 at 05:47:54PM +0100, Robin Murphy wrote:
>>> Now that the Host1x bus_type implements a .dma_configure callback,
>>> subdevices should automatically get configured for DMA as their drivers
>>> bind, so there's no need to also force it at device creation time.
>>>
>>> CC: Thierry Reding <thierry.reding@gmail.com>
>>> CC: Mikko Perttunen <cyndis@kapsi.fi>
>>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>>> ---
>>>
>>> I *believe* my reasoning is correct here, but please shout if it's not.
>>>
>>>   drivers/gpu/host1x/bus.c | 2 --
>>>   1 file changed, 2 deletions(-)
>>
>> Applied, thanks.
> 
> Actually I was a little too quick on the trigger there. I don't think we
> can remove this here because the of_dma_configure() in this call
> configures the logical "compound" child device, whereas the
> .dma_configure callback configures the physical device.

Right, that's what I couldn't quite get my head around - I have the 
impression that the logical devices belong to host1x_bus_type and the 
physical ones to platform_bus_type, and thus each should be covered by 
the respective .dma_configure implementations, but I always end up 
getting lost and confused in Host1x, and having no hardware to hand to 
run easy tests on doesn't help much either.

What I'm really trying to do here is minimise the potential impact of a 
possible future patch mucking with of_dma_configure()'s interface, so 
it's not the end of the world if this call ends up staying, it just 
means I might be after one more ack at some point ;)

Thanks,
Robin.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-26 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-12 16:47 [PATCH] gpu: host1x: Remove redundant of_dma_configure() call Robin Murphy
2018-09-26 14:10 ` Thierry Reding
2018-09-26 14:13   ` Thierry Reding
2018-09-26 14:29     ` Robin Murphy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.