Merge pull request #2 from brain-hackers/fix-fb-dma

Framebuffer の DMA を起動直前に無効化
This commit is contained in:
Takumi Sueda 2020-11-01 03:32:01 +09:00 committed by GitHub
commit 188b1ac67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View File

@ -146,6 +146,8 @@ struct mxs_dma_chan {
struct list_head done;
};
int mxs_dma_disable(int chan);
struct mxs_dma_desc *mxs_dma_desc_alloc(void);
void mxs_dma_desc_free(struct mxs_dma_desc *);
int mxs_dma_desc_append(int channel, struct mxs_dma_desc *pdesc);

View File

@ -1,5 +1,6 @@
ifdef CONFIG_VIDEO_MXS
obj-$(CONFIG_VIDEO_MXS) += lcd.o
obj-$(CONFIG_VIDEO_MXS) += dma.o
else
obj- = __dummy__.o
endif

7
board/sharp/common/dma.c Normal file
View File

@ -0,0 +1,7 @@
#include <common.h>
#include <bootm.h>
#include <asm/mach-imx/dma.h>
void board_quiesce_devices(void) {
mxs_dma_disable(MXS_DMA_CHANNEL_AHB_APBH_LCDIF);
}

View File

@ -176,7 +176,7 @@ static int mxs_dma_enable(int channel)
* state. It is unwise to call this function if there is ANY chance the hardware
* is still processing a command.
*/
static int mxs_dma_disable(int channel)
int mxs_dma_disable(int channel)
{
struct mxs_dma_chan *pchan;
struct mxs_apbh_regs *apbh_regs =