* [PATCH 1/1] drm/vmwgfx: free ttm resource before assigning a new one
@ 2021-05-03 17:26 Nirmoy Das
2021-05-03 17:39 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Nirmoy Das @ 2021-05-03 17:26 UTC (permalink / raw)
To: dri-devel; +Cc: daniel.vetter, Nirmoy Das, sroland, Christian.Koenig
TTM BO resource need to be freed before calling ttm_bo_assign_mem().
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index 2dc031fe4a90..93e4cf34a3a3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -738,6 +738,7 @@ static int vmw_move(struct ttm_buffer_object *bo,
if (old_man->use_tt && new_man->use_tt) {
if (bo->mem.mem_type == TTM_PL_SYSTEM) {
+ ttm_resource_free(bo, &bo->mem);
ttm_bo_assign_mem(bo, new_mem);
return 0;
}
--
2.31.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] drm/vmwgfx: free ttm resource before assigning a new one
2021-05-03 17:26 [PATCH 1/1] drm/vmwgfx: free ttm resource before assigning a new one Nirmoy Das
@ 2021-05-03 17:39 ` Christian König
2021-05-03 18:13 ` Nirmoy
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2021-05-03 17:39 UTC (permalink / raw)
To: Nirmoy Das, dri-devel; +Cc: daniel.vetter, sroland
Am 03.05.21 um 19:26 schrieb Nirmoy Das:
> TTM BO resource need to be freed before calling ttm_bo_assign_mem().
>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index 2dc031fe4a90..93e4cf34a3a3 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -738,6 +738,7 @@ static int vmw_move(struct ttm_buffer_object *bo,
>
> if (old_man->use_tt && new_man->use_tt) {
> if (bo->mem.mem_type == TTM_PL_SYSTEM) {
> + ttm_resource_free(bo, &bo->mem);
> ttm_bo_assign_mem(bo, new_mem);
Mhm, we should probably rather call ttm_bo_move_null here like other
drivers do.
Christian.
> return 0;
> }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] drm/vmwgfx: free ttm resource before assigning a new one
2021-05-03 17:39 ` Christian König
@ 2021-05-03 18:13 ` Nirmoy
0 siblings, 0 replies; 3+ messages in thread
From: Nirmoy @ 2021-05-03 18:13 UTC (permalink / raw)
To: Christian König, Nirmoy Das, dri-devel; +Cc: daniel.vetter, sroland
On 5/3/21 7:39 PM, Christian König wrote:
> Am 03.05.21 um 19:26 schrieb Nirmoy Das:
>> TTM BO resource need to be freed before calling ttm_bo_assign_mem().
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
>> ---
>> drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> index 2dc031fe4a90..93e4cf34a3a3 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
>> @@ -738,6 +738,7 @@ static int vmw_move(struct ttm_buffer_object *bo,
>> if (old_man->use_tt && new_man->use_tt) {
>> if (bo->mem.mem_type == TTM_PL_SYSTEM) {
>> + ttm_resource_free(bo, &bo->mem);
>> ttm_bo_assign_mem(bo, new_mem);
>
> Mhm, we should probably rather call ttm_bo_move_null here like other
> drivers do.
>
Thanks Christian, I will send a updated patch.
Nirmoy
> Christian.
>
>> return 0;
>> }
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-03 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 17:26 [PATCH 1/1] drm/vmwgfx: free ttm resource before assigning a new one Nirmoy Das
2021-05-03 17:39 ` Christian König
2021-05-03 18:13 ` Nirmoy
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).