summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2019-06-11 10:13:04 +0300
committerBen Skeggs <bskeggs@redhat.com>2019-08-23 05:55:33 +0300
commita0a76244760d8b72ba1bb9c6998e41f5d286d6aa (patch)
tree4254e6b71a7ebb3a9105d3c4d288707dfd1aac8b /drivers/gpu/drm/nouveau/dispnv50
parent9a99e904cc5b08f8eda2366135404fe72dae16af (diff)
downloadlinux-a0a76244760d8b72ba1bb9c6998e41f5d286d6aa.tar.xz
drm/nouveau/kms/gv100-: attach alpha property to planes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/atom.h1
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndw.c5
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/atom.h b/drivers/gpu/drm/nouveau/dispnv50/atom.h
index 3192f067d291..973074403f3c 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/atom.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/atom.h
@@ -223,6 +223,7 @@ struct nv50_wndw_atom {
struct {
u8 depth;
+ u8 k1;
} blend;
union nv50_wndw_atom_mask {
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
index 10fcd4e1e44c..76c69c6eca77 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
@@ -288,6 +288,7 @@ nv50_wndw_atomic_check_acquire(struct nv50_wndw *wndw, bool modeset,
if (wndw->func->blend_set) {
asyw->blend.depth = 255 - asyw->state.normalized_zpos;
+ asyw->blend.k1 = asyw->state.alpha >> 8;
if (memcmp(&armw->blend, &asyw->blend, sizeof(asyw->blend)))
asyw->set.blend = true;
}
@@ -656,6 +657,10 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
nv50_wndw_zpos_default(&wndw->plane), 0, 254);
if (ret)
return ret;
+
+ ret = drm_plane_create_alpha_property(&wndw->plane);
+ if (ret)
+ return ret;
} else {
ret = drm_plane_create_zpos_immutable_property(&wndw->plane,
nv50_wndw_zpos_default(&wndw->plane));
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
index 4d2d54a8c659..3c6d64d1b708 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
@@ -88,7 +88,7 @@ wndwc37e_blend_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
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, asyw->blend.k1);
evo_data(push, 0x00007722);
evo_data(push, 0xffff0000);
evo_data(push, 0xffff0000);