File tree Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Expand file tree Collapse file tree 1 file changed +6
-17
lines changed Original file line number Diff line number Diff line change @@ -5333,27 +5333,16 @@ static int add_displayid_detailed_1_modes(struct drm_connector *connector,
5333
5333
static int add_displayid_detailed_modes (struct drm_connector * connector ,
5334
5334
struct edid * edid )
5335
5335
{
5336
- const u8 * displayid ;
5337
- int length , idx ;
5338
5336
const struct displayid_block * block ;
5337
+ struct displayid_iter iter ;
5339
5338
int num_modes = 0 ;
5340
- int ext_index = 0 ;
5341
-
5342
- for (;;) {
5343
- displayid = drm_find_displayid_extension (edid , & length , & idx ,
5344
- & ext_index );
5345
- if (!displayid )
5346
- break ;
5347
5339
5348
- idx += sizeof (struct displayid_hdr );
5349
- for_each_displayid_db (displayid , block , idx , length ) {
5350
- switch (block -> tag ) {
5351
- case DATA_BLOCK_TYPE_1_DETAILED_TIMING :
5352
- num_modes += add_displayid_detailed_1_modes (connector , block );
5353
- break ;
5354
- }
5355
- }
5340
+ displayid_iter_edid_begin (edid , & iter );
5341
+ displayid_iter_for_each (block , & iter ) {
5342
+ if (block -> tag == DATA_BLOCK_TYPE_1_DETAILED_TIMING )
5343
+ num_modes += add_displayid_detailed_1_modes (connector , block );
5356
5344
}
5345
+ displayid_iter_end (& iter );
5357
5346
5358
5347
return num_modes ;
5359
5348
}
You can’t perform that action at this time.
0 commit comments