Commit 70594e8b authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/hyperv: Use offset-adjusted shadow-plane mappings

For framebuffers with non-zero offset fields, shadow-plane helpers
provide a pointer to the first byte of the contained data. Use it in
hyperv.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210803125928.27780-5-tzimmermann@suse.de
parent 6d463aaf
...@@ -105,7 +105,7 @@ static void hyperv_pipe_enable(struct drm_simple_display_pipe *pipe, ...@@ -105,7 +105,7 @@ static void hyperv_pipe_enable(struct drm_simple_display_pipe *pipe,
crtc_state->mode.hdisplay, crtc_state->mode.hdisplay,
crtc_state->mode.vdisplay, crtc_state->mode.vdisplay,
plane_state->fb->pitches[0]); plane_state->fb->pitches[0]);
hyperv_blit_to_vram_fullscreen(plane_state->fb, &shadow_plane_state->map[0]); hyperv_blit_to_vram_fullscreen(plane_state->fb, &shadow_plane_state->data[0]);
} }
static int hyperv_pipe_check(struct drm_simple_display_pipe *pipe, static int hyperv_pipe_check(struct drm_simple_display_pipe *pipe,
...@@ -133,7 +133,7 @@ static void hyperv_pipe_update(struct drm_simple_display_pipe *pipe, ...@@ -133,7 +133,7 @@ static void hyperv_pipe_update(struct drm_simple_display_pipe *pipe,
struct drm_rect rect; struct drm_rect rect;
if (drm_atomic_helper_damage_merged(old_state, state, &rect)) { if (drm_atomic_helper_damage_merged(old_state, state, &rect)) {
hyperv_blit_to_vram_rect(state->fb, &shadow_plane_state->map[0], &rect); hyperv_blit_to_vram_rect(state->fb, &shadow_plane_state->data[0], &rect);
hyperv_update_dirt(hv->hdev, &rect); hyperv_update_dirt(hv->hdev, &rect);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment