Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
vgaarb: trivial fix
drm: radeon cleanup fixes...
drm: fix trivial coding errors
drm: ttm sparse fixes.
drm/nouveau: fix panels using straps-based mode detection
drm/ttm: Clear the ghost cpu_writers flag on ttm_buffer_object_transfer.
drm/radeon: don't allow device to be opened if powered down

+19 -12
+3 -3
drivers/gpu/drm/drm_buffer.c
··· 98 98 * user_data: A pointer the data that is copied to the buffer. 99 99 * size: The Number of bytes to copy. 100 100 */ 101 - extern int drm_buffer_copy_from_user(struct drm_buffer *buf, 102 - void __user *user_data, int size) 101 + int drm_buffer_copy_from_user(struct drm_buffer *buf, 102 + void __user *user_data, int size) 103 103 { 104 104 int nr_pages = size / PAGE_SIZE + 1; 105 105 int idx; ··· 163 163 { 164 164 int idx = drm_buffer_index(buf); 165 165 int page = drm_buffer_page(buf); 166 - void *obj = 0; 166 + void *obj = NULL; 167 167 168 168 if (idx + objsize <= PAGE_SIZE) { 169 169 obj = &buf->data[page][idx];
+4 -2
drivers/gpu/drm/nouveau/nouveau_connector.c
··· 558 558 if (nv_encoder->dcb->type == OUTPUT_LVDS && 559 559 (nv_encoder->dcb->lvdsconf.use_straps_for_mode || 560 560 dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) { 561 - nv_connector->native_mode = drm_mode_create(dev); 562 - nouveau_bios_fp_mode(dev, nv_connector->native_mode); 561 + struct drm_display_mode mode; 562 + 563 + nouveau_bios_fp_mode(dev, &mode); 564 + nv_connector->native_mode = drm_mode_duplicate(dev, &mode); 563 565 } 564 566 565 567 /* Find the native mode if this is a digital panel, if we didn't
+1 -1
drivers/gpu/drm/radeon/atombios.h
··· 4999 4999 #define SW_I2C_CNTL_WRITE1BIT 6 5000 5000 5001 5001 //==============================VESA definition Portion=============================== 5002 - #define VESA_OEM_PRODUCT_REV '01.00' 5002 + #define VESA_OEM_PRODUCT_REV "01.00" 5003 5003 #define VESA_MODE_ATTRIBUTE_MODE_SUPPORT 0xBB //refer to VBE spec p.32, no TTY support 5004 5004 #define VESA_MODE_WIN_ATTRIBUTE 7 5005 5005 #define VESA_WIN_SIZE 64
+1 -1
drivers/gpu/drm/radeon/r600.c
··· 2729 2729 if (i < rdev->usec_timeout) { 2730 2730 DRM_INFO("ib test succeeded in %u usecs\n", i); 2731 2731 } else { 2732 - DRM_ERROR("radeon: ib test failed (sracth(0x%04X)=0x%08X)\n", 2732 + DRM_ERROR("radeon: ib test failed (scratch(0x%04X)=0x%08X)\n", 2733 2733 scratch, tmp); 2734 2734 r = -EINVAL; 2735 2735 }
+4
drivers/gpu/drm/radeon/radeon_kms.c
··· 203 203 */ 204 204 int radeon_driver_firstopen_kms(struct drm_device *dev) 205 205 { 206 + struct radeon_device *rdev = dev->dev_private; 207 + 208 + if (rdev->powered_down) 209 + return -EINVAL; 206 210 return 0; 207 211 } 208 212
+1
drivers/gpu/drm/ttm/ttm_bo_util.c
··· 351 351 INIT_LIST_HEAD(&fbo->lru); 352 352 INIT_LIST_HEAD(&fbo->swap); 353 353 fbo->vm_node = NULL; 354 + atomic_set(&fbo->cpu_writers, 0); 354 355 355 356 fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); 356 357 kref_init(&fbo->list_kref);
+4 -4
drivers/gpu/drm/ttm/ttm_page_alloc.c
··· 69 69 spinlock_t lock; 70 70 bool fill_lock; 71 71 struct list_head list; 72 - int gfp_flags; 72 + gfp_t gfp_flags; 73 73 unsigned npages; 74 74 char *name; 75 75 unsigned long nfrees; ··· 475 475 * This function is reentrant if caller updates count depending on number of 476 476 * pages returned in pages array. 477 477 */ 478 - static int ttm_alloc_new_pages(struct list_head *pages, int gfp_flags, 478 + static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags, 479 479 int ttm_flags, enum ttm_caching_state cstate, unsigned count) 480 480 { 481 481 struct page **caching_array; ··· 666 666 { 667 667 struct ttm_page_pool *pool = ttm_get_pool(flags, cstate); 668 668 struct page *p = NULL; 669 - int gfp_flags = GFP_USER; 669 + gfp_t gfp_flags = GFP_USER; 670 670 int r; 671 671 672 672 /* set zero flag for page allocation if required */ ··· 818 818 return 0; 819 819 } 820 820 821 - void ttm_page_alloc_fini() 821 + void ttm_page_alloc_fini(void) 822 822 { 823 823 int i; 824 824
+1 -1
drivers/gpu/vga/vgaarb.c
··· 598 598 pr_debug("vgaarb: decoding count now is: %d\n", vga_decode_count); 599 599 } 600 600 601 - void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace) 601 + static void __vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes, bool userspace) 602 602 { 603 603 struct vga_device *vgadev; 604 604 unsigned long flags;