From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/5] drm/i915: don't memset the fb buffer if preallocated
Date: Thu, 14 Nov 2013 16:04:25 -0800 [thread overview]
Message-ID: <1384473865-1456-5-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1384473865-1456-1-git-send-email-jbarnes@virtuousgeek.org>
We want to preserve the BIOS/bootloader contents for later.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
drivers/gpu/drm/i915/intel_fbdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 5ee5dc0..c7b1adf 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -123,6 +123,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
struct drm_framebuffer *fb;
struct drm_i915_gem_object *obj;
int size, ret;
+ bool prealloc = false;
mutex_lock(&dev->struct_mutex);
@@ -132,6 +133,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
if (ret)
goto out_unlock;
} else {
+ prealloc = true;
sizes->fb_width = intel_fb->base.width;
sizes->fb_height = intel_fb->base.height;
}
@@ -193,7 +195,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
* If the object is stolen however, it will be full of whatever
* garbage was left in there.
*/
- if (ifbdev->ifb.obj->stolen)
+ if (ifbdev->ifb.obj->stolen && !prealloc)
memset_io(info->screen_base, 0, info->screen_size);
/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
--
1.8.4.2
next prev parent reply other threads:[~2013-11-15 0:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-15 0:04 [PATCH 1/5] drm/i915: make pitch_for_width take a tiled arg v2 Jesse Barnes
2013-11-15 0:04 ` [PATCH 2/5] drm/i915: split fb allocation and initialization v2 Jesse Barnes
2013-11-15 0:04 ` [PATCH 3/5] drm/i915: retrieve current fb config into new plane_config structure at init v2 Jesse Barnes
2013-11-15 0:26 ` Daniel Vetter
2013-11-15 0:44 ` Bob Paauwe
2013-11-15 18:11 ` Jesse Barnes
2013-11-15 0:04 ` [PATCH 4/5] drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon Jesse Barnes
2013-11-15 0:29 ` Daniel Vetter
2013-11-15 9:40 ` Chris Wilson
2013-11-15 0:04 ` Jesse Barnes [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-11-25 23:51 [PATCH 1/5] drm/i915: make pitch_for_width take a tiled arg v2 Jesse Barnes
2013-11-25 23:51 ` [PATCH 5/5] drm/i915: don't memset the fb buffer if preallocated Jesse Barnes
2013-11-26 14:13 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384473865-1456-5-git-send-email-jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox