update code/part13/mytftfb.c.

Signed-off-by: lishanwen <1477153217@qq.com>
This commit is contained in:
lishanwen 2024-02-29 05:10:58 +00:00 committed by Gitee
parent 42761587d7
commit 58811bc597
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -267,10 +267,7 @@ static int myfb_probe(struct spi_device *spi)
myfb->screen_size = gmem_size; myfb->screen_size = gmem_size;
myfb->fix.smem_len = gmem_size; myfb->fix.smem_len = gmem_size;
myfb->fix.smem_start = (u32)gmem_addr; myfb->fix.smem_start = virt_to_phys(gmem_addr);
memset((void *)myfb->fix.smem_start, 0, myfb->fix.smem_len); //清楚显示缓存
myfb->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB; myfb->flags = FBINFO_FLAG_DEFAULT | FBINFO_VIRTFB;