All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, airlied@linux.ie, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	noralf@tronnes.org, drawat.floss@gmail.com, kraxel@redhat.com,
	hdegoede@redhat.com, sean@poorly.run,
	rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com,
	sam@ravnborg.org
Cc: dri-devel@lists.freedesktop.org, linux-hyperv@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 04/11] drm/hyperv: Use offset-adjusted shadow-plane mappings
Date: Tue,  3 Aug 2021 14:59:21 +0200	[thread overview]
Message-ID: <20210803125928.27780-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20210803125928.27780-1-tzimmermann@suse.de>

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: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
index 3aaee4730ec6..6dd4717d3e1e 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
@@ -105,7 +105,7 @@ static void hyperv_pipe_enable(struct drm_simple_display_pipe *pipe,
 				crtc_state->mode.hdisplay,
 				crtc_state->mode.vdisplay,
 				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,
@@ -133,7 +133,7 @@ static void hyperv_pipe_update(struct drm_simple_display_pipe *pipe,
 	struct drm_rect 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);
 	}
 }
-- 
2.32.0


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, airlied@linux.ie, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	noralf@tronnes.org, drawat.floss@gmail.com, kraxel@redhat.com,
	hdegoede@redhat.com, sean@poorly.run,
	rodrigosiqueiramelo@gmail.com, melissa.srw@gmail.com,
	sam@ravnborg.org
Cc: linux-hyperv@vger.kernel.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: [PATCH 04/11] drm/hyperv: Use offset-adjusted shadow-plane mappings
Date: Tue,  3 Aug 2021 14:59:21 +0200	[thread overview]
Message-ID: <20210803125928.27780-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20210803125928.27780-1-tzimmermann@suse.de>

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: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/hyperv/hyperv_drm_modeset.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
index 3aaee4730ec6..6dd4717d3e1e 100644
--- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
+++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
@@ -105,7 +105,7 @@ static void hyperv_pipe_enable(struct drm_simple_display_pipe *pipe,
 				crtc_state->mode.hdisplay,
 				crtc_state->mode.vdisplay,
 				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,
@@ -133,7 +133,7 @@ static void hyperv_pipe_update(struct drm_simple_display_pipe *pipe,
 	struct drm_rect 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);
 	}
 }
-- 
2.32.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2021-08-03 12:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 12:59 [PATCH 00/11] Provide offset-adjusted framebuffer mappings Thomas Zimmermann
2021-08-03 12:59 ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 01/11] drm/gem: Provide offset-adjusted framebuffer BO mappings Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 16:13   ` Sam Ravnborg
2021-08-03 16:13     ` Sam Ravnborg
2021-08-03 12:59 ` [PATCH 02/11] drm/ast: Use offset-adjusted shadow-plane mappings Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 03/11] drm/gud: Get offset-adjusted mapping from drm_gem_fb_vmap() Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` Thomas Zimmermann [this message]
2021-08-03 12:59   ` [PATCH 04/11] drm/hyperv: Use offset-adjusted shadow-plane mappings Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 05/11] drm/mgag200: " Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 06/11] drm/cirrus: " Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 07/11] drm/gm12u320: " Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 08/11] drm/simpledrm: Use offset-adjusted shadow-plane mapping Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 09/11] drm/udl: " Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 10/11] drm/vbox: Use offset-adjusted shadow-plane mappings Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 12:59 ` [PATCH 11/11] drm/vkms: Use offset-adjusted shadow-plane mappings and output Thomas Zimmermann
2021-08-03 12:59   ` Thomas Zimmermann
2021-08-03 16:21 ` [PATCH 00/11] Provide offset-adjusted framebuffer mappings Sam Ravnborg
2021-08-03 16:21   ` Sam Ravnborg
2021-08-04 18:22   ` Thomas Zimmermann
2021-08-04 18:22     ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803125928.27780-5-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=drawat.floss@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=melissa.srw@gmail.com \
    --cc=mripard@kernel.org \
    --cc=noralf@tronnes.org \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.