summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/lut.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2019-09-06 07:13:59 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-01-15 03:49:58 +0300
commit131992709dc4c6140cec3b352f820cb873f7dd50 (patch)
tree071b2b1facb94d5a9c3c1a40fd35682e6b0b4ad1 /drivers/gpu/drm/nouveau/dispnv50/lut.c
parent11a8630917b681ff2f5320938b8d76b354c89d34 (diff)
downloadlinux-131992709dc4c6140cec3b352f820cb873f7dd50.tar.xz
drm/nouveau/kms/gf119-: allow both 256- and 1024-sized LUTs to be used
The hardware supports either size. Also add checks to ensure that only these two sizes may be used for supplying a LUT. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/lut.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/lut.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/lut.c b/drivers/gpu/drm/nouveau/dispnv50/lut.c
index 994def4fd51a..4e95ca5604ab 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/lut.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/lut.c
@@ -49,7 +49,7 @@ nv50_lut_load(struct nv50_lut *lut, int buffer, struct drm_property_blob *blob,
kvfree(in);
}
} else {
- load(in, blob->length / sizeof(*in), mem);
+ load(in, drm_color_lut_size(blob), mem);
}
return addr;