drm/nouveau/kms/gv100-: attach alpha property to planes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
9a99e904cc
commit
a0a7624476
@ -223,6 +223,7 @@ struct nv50_wndw_atom {
|
||||
|
||||
struct {
|
||||
u8 depth;
|
||||
u8 k1;
|
||||
} blend;
|
||||
|
||||
union nv50_wndw_atom_mask {
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user