Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6869ce1c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: ioremap return value checks
  drm/via: Fix dmablit when blit queue is full
  drm_rmmap_ioctl(): remove dead code
parents 36373b44 0769d39c
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -177,8 +177,14 @@ static int drm_addmap_core(struct drm_device * dev, unsigned int offset,
						     MTRR_TYPE_WRCOMB, 1);
			}
		}
		if (map->type == _DRM_REGISTERS)
		if (map->type == _DRM_REGISTERS) {
			map->handle = ioremap(map->offset, map->size);
			if (!map->handle) {
				drm_free(map, sizeof(*map), DRM_MEM_MAPS);
				return -ENOMEM;
			}
		}
				
		break;
	case _DRM_SHM:
		list = drm_find_matching_map(dev, map);
@@ -479,11 +485,6 @@ int drm_rmmap_ioctl(struct inode *inode, struct file *filp,
		return -EINVAL;
	}

	if (!map) {
		mutex_unlock(&dev->struct_mutex);
		return -EINVAL;
	}

	/* Register and framebuffer maps are permanent */
	if ((map->type == _DRM_REGISTERS) || (map->type == _DRM_FRAME_BUFFER)) {
		mutex_unlock(&dev->struct_mutex);
+1 −1
Original line number Diff line number Diff line
@@ -560,7 +560,7 @@ via_init_dmablit(struct drm_device *dev)
		blitq->head = 0;
		blitq->cur = 0;
		blitq->serviced = 0;
		blitq->num_free = VIA_NUM_BLIT_SLOTS;
		blitq->num_free = VIA_NUM_BLIT_SLOTS - 1;
		blitq->num_outstanding = 0;
		blitq->is_active = 0;
		blitq->aborting = 0;