From f88bc9d3ecca5ddc29642269f4624d07265c1bf5 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Tue, 8 May 2018 20:39:47 +1000 Subject: 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 --- drivers/gpu/drm/nouveau/dispnv50/head.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'drivers/gpu/drm/nouveau/dispnv50/head.c') 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 -- cgit v1.2.3-59-g8ed1b