Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376945
b: refs/heads/master
c: 70b1304
h: refs/heads/master
i:
  376943: 13c8c1f
v: v3
  • Loading branch information
Patrik Jakobsson committed Jun 9, 2013
1 parent 6464bdb commit 46cadc1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: 3463cf1aad48ef43dd0b4cbd7fed15dcc8d2ca53
refs/heads/master: 70b1304eeedf211fc9fa185b43350bd9ab4c119c
16 changes: 11 additions & 5 deletions trunk/drivers/gpu/drm/gma500/cdv_intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ static int cdv_intel_crtc_cursor_set(struct drm_crtc *crtc,
size_t addr = 0;
struct gtt_range *gt;
struct drm_gem_object *obj;
int ret;
int ret = 0;

/* if we want to turn of the cursor ignore width and height */
if (!handle) {
Expand Down Expand Up @@ -1499,7 +1499,8 @@ static int cdv_intel_crtc_cursor_set(struct drm_crtc *crtc,

if (obj->size < width * height * 4) {
dev_dbg(dev->dev, "buffer is to small\n");
return -ENOMEM;
ret = -ENOMEM;
goto unref_cursor;
}

gt = container_of(obj, struct gtt_range, gem);
Expand All @@ -1508,7 +1509,7 @@ static int cdv_intel_crtc_cursor_set(struct drm_crtc *crtc,
ret = psb_gtt_pin(gt);
if (ret) {
dev_err(dev->dev, "Can not pin down handle 0x%x\n", handle);
return ret;
goto unref_cursor;
}

addr = gt->offset; /* Or resource.start ??? */
Expand All @@ -1532,9 +1533,14 @@ static int cdv_intel_crtc_cursor_set(struct drm_crtc *crtc,
struct gtt_range, gem);
psb_gtt_unpin(gt);
drm_gem_object_unreference(psb_intel_crtc->cursor_obj);
psb_intel_crtc->cursor_obj = obj;
}
return 0;

psb_intel_crtc->cursor_obj = obj;
return ret;

unref_cursor:
drm_gem_object_unreference(obj);
return ret;
}

static int cdv_intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
Expand Down

0 comments on commit 46cadc1

Please sign in to comment.