mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
x1000: fix regression on Q1 with misaligned write pointer
Commit 1fb906500a ("x1000: LCD DMA fix") caused a regression
on the Q1 by breaking the LCD_X1000_DMA_WAIT_FOR_FRAME logic,
since the wrong branch of lcd_wait_frame() was taken.
Change-Id: Icb44335f506a1a691280de8219188526bb11468f
This commit is contained in:
parent
76c62dc429
commit
6712779ccb
1 changed files with 3 additions and 5 deletions
|
|
@ -358,10 +358,6 @@ static bool lcd_wait_frame(void)
|
||||||
|
|
||||||
static void lcd_dma_stop(DMA_Mode mode)
|
static void lcd_dma_stop(DMA_Mode mode)
|
||||||
{
|
{
|
||||||
int irq = disable_irq_save();
|
|
||||||
lcd_on = false;
|
|
||||||
restore_irq(irq);
|
|
||||||
|
|
||||||
if (mode == MODE_INIT) { // Run this only once when endinng
|
if (mode == MODE_INIT) { // Run this only once when endinng
|
||||||
#ifdef LCD_X1000_DMA_WAIT_FOR_FRAME
|
#ifdef LCD_X1000_DMA_WAIT_FOR_FRAME
|
||||||
/* Wait for frame to finish to avoid misaligning the write pointer */
|
/* Wait for frame to finish to avoid misaligning the write pointer */
|
||||||
|
|
@ -388,6 +384,8 @@ static void lcd_dma_stop(DMA_Mode mode)
|
||||||
/* Clear format conversion bit, disable vsync */
|
/* Clear format conversion bit, disable vsync */
|
||||||
jz_writef(LCD_MCFG_NEW, FMT_CONV(0), DTIMES(0));
|
jz_writef(LCD_MCFG_NEW, FMT_CONV(0), DTIMES(0));
|
||||||
jz_writef(LCD_MCTRL, NARROW_TE(0), TE_INV(0), NOT_USE_TE(1));
|
jz_writef(LCD_MCTRL, NARROW_TE(0), TE_INV(0), NOT_USE_TE(1));
|
||||||
|
|
||||||
|
lcd_on = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcd_send(uint32_t d)
|
static void lcd_send(uint32_t d)
|
||||||
|
|
@ -468,7 +466,7 @@ void lcd_enable(bool en)
|
||||||
{
|
{
|
||||||
bool state = lcd_active();
|
bool state = lcd_active();
|
||||||
if(state && !en)
|
if(state && !en)
|
||||||
#if defined(BOOTLOADER)
|
#if defined(BOOTLOADER) || defined(LCD_X1000_DMA_WAIT_FOR_FRAME)
|
||||||
lcd_dma_stop(MODE_INIT);
|
lcd_dma_stop(MODE_INIT);
|
||||||
#else
|
#else
|
||||||
lcd_dma_stop(MODE_SLEEP);
|
lcd_dma_stop(MODE_SLEEP);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue