* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: vmwgfx: Fix assignment in vmw_framebuffer_create_handle drm/radeon/kms: Fix device tree linkage of i2c buses drm: Pass the real error code back during GEM bo initialisation Revert "drm/i810: cleanup reclaim_buffers"
Unified · Split
| @@ -140,7 +140,7 @@ int drm_gem_object_init(struct drm_device *dev, · 139 unmodified lines | ||
| 140 | 140 | obj->dev = dev; |
| 141 | 141 | obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); |
| 142 | 142 | if (IS_ERR(obj->filp)) |
| 143 | − return -ENOMEM; | |
| 143 | + return PTR_ERR(obj->filp); | |
| 144 | 144 | |
| 145 | 145 | kref_init(&obj->refcount); |
| 146 | 146 | atomic_set(&obj->handle_count, 0); |
| @@ -886,7 +886,7 @@ static int i810_flush_queue(struct drm_device *dev) · 885 unmodified lines | ||
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | /* Must be called with the lock held */ |
| 889 | −void i810_driver_reclaim_buffers(struct drm_device *dev, | |
| 889 | +static void i810_reclaim_buffers(struct drm_device *dev, | |
| 890 | 890 | struct drm_file *file_priv) |
| 891 | 891 | { |
| 892 | 892 | struct drm_device_dma *dma = dev->dma; |
| @@ -1223,17 +1223,12 @@ void i810_driver_preclose(struct drm_device *dev, struct drm_file *file_priv) · 330 unmodified lines | ||
| 1223 | 1223 | if (dev_priv->page_flipping) |
| 1224 | 1224 | i810_do_cleanup_pageflip(dev); |
| 1225 | 1225 | } |
| 1226 | +} | |
| 1226 | 1227 | |
| 1227 | − if (file_priv->master && file_priv->master->lock.hw_lock) { | |
| 1228 | − drm_idlelock_take(&file_priv->master->lock); | |
| 1229 | − i810_driver_reclaim_buffers(dev, file_priv); | |
| 1230 | − drm_idlelock_release(&file_priv->master->lock); | |
| 1231 | − } else { | |
| 1232 | − /* master disappeared, clean up stuff anyway and hope nothing | |
| 1233 | − * goes wrong */ | |
| 1234 | − i810_driver_reclaim_buffers(dev, file_priv); | |
| 1235 | − } | |
| 1236 | − | |
| 1228 | +void i810_driver_reclaim_buffers_locked(struct drm_device *dev, | |
| 1229 | + struct drm_file *file_priv) | |
| 1230 | +{ | |
| 1231 | + i810_reclaim_buffers(dev, file_priv); | |
| 1237 | 1232 | } |
| 1238 | 1233 | |
| 1239 | 1234 | int i810_driver_dma_quiescent(struct drm_device *dev) |
| @@ -63,6 +63,7 @@ static struct drm_driver driver = { · 62 unmodified lines | ||
| 63 | 63 | .lastclose = i810_driver_lastclose, |
| 64 | 64 | .preclose = i810_driver_preclose, |
| 65 | 65 | .device_is_agp = i810_driver_device_is_agp, |
| 66 | + .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, | |
| 66 | 67 | .dma_quiescent = i810_driver_dma_quiescent, |
| 67 | 68 | .ioctls = i810_ioctls, |
| 68 | 69 | .fops = &i810_driver_fops, |
| @@ -116,12 +116,14 @@ typedef struct drm_i810_private { · 115 unmodified lines | ||
| 116 | 116 | |
| 117 | 117 | /* i810_dma.c */ |
| 118 | 118 | extern int i810_driver_dma_quiescent(struct drm_device *dev); |
| 119 | −void i810_driver_reclaim_buffers(struct drm_device *dev, | |
| 120 | − struct drm_file *file_priv); | |
| 119 | +extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev, | |
| 120 | + struct drm_file *file_priv); | |
| 121 | 121 | extern int i810_driver_load(struct drm_device *, unsigned long flags); |
| 122 | 122 | extern void i810_driver_lastclose(struct drm_device *dev); |
| 123 | 123 | extern void i810_driver_preclose(struct drm_device *dev, |
| 124 | 124 | struct drm_file *file_priv); |
| 125 | +extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev, | |
| 126 | + struct drm_file *file_priv); | |
| 125 | 127 | extern int i810_driver_device_is_agp(struct drm_device *dev); |
| 126 | 128 | |
| 127 | 129 | extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
| @@ -897,6 +897,7 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev, · 896 unmodified lines | ||
| 897 | 897 | i2c->rec = *rec; |
| 898 | 898 | i2c->adapter.owner = THIS_MODULE; |
| 899 | 899 | i2c->adapter.class = I2C_CLASS_DDC; |
| 900 | + i2c->adapter.dev.parent = &dev->pdev->dev; | |
| 900 | 901 | i2c->dev = dev; |
| 901 | 902 | i2c_set_adapdata(&i2c->adapter, i2c); |
| 902 | 903 | if (rec->mm_i2c || |
| @@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb, · 377 unmodified lines | ||
| 378 | 378 | unsigned int *handle) |
| 379 | 379 | { |
| 380 | 380 | if (handle) |
| 381 | − handle = 0; | |
| 381 | + *handle = 0; | |
| 382 | 382 | |
| 383 | 383 | return 0; |
| 384 | 384 | } |