History log of /drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
Revision Date Author Comments
5838ae610ff36777b8fce6f353c2417980c1a1fa 30-Sep-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: fix dpms regression on certain boards

Reported in fdo#82527 comment #2.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9506140f425da42d919ea58307c8e83b78961dae 15-Sep-2014 Ben Skeggs <bskeggs@redhat.com> drm/g94-/disp: calculate some dp audio constants

NVIDIA appear to have tweaked the algorithm from GF110, this implements
the previous algorithm for them still.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b38a2322df62dbcd423d3e329f401eb14c1f0e4a 11-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: add support for completion events

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c354080dc8cf450f2db374bcfa8ce24cb97c62f2 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: shhh compiler

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
80bc340b3dd720c5b7818e21a9a1ee36e1d7ef30 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: implement nvif event sources for vblank/connector notifiers

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b76f15295eadd37405cdb4855351a6ceda0bd1b1 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: allow user direct access to channel control registers

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
648d4dfde721885737b33a06f2b73ee125acf271 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: audit and version display classes

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4952b4d339033c2019bbd00f28f422b6fc340408 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: audit and version SCANOUTPOS method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
67cb49c45feba4141ed4b962855249d30302cd7d 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version PIOR_PWR method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c02ed2bf98a682c477640c782d1e6a94525b2123 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version SOR_DP_PWR method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a3761fa2483f48d158234760d5e25e5071e41537 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version LVDS_SCRIPT method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e00f2235386484cc1920dd99d17beac2a8dc4a95 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version SOR_HDMI_PWR method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
120b0c39c75688864e4a25e71cf3ed40e8e18651 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version SOR_HDA_ELD method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d55b4af909bc16f7982c2b8b8656f0898158627b 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version SOR_PWR method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c4abd3178e117d3ca15a40d76df2dbb135f33d78 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version DAC_LOAD method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bf0eb89859439f016a1fab4cdf737c95f36dbb2e 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: audit and version DAC_PWR method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2c04ae01df38f95dd3e553c85cdac670a80110f5 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: share channel creation between nv50/gf110 impls

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
586491e6fc27f1783081955fd26d70789ddb3a07 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/device: audit and version NV_DEVICE class

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
79ca27706a034b683196c85f5c6901b78e5ab8f0 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/core: rework event interface

This is a lot of prep-work for being able to send event notifications
back to userspace. Events now contain data, rather than a "something
just happened" signal.

Handler data is now embedded into a containing structure, rather than
being kmalloc()'d, and can optionally have the notify routine handled
in a workqueue.

Various races between suspend/unload with display HPD/DP IRQ handlers
automagically solved as a result.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
0713b4510e62411071b748d786043cdaada56ce5 01-Jul-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/dp: fix required link bandwidth calculations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ba5e01b0d0146c2d2bb5475cf1d6efec51bf2669 17-Jun-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: fix a potential oops in supervisor handling

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1ae5a62bb8b6b544bdfac7bdcb15c9eb22dd6620 11-Jun-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp/dp: fix tmds passthrough on dp connector

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
55f083c33feb7231c7574a64cd01b0477715a370 20-May-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp/dp: maintain link in response to hpd signal

This previously worked for the most part due to userspace doing a
modeset in response to HPD interrupts. This will allow us to
properly handle cases where sync is lost for other reasons, or if
userspace isn't caring.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b17932c01a006d36a716ec0ab678d15711dea072 27-May-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: train PIOR-attached DP from second supervisor

Same place as for SOR, between detach and attach phases.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3b52a1f90639a88b3c76e4d42b60c34dd950cad3 19-May-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp/dp: make use of existing output data for link training

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
415f12efc1b2308411b2cbc3e82666b3db8a7758 21-May-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: start removing direct vbios parsing from supervisor

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b8407c9e504f43a50ba0de746c5e8958521165aa 17-May-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp/dp: create subclass for dp outputs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8e8832e8a8ad4159fd6f9cb13975941c5de50c0f 13-May-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/core: allow event source to handle multiple event types per index

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9cf6ba20b4fd1299d376364a698f6068b99b1de5 20-Feb-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: dump channel state when update method fails

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b62b9ec2eb7b2861db1186b701c04a08b6208553 20-Feb-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: allow dumping core channel state at first supervisor intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d67d92c0669ef1784edde11448f7881820b22df5 20-Feb-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: add method descriptions for debugging

Lists of known methods for the DMA channel classes, and mappings to
their priv register addresses (where known).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
117e16335bab4f433de16838f50834daa074b6c6 21-Feb-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: decode the known error codes to human readable form

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a8f8b4891d26c430a18aad6cce561e8d50e85b10 20-Feb-2014 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: preparation for storing static class data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a7f1c1e65b68e1e1ab70898528d5977ed68a0a7d 14-Feb-2014 Ilia Mirkin <imirkin@alum.mit.edu> drm/nv50/disp: use correct register to determine DP display bpp

Commit 0a0afd282f ("drm/nv50-/disp: move DP link training to core and
train from supervisor") added code that uses the wrong register for
computing the display bpp, used for bandwidth calculation. Adjust to use
the same register as used by exec_clkcmp and nv50_disp_intr_unk20_2_dp.

Reported-by: Torsten Wagner <torsten.wagner@gmail.com>
Reported-by: Michael Gulick <mgulick@mathworks.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67628
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d2fa7d32ea7b54d910637e50df4972e3540722d4 14-Nov-2013 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: add a method to fetch info needed by drm vblank timestamping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b969fa52ba725adf83761d579a300b1107f84478 30-Jul-2013 Emil Velikov <emil.l.velikov@gmail.com> drm/nv50-/disp: use the number of dac, sor, pior rather than hardcoded values

The values are already stored on chipset specific basis in the ctor.
Make the most of them and simplify the code further by using a temporary
variable to avoid code duplication.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
378f2bcdf7c971453d11580936dc0ffe845f5880 02-Jul-2013 Emil Velikov <emil.l.velikov@gmail.com> drm/nv50-/disp: Use output specific mask in interrupt

The commit

commit 476e84e126171d809f9c0b5d97137f5055f95ca8
Author: Ben Skeggs <bskeggs@redhat.com>
Date: Mon Feb 11 09:24:23 2013 +1000

drm/nv50-/disp: initial supervisor support for off-chip encoders

changed the write mask in one of the interrupt functions for on-chip encoders,
causing a regression in certain VGA dual-head setups. This commit reintroduces
the mask thus resolving the regression

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66129
Reported-and-Tested-by: Yves-Alexis <corsac@debian.org>
Cc: stable@vger.kernel.org [3.9+]
CC: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
88524bc06926b243c75e5751eb3403c602b6a904 05-Mar-2013 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/devinit: move simple pll setting routines to devinit

These are pretty much useless for reclocking purposes. Lets make it
clearer what they're for and move them to DEVINIT to signify they're
for the very simple PLL setting requirements of running the init
tables.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2ecda48b36ecb4ec21d1d5ba7b8ccaa7ec701795 24-Apr-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: use self as parent for subobjects

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
43e6e51c037cafac5047a65cfa9d37b450157af1 25-Apr-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: inform core when we're not creating a new context

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c8f28f89566321842afb81d3ddd79d611e3587ce 05-Mar-2013 Maarten Lankhorst <maarten.lankhorst@canonical.com> drm/nouveau: fix regression in vblanking

nv50_vblank_enable/disable got switched from NV50_PDISPLAY_INTR_EN_1_VBLANK_CRTC_0 (4) << head to 1 << head, which is wrong.

4 << head is the correct value.

Fixes regression with vblanking since 1d7c71a3e2f77 "drm/nouveau/disp: port vblank handling to event interface"

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
16d4c031dd3befa1a85ff4645e28bb173e16ef43 20-Feb-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: handle multiple actions from one set of supervisor intrs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
476e84e126171d809f9c0b5d97137f5055f95ca8 11-Feb-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: initial supervisor support for off-chip encoders

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a2bc283f3905389ba53962a2bbb05ede0c16193d 11-Feb-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: initial work towards supporting external encoders

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
0a0afd282fd715dd63d64b243299a64da14f8e8d 19-Feb-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: move DP link training to core and train from supervisor

We need to be able to do link training for PIOR-connected ANX9805 from
the third supervisor handler (due to script ordering in the bios, can't
have the "user" call train because some settings are overwritten from
the modesetting bios scripts).

This moves link training for SOR-connected DP encoders to the second
supervisor interrupt, *before* we call the modesetting scripts (yes,
different ordering from PIOR is necessary). This is useful since we
should now be able to remove some hacks to workaround races between
the supervisor and link training paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5cc027f6b1ec651c18a4322ed3e30c6e9cf01e96 18-Feb-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: handle supervisor tasks from workqueue

i2c_algo_bit sleeps...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
46c13c131d3b73080aa0f50f45e834a9ab3c0e71 16-Feb-2013 Ben Skeggs <bskeggs@redhat.com> drm/nv50-/disp: 0x0000 is a valid udisp config value

Return an out-of-range value instead to signal a failure from
exec_clkcmp().

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
af1ac18a19b80f922046fd383a3a3e780ee94915 23-Jan-2013 Dan Carpenter <dan.carpenter@oracle.com> drm/nouveau/disp: sizeof() wrong pointer

"data" is a void pointer and "args" is "data" after we have casted it to
a struct. We care about the size of the struct here. Btw,
sizeof(*data) is 1.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1d7c71a3e2f77336df536855b0efd2dc5bdeb41b 31-Jan-2013 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: port vblank handling to event interface

This removes the nastiness with the interactions between display and
software engines when handling vblank semaphore release interrupts.

Now, all the semantics are handled in one place (sw) \o/.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c684cef795cb5356ae7f6a7ad613946eef14265f 03-Jan-2013 Marcin Slusarz <marcin.slusarz@gmail.com> drm/nv50/disp: fix selection of bios script for analog outputs

Analog output number was overwritten by value from digital output path.
Fix it.

Fixes resume from s2ram: https://bugs.freedesktop.org/show_bug.cgi?id=58729
(as stumbled on by J Binder, Pontus Fuchs and me)
Fixes blank screen on module load (reported by Sune Mølgaard).

Fixes regression from commit 186ecad21c854385823a430b1402053ae7fd59dc
("drm/nv50/disp: move remaining interrupt handling into core").

Reported-by: J Binder <wheel@herr-der-mails.de>
Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Reported-by: Sune Mølgaard <sune@molgaard.org>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Sune Mølgaard <sune@molgaard.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bf2c886a857dcf61f2354796a8858a230f2737fa 21-Nov-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: add support for 10bpc over DisplayPort

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
186ecad21c854385823a430b1402053ae7fd59dc 08-Nov-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: move remaining interrupt handling into core

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4a230fa61884ffe6b6a806563eee82f12a60fa1e 09-Nov-2012 Ben Skeggs <bskeggs@redhat.com> drm/nvd0/disp: calculate U script id in supervisor interrupt

This is like we do on nv50:nvd9 already. There's been no problems seen
yet with using this *seemingly* scratch register to store the value, but
we won't be able to do this anymore once nv50's code is merged.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7ebb38b556485449bfaa506a196439f6a6fd6ebd 09-Nov-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: call into core for dac load detection

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ef22c8bb7b3fac45919b7fde412d36d1a8367d51 09-Nov-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: call into core to handle dac/sor power state changes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
944234d6a2c46a4666533904b7ea8c79807e9072 30-Oct-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: allow PCI_US pushbuf binding
370c00f939c5dddd527ab5cfa8740ba7683ac630 14-Aug-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: initial implementation of the various channel object classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
446b05a077fc880ccb135ed894285e4cf47e8c56 13-Aug-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: enable interrupts and setup memory area

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ab77214a8eb008efbba413fd04bdacc81d20f813 14-Aug-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: copy caps to evo

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
70cabe4a14ae606a5329abb5489e4ef0d896d03d 14-Aug-2012 Ben Skeggs <bskeggs@redhat.com> drm/nv50/disp: create skeleton display/channel object classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4113014f2d7bef992ed373c30b6b4ba4be6969ea 15-Nov-2012 Kelly Doran <kel.p.doran@gmail.com> drm/nvc0/disp: fix thinko in vblank regression fix..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11d92561c81be2f4a7af37f035e1af294b960abe 07-Nov-2012 Kelly Doran <kel.p.doran@gmail.com> drm/nvc0/disp: fix regression in vblank semaphore release

Signed-off-by: Kelly Doran <kel.p.doran@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ebb945a94bba2ce8dff7b0942ff2b3f2a52a0a69 20-Jul-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: port all engines to new engine module format

This is a HUGE commit, but it's not nearly as bad as it looks - any problems
can be isolated to a particular chipset and engine combination. It was
simply too difficult to port each one at a time, the compat layers are
*already* ridiculous.

Most of the changes here are simply to the glue, the process for each of the
engine modules was to start with a standard skeleton and copy+paste the old
code into the appropriate places, fixing up variable names etc as needed.

v2: Marcin Slusarz <marcin.slusarz@gmail.com>
- fix find/replace bug in license header

v3: Ben Skeggs <bskeggs@redhat.com>
- bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and
left no space for kernel's requirements during GEM pushbuf submission.
- fix duplicate assignments noticed by clang

v4: Marcin Slusarz <marcin.slusarz@gmail.com>
- add sparse annotations to nv04_fifo_pause/nv04_fifo_start
- use ioread32_native/iowrite32_native for fifo control registers

v5: Ben Skeggs <bskeggs@redhat.com>
- rebase on v3.6-rc4, modified to keep copy engine fix intact
- nv10/fence: unmap fence bo before destroying
- fixed fermi regression when using nvidia gr fuc
- fixed typo in supported dma_mask checking

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>