aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2012-01-13 18:48:39 -0500
committerKeith Packard <keithp@keithp.com>2012-01-13 18:49:27 -0500
commit00c2064b7766c4e24af42e21da1903aedc8ca4c0 (patch)
tree513399b011821207a8543cddc602c07ffa2c2b9d
parent96c0a2f52c45d8ec0a2b70810f4693530feaba5d (diff)
drm/i915: sprite init failure on pre-SNB is not a failure
We can call the plane init function unconditionally, but don't need to complain if it fails, since that will only happen if we're out of memory (and other things will fail) or if we're on the wrong platform (which is ok). And remove the DRM_ERRORs from the sprite code itself to avoid dmesg spam. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c9
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c8
2 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 96cea08b10c..b3b51c43dad 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9028,12 +9028,9 @@ void intel_modeset_init(struct drm_device *dev)
9028 9028
9029 for (i = 0; i < dev_priv->num_pipe; i++) { 9029 for (i = 0; i < dev_priv->num_pipe; i++) {
9030 intel_crtc_init(dev, i); 9030 intel_crtc_init(dev, i);
9031 if (HAS_PCH_SPLIT(dev)) { 9031 ret = intel_plane_init(dev, i);
9032 ret = intel_plane_init(dev, i); 9032 if (ret)
9033 if (ret) 9033 DRM_DEBUG_KMS("plane %d init failed: %d\n", i, ret);
9034 DRM_ERROR("plane %d init failed: %d\n",
9035 i, ret);
9036 }
9037 } 9034 }
9038 9035
9039 /* Just disable it once at startup */ 9036 /* Just disable it once at startup */
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index d13989fda50..2288abf88cc 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -466,10 +466,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
466 mutex_lock(&dev->struct_mutex); 466 mutex_lock(&dev->struct_mutex);
467 467
468 ret = intel_pin_and_fence_fb_obj(dev, obj, NULL); 468 ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
469 if (ret) { 469 if (ret)
470 DRM_ERROR("failed to pin object\n");
471 goto out_unlock; 470 goto out_unlock;
472 }
473 471
474 intel_plane->obj = obj; 472 intel_plane->obj = obj;
475 473
@@ -632,10 +630,8 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe)
632 unsigned long possible_crtcs; 630 unsigned long possible_crtcs;
633 int ret; 631 int ret;
634 632
635 if (!(IS_GEN6(dev) || IS_GEN7(dev))) { 633 if (!(IS_GEN6(dev) || IS_GEN7(dev)))
636 DRM_ERROR("new plane code only for SNB+\n");
637 return -ENODEV; 634 return -ENODEV;
638 }
639 635
640 intel_plane = kzalloc(sizeof(struct intel_plane), GFP_KERNEL); 636 intel_plane = kzalloc(sizeof(struct intel_plane), GFP_KERNEL);
641 if (!intel_plane) 637 if (!intel_plane)