drm/amd/display: Update the register GRPH_SWAP_CNTL if surface pixel format changed.
authorDuke Du <Duke.Du@amd.com>
Thu, 4 Jan 2018 01:32:06 +0000 (09:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:18:33 +0000 (14:18 -0500)
Signed-off-by: Duke Du <Duke.Du@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

index 990f891a46f6961632cfb8f1e6b647660f06d156..eddfc43963675c4c495e2d2deff37eb654f03ba8 100644 (file)
@@ -1066,6 +1066,9 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
        if (u->plane_info->rotation != u->surface->rotation)
                update_flags->bits.rotation_change = 1;
 
+       if (u->plane_info->format != u->surface->format)
+               update_flags->bits.pixel_format_change = 1;
+
        if (u->plane_info->stereo_format != u->surface->stereo_format)
                update_flags->bits.stereo_format_change = 1;
 
index 41d095318a5cfb13f0c1deed4e0de7a10771e736..836bc3aea2917fce6882e22fe032c7c5e4e9d0f1 100644 (file)
@@ -400,6 +400,7 @@ union surface_update_flags {
                uint32_t in_transfer_func_change:1;
                uint32_t input_csc_change:1;
                uint32_t output_tf_change:1;
+               uint32_t pixel_format_change:1;
 
                /* Full updates */
                uint32_t new_plane:1;
index 7e99d788f0e05b349f445b026b81e3c4feb945f2..c6a4fa2f17c2805e5452028efcebaef3de7b4a0e 100644 (file)
@@ -1725,6 +1725,7 @@ static void update_dchubp_dpp(
        }
 
        if (plane_state->update_flags.bits.full_update ||
+               plane_state->update_flags.bits.pixel_format_change ||
                plane_state->update_flags.bits.horizontal_mirror_change ||
                plane_state->update_flags.bits.rotation_change ||
                plane_state->update_flags.bits.swizzle_change ||