Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 May 2009 00:02:05 +0000 (17:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 May 2009 00:02:05 +0000 (17:02 -0700)
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/r128: fix r128 ioremaps to use ioremap_wc.
  drm: cleanup properly in drm_get_dev() failure paths
  drm: clean the map list before destroying the hash table
  drm: remove unreachable code in drm_sysfs.c
  drm: add control node checks missing from kms merge
  drm/kms: don't try to shortcut drm mode set function
  drm/radeon: bump minor version for occlusion queries support

drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/drm_drv.c
drivers/gpu/drm/drm_stub.c
drivers/gpu/drm/drm_sysfs.c
drivers/gpu/drm/r128/r128_cce.c
drivers/gpu/drm/radeon/radeon_drv.h

index a04639d..4589044 100644 (file)
@@ -561,7 +561,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
        int saved_x, saved_y;
        struct drm_encoder *encoder;
        bool ret = true;
-       bool depth_changed, bpp_changed;
 
        adjusted_mode = drm_mode_duplicate(dev, mode);
 
@@ -570,15 +569,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
        if (!crtc->enabled)
                return true;
 
-       if (old_fb && crtc->fb) {
-               depth_changed = (old_fb->depth != crtc->fb->depth);
-               bpp_changed = (old_fb->bits_per_pixel !=
-                              crtc->fb->bits_per_pixel);
-       } else {
-               depth_changed = true;
-               bpp_changed = true;
-       }
-
        saved_mode = crtc->mode;
        saved_x = crtc->x;
        saved_y = crtc->y;
@@ -590,15 +580,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
        crtc->x = x;
        crtc->y = y;
 
-       if (drm_mode_equal(&saved_mode, &crtc->mode)) {
-               if (saved_x != crtc->x || saved_y != crtc->y ||
-                   depth_changed || bpp_changed) {
-                       ret = !crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y,
-                                                        old_fb);
-                       goto done;
-               }
-       }
-
        /* Pass our mode to the connectors and the CRTC to give them a chance to
         * adjust it according to limitations or connector properties, and also
         * a chance to reject the mode entirely.
index c4ada8b..f01def1 100644 (file)
@@ -456,7 +456,8 @@ int drm_ioctl(struct inode *inode, struct file *filp,
                retcode = -EINVAL;
        } else if (((ioctl->flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)) ||
                   ((ioctl->flags & DRM_AUTH) && !file_priv->authenticated) ||
-                  ((ioctl->flags & DRM_MASTER) && !file_priv->is_master)) {
+                  ((ioctl->flags & DRM_MASTER) && !file_priv->is_master) ||
+                  (!(ioctl->flags & DRM_CONTROL_ALLOW) && (file_priv->minor->type == DRM_MINOR_CONTROL))) {
                retcode = -EACCES;
        } else {
                if (cmd & (IOC_IN | IOC_OUT)) {
index ef87861..b9631e3 100644 (file)
@@ -402,14 +402,14 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
        if (dev->driver->load) {
                ret = dev->driver->load(dev, ent->driver_data);
                if (ret)
-                       goto err_g3;
+                       goto err_g4;
        }
 
         /* setup the grouping for the legacy output */
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
                ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group);
                if (ret)
-                       goto err_g3;
+                       goto err_g4;
        }
 
        list_add_tail(&dev->driver_item, &driver->device_list);
@@ -420,8 +420,11 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
 
        return 0;
 
-err_g3:
+err_g4:
        drm_put_minor(&dev->primary);
+err_g3:
+       if (drm_core_check_feature(dev, DRIVER_MODESET))
+               drm_put_minor(&dev->control);
 err_g2:
        pci_disable_device(pdev);
 err_g1:
@@ -502,11 +505,11 @@ void drm_put_dev(struct drm_device *dev)
                dev->agp = NULL;
        }
 
-       drm_ht_remove(&dev->map_hash);
-       drm_ctxbitmap_cleanup(dev);
-
        list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
                drm_rmmap(dev, r_list->map);
+       drm_ht_remove(&dev->map_hash);
+
+       drm_ctxbitmap_cleanup(dev);
 
        if (drm_core_check_feature(dev, DRIVER_MODESET))
                drm_put_minor(&dev->control);
index 022876a..8f93729 100644 (file)
@@ -489,9 +489,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
 
        return 0;
 
-       device_unregister(&minor->kdev);
 err_out:
-
        return err;
 }
 
index 32de4ce..077c045 100644 (file)
@@ -511,9 +511,9 @@ static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
 
 #if __OS_HAS_AGP
        if (!dev_priv->is_pci) {
-               drm_core_ioremap(dev_priv->cce_ring, dev);
-               drm_core_ioremap(dev_priv->ring_rptr, dev);
-               drm_core_ioremap(dev->agp_buffer_map, dev);
+               drm_core_ioremap_wc(dev_priv->cce_ring, dev);
+               drm_core_ioremap_wc(dev_priv->ring_rptr, dev);
+               drm_core_ioremap_wc(dev->agp_buffer_map, dev);
                if (!dev_priv->cce_ring->handle ||
                    !dev_priv->ring_rptr->handle ||
                    !dev->agp_buffer_map->handle) {
index ed4d27e..8071d96 100644 (file)
  * 1.27- Add support for IGP GART
  * 1.28- Add support for VBL on CRTC2
  * 1.29- R500 3D cmd buffer support
+ * 1.30- Add support for occlusion queries
  */
 #define DRIVER_MAJOR           1
-#define DRIVER_MINOR           29
+#define DRIVER_MINOR           30
 #define DRIVER_PATCHLEVEL      0
 
 /*