drm/vc4: Add a getparam ioctl for getting the V3D identity regs.
authorEric Anholt <eric@anholt.net>
Fri, 1 Jul 2016 20:10:38 +0000 (13:10 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 14 Jul 2016 15:08:35 +0000 (08:08 -0700)
commitaf713795c59fea36161a7debf97dbc10bf652cf7
tree49f9f82095bd764640e6edf4d416239f96f8f426
parentdeb4765db386db67626ffd075d8b5eb5fdf9c4f6
drm/vc4: Add a getparam ioctl for getting the V3D identity regs.

As I extend the driver to support different V3D revisions, userspace
needs to know what version it's targeting.  This is most easily
detected using the V3D identity registers.

v2: Make sure V3D is runtime PM on when reading the registers.
v3: Switch to a 64-bit param value (suggested by Rob Clark in review)

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v2)
Reviewed-by: Rob Clark <robdclark@gmail.com> (v3, over irc)
drivers/gpu/drm/vc4/vc4_drv.c
include/uapi/drm/vc4_drm.h