We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46642a7 commit 6b86a12Copy full SHA for 6b86a12
drivers/gpu/drm/bochs/bochs_kms.c
@@ -29,16 +29,21 @@ static void bochs_plane_update(struct bochs_device *bochs,
29
struct drm_plane_state *state)
30
{
31
struct drm_gem_vram_object *gbo;
32
+ s64 gpu_addr;
33
34
if (!state->fb || !bochs->stride)
35
return;
36
37
gbo = drm_gem_vram_of_gem(state->fb->obj[0]);
38
+ gpu_addr = drm_gem_vram_offset(gbo);
39
+ if (WARN_ON_ONCE(gpu_addr < 0))
40
+ return; /* Bug: we didn't pin the BO to VRAM in prepare_fb. */
41
+
42
bochs_hw_setbase(bochs,
43
state->crtc_x,
44
state->crtc_y,
45
state->fb->pitches[0],
- state->fb->offsets[0] + gbo->bo.offset);
46
+ state->fb->offsets[0] + gpu_addr);
47
bochs_hw_setformat(bochs, state->fb->format);
48
}
49
0 commit comments