* '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 | obj->dev = dev; | 140 | obj->dev = dev; |
| 141 | obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); | 141 | obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); |
| 142 | if (IS_ERR(obj->filp)) | 142 | if (IS_ERR(obj->filp)) |
| 143 | return -ENOMEM; | 143 | return PTR_ERR(obj->filp); |
| 144 | 144 | ||
| 145 | kref_init(&obj->refcount); | 145 | kref_init(&obj->refcount); |
| 146 | atomic_set(&obj->handle_count, 0); | 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 | /* Must be called with the lock held */ | 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 | struct drm_file *file_priv) | 890 | struct drm_file *file_priv) |
| 891 | { | 891 | { |
| 892 | struct drm_device_dma *dma = dev->dma; | 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 | if (dev_priv->page_flipping) | 1223 | if (dev_priv->page_flipping) |
| 1224 | i810_do_cleanup_pageflip(dev); | 1224 | i810_do_cleanup_pageflip(dev); |
| 1225 | } | 1225 | } |
| 1226 | } | ||
| 1226 | 1227 | ||
| 1227 | if (file_priv->master && file_priv->master->lock.hw_lock) { | 1228 | void i810_driver_reclaim_buffers_locked(struct drm_device *dev, |
| 1228 | drm_idlelock_take(&file_priv->master->lock); | 1229 | struct drm_file *file_priv) |
| 1229 | i810_driver_reclaim_buffers(dev, file_priv); | 1230 | { |
| 1230 | drm_idlelock_release(&file_priv->master->lock); | 1231 | i810_reclaim_buffers(dev, file_priv); |
| 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 | |||
| 1237 | } | 1232 | } |
| 1238 | 1233 | ||
| 1239 | int i810_driver_dma_quiescent(struct drm_device *dev) | 1234 | int i810_driver_dma_quiescent(struct drm_device *dev) |
| @@ -63,6 +63,7 @@ static struct drm_driver driver = { · 62 unmodified lines | |||
| 63 | .lastclose = i810_driver_lastclose, | 63 | .lastclose = i810_driver_lastclose, |
| 64 | .preclose = i810_driver_preclose, | 64 | .preclose = i810_driver_preclose, |
| 65 | .device_is_agp = i810_driver_device_is_agp, | 65 | .device_is_agp = i810_driver_device_is_agp, |
| 66 | .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, | ||
| 66 | .dma_quiescent = i810_driver_dma_quiescent, | 67 | .dma_quiescent = i810_driver_dma_quiescent, |
| 67 | .ioctls = i810_ioctls, | 68 | .ioctls = i810_ioctls, |
| 68 | .fops = &i810_driver_fops, | 69 | .fops = &i810_driver_fops, |
| @@ -116,12 +116,14 @@ typedef struct drm_i810_private { · 115 unmodified lines | |||
| 116 | 116 | ||
| 117 | /* i810_dma.c */ | 117 | /* i810_dma.c */ |
| 118 | extern int i810_driver_dma_quiescent(struct drm_device *dev); | 118 | extern int i810_driver_dma_quiescent(struct drm_device *dev); |
| 119 | void i810_driver_reclaim_buffers(struct drm_device *dev, | 119 | extern void i810_driver_reclaim_buffers_locked(struct drm_device *dev, |
| 120 | struct drm_file *file_priv); | 120 | struct drm_file *file_priv); |
| 121 | extern int i810_driver_load(struct drm_device *, unsigned long flags); | 121 | extern int i810_driver_load(struct drm_device *, unsigned long flags); |
| 122 | extern void i810_driver_lastclose(struct drm_device *dev); | 122 | extern void i810_driver_lastclose(struct drm_device *dev); |
| 123 | extern void i810_driver_preclose(struct drm_device *dev, | 123 | extern void i810_driver_preclose(struct drm_device *dev, |
| 124 | struct drm_file *file_priv); | 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 | extern int i810_driver_device_is_agp(struct drm_device *dev); | 127 | extern int i810_driver_device_is_agp(struct drm_device *dev); |
| 126 | 128 | ||
| 127 | extern long i810_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | 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 | i2c->rec = *rec; | 897 | i2c->rec = *rec; |
| 898 | i2c->adapter.owner = THIS_MODULE; | 898 | i2c->adapter.owner = THIS_MODULE; |
| 899 | i2c->adapter.class = I2C_CLASS_DDC; | 899 | i2c->adapter.class = I2C_CLASS_DDC; |
| 900 | i2c->adapter.dev.parent = &dev->pdev->dev; | ||
| 900 | i2c->dev = dev; | 901 | i2c->dev = dev; |
| 901 | i2c_set_adapdata(&i2c->adapter, i2c); | 902 | i2c_set_adapdata(&i2c->adapter, i2c); |
| 902 | if (rec->mm_i2c || | 903 | if (rec->mm_i2c || |
| @@ -378,7 +378,7 @@ int vmw_framebuffer_create_handle(struct drm_framebuffer *fb, · 377 unmodified lines | |||
| 378 | unsigned int *handle) | 378 | unsigned int *handle) |
| 379 | { | 379 | { |
| 380 | if (handle) | 380 | if (handle) |
| 381 | handle = 0; | 381 | *handle = 0; |
| 382 | 382 | ||
| 383 | return 0; | 383 | return 0; |
| 384 | } | 384 | } |