drm/amd/display: Adjust code style
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Fri, 1 Dec 2023 13:25:41 +0000 (06:25 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2023 20:22:36 +0000 (15:22 -0500)
This simple commit adjusts part of the code style in some of the dc bios
files.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c

index 971473c69b328c0604669db3264c76cd1492d9b4..aef964f1bcbe5c2f40139999da22565463fb291a 100644 (file)
@@ -2215,22 +2215,22 @@ static enum bp_result bios_parser_get_disp_connector_caps_info(
 
        switch (bp->object_info_tbl.revision.minor) {
        case 4:
-           default:
-                   object = get_bios_object(bp, object_id);
-
-                   if (!object)
-                           return BP_RESULT_BADINPUT;
-
-                   record = get_disp_connector_caps_record(bp, object);
-                   if (!record)
-                           return BP_RESULT_NORECORD;
-
-                   info->INTERNAL_DISPLAY =
-                           (record->connectcaps & ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY) ? 1 : 0;
-                   info->INTERNAL_DISPLAY_BL =
-                           (record->connectcaps & ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY_BL) ? 1 : 0;
-                   break;
-           case 5:
+               default:
+                       object = get_bios_object(bp, object_id);
+
+                       if (!object)
+                               return BP_RESULT_BADINPUT;
+
+                       record = get_disp_connector_caps_record(bp, object);
+                       if (!record)
+                               return BP_RESULT_NORECORD;
+
+                       info->INTERNAL_DISPLAY =
+                               (record->connectcaps & ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY) ? 1 : 0;
+                       info->INTERNAL_DISPLAY_BL =
+                               (record->connectcaps & ATOM_CONNECTOR_CAP_INTERNAL_DISPLAY_BL) ? 1 : 0;
+                       break;
+       case 5:
                object_path_v3 = get_bios_object_from_path_v3(bp, object_id);
 
                if (!object_path_v3)
@@ -3330,27 +3330,28 @@ static enum bp_result get_bracket_layout_record(
                DC_LOG_DETECTION_EDID_PARSER("Invalid slot_layout_info\n");
                return BP_RESULT_BADINPUT;
        }
+
        tbl = &bp->object_info_tbl;
        v1_4 = tbl->v1_4;
        v1_5 = tbl->v1_5;
 
        result = BP_RESULT_NORECORD;
        switch (bp->object_info_tbl.revision.minor) {
-               case 4:
-               default:
-                       for (i = 0; i < v1_4->number_of_path; ++i)      {
-                               if (bracket_layout_id ==
-                                       v1_4->display_path[i].display_objid) {
-                                       result = update_slot_layout_info(dcb, i, slot_layout_info);
-                                       break;
-                               }
+       case 4:
+       default:
+               for (i = 0; i < v1_4->number_of_path; ++i) {
+                       if (bracket_layout_id == v1_4->display_path[i].display_objid) {
+                               result = update_slot_layout_info(dcb, i, slot_layout_info);
+                               break;
                        }
-                   break;
-               case 5:
-                       for (i = 0; i < v1_5->number_of_path; ++i)
-                               result = update_slot_layout_info_v2(dcb, i, slot_layout_info);
-                       break;
+               }
+               break;
+       case 5:
+               for (i = 0; i < v1_5->number_of_path; ++i)
+                       result = update_slot_layout_info_v2(dcb, i, slot_layout_info);
+               break;
        }
+
        return result;
 }
 
@@ -3359,9 +3360,7 @@ static enum bp_result bios_get_board_layout_info(
        struct board_layout_info *board_layout_info)
 {
        unsigned int i;
-
        struct bios_parser *bp;
-
        static enum bp_result record_result;
        unsigned int max_slots;
 
@@ -3371,7 +3370,6 @@ static enum bp_result bios_get_board_layout_info(
                0, 0
        };
 
-
        bp = BP_FROM_DCB(dcb);
 
        if (board_layout_info == NULL) {
@@ -3552,7 +3550,6 @@ static const struct dc_vbios_funcs vbios_funcs = {
        .bios_parser_destroy = firmware_parser_destroy,
 
        .get_board_layout_info = bios_get_board_layout_info,
-       /* TODO: use this fn in hw init?*/
        .pack_data_tables = bios_parser_pack_data_tables,
 
        .get_atom_dc_golden_table = bios_get_atom_dc_golden_table,