mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +00:00
display: Add fifo draining before requesting info
In case we got loaded from bad chainloader. Fixes issues with incorrect display ID when fifo has left overs.
This commit is contained in:
parent
d0d943c9c3
commit
e4bc5c41ce
1 changed files with 4 additions and 1 deletions
|
@ -339,9 +339,12 @@ void display_init()
|
|||
|
||||
#if 0
|
||||
// Get Display ID.
|
||||
_display_id = 0xCCCCCC;
|
||||
_display_id = 0xCCCCCC; // Set initial value. 4th byte cleared.
|
||||
display_dsi_read(MIPI_DCS_GET_DISPLAY_ID, 3, &_display_id, DSI_VIDEO_DISABLED);
|
||||
#else
|
||||
// Drain RX FIFO.
|
||||
_display_dsi_read_rx_fifo(NULL);
|
||||
|
||||
// Set reply size.
|
||||
_display_dsi_send_cmd(MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, 3, 0);
|
||||
_display_dsi_wait(250000, _DSIREG(DSI_TRIGGER), DSI_TRIGGER_HOST | DSI_TRIGGER_VIDEO);
|
||||
|
|
Loading…
Reference in a new issue