From: Ben Skeggs Date: Tue, 11 Jun 2019 07:13:04 +0000 (+1000) Subject: drm/nouveau/kms/gv100-: attach alpha property to planes X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a0a76244760d8b72ba1bb9c6998e41f5d286d6aa;p=openwrt%2Fstaging%2Fblogic.git drm/nouveau/kms/gv100-: attach alpha property to planes Signed-off-by: Ben Skeggs --- 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);