Skip to content

Commit

Permalink
drm/i915: sprite init failure on pre-SNB is not a failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Barnes authored and Keith Packard committed Jan 13, 2012
1 parent 96c0a2f commit 00c2064
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
9 changes: 3 additions & 6 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -9028,12 +9028,9 @@ void intel_modeset_init(struct drm_device *dev)

for (i = 0; i < dev_priv->num_pipe; i++) {
intel_crtc_init(dev, i);
if (HAS_PCH_SPLIT(dev)) {
ret = intel_plane_init(dev, i);
if (ret)
DRM_ERROR("plane %d init failed: %d\n",
i, ret);
}
ret = intel_plane_init(dev, i);
if (ret)
DRM_DEBUG_KMS("plane %d init failed: %d\n", i, ret);
}

/* Just disable it once at startup */
Expand Down
8 changes: 2 additions & 6 deletions drivers/gpu/drm/i915/intel_sprite.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,8 @@ intel_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
mutex_lock(&dev->struct_mutex);

ret = intel_pin_and_fence_fb_obj(dev, obj, NULL);
if (ret) {
DRM_ERROR("failed to pin object\n");
if (ret)
goto out_unlock;
}

intel_plane->obj = obj;

Expand Down Expand Up @@ -632,10 +630,8 @@ intel_plane_init(struct drm_device *dev, enum pipe pipe)
unsigned long possible_crtcs;
int ret;

if (!(IS_GEN6(dev) || IS_GEN7(dev))) {
DRM_ERROR("new plane code only for SNB+\n");
if (!(IS_GEN6(dev) || IS_GEN7(dev)))
return -ENODEV;
}

intel_plane = kzalloc(sizeof(struct intel_plane), GFP_KERNEL);
if (!intel_plane)
Expand Down

0 comments on commit 00c2064

Please sign in to comment.