diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2021-11-10 11:36:55 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-11-11 12:06:57 +0100 |
commit | 27bd66dd6419c45e320f34ed419cd80833de1161 (patch) | |
tree | 2c2232532feb283969f9482ec7f0c4f556b24a1e /drivers/gpu/drm/hyperv | |
parent | drm/format-helper: Export drm_fb_clip_offset() (diff) | |
download | linux-27bd66dd6419c45e320f34ed419cd80833de1161.tar.xz linux-27bd66dd6419c45e320f34ed419cd80833de1161.zip |
drm/format-helper: Rework format-helper memcpy functions
Move destination-buffer clipping from all format-helper memcpy
function into callers. Support destination-buffer pitch. Only
distinguish between system and I/O memory, but use same logic
everywhere.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211110103702.374-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/hyperv')
-rw-r--r-- | drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c index 6dd4717d3e1e..b490c3d2286e 100644 --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c @@ -23,13 +23,16 @@ static int hyperv_blit_to_vram_rect(struct drm_framebuffer *fb, struct drm_rect *rect) { struct hyperv_drm_device *hv = to_hv(fb->dev); + void __iomem *dst = hv->vram; void *vmap = map->vaddr; /* TODO: Use mapping abstraction properly */ int idx; if (!drm_dev_enter(&hv->dev, &idx)) return -ENODEV; - drm_fb_memcpy_dstclip(hv->vram, fb->pitches[0], vmap, fb, rect); + dst += drm_fb_clip_offset(fb->pitches[0], fb->format, rect); + drm_fb_memcpy_toio(dst, fb->pitches[0], vmap, fb, rect); + drm_dev_exit(idx); return 0; |