Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 862d3f3e authored by LuK1337's avatar LuK1337 Committed by hmtheboy154
Browse files

oplus_dc_diming: Improve dimlayer_bl_en getter

Now it returns proper values for v1/v3 oplus_dimlayer_bl_enable;

Change-Id: Ie14c39bb15dec633e454194e5c5df812d2ce114f
parent 82592774
Loading
Loading
Loading
Loading
+1098 −1084
Original line number Diff line number Diff line
@@ -1075,9 +1075,23 @@ int oplus_display_panel_set_dimlayer_enable(void *data)

int oplus_display_panel_get_dimlayer_enable(void *data)
{
	struct dsi_display *display = NULL;
	uint32_t *dimlayer_bl_enable = data;

	display = get_main_display();
	if (!display)
		return -EINVAL;

	if (display->name) {
		if (!strcmp(display->panel->oplus_priv.vendor_name, "ANA6706"))
			(*dimlayer_bl_enable) = oplus_dimlayer_bl_enable;
		else if (!strcmp(display->panel->name, "boe nt37800 amoled fhd+ panel with DSC"))
			(*dimlayer_bl_enable) = oplus_dimlayer_bl_enable_v3;
		else
			(*dimlayer_bl_enable) = oplus_dimlayer_bl_enable_v2;
	} else {
		(*dimlayer_bl_enable) = oplus_dimlayer_bl_enable_v2;
	}

	return 0;
}