diff mbox series

[RFC] drm/etnaviv: Disable softpin

Message ID 20221201232100.221606-1-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series [RFC] drm/etnaviv: Disable softpin | expand

Commit Message

Marek Vasut Dec. 1, 2022, 11:21 p.m. UTC
Currently softpin suffers from assorted race conditions exposed by newer
versions of mesa 22.2.y and 22.3.y . Those races are difficult to fix in
older kernel versions due to massive amount of backports necessary to do
so. Disable softpin by default until Linux 6.1.y is out, which contains
the necessary fixes to make softpin work reliably.

Fixes: 088880ddc0b20 ("drm/etnaviv: implement softpin")
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Russell King <linux+etnaviv@armlinux.org.uk>
Cc: etnaviv@lists.freedesktop.org
To: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Lucas Stach Dec. 2, 2022, 8:59 a.m. UTC | #1
Am Freitag, dem 02.12.2022 um 00:21 +0100 schrieb Marek Vasut:
> Currently softpin suffers from assorted race conditions exposed by newer
> versions of mesa 22.2.y and 22.3.y . Those races are difficult to fix in
> older kernel versions due to massive amount of backports necessary to do
> so. Disable softpin by default until Linux 6.1.y is out, which contains
> the necessary fixes to make softpin work reliably.
> 
Sorry, but that's a NACK. The userspace driver depends on softpin for
GPUs with texture descriptors, so this introduces a hard functional
regression for those GPUs. I.e. they would go from "require race fixes
that are already on the way to upstream" to not working at all.

Regards,
Lucas

> Fixes: 088880ddc0b20 ("drm/etnaviv: implement softpin")
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Russell King <linux+etnaviv@armlinux.org.uk>
> Cc: etnaviv@lists.freedesktop.org
> To: dri-devel@lists.freedesktop.org
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index 51320eeebfcff..326c9696cccea 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -146,10 +146,7 @@ int etnaviv_gpu_get_param(struct etnaviv_gpu *gpu, u32 param, u64 *value)
>  		break;
>  
>  	case ETNAVIV_PARAM_SOFTPIN_START_ADDR:
> -		if (priv->mmu_global->version == ETNAVIV_IOMMU_V2)
> -			*value = ETNAVIV_SOFTPIN_START_ADDRESS;
> -		else
> -			*value = ~0ULL;
> +		*value = ~0ULL;
>  		break;
>  
>  	case ETNAVIV_PARAM_GPU_PRODUCT_ID:
Marek Vasut Dec. 2, 2022, 10:20 a.m. UTC | #2
On 12/2/22 09:59, Lucas Stach wrote:
> Am Freitag, dem 02.12.2022 um 00:21 +0100 schrieb Marek Vasut:
>> Currently softpin suffers from assorted race conditions exposed by newer
>> versions of mesa 22.2.y and 22.3.y . Those races are difficult to fix in
>> older kernel versions due to massive amount of backports necessary to do
>> so. Disable softpin by default until Linux 6.1.y is out, which contains
>> the necessary fixes to make softpin work reliably.
>>
> Sorry, but that's a NACK. The userspace driver depends on softpin for
> GPUs with texture descriptors, so this introduces a hard functional
> regression for those GPUs. I.e. they would go from "require race fixes
> that are already on the way to upstream" to not working at all.

I expected that NAK.

But then, what options do we have here, except for a massive convoluted 
backport, which might bring bugs of its own ?
Lucas Stach Dec. 2, 2022, 10:49 a.m. UTC | #3
Am Freitag, dem 02.12.2022 um 11:20 +0100 schrieb Marek Vasut:
> On 12/2/22 09:59, Lucas Stach wrote:
> > Am Freitag, dem 02.12.2022 um 00:21 +0100 schrieb Marek Vasut:
> > > Currently softpin suffers from assorted race conditions exposed by newer
> > > versions of mesa 22.2.y and 22.3.y . Those races are difficult to fix in
> > > older kernel versions due to massive amount of backports necessary to do
> > > so. Disable softpin by default until Linux 6.1.y is out, which contains
> > > the necessary fixes to make softpin work reliably.
> > > 
> > Sorry, but that's a NACK. The userspace driver depends on softpin for
> > GPUs with texture descriptors, so this introduces a hard functional
> > regression for those GPUs. I.e. they would go from "require race fixes
> > that are already on the way to upstream" to not working at all.
> 
> I expected that NAK.
> 
> But then, what options do we have here, except for a massive convoluted 
> backport, which might bring bugs of its own ?

There is no other option. The kernel driver in the LTS releases does
have a buggy softpin implementation. If someone cares about being able
to keep their system on the LTS kernel, then that someone either needs
to carry out the backports of the fixes with the necessary diligence or
sponsor someone to do it.

Regards,
Lucas
diff mbox series

Patch

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 51320eeebfcff..326c9696cccea 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -146,10 +146,7 @@  int etnaviv_gpu_get_param(struct etnaviv_gpu *gpu, u32 param, u64 *value)
 		break;
 
 	case ETNAVIV_PARAM_SOFTPIN_START_ADDR:
-		if (priv->mmu_global->version == ETNAVIV_IOMMU_V2)
-			*value = ETNAVIV_SOFTPIN_START_ADDRESS;
-		else
-			*value = ~0ULL;
+		*value = ~0ULL;
 		break;
 
 	case ETNAVIV_PARAM_GPU_PRODUCT_ID: