]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dpu: Fix reservation failures in modeset
authorKalyan Thota <kalyan_t@codeaurora.org>
Mon, 10 Aug 2020 12:49:18 +0000 (18:19 +0530)
committerRob Clark <robdclark@chromium.org>
Mon, 17 Aug 2020 19:23:10 +0000 (12:23 -0700)
commita14713d7755b0f4aae2446fad5a61f4962e929c1
tree739717e847e1c3d901686fecf775ce938048e41d
parente5f0bf958198ed018c9fdf06e8d307ced9af9c95
drm/msm/dpu: Fix reservation failures in modeset

In TEST_ONLY commit, rm global_state will duplicate the
object and request for new reservations, once they pass
then the new state will be swapped with the old and will
be available for the Atomic Commit.

This patch fixes some of missing links in the resource
reservation sequence mentioned above.

1) Creation of duplicate state in test_only commit (Rob)
2) Allocate and release the resources on every modeset.
3) Avoid allocation only when active is false.

In a modeset operation, swap state happens well before
disable. Hence clearing reservations in disable will
cause failures in modeset enable.

Allow reservations to be cleared/allocated before swap,
such that only newly committed resources are pushed to HW.

Changes in v1:
 - Move the rm release to atomic_check.
 - Ensure resource allocation and free happens when active
   is not changed i.e only when mode is changed.(Rob)

Changes in v2:
 - Handle dpu_kms_get_global_state API failure as it may
   return EDEADLK (swboyd).

Signed-off-by: Kalyan Thota <kalyan_t@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c