* [PATCH] drm/i915: Clear the stolen fb before enabling
@ 2012-12-16 12:15 Chris Wilson
2012-12-17 11:33 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2012-12-16 12:15 UTC (permalink / raw)
To: intel-gfx
As the stolen memory region will contain the contents of whatever was
last there, it invariably contains garbage. To be consistent with the
shmemfs backed fb and the expectations of the fb layer, we need to clear
the fb prior to installing it as an fbcon.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58111
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_fb.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 30d317a..a815e64 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -104,6 +104,13 @@ static struct fb_info *intelfb_create_info(struct intel_fbdev *ifbdev)
if (!info->screen_base)
goto err_cmap;
+ /* 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(info->screen_base, 0, info->screen_size);
+
/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-17 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-16 12:15 [PATCH] drm/i915: Clear the stolen fb before enabling Chris Wilson
2012-12-17 11:33 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox