diff options
author | Pixel Ding <Pixel.Ding@amd.com> | 2017-01-23 22:39:48 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-03-29 23:52:40 -0400 |
commit | cbabc8b343953e7bc6d70b5a22aaebbd73ae9934 (patch) | |
tree | a75441cb274ebeaf34f7bb130ee6444f1a0060e8 /drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | |
parent | 9bc92b9c8d0919b61660300249fa67e291ae0ecc (diff) |
drm/amdgpu: clean framebuffer with GPU
CPU is not efficient to clean framebuffer especially under
virtualization, then loading driver takes long time which causes
timeout of mailbox handshake.
Signed-off-by: Pixel Ding <Pixel.Ding@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 5 |
1 files 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 72505b15dd13..bab109e46d22 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | |||
@@ -147,7 +147,8 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev, | |||
147 | ret = amdgpu_gem_object_create(adev, aligned_size, 0, | 147 | ret = amdgpu_gem_object_create(adev, aligned_size, 0, |
148 | AMDGPU_GEM_DOMAIN_VRAM, | 148 | AMDGPU_GEM_DOMAIN_VRAM, |
149 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | | 149 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | |
150 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, | 150 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS | |
151 | AMDGPU_GEM_CREATE_VRAM_CLEARED, | ||
151 | true, &gobj); | 152 | true, &gobj); |
152 | if (ret) { | 153 | if (ret) { |
153 | printk(KERN_ERR "failed to allocate framebuffer (%d)\n", | 154 | printk(KERN_ERR "failed to allocate framebuffer (%d)\n", |
@@ -241,8 +242,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper, | |||
241 | /* setup helper */ | 242 | /* setup helper */ |
242 | rfbdev->helper.fb = fb; | 243 | rfbdev->helper.fb = fb; |
243 | 244 | ||
244 | memset_io(abo->kptr, 0x0, amdgpu_bo_size(abo)); | ||
245 | |||
246 | strcpy(info->fix.id, "amdgpudrmfb"); | 245 | strcpy(info->fix.id, "amdgpudrmfb"); |
247 | 246 | ||
248 | drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); | 247 | drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); |