diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2019-06-11 09:46:13 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2019-08-23 05:55:33 +0300 |
commit | 9a99e904cc5b08f8eda2366135404fe72dae16af (patch) | |
tree | a484009c1db54308f18b61ddad427cfb2b0dfb8f /drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | |
parent | 7a962f2b7276ccfb844583f0db5680e763d6f6da (diff) | |
download | linux-9a99e904cc5b08f8eda2366135404fe72dae16af.tar.xz |
drm/nouveau/kms/gv100-: add support for plane zpos property
Has a nice side-effect that we only update HW for this when it changes now,
rather than every time we do a page flip.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c index 0d270cd5ac4c..4d2d54a8c659 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c @@ -82,6 +82,23 @@ wndwc37e_ilut(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) } void +wndwc37e_blend_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) +{ + u32 *push; + if ((push = evo_wait(&wndw->wndw, 8))) { + evo_mthd(push, 0x02ec, 7); + evo_data(push, asyw->blend.depth << 4); + evo_data(push, 0x000000ff); + evo_data(push, 0x00007722); + evo_data(push, 0xffff0000); + evo_data(push, 0xffff0000); + evo_data(push, 0xffff0000); + evo_data(push, 0xffff0000); + evo_kick(push, &wndw->wndw); + } +} + +void wndwc37e_image_clr(struct nv50_wndw *wndw) { u32 *push; @@ -99,7 +116,7 @@ wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { u32 *push; - if (!(push = evo_wait(&wndw->wndw, 25))) + if (!(push = evo_wait(&wndw->wndw, 17))) return; evo_mthd(push, 0x0308, 1); @@ -124,16 +141,6 @@ wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) evo_mthd(push, 0x02a4, 1); evo_data(push, asyw->state.crtc_h << 16 | asyw->state.crtc_w); - - /*XXX: Composition-related stuff. Need to implement properly. */ - evo_mthd(push, 0x02ec, 7); - evo_data(push, (2 - (wndw->id & 1)) << 4); - evo_data(push, 0x000000ff); - evo_data(push, 0x00007722); - evo_data(push, 0xffff0000); - evo_data(push, 0xffff0000); - evo_data(push, 0xffff0000); - evo_data(push, 0xffff0000); evo_kick(push, &wndw->wndw); } @@ -258,6 +265,7 @@ wndwc37e = { .csc_clr = wndwc37e_csc_clr, .image_set = wndwc37e_image_set, .image_clr = wndwc37e_image_clr, + .blend_set = wndwc37e_blend_set, .update = wndwc37e_update, }; |