diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 04:10:27 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-08-10 05:28:10 +1000 |
commit | 4952b4d339033c2019bbd00f28f422b6fc340408 (patch) | |
tree | 10b610a3ca4d2b7e60e6795fc33e784e809bf2e8 /drivers/gpu/drm/nouveau/nvif | |
parent | 67cb49c45feba4141ed4b962855249d30302cd7d (diff) |
drm/nouveau/disp: audit and version SCANOUTPOS method
The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/class.h | 23 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvif/object.h | 1 |
2 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/class.h b/drivers/gpu/drm/nouveau/nvif/class.h index f869f94d41c1..b0998e7a5396 100644 --- a/drivers/gpu/drm/nouveau/nvif/class.h +++ b/drivers/gpu/drm/nouveau/nvif/class.h @@ -294,6 +294,28 @@ struct kepler_channel_gpfifo_a_v0 { * legacy display ******************************************************************************/ +struct nv04_disp_mthd_v0 { + __u8 version; +#define NV04_DISP_SCANOUTPOS 0x00 + __u8 method; + __u8 head; + __u8 pad03[5]; +}; + +struct nv04_disp_scanoutpos_v0 { + __u8 version; + __u8 pad01[7]; + __s64 time[2]; + __u16 vblanks; + __u16 vblanke; + __u16 vtotal; + __u16 vline; + __u16 hblanks; + __u16 hblanke; + __u16 htotal; + __u16 hline; +}; + /******************************************************************************* * display @@ -303,6 +325,7 @@ struct kepler_channel_gpfifo_a_v0 { struct nv50_disp_mthd_v0 { __u8 version; +#define NV50_DISP_SCANOUTPOS 0x00 __u8 method; __u8 head; __u8 pad03[5]; diff --git a/drivers/gpu/drm/nouveau/nvif/object.h b/drivers/gpu/drm/nouveau/nvif/object.h index a5d82814a9b0..fac3a3bbec44 100644 --- a/drivers/gpu/drm/nouveau/nvif/object.h +++ b/drivers/gpu/drm/nouveau/nvif/object.h @@ -71,6 +71,5 @@ void nvif_object_unmap(struct nvif_object *); /*XXX*/ #include <core/object.h> #define nvkm_object(a) ((struct nouveau_object *)nvif_object(a)->priv) -#define nvif_exec(a,b,c,d) nv_exec(nvkm_object(a), (b), (c), (d)) #endif |