Commit 413f81eb authored by Linus Torvalds's avatar Linus Torvalds

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

* '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
parents 899ad580 42beefc0
...@@ -561,7 +561,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, ...@@ -561,7 +561,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
int saved_x, saved_y; int saved_x, saved_y;
struct drm_encoder *encoder; struct drm_encoder *encoder;
bool ret = true; bool ret = true;
bool depth_changed, bpp_changed;
adjusted_mode = drm_mode_duplicate(dev, mode); adjusted_mode = drm_mode_duplicate(dev, mode);
...@@ -570,15 +569,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, ...@@ -570,15 +569,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
if (!crtc->enabled) if (!crtc->enabled)
return true; 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_mode = crtc->mode;
saved_x = crtc->x; saved_x = crtc->x;
saved_y = crtc->y; saved_y = crtc->y;
...@@ -590,15 +580,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, ...@@ -590,15 +580,6 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
crtc->x = x; crtc->x = x;
crtc->y = y; 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 /* 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 * adjust it according to limitations or connector properties, and also
* a chance to reject the mode entirely. * a chance to reject the mode entirely.
......
...@@ -456,7 +456,8 @@ int drm_ioctl(struct inode *inode, struct file *filp, ...@@ -456,7 +456,8 @@ int drm_ioctl(struct inode *inode, struct file *filp,
retcode = -EINVAL; retcode = -EINVAL;
} else if (((ioctl->flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)) || } else if (((ioctl->flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)) ||
((ioctl->flags & DRM_AUTH) && !file_priv->authenticated) || ((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; retcode = -EACCES;
} else { } else {
if (cmd & (IOC_IN | IOC_OUT)) { if (cmd & (IOC_IN | IOC_OUT)) {
......
...@@ -402,14 +402,14 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, ...@@ -402,14 +402,14 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
if (dev->driver->load) { if (dev->driver->load) {
ret = dev->driver->load(dev, ent->driver_data); ret = dev->driver->load(dev, ent->driver_data);
if (ret) if (ret)
goto err_g3; goto err_g4;
} }
/* setup the grouping for the legacy output */ /* setup the grouping for the legacy output */
if (drm_core_check_feature(dev, DRIVER_MODESET)) { if (drm_core_check_feature(dev, DRIVER_MODESET)) {
ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group); ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group);
if (ret) if (ret)
goto err_g3; goto err_g4;
} }
list_add_tail(&dev->driver_item, &driver->device_list); 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, ...@@ -420,8 +420,11 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
return 0; return 0;
err_g3: err_g4:
drm_put_minor(&dev->primary); drm_put_minor(&dev->primary);
err_g3:
if (drm_core_check_feature(dev, DRIVER_MODESET))
drm_put_minor(&dev->control);
err_g2: err_g2:
pci_disable_device(pdev); pci_disable_device(pdev);
err_g1: err_g1:
...@@ -502,11 +505,11 @@ void drm_put_dev(struct drm_device *dev) ...@@ -502,11 +505,11 @@ void drm_put_dev(struct drm_device *dev)
dev->agp = NULL; 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) list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
drm_rmmap(dev, r_list->map); drm_rmmap(dev, r_list->map);
drm_ht_remove(&dev->map_hash);
drm_ctxbitmap_cleanup(dev);
if (drm_core_check_feature(dev, DRIVER_MODESET)) if (drm_core_check_feature(dev, DRIVER_MODESET))
drm_put_minor(&dev->control); drm_put_minor(&dev->control);
......
...@@ -489,9 +489,7 @@ int drm_sysfs_device_add(struct drm_minor *minor) ...@@ -489,9 +489,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
return 0; return 0;
device_unregister(&minor->kdev);
err_out: err_out:
return err; return err;
} }
......
...@@ -511,9 +511,9 @@ static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init) ...@@ -511,9 +511,9 @@ static int r128_do_init_cce(struct drm_device * dev, drm_r128_init_t * init)
#if __OS_HAS_AGP #if __OS_HAS_AGP
if (!dev_priv->is_pci) { if (!dev_priv->is_pci) {
drm_core_ioremap(dev_priv->cce_ring, dev); drm_core_ioremap_wc(dev_priv->cce_ring, dev);
drm_core_ioremap(dev_priv->ring_rptr, dev); drm_core_ioremap_wc(dev_priv->ring_rptr, dev);
drm_core_ioremap(dev->agp_buffer_map, dev); drm_core_ioremap_wc(dev->agp_buffer_map, dev);
if (!dev_priv->cce_ring->handle || if (!dev_priv->cce_ring->handle ||
!dev_priv->ring_rptr->handle || !dev_priv->ring_rptr->handle ||
!dev->agp_buffer_map->handle) { !dev->agp_buffer_map->handle) {
......
...@@ -99,9 +99,10 @@ ...@@ -99,9 +99,10 @@
* 1.27- Add support for IGP GART * 1.27- Add support for IGP GART
* 1.28- Add support for VBL on CRTC2 * 1.28- Add support for VBL on CRTC2
* 1.29- R500 3D cmd buffer support * 1.29- R500 3D cmd buffer support
* 1.30- Add support for occlusion queries
*/ */
#define DRIVER_MAJOR 1 #define DRIVER_MAJOR 1
#define DRIVER_MINOR 29 #define DRIVER_MINOR 30
#define DRIVER_PATCHLEVEL 0 #define DRIVER_PATCHLEVEL 0
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment