* [PATCH] drm/radeon: page table BOs are kernel allocations
@ 2014-07-02 19:28 Christian König
2014-07-02 19:53 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2014-07-02 19:28 UTC (permalink / raw)
To: dri-devel
From: Christian König <christian.koenig@amd.com>
Userspace shouldn't be able to access them.
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/radeon/radeon_vm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index c11b71d..c8c48aa 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -493,7 +493,7 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
mutex_unlock(&vm->mutex);
r = radeon_bo_create(rdev, RADEON_VM_PTE_COUNT * 8,
- RADEON_GPU_PAGE_SIZE, false,
+ RADEON_GPU_PAGE_SIZE, true,
RADEON_GEM_DOMAIN_VRAM, NULL, &pt);
if (r)
return r;
@@ -913,7 +913,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)
return -ENOMEM;
}
- r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, false,
+ r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, true,
RADEON_GEM_DOMAIN_VRAM, NULL,
&vm->page_directory);
if (r)
--
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] 3+ messages in thread
* Re: [PATCH] drm/radeon: page table BOs are kernel allocations
2014-07-02 19:28 [PATCH] drm/radeon: page table BOs are kernel allocations Christian König
@ 2014-07-02 19:53 ` Alex Deucher
2014-07-03 6:49 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2014-07-02 19:53 UTC (permalink / raw)
To: Christian König; +Cc: Maling list - DRI developers
On Wed, Jul 2, 2014 at 3:28 PM, Christian König <deathsimple@vodafone.de> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Userspace shouldn't be able to access them.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Cc: stable@vger.kernel.org
I assume this is for 3.15. I had to tweak it slightly for 3.16.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_vm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
> index c11b71d..c8c48aa 100644
> --- a/drivers/gpu/drm/radeon/radeon_vm.c
> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
> @@ -493,7 +493,7 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
> mutex_unlock(&vm->mutex);
>
> r = radeon_bo_create(rdev, RADEON_VM_PTE_COUNT * 8,
> - RADEON_GPU_PAGE_SIZE, false,
> + RADEON_GPU_PAGE_SIZE, true,
> RADEON_GEM_DOMAIN_VRAM, NULL, &pt);
> if (r)
> return r;
> @@ -913,7 +913,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)
> return -ENOMEM;
> }
>
> - r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, false,
> + r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, true,
> RADEON_GEM_DOMAIN_VRAM, NULL,
> &vm->page_directory);
> if (r)
> --
> 1.9.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/radeon: page table BOs are kernel allocations
2014-07-02 19:53 ` Alex Deucher
@ 2014-07-03 6:49 ` Christian König
0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2014-07-03 6:49 UTC (permalink / raw)
To: Alex Deucher; +Cc: Maling list - DRI developers
Am 02.07.2014 21:53, schrieb Alex Deucher:
> On Wed, Jul 2, 2014 at 3:28 PM, Christian König <deathsimple@vodafone.de> wrote:
>> From: Christian König <christian.koenig@amd.com>
>>
>> Userspace shouldn't be able to access them.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Cc: stable@vger.kernel.org
> I assume this is for 3.15. I had to tweak it slightly for 3.16.
Yeah, I've created the patch on a 3.15 branch. Didn't realized that we
need to change it slightly for 3.16.
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Thanks,
Christian.
>
>> ---
>> drivers/gpu/drm/radeon/radeon_vm.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
>> index c11b71d..c8c48aa 100644
>> --- a/drivers/gpu/drm/radeon/radeon_vm.c
>> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
>> @@ -493,7 +493,7 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
>> mutex_unlock(&vm->mutex);
>>
>> r = radeon_bo_create(rdev, RADEON_VM_PTE_COUNT * 8,
>> - RADEON_GPU_PAGE_SIZE, false,
>> + RADEON_GPU_PAGE_SIZE, true,
>> RADEON_GEM_DOMAIN_VRAM, NULL, &pt);
>> if (r)
>> return r;
>> @@ -913,7 +913,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)
>> return -ENOMEM;
>> }
>>
>> - r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, false,
>> + r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, true,
>> RADEON_GEM_DOMAIN_VRAM, NULL,
>> &vm->page_directory);
>> if (r)
>> --
>> 1.9.1
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-03 6:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02 19:28 [PATCH] drm/radeon: page table BOs are kernel allocations Christian König
2014-07-02 19:53 ` Alex Deucher
2014-07-03 6:49 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.