]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: add i915_get_reset_stats_ioctl
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Wed, 30 Oct 2013 13:44:16 +0000 (15:44 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Nov 2013 13:15:48 +0000 (14:15 +0100)
commitb6359918b885da7c7b58c050674278dbd06020ab
treecc53fb03185fe5cea25274079844228b25f790c5
parent2ac0f45099d2d3b8918d63e1bac698b5cb272aa1
drm/i915: add i915_get_reset_stats_ioctl

This ioctl returns reset stats for specified context.

The struct returned contains context loss counters.

reset_count:    all resets across all contexts
batch_active:   active batches lost on resets
batch_pending:  pending batches lost on resets

v2: get rid of state tracking completely and deliver only counts. Idea
    from Chris Wilson.

v3: fix commit message

v4: default context handled inside i915_gem_context_get_hang_stats

v5: reset_count only for priviledged process

v6: ctx=0 needs CAP_SYS_ADMIN for batch_* counters (Chris Wilson)

v7: context hang stats never returns NULL

v8: rebased on top of reworked context hang stats
    DRM_RENDER_ALLOW for ioctl

v9: use DEFAULT_CONTEXT_ID. Improve comments for ioctl struct members

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Ian Romanick <idr@freedesktop.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_uncore.c
include/uapi/drm/i915_drm.h