drm/msm/mdp5: Use the new private_obj state
authorArchit Taneja <architt@codeaurora.org>
Wed, 21 Feb 2018 14:37:23 +0000 (09:37 -0500)
committerRob Clark <robdclark@gmail.com>
Sun, 3 Jun 2018 20:49:00 +0000 (16:49 -0400)
commit7907a0d77cb461f58045763c205a5830be72e97c
treef842c08966fe136f30162fd4fd053c1e4d15ce35
parent8d58ef346f30cbbeb9213a7eb90c832abf903fa0
drm/msm/mdp5: Use the new private_obj state

This replaces the usage of the subclassed atomic state (mdp5_state)
with a private_obj state embedded within drm_atomic_state. The latter
method is the preferred approach, since it's simpler to implement
and less prone to errors.

The new API replaces the older and equivalent mdp5_state usage in the
following pattern:
- References to "mdp5_kms->state" (i.e, the old/existing state) is
  replaced with mdp5_get_existing_global_state(). In the atomic_check
  path, this should be called with the glob_state_lock drm_modeset_lock
  alredy taken.
- References to "mdp5_get_state()" are replaced with
  mdp5_get_global_state(). This acquires glob_state_lock and uses
  drm_atomic_get_private_obj_state() to create a new duplicated state.

Changes in v3:
- Acquire glob_state_lock in mdp5_smp.c
- Added to the msm atomic helper patch set
Changes in v4:
- None

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_mixer.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_pipe.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c