diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2019-05-28 05:58:37 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2019-08-23 05:55:31 +0300 |
commit | 38a72243235ecf2c1359ce66ebed29a7dfb680f7 (patch) | |
tree | 7057e5e19d486dc480db4572e5fd127ec8642c2a /drivers/gpu/drm/nouveau/dispnv50/base827c.c | |
parent | ebf8ca6b3d6d7310646b092f3d5219abe2858e81 (diff) | |
download | linux-38a72243235ecf2c1359ce66ebed29a7dfb680f7.tar.xz |
drm/nouveau/kms/nv50-: add fp16 scanout support
Older hardware seems to want 0..1024 values, while new hardware takes
0..1 values. We set the gain to 1024 for the earlier display classes.
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/base827c.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/base827c.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/base827c.c b/drivers/gpu/drm/nouveau/dispnv50/base827c.c index 73646819a0d6..f4c05949dd62 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/base827c.c +++ b/drivers/gpu/drm/nouveau/dispnv50/base827c.c @@ -25,12 +25,21 @@ static void base827c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { u32 *push; - if ((push = evo_wait(&wndw->wndw, 10))) { + if ((push = evo_wait(&wndw->wndw, 13))) { evo_mthd(push, 0x0084, 1); evo_data(push, asyw->image.mode << 8 | asyw->image.interval << 4); evo_mthd(push, 0x00c0, 1); evo_data(push, asyw->image.handle[0]); + if (asyw->image.format == 0xca) { + evo_mthd(push, 0x0110, 2); + evo_data(push, 1); + evo_data(push, 0x6400); + } else { + evo_mthd(push, 0x0110, 2); + evo_data(push, 0); + evo_data(push, 0); + } evo_mthd(push, 0x0800, 5); evo_data(push, asyw->image.offset[0] >> 8); evo_data(push, 0x00000000); |