@@ -1306,6 +1306,46 @@ dpu_plane_duplicate_state(struct drm_plane *plane)
1306
1306
return & pstate -> base ;
1307
1307
}
1308
1308
1309
+ static const char * const multirect_mode_name [] = {
1310
+ [DPU_SSPP_MULTIRECT_NONE ] = "none" ,
1311
+ [DPU_SSPP_MULTIRECT_PARALLEL ] = "parallel" ,
1312
+ [DPU_SSPP_MULTIRECT_TIME_MX ] = "time_mx" ,
1313
+ };
1314
+
1315
+ static const char * const multirect_index_name [] = {
1316
+ [DPU_SSPP_RECT_SOLO ] = "solo" ,
1317
+ [DPU_SSPP_RECT_0 ] = "rect_0" ,
1318
+ [DPU_SSPP_RECT_1 ] = "rect_1" ,
1319
+ };
1320
+
1321
+ static const char * dpu_get_multirect_mode (enum dpu_sspp_multirect_mode mode )
1322
+ {
1323
+ if (WARN_ON (mode >= ARRAY_SIZE (multirect_mode_name )))
1324
+ return "unknown" ;
1325
+
1326
+ return multirect_mode_name [mode ];
1327
+ }
1328
+
1329
+ static const char * dpu_get_multirect_index (enum dpu_sspp_multirect_index index )
1330
+ {
1331
+ if (WARN_ON (index >= ARRAY_SIZE (multirect_index_name )))
1332
+ return "unknown" ;
1333
+
1334
+ return multirect_index_name [index ];
1335
+ }
1336
+
1337
+ static void dpu_plane_atomic_print_state (struct drm_printer * p ,
1338
+ const struct drm_plane_state * state )
1339
+ {
1340
+ const struct dpu_plane_state * pstate = to_dpu_plane_state (state );
1341
+ const struct dpu_plane * pdpu = to_dpu_plane (state -> plane );
1342
+
1343
+ drm_printf (p , "\tstage=%d\n" , pstate -> stage );
1344
+ drm_printf (p , "\tsspp=%s\n" , pdpu -> pipe_hw -> cap -> name );
1345
+ drm_printf (p , "\tmultirect_mode=%s\n" , dpu_get_multirect_mode (pstate -> multirect_mode ));
1346
+ drm_printf (p , "\tmultirect_index=%s\n" , dpu_get_multirect_index (pstate -> multirect_index ));
1347
+ }
1348
+
1309
1349
static void dpu_plane_reset (struct drm_plane * plane )
1310
1350
{
1311
1351
struct dpu_plane * pdpu ;
@@ -1445,6 +1485,7 @@ static const struct drm_plane_funcs dpu_plane_funcs = {
1445
1485
.reset = dpu_plane_reset ,
1446
1486
.atomic_duplicate_state = dpu_plane_duplicate_state ,
1447
1487
.atomic_destroy_state = dpu_plane_destroy_state ,
1488
+ .atomic_print_state = dpu_plane_atomic_print_state ,
1448
1489
.late_register = dpu_plane_late_register ,
1449
1490
.format_mod_supported = dpu_plane_format_mod_supported ,
1450
1491
};
0 commit comments