* [PATCH 1/2] drm/radeon: fix page directory update size estimation
@ 2014-05-12 13:30 Christian König
2014-05-12 13:30 ` [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2 Christian König
2014-05-12 15:23 ` [PATCH 1/2] drm/radeon: fix page directory update size estimation Alex Deucher
0 siblings, 2 replies; 5+ messages in thread
From: Christian König @ 2014-05-12 13:30 UTC (permalink / raw)
To: dri-devel
From: Christian König <christian.koenig@amd.com>
Take padding into account as well.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=75651
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/radeon/radeon_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index 2aae6ce..d9ab99f 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -595,7 +595,7 @@ int radeon_vm_update_page_directory(struct radeon_device *rdev,
ndw = 64;
/* assume the worst case */
- ndw += vm->max_pde_used * 12;
+ ndw += vm->max_pde_used * 16;
/* update too big for an IB */
if (ndw > 0xfffff)
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2
2014-05-12 13:30 [PATCH 1/2] drm/radeon: fix page directory update size estimation Christian König
@ 2014-05-12 13:30 ` Christian König
2014-05-13 19:47 ` Marek Olšák
2014-05-12 15:23 ` [PATCH 1/2] drm/radeon: fix page directory update size estimation Alex Deucher
1 sibling, 1 reply; 5+ messages in thread
From: Christian König @ 2014-05-12 13:30 UTC (permalink / raw)
To: dri-devel
From: Christian König <christian.koenig@amd.com>
Some buffers (UVD/VM page tables) must be placed in VRAM,
but the byte restriction for moving buffers didn't took this
into account.
v2: keep closer to the original code
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/radeon/radeon_object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index 72705fb..4faa4d6 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -458,7 +458,7 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
* into account. We don't want to disallow buffer moves
* completely.
*/
- if (current_domain != RADEON_GEM_DOMAIN_CPU &&
+ if ((lobj->alt_domain & current_domain) != 0 &&
(domain & current_domain) == 0 && /* will be moved */
bytes_moved > bytes_moved_threshold) {
/* don't move it */
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2
2014-05-12 13:30 ` [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2 Christian König
@ 2014-05-13 19:47 ` Marek Olšák
2014-05-14 9:46 ` Christian König
0 siblings, 1 reply; 5+ messages in thread
From: Marek Olšák @ 2014-05-13 19:47 UTC (permalink / raw)
To: Christian König; +Cc: dri-devel
For the patch:
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
It would be clearer if alt_domain was renamed to allowed_domains.
Marek
On Mon, May 12, 2014 at 3:30 PM, Christian König
<deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Some buffers (UVD/VM page tables) must be placed in VRAM,
> but the byte restriction for moving buffers didn't took this
> into account.
>
> v2: keep closer to the original code
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_object.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
> index 72705fb..4faa4d6 100644
> --- a/drivers/gpu/drm/radeon/radeon_object.c
> +++ b/drivers/gpu/drm/radeon/radeon_object.c
> @@ -458,7 +458,7 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
> * into account. We don't want to disallow buffer moves
> * completely.
> */
> - if (current_domain != RADEON_GEM_DOMAIN_CPU &&
> + if ((lobj->alt_domain & current_domain) != 0 &&
> (domain & current_domain) == 0 && /* will be moved */
> bytes_moved > bytes_moved_threshold) {
> /* don't move it */
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2
2014-05-13 19:47 ` Marek Olšák
@ 2014-05-14 9:46 ` Christian König
0 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2014-05-14 9:46 UTC (permalink / raw)
To: Marek Olšák; +Cc: dri-devel
Am 13.05.2014 21:47, schrieb Marek Olšák:
> For the patch:
>
> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
>
> It would be clearer if alt_domain was renamed to allowed_domains.
Yeah, already had the same idea. Going to rename "domain" to
"prefered_domains" and "alt_domain" to "allowed_domains" for 3.16.
Thanks,
Christian.
>
> Marek
>
> On Mon, May 12, 2014 at 3:30 PM, Christian König
> <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> Some buffers (UVD/VM page tables) must be placed in VRAM,
>> but the byte restriction for moving buffers didn't took this
>> into account.
>>
>> v2: keep closer to the original code
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> ---
>> drivers/gpu/drm/radeon/radeon_object.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
>> index 72705fb..4faa4d6 100644
>> --- a/drivers/gpu/drm/radeon/radeon_object.c
>> +++ b/drivers/gpu/drm/radeon/radeon_object.c
>> @@ -458,7 +458,7 @@ int radeon_bo_list_validate(struct radeon_device *rdev,
>> * into account. We don't want to disallow buffer moves
>> * completely.
>> */
>> - if (current_domain != RADEON_GEM_DOMAIN_CPU &&
>> + if ((lobj->alt_domain & current_domain) != 0 &&
>> (domain & current_domain) == 0 && /* will be moved */
>> bytes_moved > bytes_moved_threshold) {
>> /* don't move it */
>> --
>> 1.9.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/radeon: fix page directory update size estimation
2014-05-12 13:30 [PATCH 1/2] drm/radeon: fix page directory update size estimation Christian König
2014-05-12 13:30 ` [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2 Christian König
@ 2014-05-12 15:23 ` Alex Deucher
1 sibling, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2014-05-12 15:23 UTC (permalink / raw)
To: Christian König; +Cc: Maling list - DRI developers
On Mon, May 12, 2014 at 9:30 AM, Christian König
<deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Take padding into account as well.
>
> Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=75651
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
For the series:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_vm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
> index 2aae6ce..d9ab99f 100644
> --- a/drivers/gpu/drm/radeon/radeon_vm.c
> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
> @@ -595,7 +595,7 @@ int radeon_vm_update_page_directory(struct radeon_device *rdev,
> ndw = 64;
>
> /* assume the worst case */
> - ndw += vm->max_pde_used * 12;
> + ndw += vm->max_pde_used * 16;
>
> /* update too big for an IB */
> if (ndw > 0xfffff)
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-14 9:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 13:30 [PATCH 1/2] drm/radeon: fix page directory update size estimation Christian König
2014-05-12 13:30 ` [PATCH 2/2] drm/radeon: fix buffer placement under memory pressure v2 Christian König
2014-05-13 19:47 ` Marek Olšák
2014-05-14 9:46 ` Christian König
2014-05-12 15:23 ` [PATCH 1/2] drm/radeon: fix page directory update size estimation Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox