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

Commit 0111be42 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Dave Airlie
Browse files

drm: Kill drm perf counter leftovers



The user of these counters was killed in

 commit d79cdc83
 Author: Daniel Vetter <daniel.vetter@ffwll.ch>
 Date:   Thu Aug 8 15:41:32 2013 +0200

    drm: no-op out GET_STATS ioctl

so clean up the leftovers as well.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ffbab09b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -315,7 +315,6 @@ long drm_ioctl(struct file *filp,
		return -ENODEV;

	atomic_inc(&dev->ioctl_count);
	atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]);
	++file_priv->ioctl_count;

	if ((nr >= DRM_CORE_IOCTL_COUNT) &&
+0 −7
Original line number Diff line number Diff line
@@ -113,7 +113,6 @@ int drm_open(struct inode *inode, struct file *filp)
	retcode = drm_open_helper(inode, filp, dev);
	if (retcode)
		goto err_undo;
	atomic_inc(&dev->counts[_DRM_STAT_OPENS]);
	if (need_setup) {
		retcode = drm_setup(dev);
		if (retcode)
@@ -392,17 +391,12 @@ static void drm_events_release(struct drm_file *file_priv)
 */
static void drm_legacy_dev_reinit(struct drm_device *dev)
{
	int i;

	if (drm_core_check_feature(dev, DRIVER_MODESET))
		return;

	atomic_set(&dev->ioctl_count, 0);
	atomic_set(&dev->vma_count, 0);

	for (i = 0; i < ARRAY_SIZE(dev->counts); i++)
		atomic_set(&dev->counts[i], 0);

	dev->sigdata.lock = NULL;

	dev->context_flag = 0;
@@ -585,7 +579,6 @@ int drm_release(struct inode *inode, struct file *filp)
	 * End inline drm_release
	 */

	atomic_inc(&dev->counts[_DRM_STAT_CLOSES]);
	if (!--dev->open_count) {
		if (atomic_read(&dev->ioctl_count)) {
			DRM_ERROR("Device busy: %d\n",
+0 −3
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
		if (drm_lock_take(&master->lock, lock->context)) {
			master->lock.file_priv = file_priv;
			master->lock.lock_time = jiffies;
			atomic_inc(&dev->counts[_DRM_STAT_LOCKS]);
			break;	/* Got lock */
		}

@@ -157,8 +156,6 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
		return -EINVAL;
	}

	atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]);

	if (drm_lock_free(&master->lock, lock->context)) {
		/* FIXME: Should really bail out here. */
	}
+0 −9
Original line number Diff line number Diff line
@@ -431,15 +431,6 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver,
	mutex_init(&dev->struct_mutex);
	mutex_init(&dev->ctxlist_mutex);

	/* the DRM has 6 basic counters */
	dev->counters = 6;
	dev->types[0] = _DRM_STAT_LOCK;
	dev->types[1] = _DRM_STAT_OPENS;
	dev->types[2] = _DRM_STAT_CLOSES;
	dev->types[3] = _DRM_STAT_IOCTLS;
	dev->types[4] = _DRM_STAT_LOCKS;
	dev->types[5] = _DRM_STAT_UNLOCKS;

	if (drm_ht_create(&dev->map_hash, 12))
		goto err_free;

+0 −11
Original line number Diff line number Diff line
@@ -944,8 +944,6 @@ static int i810_dma_vertex(struct drm_device *dev, void *data,
				 dma->buflist[vertex->idx],
				 vertex->discard, vertex->used);

	atomic_add(vertex->used, &dev->counts[_DRM_STAT_SECONDARY]);
	atomic_inc(&dev->counts[_DRM_STAT_DMA]);
	sarea_priv->last_enqueue = dev_priv->counter - 1;
	sarea_priv->last_dispatch = (int)hw_status[5];

@@ -1105,8 +1103,6 @@ static int i810_dma_mc(struct drm_device *dev, void *data,
	i810_dma_dispatch_mc(dev, dma->buflist[mc->idx], mc->used,
			     mc->last_render);

	atomic_add(mc->used, &dev->counts[_DRM_STAT_SECONDARY]);
	atomic_inc(&dev->counts[_DRM_STAT_DMA]);
	sarea_priv->last_enqueue = dev_priv->counter - 1;
	sarea_priv->last_dispatch = (int)hw_status[5];

@@ -1197,13 +1193,6 @@ static int i810_flip_bufs(struct drm_device *dev, void *data,

int i810_driver_load(struct drm_device *dev, unsigned long flags)
{
	/* i810 has 4 more counters */
	dev->counters += 4;
	dev->types[6] = _DRM_STAT_IRQ;
	dev->types[7] = _DRM_STAT_PRIMARY;
	dev->types[8] = _DRM_STAT_SECONDARY;
	dev->types[9] = _DRM_STAT_DMA;

	pci_set_master(dev->pdev);

	return 0;
Loading