diff mbox

[1/1] UBUNTU: (pre-stable) drm/i915: Increase fb alignment to 64k

Message ID 1265805475-29670-2-git-send-email-apw@canonical.com
State Accepted
Delegated to: Stefan Bader
Headers show

Commit Message

Andy Whitcroft Feb. 10, 2010, 12:37 p.m. UTC
From: Chris Wilson <chris@chris-wilson.co.uk>

BugLink: http://bugs.launchpad.net/bugs/404064

An untiled framebuffer must be aligned to 64k. This is normally handled
by intel_pin_and_fence_fb_obj(), but the intelfb_create() likes to be

Comments

Stefan Bader Feb. 10, 2010, 1:32 p.m. UTC | #1
Well, something aligned to 64k is always aligned to 4k so, things should not be
able to get worse...

Andy Whitcroft wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
> 
> BugLink: http://bugs.launchpad.net/bugs/404064
> 
> An untiled framebuffer must be aligned to 64k. This is normally handled
> by intel_pin_and_fence_fb_obj(), but the intelfb_create() likes to be
> different and do the pinning itself. However, it aligns the buffer
> object incorrectly for pre-i965 chipsets causing a PGTBL_ERR when it is
> installed onto the output.
> 
> Fixes:
>   KMS error message while initializing modesetting -
>   render error detected: EIR: 0x10 [i915]
>   http://bugs.freedesktop.org/show_bug.cgi?id=22936
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@kernel.org
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/gpu/drm/i915/intel_fb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
> index 2b0fe54..1318ac2 100644
> --- a/drivers/gpu/drm/i915/intel_fb.c
> +++ b/drivers/gpu/drm/i915/intel_fb.c
> @@ -148,7 +148,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
>  
>  	mutex_lock(&dev->struct_mutex);
>  
> -	ret = i915_gem_object_pin(fbo, PAGE_SIZE);
> +	ret = i915_gem_object_pin(fbo, 64*1024);
>  	if (ret) {
>  		DRM_ERROR("failed to pin fb: %d\n", ret);
>  		goto out_unref;
Tim Gardner Feb. 10, 2010, 1:38 p.m. UTC | #2
Andy Whitcroft wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
> 
> BugLink: http://bugs.launchpad.net/bugs/404064
> 
> An untiled framebuffer must be aligned to 64k. This is normally handled
> by intel_pin_and_fence_fb_obj(), but the intelfb_create() likes to be
> different and do the pinning itself. However, it aligns the buffer
> object incorrectly for pre-i965 chipsets causing a PGTBL_ERR when it is
> installed onto the output.
> 
> Fixes:
>   KMS error message while initializing modesetting -
>   render error detected: EIR: 0x10 [i915]
>   http://bugs.freedesktop.org/show_bug.cgi?id=22936
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@kernel.org
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
>  drivers/gpu/drm/i915/intel_fb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
> index 2b0fe54..1318ac2 100644
> --- a/drivers/gpu/drm/i915/intel_fb.c
> +++ b/drivers/gpu/drm/i915/intel_fb.c
> @@ -148,7 +148,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
>  
>  	mutex_lock(&dev->struct_mutex);
>  
> -	ret = i915_gem_object_pin(fbo, PAGE_SIZE);
> +	ret = i915_gem_object_pin(fbo, 64*1024);
>  	if (ret) {
>  		DRM_ERROR("failed to pin fb: %d\n", ret);
>  		goto out_unref;

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader Feb. 10, 2010, 7:47 p.m. UTC | #3
Applied to Karmic
diff mbox

Patch

different and do the pinning itself. However, it aligns the buffer
object incorrectly for pre-i965 chipsets causing a PGTBL_ERR when it is
installed onto the output.

Fixes:
  KMS error message while initializing modesetting -
  render error detected: EIR: 0x10 [i915]
  http://bugs.freedesktop.org/show_bug.cgi?id=22936

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/gpu/drm/i915/intel_fb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 2b0fe54..1318ac2 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -148,7 +148,7 @@  static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
 
 	mutex_lock(&dev->struct_mutex);
 
-	ret = i915_gem_object_pin(fbo, PAGE_SIZE);
+	ret = i915_gem_object_pin(fbo, 64*1024);
 	if (ret) {
 		DRM_ERROR("failed to pin fb: %d\n", ret);
 		goto out_unref;