summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arm
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2019-09-04 23:29:13 +0300
committerSean Paul <seanpaul@chromium.org>2019-10-08 16:41:06 +0300
commit354c2d310082d1c384213ba76c3757dd3cd8755d (patch)
tree3e5489031e4a32d7468798d33dea647fee51c37b /drivers/gpu/drm/arm
parent9a197c862f0d0863a61715a056c16b07d18aa5d8 (diff)
downloadlinux-354c2d310082d1c384213ba76c3757dd3cd8755d.tar.xz
drm: damage_helper: Fix race checking plane->state->fb
Since the dirtyfb ioctl doesn't give us any hints as to which plane is scanning out the fb it's marking as damaged, we need to loop through planes to find it. Currently we just reach into plane state and check, but that can race with another commit changing the fb out from under us. This patch locks the plane before checking the fb and will release the lock if the plane is not displaying the dirty fb. Fixes: b9fc5e01d1ce ("drm: Add helper to implement legacy dirtyfb") Cc: Rob Clark <robdclark@gmail.com> Cc: Deepak Rawat <drawat@vmware.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <maxime.ripard@bootlin.com> Cc: Sean Paul <sean@poorly.run> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v5.0+ Reported-by: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190904202938.110207-1-sean@poorly.run
Diffstat (limited to 'drivers/gpu/drm/arm')
0 files changed, 0 insertions, 0 deletions