diff mbox

drm/radeon: allocate SA bo in the requested domain

Message ID 1366906748-3369-1-git-send-email-deathsimple@vodafone.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christian König April 25, 2013, 4:19 p.m. UTC
From: Christian König <christian.koenig@amd.com>

This avoid moving the BO directly after allocating it.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/radeon_sa.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Deucher April 25, 2013, 4:40 p.m. UTC | #1
On Thu, Apr 25, 2013 at 12:19 PM, Christian König
<deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> This avoid moving the BO directly after allocating it.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>

Looks good.  Applied to my tree.

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_sa.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c
> index cb80099..0abe5a9 100644
> --- a/drivers/gpu/drm/radeon/radeon_sa.c
> +++ b/drivers/gpu/drm/radeon/radeon_sa.c
> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev,
>         }
>
>         r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true,
> -                            RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo);
> +                            domain, NULL, &sa_manager->bo);
>         if (r) {
>                 dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r);
>                 return r;
> --
> 1.7.10.4
>
Christian König April 25, 2013, 4:47 p.m. UTC | #2
Am 25.04.2013 18:40, schrieb Alex Deucher:
> On Thu, Apr 25, 2013 at 12:19 PM, Christian König
> <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> This avoid moving the BO directly after allocating it.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
> Looks good.  Applied to my tree.

Have you also seen/applied "[PATCH] drm/radeon: fix scratch reg handling 
for UVD fence"?

That one is more important cause it fixes a real bug, while this patch 
is just a cleanup.

Christian.

> Alex
>
>> ---
>>   drivers/gpu/drm/radeon/radeon_sa.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c
>> index cb80099..0abe5a9 100644
>> --- a/drivers/gpu/drm/radeon/radeon_sa.c
>> +++ b/drivers/gpu/drm/radeon/radeon_sa.c
>> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev,
>>          }
>>
>>          r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true,
>> -                            RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo);
>> +                            domain, NULL, &sa_manager->bo);
>>          if (r) {
>>                  dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r);
>>                  return r;
>> --
>> 1.7.10.4
>>
Alex Deucher April 25, 2013, 4:49 p.m. UTC | #3
On Thu, Apr 25, 2013 at 12:47 PM, Christian König
<deathsimple@vodafone.de> wrote:
> Am 25.04.2013 18:40, schrieb Alex Deucher:
>
>> On Thu, Apr 25, 2013 at 12:19 PM, Christian König
>> <deathsimple@vodafone.de> wrote:
>>>
>>> From: Christian König <christian.koenig@amd.com>
>>>
>>> This avoid moving the BO directly after allocating it.
>>>
>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>>
>> Looks good.  Applied to my tree.
>
>
> Have you also seen/applied "[PATCH] drm/radeon: fix scratch reg handling for
> UVD fence"?
>
> That one is more important cause it fixes a real bug, while this patch is
> just a cleanup.

I'll grab that one too.

Alex

>
> Christian.
>
>
>> Alex
>>
>>> ---
>>>   drivers/gpu/drm/radeon/radeon_sa.c |    2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c
>>> b/drivers/gpu/drm/radeon/radeon_sa.c
>>> index cb80099..0abe5a9 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_sa.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_sa.c
>>> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device
>>> *rdev,
>>>          }
>>>
>>>          r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true,
>>> -                            RADEON_GEM_DOMAIN_CPU, NULL,
>>> &sa_manager->bo);
>>> +                            domain, NULL, &sa_manager->bo);
>>>          if (r) {
>>>                  dev_err(rdev->dev, "(%d) failed to allocate bo for
>>> manager\n", r);
>>>                  return r;
>>> --
>>> 1.7.10.4
>>>
>
Dieter Nützel April 28, 2013, 10:47 p.m. UTC | #4
Am 2013-04-25 18:19, schrieb Christian König:
> From: Christian König <christian.koenig@amd.com>
> 
> This avoid moving the BO directly after allocating it.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Tested-by: Dieter Nützel <dieter@nuetzel-hh.de>

Regards,
Dieter

> ---
> drivers/gpu/drm/radeon/radeon_sa.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c
> b/drivers/gpu/drm/radeon/radeon_sa.c
> index cb80099..0abe5a9 100644
> --- a/drivers/gpu/drm/radeon/radeon_sa.c
> +++ b/drivers/gpu/drm/radeon/radeon_sa.c
> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device 
> *rdev,
> 	}
> 
> 	r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true,
> -			     RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo);
> +			     domain, NULL, &sa_manager->bo);
> 	if (r) {
> 		dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r);
> 		return r;
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c
index cb80099..0abe5a9 100644
--- a/drivers/gpu/drm/radeon/radeon_sa.c
+++ b/drivers/gpu/drm/radeon/radeon_sa.c
@@ -64,7 +64,7 @@  int radeon_sa_bo_manager_init(struct radeon_device *rdev,
 	}
 
 	r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true,
-			     RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo);
+			     domain, NULL, &sa_manager->bo);
 	if (r) {
 		dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r);
 		return r;