aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/dispnv50/head.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2018-05-08 20:39:47 +1000
committerBen Skeggs <bskeggs@redhat.com>2018-05-18 15:01:28 +1000
commitf88bc9d3ecca5ddc29642269f4624d07265c1bf5 (patch)
tree420189c28160b0f36c43f048b90c66b855af5037 /drivers/gpu/drm/nouveau/dispnv50/head.c
parentdrm/nouveau/kms/nv50-: allow specification of valid heads for a window (diff)
downloadlinux-dev-f88bc9d3ecca5ddc29642269f4624d07265c1bf5.tar.xz
linux-dev-f88bc9d3ecca5ddc29642269f4624d07265c1bf5.zip
drm/nouveau/kms/nv50-: unify set/clr masks
This is a simplification that'll be used to improve interlock handling. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/head.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/head.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
index 1335c00500d1..2eb7fdb61131 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -81,14 +81,15 @@ nv50_head_lut_load(struct drm_property_blob *blob, int mode,
}
void
-nv50_head_flush_clr(struct nv50_head *head, struct nv50_head_atom *asyh, bool y)
+nv50_head_flush_clr(struct nv50_head *head,
+ struct nv50_head_atom *asyh, bool flush)
{
- if (asyh->clr.ilut && (!asyh->set.ilut || y))
- head->func->ilut_clr(head);
- if (asyh->clr.core && (!asyh->set.core || y))
- head->func->core_clr(head);
- if (asyh->clr.curs && (!asyh->set.curs || y))
- head->func->curs_clr(head);
+ union nv50_head_atom_mask clr = {
+ .mask = asyh->clr.mask & ~(flush ? 0 : asyh->set.mask),
+ };
+ if (clr.ilut) head->func->ilut_clr(head);
+ if (clr.core) head->func->core_clr(head);
+ if (clr.curs) head->func->curs_clr(head);
}
void