summaryrefslogtreecommitdiff
path: root/bsd-core/drm_drawable.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-05-28 21:01:18 +0100
committerAlan Hourihane <alanh@tungstengraphics.com>2008-05-28 21:01:18 +0100
commit3a3f39d144c47ce937d6924d344a9ad3d82a2db5 (patch)
tree109faf867b2e5774d54fe9499dbfebd3f26f014f /bsd-core/drm_drawable.c
parent070755af3fecefb6b09e8ef98738e4926e4148a7 (diff)
parent5b86823fa36513f521412a38c240cb18f02dcc9a (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/drm into modesetting-101
Conflicts: shared-core/i915_dma.c shared-core/i915_drv.h
Diffstat (limited to 'bsd-core/drm_drawable.c')
-rw-r--r--bsd-core/drm_drawable.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/bsd-core/drm_drawable.c b/bsd-core/drm_drawable.c
index fb318d47..268b956c 100644
--- a/bsd-core/drm_drawable.c
+++ b/bsd-core/drm_drawable.c
@@ -56,7 +56,7 @@ RB_GENERATE_STATIC(drawable_tree, bsd_drm_drawable_info, tree,
drm_drawable_compare);
struct drm_drawable_info *
-drm_get_drawable_info(drm_device_t *dev, int handle)
+drm_get_drawable_info(struct drm_device *dev, int handle)
{
struct bsd_drm_drawable_info find, *result;
@@ -66,7 +66,7 @@ drm_get_drawable_info(drm_device_t *dev, int handle)
return &result->info;
}
-int drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
+int drm_adddraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_draw_t *draw = data;
struct bsd_drm_drawable_info *info;
@@ -87,7 +87,7 @@ int drm_adddraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
return 0;
}
-int drm_rmdraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
+int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_draw_t *draw = (drm_draw_t *)data;
struct drm_drawable_info *info;
@@ -108,7 +108,8 @@ int drm_rmdraw(drm_device_t *dev, void *data, struct drm_file *file_priv)
}
}
-int drm_update_draw(drm_device_t *dev, void *data, struct drm_file *file_priv)
+int drm_update_draw(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
{
struct drm_drawable_info *info;
struct drm_update_draw *update = (struct drm_update_draw *)data;
@@ -135,8 +136,10 @@ int drm_update_draw(drm_device_t *dev, void *data, struct drm_file *file_priv)
if (info->rects == NULL) {
info->rects = drm_alloc(sizeof(*info->rects) *
update->num, DRM_MEM_DRAWABLE);
- if (info->rects == NULL)
+ if (info->rects == NULL) {
+ DRM_SPINUNLOCK(&dev->drw_lock);
return ENOMEM;
+ }
info->num_rects = update->num;
}
/* For some reason the pointer arg is unsigned long long. */