]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/nouveau/kms/gv100-: attach alpha property to planes
authorBen Skeggs <bskeggs@redhat.com>
Tue, 11 Jun 2019 07:13:04 +0000 (17:13 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 23 Aug 2019 02:55:33 +0000 (12:55 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/atom.h
drivers/gpu/drm/nouveau/dispnv50/wndw.c
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c

index 3192f067d2915b79bd7236498736e654dd27afe6..973074403f3c2dcb361bd11d609245d037201d3b 100644 (file)
@@ -223,6 +223,7 @@ struct nv50_wndw_atom {
 
        struct {
                u8 depth;
+               u8 k1;
        } blend;
 
        union nv50_wndw_atom_mask {
index 10fcd4e1e44cdf93ceabb9ced7c566c4eb04b6ee..76c69c6eca7722d4b979f44bdc6f9c28c4d79fd2 100644 (file)
@@ -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));
index 4d2d54a8c659a2946edc234fbfab23751ea732a2..3c6d64d1b70820ca608b9c95813d4f76755b23d0 100644 (file)
@@ -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);