Commit 813e34ad authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Bartlomiej Zolnierkiewicz
Browse files

jz4740_fb: fix DMA API abuse



Virtual addresses return from dma(m)_alloc_coherent are opaque in what
backs then, and drivers must not poke into them.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
[b.zolnierkie: patch description fixup]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 56fc5f48
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -457,7 +457,6 @@ static int jzfb_alloc_devmem(struct jzfb *jzfb)
{
	int max_videosize = 0;
	struct fb_videomode *mode = jzfb->pdata->modes;
	void *page;
	int i;

	for (i = 0; i < jzfb->pdata->num_modes; ++mode, ++i) {
@@ -482,12 +481,6 @@ static int jzfb_alloc_devmem(struct jzfb *jzfb)
	if (!jzfb->vidmem)
		goto err_free_framedesc;

	for (page = jzfb->vidmem;
		 page < jzfb->vidmem + PAGE_ALIGN(jzfb->vidmem_size);
		 page += PAGE_SIZE) {
		SetPageReserved(virt_to_page(page));
	}

	jzfb->framedesc->next = jzfb->framedesc_phys;
	jzfb->framedesc->addr = jzfb->vidmem_phys;
	jzfb->framedesc->id = 0xdeafbead;