Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131627
b: refs/heads/master
c: 7f9872e
h: refs/heads/master
i:
  131625: f8cbfb3
  131623: 3041697
v: v3
  • Loading branch information
Kristian Høgsberg authored and Dave Airlie committed Feb 20, 2009
1 parent 0eded67 commit 3c62ff2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c3b82e2b229e78eb32f4ea12d16f3ebeeab3fc7
refs/heads/master: 7f9872e06d749afdc2029aa6b7ffe88cb3b8c5c2
9 changes: 5 additions & 4 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,18 +1043,19 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
}

/* we only need to pin inside GTT if cursor is non-phy */
mutex_lock(&dev->struct_mutex);
if (!dev_priv->cursor_needs_physical) {
ret = i915_gem_object_pin(bo, PAGE_SIZE);
if (ret) {
DRM_ERROR("failed to pin cursor bo\n");
goto fail;
goto fail_locked;
}
addr = obj_priv->gtt_offset;
} else {
ret = i915_gem_attach_phys_object(dev, bo, (pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1);
if (ret) {
DRM_ERROR("failed to attach phys object\n");
goto fail;
goto fail_locked;
}
addr = obj_priv->phys_obj->handle->busaddr;
}
Expand All @@ -1074,17 +1075,17 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
i915_gem_detach_phys_object(dev, intel_crtc->cursor_bo);
} else
i915_gem_object_unpin(intel_crtc->cursor_bo);
mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(intel_crtc->cursor_bo);
mutex_unlock(&dev->struct_mutex);
}
mutex_unlock(&dev->struct_mutex);

intel_crtc->cursor_addr = addr;
intel_crtc->cursor_bo = bo;

return 0;
fail:
mutex_lock(&dev->struct_mutex);
fail_locked:
drm_gem_object_unreference(bo);
mutex_unlock(&dev->struct_mutex);
return ret;
Expand Down

0 comments on commit 3c62ff2

Please sign in to comment.