All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: Register context bus unconditionally
@ 2022-07-07 17:30 ` Robin Murphy
  0 siblings, 0 replies; 10+ messages in thread
From: Robin Murphy @ 2022-07-07 17:30 UTC (permalink / raw)
  To: thierry.reding, mperttunen; +Cc: iommu, linux-tegra, dri-devel

Conditional registration is a problem for other subsystems which may
unwittingly try to interact with host1x_context_device_bus_type in an
uninitialised state on non-Tegra platforms. A look under /sys/bus on a
typical system already reveals plenty of entries from enabled but
otherwise irrelevant configs, so lets keep things simple and register
our context bus unconditionally too.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 drivers/gpu/host1x/context_bus.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
index b0d35b2bbe89..d9421179d7b4 100644
--- a/drivers/gpu/host1x/context_bus.c
+++ b/drivers/gpu/host1x/context_bus.c
@@ -15,11 +15,6 @@ static int __init host1x_context_device_bus_init(void)
 {
 	int err;
 
-	if (!of_machine_is_compatible("nvidia,tegra186") &&
-	    !of_machine_is_compatible("nvidia,tegra194") &&
-	    !of_machine_is_compatible("nvidia,tegra234"))
-		return 0;
-
 	err = bus_register(&host1x_context_device_bus_type);
 	if (err < 0) {
 		pr_err("bus type registration failed: %d\n", err);
-- 
2.36.1.dirty


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

* [PATCH] gpu: host1x: Register context bus unconditionally
@ 2022-07-07 17:30 ` Robin Murphy
  0 siblings, 0 replies; 10+ messages in thread
From: Robin Murphy @ 2022-07-07 17:30 UTC (permalink / raw)
  To: thierry.reding, mperttunen; +Cc: linux-tegra, iommu, dri-devel

Conditional registration is a problem for other subsystems which may
unwittingly try to interact with host1x_context_device_bus_type in an
uninitialised state on non-Tegra platforms. A look under /sys/bus on a
typical system already reveals plenty of entries from enabled but
otherwise irrelevant configs, so lets keep things simple and register
our context bus unconditionally too.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 drivers/gpu/host1x/context_bus.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
index b0d35b2bbe89..d9421179d7b4 100644
--- a/drivers/gpu/host1x/context_bus.c
+++ b/drivers/gpu/host1x/context_bus.c
@@ -15,11 +15,6 @@ static int __init host1x_context_device_bus_init(void)
 {
 	int err;
 
-	if (!of_machine_is_compatible("nvidia,tegra186") &&
-	    !of_machine_is_compatible("nvidia,tegra194") &&
-	    !of_machine_is_compatible("nvidia,tegra234"))
-		return 0;
-
 	err = bus_register(&host1x_context_device_bus_type);
 	if (err < 0) {
 		pr_err("bus type registration failed: %d\n", err);
-- 
2.36.1.dirty


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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
  2022-07-07 17:30 ` Robin Murphy
@ 2022-07-08  8:33   ` Mikko Perttunen
  -1 siblings, 0 replies; 10+ messages in thread
From: Mikko Perttunen @ 2022-07-08  8:33 UTC (permalink / raw)
  To: Robin Murphy, thierry.reding, mperttunen; +Cc: iommu, linux-tegra, dri-devel

On 7/7/22 20:30, Robin Murphy wrote:
> Conditional registration is a problem for other subsystems which may
> unwittingly try to interact with host1x_context_device_bus_type in an
> uninitialised state on non-Tegra platforms. A look under /sys/bus on a
> typical system already reveals plenty of entries from enabled but
> otherwise irrelevant configs, so lets keep things simple and register
> our context bus unconditionally too.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
>   drivers/gpu/host1x/context_bus.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
> index b0d35b2bbe89..d9421179d7b4 100644
> --- a/drivers/gpu/host1x/context_bus.c
> +++ b/drivers/gpu/host1x/context_bus.c
> @@ -15,11 +15,6 @@ static int __init host1x_context_device_bus_init(void)
>   {
>   	int err;
>   
> -	if (!of_machine_is_compatible("nvidia,tegra186") &&
> -	    !of_machine_is_compatible("nvidia,tegra194") &&
> -	    !of_machine_is_compatible("nvidia,tegra234"))
> -		return 0;
> -
>   	err = bus_register(&host1x_context_device_bus_type);
>   	if (err < 0) {
>   		pr_err("bus type registration failed: %d\n", err);

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>

Cheers,
Mikko

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
@ 2022-07-08  8:33   ` Mikko Perttunen
  0 siblings, 0 replies; 10+ messages in thread
From: Mikko Perttunen @ 2022-07-08  8:33 UTC (permalink / raw)
  To: Robin Murphy, thierry.reding, mperttunen; +Cc: linux-tegra, iommu, dri-devel

On 7/7/22 20:30, Robin Murphy wrote:
> Conditional registration is a problem for other subsystems which may
> unwittingly try to interact with host1x_context_device_bus_type in an
> uninitialised state on non-Tegra platforms. A look under /sys/bus on a
> typical system already reveals plenty of entries from enabled but
> otherwise irrelevant configs, so lets keep things simple and register
> our context bus unconditionally too.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
>   drivers/gpu/host1x/context_bus.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
> index b0d35b2bbe89..d9421179d7b4 100644
> --- a/drivers/gpu/host1x/context_bus.c
> +++ b/drivers/gpu/host1x/context_bus.c
> @@ -15,11 +15,6 @@ static int __init host1x_context_device_bus_init(void)
>   {
>   	int err;
>   
> -	if (!of_machine_is_compatible("nvidia,tegra186") &&
> -	    !of_machine_is_compatible("nvidia,tegra194") &&
> -	    !of_machine_is_compatible("nvidia,tegra234"))
> -		return 0;
> -
>   	err = bus_register(&host1x_context_device_bus_type);
>   	if (err < 0) {
>   		pr_err("bus type registration failed: %d\n", err);

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>

Cheers,
Mikko

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
  2022-07-07 17:30 ` Robin Murphy
@ 2022-07-08 14:32   ` Thierry Reding
  -1 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2022-07-08 14:32 UTC (permalink / raw)
  To: Robin Murphy; +Cc: mperttunen, iommu, linux-tegra, dri-devel

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

On Thu, Jul 07, 2022 at 06:30:44PM +0100, Robin Murphy wrote:
> Conditional registration is a problem for other subsystems which may
> unwittingly try to interact with host1x_context_device_bus_type in an
> uninitialised state on non-Tegra platforms. A look under /sys/bus on a
> typical system already reveals plenty of entries from enabled but
> otherwise irrelevant configs, so lets keep things simple and register
> our context bus unconditionally too.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
>  drivers/gpu/host1x/context_bus.c | 5 -----
>  1 file changed, 5 deletions(-)

Applied, thanks.

Do we need this in v5.19 or is it enough if this gets into v5.20?

Thierry

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

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
@ 2022-07-08 14:32   ` Thierry Reding
  0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2022-07-08 14:32 UTC (permalink / raw)
  To: Robin Murphy; +Cc: linux-tegra, iommu, dri-devel, mperttunen

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

On Thu, Jul 07, 2022 at 06:30:44PM +0100, Robin Murphy wrote:
> Conditional registration is a problem for other subsystems which may
> unwittingly try to interact with host1x_context_device_bus_type in an
> uninitialised state on non-Tegra platforms. A look under /sys/bus on a
> typical system already reveals plenty of entries from enabled but
> otherwise irrelevant configs, so lets keep things simple and register
> our context bus unconditionally too.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
>  drivers/gpu/host1x/context_bus.c | 5 -----
>  1 file changed, 5 deletions(-)

Applied, thanks.

Do we need this in v5.19 or is it enough if this gets into v5.20?

Thierry

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

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
  2022-07-08 14:32   ` Thierry Reding
@ 2022-07-08 14:44     ` Robin Murphy
  -1 siblings, 0 replies; 10+ messages in thread
From: Robin Murphy @ 2022-07-08 14:44 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra, iommu, Joerg Roedel, dri-devel, mperttunen

On 2022-07-08 15:32, Thierry Reding wrote:
> On Thu, Jul 07, 2022 at 06:30:44PM +0100, Robin Murphy wrote:
>> Conditional registration is a problem for other subsystems which may
>> unwittingly try to interact with host1x_context_device_bus_type in an
>> uninitialised state on non-Tegra platforms. A look under /sys/bus on a
>> typical system already reveals plenty of entries from enabled but
>> otherwise irrelevant configs, so lets keep things simple and register
>> our context bus unconditionally too.
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>> ---
>>   drivers/gpu/host1x/context_bus.c | 5 -----
>>   1 file changed, 5 deletions(-)
> 
> Applied, thanks.
> 
> Do we need this in v5.19 or is it enough if this gets into v5.20?

It's not strictly a critical fix, so I think 5.20 is fine. I plan to 
post v4 of my bus_set_iommu() series next week as the hopefully-final 
version, but at this point I think it might be safer to hold off 
actually merging that until early next cycle, to give it plenty of time 
in -next.

Thanks,
Robin.

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
@ 2022-07-08 14:44     ` Robin Murphy
  0 siblings, 0 replies; 10+ messages in thread
From: Robin Murphy @ 2022-07-08 14:44 UTC (permalink / raw)
  To: Thierry Reding; +Cc: mperttunen, iommu, linux-tegra, dri-devel, Joerg Roedel

On 2022-07-08 15:32, Thierry Reding wrote:
> On Thu, Jul 07, 2022 at 06:30:44PM +0100, Robin Murphy wrote:
>> Conditional registration is a problem for other subsystems which may
>> unwittingly try to interact with host1x_context_device_bus_type in an
>> uninitialised state on non-Tegra platforms. A look under /sys/bus on a
>> typical system already reveals plenty of entries from enabled but
>> otherwise irrelevant configs, so lets keep things simple and register
>> our context bus unconditionally too.
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>> ---
>>   drivers/gpu/host1x/context_bus.c | 5 -----
>>   1 file changed, 5 deletions(-)
> 
> Applied, thanks.
> 
> Do we need this in v5.19 or is it enough if this gets into v5.20?

It's not strictly a critical fix, so I think 5.20 is fine. I plan to 
post v4 of my bus_set_iommu() series next week as the hopefully-final 
version, but at this point I think it might be safer to hold off 
actually merging that until early next cycle, to give it plenty of time 
in -next.

Thanks,
Robin.

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
  2022-07-08 14:44     ` Robin Murphy
@ 2022-07-08 15:11       ` Thierry Reding
  -1 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2022-07-08 15:11 UTC (permalink / raw)
  To: Robin Murphy; +Cc: mperttunen, iommu, linux-tegra, dri-devel, Joerg Roedel

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

On Fri, Jul 08, 2022 at 03:44:09PM +0100, Robin Murphy wrote:
> On 2022-07-08 15:32, Thierry Reding wrote:
> > On Thu, Jul 07, 2022 at 06:30:44PM +0100, Robin Murphy wrote:
> > > Conditional registration is a problem for other subsystems which may
> > > unwittingly try to interact with host1x_context_device_bus_type in an
> > > uninitialised state on non-Tegra platforms. A look under /sys/bus on a
> > > typical system already reveals plenty of entries from enabled but
> > > otherwise irrelevant configs, so lets keep things simple and register
> > > our context bus unconditionally too.
> > > 
> > > Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> > > ---
> > >   drivers/gpu/host1x/context_bus.c | 5 -----
> > >   1 file changed, 5 deletions(-)
> > 
> > Applied, thanks.
> > 
> > Do we need this in v5.19 or is it enough if this gets into v5.20?
> 
> It's not strictly a critical fix, so I think 5.20 is fine. I plan to post v4
> of my bus_set_iommu() series next week as the hopefully-final version, but
> at this point I think it might be safer to hold off actually merging that
> until early next cycle, to give it plenty of time in -next.

Alright, I'll send it for v5.20 for now. If things change we can always
backport to v5.19.

Thierry

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

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

* Re: [PATCH] gpu: host1x: Register context bus unconditionally
@ 2022-07-08 15:11       ` Thierry Reding
  0 siblings, 0 replies; 10+ messages in thread
From: Thierry Reding @ 2022-07-08 15:11 UTC (permalink / raw)
  To: Robin Murphy; +Cc: linux-tegra, iommu, Joerg Roedel, dri-devel, mperttunen

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

On Fri, Jul 08, 2022 at 03:44:09PM +0100, Robin Murphy wrote:
> On 2022-07-08 15:32, Thierry Reding wrote:
> > On Thu, Jul 07, 2022 at 06:30:44PM +0100, Robin Murphy wrote:
> > > Conditional registration is a problem for other subsystems which may
> > > unwittingly try to interact with host1x_context_device_bus_type in an
> > > uninitialised state on non-Tegra platforms. A look under /sys/bus on a
> > > typical system already reveals plenty of entries from enabled but
> > > otherwise irrelevant configs, so lets keep things simple and register
> > > our context bus unconditionally too.
> > > 
> > > Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> > > ---
> > >   drivers/gpu/host1x/context_bus.c | 5 -----
> > >   1 file changed, 5 deletions(-)
> > 
> > Applied, thanks.
> > 
> > Do we need this in v5.19 or is it enough if this gets into v5.20?
> 
> It's not strictly a critical fix, so I think 5.20 is fine. I plan to post v4
> of my bus_set_iommu() series next week as the hopefully-final version, but
> at this point I think it might be safer to hold off actually merging that
> until early next cycle, to give it plenty of time in -next.

Alright, I'll send it for v5.20 for now. If things change we can always
backport to v5.19.

Thierry

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

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

end of thread, other threads:[~2022-07-08 15:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 17:30 [PATCH] gpu: host1x: Register context bus unconditionally Robin Murphy
2022-07-07 17:30 ` Robin Murphy
2022-07-08  8:33 ` Mikko Perttunen
2022-07-08  8:33   ` Mikko Perttunen
2022-07-08 14:32 ` Thierry Reding
2022-07-08 14:32   ` Thierry Reding
2022-07-08 14:44   ` Robin Murphy
2022-07-08 14:44     ` Robin Murphy
2022-07-08 15:11     ` Thierry Reding
2022-07-08 15:11       ` Thierry Reding

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.