Skip to content

Commit

Permalink
target: msm8916: init adv7533 for all resolutions
Browse files Browse the repository at this point in the history
Make default resolution as 1080p and move the initialization part to
a common place so that all the resolution are able to initialize the
dsi to hdmi bridge chip ADV7533.

Change-Id: I99a9ac14f90aa093c9cab2279df56d6efb7c90c5
(cherry picked from commit 1a574ad)
  • Loading branch information
Ajay Singh Parmar authored and stephan-gh committed Jan 1, 2022
1 parent c2330b7 commit bdfbcb7
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions target/msm8916/oem_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,20 +617,8 @@ int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
}
break;
case HW_PLATFORM_SBC:
if (platform_is_apq8016()) {
/* Set Switch GPIO to DSI2HDMI mode */
target_set_switch_gpio(1);
/* ADV7533 DSI to HDMI Bridge Chip Connected */
mipi_dsi_i2c_device_init();
/* Read ADV Chip ID */
if (!mipi_dsi_i2c_read_byte(ADV7533_MAIN, 0x00, &rev)) {
dprintf(INFO, "ADV7533 Rev ID: 0x%x\n",rev);
} else {
dprintf(CRITICAL, "error reading Rev ID from bridge chip\n");
return PANEL_TYPE_UNKNOWN;
}
panel_id = ADV7533_720P_VIDEO_PANEL;
}
if (platform_is_apq8016())
panel_id = ADV7533_1080P_VIDEO_PANEL;
break;
default:
dprintf(CRITICAL, "Display not enabled for %d HW type\n",
Expand All @@ -639,6 +627,20 @@ int oem_panel_select(const char *panel_name, struct panel_struct *panelstruct,
}

panel_init:
if (platform_is_apq8016() && (hw_id == HW_PLATFORM_SBC)) {
/* Set Switch GPIO to DSI2HDMI mode */
target_set_switch_gpio(1);
/* ADV7533 DSI to HDMI Bridge Chip Connected */
mipi_dsi_i2c_device_init();
/* Read ADV Chip ID */
if (!mipi_dsi_i2c_read_byte(ADV7533_MAIN, 0x00, &rev)) {
dprintf(INFO, "ADV7533 Rev ID: 0x%x\n",rev);
} else {
dprintf(CRITICAL, "error reading Rev ID from bridge chip\n");
return PANEL_TYPE_UNKNOWN;
}
}

/*
* Update all data structures after 'panel_init' label. Only panel
* selection is supposed to happen before that.
Expand Down

0 comments on commit bdfbcb7

Please sign in to comment.