Skip to content

Commit 5a04a33

Browse files
committed
vendorcode/dasharo/options.c: handle DGPUEnabled as uint8
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
1 parent 6e96acd commit 5a04a33

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/vendorcode/dasharo/options.c

+10-5
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,18 @@ uint8_t cse_get_me_disable_mode(void)
284284

285285
bool dasharo_is_dgpu_enabled(void)
286286
{
287-
bool var = true;
288-
289-
if (CONFIG(DRIVERS_EFI_VARIABLE_STORE)) {
290-
read_bool_var("DGPUEnabled", &var);
287+
bool dgpu_enabled = true;
288+
289+
/* Functionally, it is a 0 or 1 value. For the desired UI however, the VFR
290+
* requires it to be handled as a uint8.
291+
*/
292+
if (CONFIG(DRIVERS_EFI_VARIABLE_STORE)){
293+
uint8_t tmp = 0;
294+
read_u8_var("DGPUEnabled", &tmp);
295+
dgpu_enabled = tmp != 0;
291296
}
292297

293-
return var;
298+
return dgpu_enabled;
294299
}
295300

296301
#else

0 commit comments

Comments
 (0)