diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-30 16:08:32 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-03-30 16:15:49 +0200 |
commit | f5f4c615982ddf9b898439cd039e5af6697c1c3e (patch) | |
tree | e5b99267b26c8b303833f223ca0c0397c919b30a /drivers/gpu/drm/drm_irq.c | |
parent | drm/bridge: ti-tfp410: support hpd via gpio (diff) | |
download | linux-f5f4c615982ddf9b898439cd039e5af6697c1c3e.tar.xz linux-f5f4c615982ddf9b898439cd039e5af6697c1c3e.zip |
drm: Convert cmpxchg(bool) back to a two step operation
ARM v6 (at least) only allows cmpxchg on 32bit variables which doesn't
always include the bool type.
drivers/built-in.o: In function `vblank_disable_and_save':
imx-ocotp.c:(.text+0xb45e8): undefined reference to `__bad_cmpxchg'
Makefile:986: recipe for target 'vmlinux' failed
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Fixes: 43dc7fe2b211 ("drm: Mark up accesses of vblank->enabled outside of its spinlock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170330140832.32377-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r-- | drivers/gpu/drm/drm_irq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index aa23b9833588..dac1b2593cb1 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -338,8 +338,10 @@ static void vblank_disable_and_save(struct drm_device *dev, unsigned int pipe) * calling the ->disable_vblank() operation in atomic context with the * hardware potentially runtime suspended. */ - if (cmpxchg_relaxed(&vblank->enabled, true, false)) + if (vblank->enabled) { __disable_vblank(dev, pipe); + vblank->enabled = false; + } /* * Always update the count and timestamp to maintain the |