]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: Fix dirtyfb refcounting
authorRob Clark <robdclark@chromium.org>
Fri, 4 Mar 2022 20:21:45 +0000 (12:21 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:30 +0000 (14:24 +0200)
commit42ef024d10bf3d5e453227de86d7b4609a574eb2
tree785f4e7ae9c6425383d206872f5005064e19a940
parent523d4155666e5a1922884bf8b56a4a386b93689e
drm/msm: Fix dirtyfb refcounting

commit 6cf1ba54d6910472a4b8a663e61bee6f9ea5556f upstream.

refcount_t complains about 0->1 transitions, which isn't *quite* what we
wanted.  So use dirtyfb==1 to mean that the fb is not connected to any
output that requires dirtyfb flushing, so that we can keep the underflow
and overflow checking.

Fixes: ec882c8d0ec6 ("drm/msm: Avoid dirtyfb stalls on video mode displays (v2)")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20220304202146.845566-1-robdclark@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/msm/msm_fb.c