@@ -85,19 +85,17 @@ setup_pixel_info(struct screen_info *si, u32 pixels_per_scan_line,
85
85
}
86
86
}
87
87
88
- static efi_status_t setup_gop ( struct screen_info * si , efi_guid_t * proto ,
89
- unsigned long size , void * * handles )
88
+ static efi_graphics_output_protocol_t *
89
+ find_gop ( efi_guid_t * proto , unsigned long size , void * * handles )
90
90
{
91
91
efi_graphics_output_protocol_t * gop , * first_gop ;
92
92
efi_graphics_output_protocol_mode_t * mode ;
93
93
efi_graphics_output_mode_info_t * info = NULL ;
94
- efi_physical_addr_t fb_base ;
95
94
efi_status_t status ;
96
95
efi_handle_t h ;
97
96
int i ;
98
97
99
98
first_gop = NULL ;
100
- gop = NULL ;
101
99
102
100
for_each_efi_handle (h , handles , size , i ) {
103
101
efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID ;
@@ -134,12 +132,25 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
134
132
}
135
133
}
136
134
135
+ return first_gop ;
136
+ }
137
+
138
+ static efi_status_t setup_gop (struct screen_info * si , efi_guid_t * proto ,
139
+ unsigned long size , void * * handles )
140
+ {
141
+ efi_graphics_output_protocol_t * gop ;
142
+ efi_graphics_output_protocol_mode_t * mode ;
143
+ efi_graphics_output_mode_info_t * info = NULL ;
144
+ efi_physical_addr_t fb_base ;
145
+
146
+ gop = find_gop (proto , size , handles );
147
+
137
148
/* Did we find any GOPs? */
138
- if (!first_gop )
149
+ if (!gop )
139
150
return EFI_NOT_FOUND ;
140
151
141
152
/* EFI framebuffer */
142
- mode = efi_table_attr (first_gop , mode );
153
+ mode = efi_table_attr (gop , mode );
143
154
info = efi_table_attr (mode , info );
144
155
145
156
si -> orig_video_isVGA = VIDEO_TYPE_EFI ;
0 commit comments