mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument
Use an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
28c80bfe8b
commit
85eb7c18ee
17 changed files with 43 additions and 26 deletions
|
@ -1164,7 +1164,8 @@ static void fimd_update_memory_section(Exynos4210fimdState *s, unsigned win)
|
|||
goto error_return;
|
||||
}
|
||||
|
||||
w->host_fb_addr = cpu_physical_memory_map(fb_start_addr, &fb_mapped_len, 0);
|
||||
w->host_fb_addr = cpu_physical_memory_map(fb_start_addr, &fb_mapped_len,
|
||||
false);
|
||||
if (!w->host_fb_addr) {
|
||||
DPRINT_ERROR("Failed to map window %u framebuffer\n", win);
|
||||
goto error_return;
|
||||
|
|
|
@ -218,7 +218,7 @@ static void tmu2_start(MilkymistTMU2State *s)
|
|||
glGenTextures(1, &texture);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
fb_len = 2ULL * s->regs[R_TEXHRES] * s->regs[R_TEXVRES];
|
||||
fb = cpu_physical_memory_map(s->regs[R_TEXFBUF], &fb_len, 0);
|
||||
fb = cpu_physical_memory_map(s->regs[R_TEXFBUF], &fb_len, false);
|
||||
if (fb == NULL) {
|
||||
glDeleteTextures(1, &texture);
|
||||
glXMakeContextCurrent(s->dpy, None, None, NULL);
|
||||
|
@ -262,7 +262,7 @@ static void tmu2_start(MilkymistTMU2State *s)
|
|||
|
||||
/* Read the QEMU dest. framebuffer into the OpenGL framebuffer */
|
||||
fb_len = 2ULL * s->regs[R_DSTHRES] * s->regs[R_DSTVRES];
|
||||
fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 0);
|
||||
fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, false);
|
||||
if (fb == NULL) {
|
||||
glDeleteTextures(1, &texture);
|
||||
glXMakeContextCurrent(s->dpy, None, None, NULL);
|
||||
|
@ -281,7 +281,7 @@ static void tmu2_start(MilkymistTMU2State *s)
|
|||
|
||||
/* Map the texture */
|
||||
mesh_len = MESH_MAXSIZE*MESH_MAXSIZE*sizeof(struct vertex);
|
||||
mesh = cpu_physical_memory_map(s->regs[R_VERTICESADDR], &mesh_len, 0);
|
||||
mesh = cpu_physical_memory_map(s->regs[R_VERTICESADDR], &mesh_len, false);
|
||||
if (mesh == NULL) {
|
||||
glDeleteTextures(1, &texture);
|
||||
glXMakeContextCurrent(s->dpy, None, None, NULL);
|
||||
|
@ -298,7 +298,7 @@ static void tmu2_start(MilkymistTMU2State *s)
|
|||
|
||||
/* Write back the OpenGL framebuffer to the QEMU framebuffer */
|
||||
fb_len = 2ULL * s->regs[R_DSTHRES] * s->regs[R_DSTVRES];
|
||||
fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 1);
|
||||
fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, true);
|
||||
if (fb == NULL) {
|
||||
glDeleteTextures(1, &texture);
|
||||
glXMakeContextCurrent(s->dpy, None, None, NULL);
|
||||
|
|
|
@ -632,7 +632,7 @@ static void omap_rfbi_transfer_start(struct omap_dss_s *s)
|
|||
len = s->rfbi.pixels * 2;
|
||||
|
||||
data_addr = s->dispc.l[0].addr[0];
|
||||
data = cpu_physical_memory_map(data_addr, &len, 0);
|
||||
data = cpu_physical_memory_map(data_addr, &len, false);
|
||||
if (data && len != s->rfbi.pixels * 2) {
|
||||
cpu_physical_memory_unmap(data, len, 0, 0);
|
||||
data = NULL;
|
||||
|
|
|
@ -57,7 +57,7 @@ static DisplaySurface *ramfb_create_display_surface(int width, int height,
|
|||
}
|
||||
|
||||
size = (hwaddr)linesize * height;
|
||||
data = cpu_physical_memory_map(addr, &size, 0);
|
||||
data = cpu_physical_memory_map(addr, &size, false);
|
||||
if (size != (hwaddr)linesize * height) {
|
||||
cpu_physical_memory_unmap(data, size, 0, 0);
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue