summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-20 11:52:44 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:51:00 +1000
commit6833d2a0c778252929805fabfdc89e4e181fcb82 (patch)
tree9b3f90f5d6e7d0ebedf289891a36dc0811904851 /drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
parent2740edb3c640e7a13fdfe752bb17154fd824f28d (diff)
drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw xlut_set()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
index b72170dab87a..942b68ee4c75 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
@@ -72,11 +72,13 @@ wndwc37e_ilut_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
if ((ret = PUSH_WAIT(push, 4)))
return ret;
- PUSH_NVSQ(push, NVC37E, 0x02b0, asyw->xlut.i.output_mode << 8 |
- asyw->xlut.i.range << 4 |
- asyw->xlut.i.size,
- 0x02b4, asyw->xlut.i.offset >> 8,
- 0x02b8, asyw->xlut.handle);
+ PUSH_MTHD(push, NVC37E, SET_CONTROL_INPUT_LUT,
+ NVVAL(NVC37E, SET_CONTROL_INPUT_LUT, OUTPUT_MODE, asyw->xlut.i.output_mode) |
+ NVVAL(NVC37E, SET_CONTROL_INPUT_LUT, RANGE, asyw->xlut.i.range) |
+ NVVAL(NVC37E, SET_CONTROL_INPUT_LUT, SIZE, asyw->xlut.i.size),
+
+ SET_OFFSET_INPUT_LUT, asyw->xlut.i.offset >> 8,
+ SET_CONTEXT_DMA_INPUT_LUT, asyw->xlut.handle);
return 0;
}
@@ -86,10 +88,10 @@ wndwc37e_ilut(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw, int size)
if (size != 256 && size != 1024)
return false;
- asyw->xlut.i.mode = 2;
- asyw->xlut.i.size = size == 1024 ? 2 : 0;
- asyw->xlut.i.range = 0;
- asyw->xlut.i.output_mode = 1;
+ asyw->xlut.i.size = size == 1024 ? NVC37E_SET_CONTROL_INPUT_LUT_SIZE_SIZE_1025 :
+ NVC37E_SET_CONTROL_INPUT_LUT_SIZE_SIZE_257;
+ asyw->xlut.i.range = NVC37E_SET_CONTROL_INPUT_LUT_RANGE_UNITY;
+ asyw->xlut.i.output_mode = NVC37E_SET_CONTROL_INPUT_LUT_OUTPUT_MODE_INTERPOLATE;
asyw->xlut.i.load = head907d_olut_load;
return true;
}