drm/amd/display: Use DRM new-style object iterators.
authorDave Airlie <airlied@redhat.com>
Mon, 9 Oct 2017 00:33:04 +0000 (10:33 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 17 Oct 2017 00:42:38 +0000 (10:42 +1000)
commit9ba29fcb76a559078491adffc74f66bf92b9dbea
tree47fbfc49e498e569675066fe39eb80a2c8087b78
parentb9e56e41e0c55c2b2ab5919c5e167faa4200b083
drm/amd/display: Use DRM new-style object iterators.

Use the correct for_each_new/old_* iterators instead of for_each_*

The following functions were considered:

amdgpu_dm_find_first_crtc_matching_connector: use for_each_new
    - Old from_state_var flag was always choosing the new state

amdgpu_dm_display_resume: use for_each_new
    - drm_atomic_helper_duplicate_state is called during suspend to
      cache the state
    - It sets 'state' within the state triplet to 'new_state'

amdgpu_dm_commit_planes: use for_each_old
    - Called after the state was swapped (via atomic commit tail)

amdgpu_dm_atomic_commit: use for_each_new
    - Called before the state is swapped

amdgpu_dm_atomic_commit_tail: use for_each_old
    - Called after the state was swapped

dm_update_crtcs_state: use for_each_new
    - Called before the state is swapped (via atomic check)

amdgpu_dm_atomic_check: use for_each_new
    - Called before the state is swapped

v2: Split out typo fixes to a new patch.

v3: Say "functions considered" instead of "affected functions". The
    latter implies that changes are made to each.

[airlied: squashed with my hacks]

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h