Skip to contentSkip to conversation

drm/amdgpu: clear framebuffer with GPU

PATCH In review Pixel Ding 3 participants 3 messages Feb 8, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Pixel Ding

author
#0 lore raw

PATCH 1/1 drm/amdgpu: clear framebuffer with GPU

CPU is not efficient to do this job. There's a failure caused by this is that handshaking gets timeout of SRIOV virtual function.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2 -3
index 1e735c4..2867f55 100644
@@ -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);
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1486517097-22328-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 2 lines · Pixel Ding

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,

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2 -1
index 1e735c4..2867f55 100644
@@ -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",

drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c static int amdgpufb_create(struct drm_fb_helper *helper, · line 248

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +0 -2
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 0b080624-7d4b-0aeb-1049-2c3637d66f64-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org

#4 lore raw

Am 08.02.2017 um 05:01 schrieb Edward O'Callaghan:

Quoted 6 lines · Pixel Ding
Quoted 2 lines

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,

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 <[email protected]> as well.

Regards,
Christian.

Quoted 24 lines
Quoted 24 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +2 -1
index 1e735c4..2867f55 100644
@@ -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;
 
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c static int amdgpufb_create(struct drm_fb_helper *helper, · line 248

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +0 -2
-	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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx