diff mbox

[5/5] drm/i915: don't memset the fb buffer

Message ID 1384366848-845-6-git-send-email-jbarnes@virtuousgeek.org (mailing list archive)
State New, archived
Headers show

Commit Message

Jesse Barnes Nov. 13, 2013, 6:20 p.m. UTC
It may be in use, let fbcon do it later if needed.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_fbdev.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Chris Wilson Nov. 13, 2013, 9:56 p.m. UTC | #1
On Wed, Nov 13, 2013 at 10:20:48AM -0800, Jesse Barnes wrote:
> It may be in use, let fbcon do it later if needed.

Sadly we need to memset the stolen buffer in some circumstances, so we
need a bit more smarts. Upon resume and if !preallocated are the cases
that spring to mind. Maybe we can add a flag to ifbdev when we can skip
the clear?
-Chris
Jesse Barnes Nov. 13, 2013, 10:05 p.m. UTC | #2
On Wed, 13 Nov 2013 21:56:56 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Wed, Nov 13, 2013 at 10:20:48AM -0800, Jesse Barnes wrote:
> > It may be in use, let fbcon do it later if needed.
> 
> Sadly we need to memset the stolen buffer in some circumstances, so we
> need a bit more smarts. Upon resume and if !preallocated are the cases
> that spring to mind. Maybe we can add a flag to ifbdev when we can skip
> the clear?

Yeah, we need something... clearing creates ugly artifacts in some
cases that I'd like to avoid.
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index adf92dd..259f5ca 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -191,13 +191,6 @@  static int intelfb_create(struct drm_fb_helper *helper,
 	drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
 	drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);
 
-	/* If the object is shmemfs backed, it will have given us zeroed pages.
-	 * If the object is stolen however, it will be full of whatever
-	 * garbage was left in there.
-	 */
-	if (ifbdev->ifb.obj->stolen)
-		memset_io(info->screen_base, 0, info->screen_size);
-
 	/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
 	DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08lx, bo %p\n",