Skip to content

Commit

Permalink
drm/i915: hold mutex for unreference() in i915_gem_tiling.c
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
  • Loading branch information
Chris Wilson authored and Dave Airlie committed Feb 20, 2009
1 parent a198bc8 commit d687310
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/i915/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,8 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
}
obj_priv->stride = args->stride;

mutex_unlock(&dev->struct_mutex);

drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);

return 0;
}
Expand Down Expand Up @@ -340,9 +339,8 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
DRM_ERROR("unknown tiling mode\n");
}

mutex_unlock(&dev->struct_mutex);

drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);

return 0;
}

0 comments on commit d687310

Please sign in to comment.