]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/amd/display: Do not set bandwidth on page flips.
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>
Wed, 4 Oct 2017 16:47:13 +0000 (12:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 21 Oct 2017 20:49:45 +0000 (16:49 -0400)
Which removes a lockdep warning for a possible deadlock situation:

While holding the drm event mutex (hard irq safe),
dc_post_update_surfaces_to_stream eventually acquires the atom context
lock, which is hard irq unsafe. We should only be calling it on full
updates anyways.

Also remove a redundant call to dc_post_update_surfaces_to_stream,
dc_commit_updates_for_stream already calls it.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 80ddccc2570a0aa90c4139f6e58edc033bcba70f..9d750fa29a876cf2e272ed3aed2689e9d94c5b9f 100644 (file)
@@ -980,8 +980,6 @@ bool dc_commit_planes_to_stream(
                        new_plane_count,
                        dc_stream, stream_update, plane_states, state);
 
-       dc_post_update_surfaces_to_stream(dc);
-
        kfree(stream_update);
        return true;
 }
@@ -1418,7 +1416,8 @@ void dc_commit_updates_for_stream(struct dc *dc,
                                update_type,
                                context);
 
-       dc_post_update_surfaces_to_stream(dc);
+       if (update_type >= UPDATE_TYPE_FULL)
+               dc_post_update_surfaces_to_stream(dc);
 
        if (dc->current_state != context) {