[PATCH] drm/amdgpu: clear framebuffer with GPU

Edward O'Callaghan funfunctor at folklore1984.net
Wed Feb 8 04:01:06 UTC 2017



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 at folklore1984.net>

> 
> Signed-off-by: Pixel Ding <Pixel.Ding at 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);
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170208/1760b2ec/attachment.sig>


More information about the amd-gfx mailing list