@@ -1360,6 +1360,26 @@ bool dc_commit_state(struct dc *dc, struct dc_state *context)
13601360 return (result == DC_OK );
13611361}
13621362
1363+ static bool is_flip_pending_in_pipes (struct dc * dc , struct dc_state * context )
1364+ {
1365+ int i ;
1366+ struct pipe_ctx * pipe ;
1367+
1368+ for (i = 0 ; i < MAX_PIPES ; i ++ ) {
1369+ pipe = & context -> res_ctx .pipe_ctx [i ];
1370+
1371+ if (!pipe -> plane_state )
1372+ continue ;
1373+
1374+ /* Must set to false to start with, due to OR in update function */
1375+ pipe -> plane_state -> status .is_flip_pending = false;
1376+ dc -> hwss .update_pending_status (pipe );
1377+ if (pipe -> plane_state -> status .is_flip_pending )
1378+ return true;
1379+ }
1380+ return false;
1381+ }
1382+
13631383bool dc_post_update_surfaces_to_stream (struct dc * dc )
13641384{
13651385 int i ;
@@ -1370,6 +1390,9 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)
13701390
13711391 post_surface_trace (dc );
13721392
1393+ if (is_flip_pending_in_pipes (dc , context ))
1394+ return true;
1395+
13731396 for (i = 0 ; i < dc -> res_pool -> pipe_count ; i ++ )
13741397 if (context -> res_ctx .pipe_ctx [i ].stream == NULL ||
13751398 context -> res_ctx .pipe_ctx [i ].plane_state == NULL ) {
@@ -1703,6 +1726,9 @@ static enum surface_update_type det_surface_update(const struct dc *dc,
17031726 if (u -> coeff_reduction_factor )
17041727 update_flags -> bits .coeff_reduction_change = 1 ;
17051728
1729+ if (u -> gamut_remap_matrix )
1730+ update_flags -> bits .gamut_remap_change = 1 ;
1731+
17061732 if (u -> gamma ) {
17071733 enum surface_pixel_format format = SURFACE_PIXEL_FORMAT_GRPH_BEGIN ;
17081734
@@ -1728,7 +1754,8 @@ static enum surface_update_type det_surface_update(const struct dc *dc,
17281754
17291755 if (update_flags -> bits .input_csc_change
17301756 || update_flags -> bits .coeff_reduction_change
1731- || update_flags -> bits .gamma_change ) {
1757+ || update_flags -> bits .gamma_change
1758+ || update_flags -> bits .gamut_remap_change ) {
17321759 type = UPDATE_TYPE_FULL ;
17331760 elevate_update_type (& overall_type , type );
17341761 }
@@ -1973,6 +2000,10 @@ static void copy_surface_update_to_plane(
19732000 if (srf_update -> coeff_reduction_factor )
19742001 surface -> coeff_reduction_factor =
19752002 * srf_update -> coeff_reduction_factor ;
2003+
2004+ if (srf_update -> gamut_remap_matrix )
2005+ surface -> gamut_remap_matrix =
2006+ * srf_update -> gamut_remap_matrix ;
19762007}
19772008
19782009static void copy_stream_update_to_stream (struct dc * dc ,
0 commit comments