Re: [Intel-gfx] [PATCH 5/5] drm/i915: don't memset the fb buffer if preallocated

2013-11-26 Thread Chris Wilson
On Mon, Nov 25, 2013 at 03:51:19PM -0800, Jesse Barnes wrote:
 We want to preserve the BIOS/bootloader contents for later.
 
 Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org

Decided this was better than my bikeshed,
Reviewed-by: Chris Wilson ch...@chris-wilson.co.uk
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 5/5] drm/i915: don't memset the fb buffer if preallocated

2013-11-25 Thread Jesse Barnes
We want to preserve the BIOS/bootloader contents for later.

Signed-off-by: Jesse Barnes jbar...@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 c55d620..abe998c 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -132,6 +132,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);
 
@@ -141,6 +142,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;
}
@@ -202,7 +204,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-fb-obj-stolen)
+   if (ifbdev-fb-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

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 5/5] drm/i915: don't memset the fb buffer if preallocated

2013-11-14 Thread Jesse Barnes
We want to preserve the BIOS/bootloader contents for later.

Signed-off-by: Jesse Barnes jbar...@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

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx