linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tegra: Use correct property for BO size
@ 2021-09-16 14:13 Mikko Perttunen
  2021-09-16 15:56 ` Dmitry Osipenko
  0 siblings, 1 reply; 3+ messages in thread
From: Mikko Perttunen @ 2021-09-16 14:13 UTC (permalink / raw)
  To: thierry.reding, jonathanh; +Cc: digetx, dri-devel, linux-tegra, Mikko Perttunen

The size property is not always populated, while the gem.size
property is.

Fixes: d7c591bc1a3f ("drm/tegra: Implement new UAPI")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
 drivers/gpu/drm/tegra/uapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c
index dc16a24f4dbe..690a339c52ec 100644
--- a/drivers/gpu/drm/tegra/uapi.c
+++ b/drivers/gpu/drm/tegra/uapi.c
@@ -222,7 +222,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data, struct drm_f
 		mapping->iova = sg_dma_address(mapping->sgt->sgl);
 	}
 
-	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->size;
+	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->gem.size;
 
 	err = xa_alloc(&context->mappings, &args->mapping, mapping, XA_LIMIT(1, U32_MAX),
 		       GFP_KERNEL);
-- 
2.32.0


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

* Re: [PATCH] drm/tegra: Use correct property for BO size
  2021-09-16 14:13 [PATCH] drm/tegra: Use correct property for BO size Mikko Perttunen
@ 2021-09-16 15:56 ` Dmitry Osipenko
  2021-09-16 16:00   ` Mikko Perttunen
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Osipenko @ 2021-09-16 15:56 UTC (permalink / raw)
  To: Mikko Perttunen, thierry.reding, jonathanh; +Cc: dri-devel, linux-tegra

16.09.2021 17:13, Mikko Perttunen пишет:
> The size property is not always populated, while the gem.size
> property is.
> 
> Fixes: d7c591bc1a3f ("drm/tegra: Implement new UAPI")
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
> ---
>  drivers/gpu/drm/tegra/uapi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c
> index dc16a24f4dbe..690a339c52ec 100644
> --- a/drivers/gpu/drm/tegra/uapi.c
> +++ b/drivers/gpu/drm/tegra/uapi.c
> @@ -222,7 +222,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data, struct drm_f
>  		mapping->iova = sg_dma_address(mapping->sgt->sgl);
>  	}
>  
> -	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->size;
> +	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->gem.size;
>  
>  	err = xa_alloc(&context->mappings, &args->mapping, mapping, XA_LIMIT(1, U32_MAX),
>  		       GFP_KERNEL);
> 

Did something bad happened to [1]? Thierry fetched patches, but didn't
make the fixes-PR yet, AFAICS.

[1]
https://patchwork.ozlabs.org/project/linux-tegra/patch/20210817020153.25378-3-digetx@gmail.com/


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

* Re: [PATCH] drm/tegra: Use correct property for BO size
  2021-09-16 15:56 ` Dmitry Osipenko
@ 2021-09-16 16:00   ` Mikko Perttunen
  0 siblings, 0 replies; 3+ messages in thread
From: Mikko Perttunen @ 2021-09-16 16:00 UTC (permalink / raw)
  To: Dmitry Osipenko, Mikko Perttunen, thierry.reding, jonathanh
  Cc: dri-devel, linux-tegra

On 9/16/21 6:56 PM, Dmitry Osipenko wrote:
> 16.09.2021 17:13, Mikko Perttunen пишет:
>> The size property is not always populated, while the gem.size
>> property is.
>>
>> Fixes: d7c591bc1a3f ("drm/tegra: Implement new UAPI")
>> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
>> ---
>>   drivers/gpu/drm/tegra/uapi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c
>> index dc16a24f4dbe..690a339c52ec 100644
>> --- a/drivers/gpu/drm/tegra/uapi.c
>> +++ b/drivers/gpu/drm/tegra/uapi.c
>> @@ -222,7 +222,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data, struct drm_f
>>   		mapping->iova = sg_dma_address(mapping->sgt->sgl);
>>   	}
>>   
>> -	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->size;
>> +	mapping->iova_end = mapping->iova + host1x_to_tegra_bo(mapping->bo)->gem.size;
>>   
>>   	err = xa_alloc(&context->mappings, &args->mapping, mapping, XA_LIMIT(1, U32_MAX),
>>   		       GFP_KERNEL);
>>
> 
> Did something bad happened to [1]? Thierry fetched patches, but didn't
> make the fixes-PR yet, AFAICS.

Oh, didn't remember you had already fixed it. Let's disregard my patch then.

Thanks,
Mikko

> 
> [1]
> https://patchwork.ozlabs.org/project/linux-tegra/patch/20210817020153.25378-3-digetx@gmail.com/
> 

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

end of thread, other threads:[~2021-09-16 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 14:13 [PATCH] drm/tegra: Use correct property for BO size Mikko Perttunen
2021-09-16 15:56 ` Dmitry Osipenko
2021-09-16 16:00   ` Mikko Perttunen

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 NNTP newsgroup(s).