All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: [PATCH 3/4] drm: virtio-gpu: transfer dumb buffers to host on plane update
Date: Wed, 13 Jan 2016 15:52:09 -0600	[thread overview]
Message-ID: <1452721930-14714-4-git-send-email-robh@kernel.org> (raw)
In-Reply-To: <1452721930-14714-1-git-send-email-robh@kernel.org>

For dumb buffers, we need to transfer them to the host when updating a
plane.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index af121cf..7b6e5c5 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -72,6 +72,13 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane,
 		vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
 		bo = gem_to_virtio_gpu_obj(vgfb->obj);
 		handle = bo->hw_res_handle;
+		if (bo->dumb) {
+			virtio_gpu_cmd_transfer_to_host_2d
+				(vgdev, handle, 0,
+				 cpu_to_le32(plane->state->crtc_w),
+				 cpu_to_le32(plane->state->crtc_h),
+				 plane->state->crtc_x, plane->state->crtc_y, NULL);
+		}
 	} else {
 		handle = 0;
 	}
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-01-13 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-13 21:52 [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
2016-01-13 21:52 ` [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates Rob Herring
2016-01-13 21:52 ` [PATCH 2/4] drm: virtio-gpu: ensure plane is flushed to host on atomic update Rob Herring
2016-01-13 21:52 ` Rob Herring [this message]
2016-01-13 21:52 ` [PATCH 4/4] drm: virtio-gpu: set atomic flag Rob Herring
2016-02-01 19:58 ` [PATCH 0/4] virtio-gpu: Fixes for atomic support Rob Herring
2016-02-01 21:26   ` Dave Airlie

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=1452721930-14714-4-git-send-email-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.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.