* [PATCH] drm/amdgpu: clear framebuffer with GPU
@ 2017-02-08 1:24 Pixel Ding
[not found] ` <1486517097-22328-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Pixel Ding @ 2017-02-08 1:24 UTC (permalink / raw)
To: Christian.Koenig-5C7GfCeVMHo
Cc: Pixel Ding, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
CPU is not efficient to do this job. There's a failure caused by this
is that handshaking gets timeout of SRIOV virtual function.
Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 1e735c4..2867f55 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -148,7 +148,8 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
ret = amdgpu_gem_object_create(adev, aligned_size, 0,
AMDGPU_GEM_DOMAIN_VRAM,
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
- AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
+ AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
+ AMDGPU_GEM_CREATE_VRAM_CLEARED,
true, &gobj);
if (ret) {
printk(KERN_ERR "failed to allocate framebuffer (%d)\n",
@@ -242,8 +243,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
/* setup helper */
rfbdev->helper.fb = fb;
- memset_io(abo->kptr, 0x0, amdgpu_bo_size(abo));
-
strcpy(info->fix.id, "amdgpudrmfb");
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: clear framebuffer with GPU
[not found] ` <1486517097-22328-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-08 4:01 ` Edward O'Callaghan
[not found] ` <0b080624-7d4b-0aeb-1049-2c3637d66f64-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Edward O'Callaghan @ 2017-02-08 4:01 UTC (permalink / raw)
To: Pixel Ding, Christian.Koenig-5C7GfCeVMHo
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1.1: Type: text/plain, Size: 1558 bytes --]
On 02/08/2017 12:24 PM, Pixel Ding wrote:
> CPU is not efficient to do this job. There's a failure caused by this
> is that handshaking gets timeout of SRIOV virtual function.
Can you fixup the commit message a little but otherwise,
Reviewed-by: Edward O'Callaghan <funfunctor-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>
>
> Signed-off-by: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index 1e735c4..2867f55 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -148,7 +148,8 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
> ret = amdgpu_gem_object_create(adev, aligned_size, 0,
> AMDGPU_GEM_DOMAIN_VRAM,
> AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
> - AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
> + AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
> + AMDGPU_GEM_CREATE_VRAM_CLEARED,
> true, &gobj);
> if (ret) {
> printk(KERN_ERR "failed to allocate framebuffer (%d)\n",
> @@ -242,8 +243,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
> /* setup helper */
> rfbdev->helper.fb = fb;
>
> - memset_io(abo->kptr, 0x0, amdgpu_bo_size(abo));
> -
> strcpy(info->fix.id, "amdgpudrmfb");
>
> drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: clear framebuffer with GPU
[not found] ` <0b080624-7d4b-0aeb-1049-2c3637d66f64-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>
@ 2017-02-08 10:33 ` Christian König
0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2017-02-08 10:33 UTC (permalink / raw)
To: Edward O'Callaghan, Pixel Ding
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 08.02.2017 um 05:01 schrieb Edward O'Callaghan:
>
> On 02/08/2017 12:24 PM, Pixel Ding wrote:
>> CPU is not efficient to do this job. There's a failure caused by this
>> is that handshaking gets timeout of SRIOV virtual function.
> Can you fixup the commit message a little but otherwise,
> Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Monk figured out that you need to move the fb init after the IB init
during device startup.
Otherwise setting this flag here will cause a NULL pointer dereference
in the SA code.
Assuming Monks patch lands first during the upstream push this one is
Reviewed-by: Christian König <christian.koenig@amd.com> as well.
Regards,
Christian.
>
>> Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> index 1e735c4..2867f55 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> @@ -148,7 +148,8 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
>> ret = amdgpu_gem_object_create(adev, aligned_size, 0,
>> AMDGPU_GEM_DOMAIN_VRAM,
>> AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
>> - AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
>> + AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
>> + AMDGPU_GEM_CREATE_VRAM_CLEARED,
>> true, &gobj);
>> if (ret) {
>> printk(KERN_ERR "failed to allocate framebuffer (%d)\n",
>> @@ -242,8 +243,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
>> /* setup helper */
>> rfbdev->helper.fb = fb;
>>
>> - memset_io(abo->kptr, 0x0, amdgpu_bo_size(abo));
>> -
>> strcpy(info->fix.id, "amdgpudrmfb");
>>
>> drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
>>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-08 10:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 1:24 [PATCH] drm/amdgpu: clear framebuffer with GPU Pixel Ding
[not found] ` <1486517097-22328-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-02-08 4:01 ` Edward O'Callaghan
[not found] ` <0b080624-7d4b-0aeb-1049-2c3637d66f64-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>
2017-02-08 10:33 ` 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.