summaryrefslogtreecommitdiff
path: root/nvkm/engine/disp/nv50.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-10 04:10:27 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-08-10 05:26:58 +1000
commit39e2197f793e11f18b9e67b322beebb89c104f78 (patch)
treeacd12b78a861b7f700e8144a94ef1fe159b78bfe /nvkm/engine/disp/nv50.c
parentdd946b338d4bad89d344751e1dd7f57de0062c4f (diff)
downloadnouveau-39e2197f793e11f18b9e67b322beebb89c104f78.tar.gz
disp/nv50-: audit and version PIOR_PWR 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 'nvkm/engine/disp/nv50.c')
-rw-r--r--nvkm/engine/disp/nv50.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nvkm/engine/disp/nv50.c b/nvkm/engine/disp/nv50.c
index ed55cc296..d83d3efe8 100644
--- a/nvkm/engine/disp/nv50.c
+++ b/nvkm/engine/disp/nv50.c
@@ -952,6 +952,10 @@ nv50_disp_base_mthd(struct nouveau_object *object, u32 mthd,
return ret;
}
break;
+ case NV50_DISP_MTHD_V1_PIOR_PWR:
+ if (!priv->pior.power)
+ return -ENODEV;
+ return priv->pior.power(object, priv, data, size, head, outp);
default:
break;
}
@@ -1080,9 +1084,6 @@ nv50_disp_base_ofuncs = {
static struct nouveau_omthds
nv50_disp_base_omthds[] = {
{ HEAD_MTHD(NV50_DISP_SCANOUTPOS) , nv50_disp_base_scanoutpos },
- { PIOR_MTHD(NV50_DISP_PIOR_PWR) , nv50_pior_mthd },
- { PIOR_MTHD(NV50_DISP_PIOR_TMDS_PWR) , nv50_pior_mthd },
- { PIOR_MTHD(NV50_DISP_PIOR_DP_PWR) , nv50_pior_mthd },
{},
};