]> err.no Git - linux-2.6/commitdiff
merge Linus head tree into my drm tree and fix up conflicts
authorDave Airlie <airlied@starflyer.(none)>
Thu, 20 Oct 2005 08:21:33 +0000 (18:21 +1000)
committerDave Airlie <airlied@linux.ie>
Thu, 20 Oct 2005 08:21:33 +0000 (18:21 +1000)
1  2 
drivers/char/drm/drm_drv.c
drivers/char/drm/drm_proc.c
drivers/char/drm/drm_stub.c
drivers/char/drm/mga_dma.c

Simple merge
index 8ec2156b97a9ec8b0d3cc60191d361650d51457d,977961002488171d10897735c993d010040b5364..3f452f763f0fa27d00b7119e170f7b0501534e8f
@@@ -89,15 -86,16 +89,15 @@@ static struct drm_proc_list 
   * "/proc/dri/%minor%/", and each entry in proc_list as
   * "/proc/dri/%minor%/%name%".
   */
 -int drm_proc_init(drm_device_t *dev, int minor,
 -                  struct proc_dir_entry *root,
 -                  struct proc_dir_entry **dev_root)
 +int drm_proc_init(drm_device_t * dev, int minor,
 +                struct proc_dir_entry *root, struct proc_dir_entry **dev_root)
  {
        struct proc_dir_entry *ent;
 -      int                   i, j;
 -      char                  name[64];
 +      int i, j;
 +      char name[64];
  
        sprintf(name, "%d", minor);
-       *dev_root = create_proc_entry(name, S_IFDIR, root);
+       *dev_root = proc_mkdir(name, root);
        if (!*dev_root) {
                DRM_ERROR("Cannot create /proc/dri/%s\n", name);
                return -1;
Simple merge
index cfbe35d5d862460ee4a2b1647d4ddbaaddf0d5ad,c8e1b6c83636d2e93b563009680b35c3a8713a3d..70dc7f64b7b9146c138a42bf97d3648854bb3c5c
@@@ -427,13 -436,12 +427,13 @@@ int mga_driver_preinit(drm_device_t * d
  static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
                                    drm_mga_dma_bootstrap_t * dma_bs)
  {
 -      drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private;
 +      drm_mga_private_t *const dev_priv =
 +          (drm_mga_private_t *) dev->dev_private;
-       const unsigned int warp_size = mga_warp_microcode_size(dev_priv);
+       unsigned int warp_size = mga_warp_microcode_size(dev_priv);
        int err;
 -      unsigned  offset;
 +      unsigned offset;
        const unsigned secondary_size = dma_bs->secondary_bin_count
 -              * dma_bs->secondary_bin_size;
 +          * dma_bs->secondary_bin_size;
        const unsigned agp_size = (dma_bs->agp_size << 20);
        drm_buf_desc_t req;
        drm_agp_mode_t mode;
                return err;
        }
  
+       /* Make drm_addbufs happy by not trying to create a mapping for less
+        * than a page.
+        */
+       if (warp_size < PAGE_SIZE)
+               warp_size = PAGE_SIZE;
        offset = 0;
 -      err = drm_addmap( dev, offset, warp_size,
 -                        _DRM_AGP, _DRM_READ_ONLY, & dev_priv->warp );
 +      err = drm_addmap(dev, offset, warp_size,
 +                       _DRM_AGP, _DRM_READ_ONLY, &dev_priv->warp);
        if (err) {
                DRM_ERROR("Unable to map WARP microcode\n");
                return err;
@@@ -574,9 -592,8 +580,9 @@@ static int mga_do_agp_dma_bootstrap(drm
  static int mga_do_pci_dma_bootstrap(drm_device_t * dev,
                                    drm_mga_dma_bootstrap_t * dma_bs)
  {
 -      drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private;
 +      drm_mga_private_t *const dev_priv =
 +          (drm_mga_private_t *) dev->dev_private;
-       const unsigned int warp_size = mga_warp_microcode_size(dev_priv);
+       unsigned int warp_size = mga_warp_microcode_size(dev_priv);
        unsigned int primary_size;
        unsigned int bin_count;
        int err;
@@@ -788,7 -823,11 +800,11 @@@ static int mga_do_init_dma(drm_device_
                return DRM_ERR(EINVAL);
        }
  
 -      if (! dev_priv->used_new_dma_init) {
 +      if (!dev_priv->used_new_dma_init) {
+               dev_priv->dma_access = MGA_PAGPXFER;
+               dev_priv->wagp_enable = MGA_WAGP_ENABLE;
                dev_priv->status = drm_core_findmap(dev, init->status_offset);
                if (!dev_priv->status) {
                        DRM_ERROR("failed to find status page!\n");
@@@ -897,17 -938,16 +913,17 @@@ static int mga_do_cleanup_dma(drm_devic
         * may not have been called from userspace and after dev_private
         * is freed, it's too late.
         */
 -      if ( dev->irq_enabled ) drm_irq_uninstall(dev);
 +      if (dev->irq_enabled)
 +              drm_irq_uninstall(dev);
  
 -      if ( dev->dev_private ) {
 +      if (dev->dev_private) {
                drm_mga_private_t *dev_priv = dev->dev_private;
  
 -              if ((dev_priv->warp != NULL) 
 +              if ((dev_priv->warp != NULL)
-                   && (dev_priv->mmio->type != _DRM_CONSISTENT))
+                   && (dev_priv->warp->type != _DRM_CONSISTENT))
                        drm_core_ioremapfree(dev_priv->warp, dev);
  
 -              if ((dev_priv->primary != NULL) 
 +              if ((dev_priv->primary != NULL)
                    && (dev_priv->primary->type != _DRM_CONSISTENT))
                        drm_core_ioremapfree(dev_priv->primary, dev);