From patchwork Wed Jan 13 21:52:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 59683 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3625999lbb; Wed, 13 Jan 2016 13:52:30 -0800 (PST) X-Received: by 10.66.100.135 with SMTP id ey7mr744229pab.108.1452721945867; Wed, 13 Jan 2016 13:52:25 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id l29si4502675pfj.78.2016.01.13.13.52.25; Wed, 13 Jan 2016 13:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A92417200C; Wed, 13 Jan 2016 13:52:24 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 449797200C for ; Wed, 13 Jan 2016 13:52:23 -0800 (PST) Received: by mail-ob0-f171.google.com with SMTP id py5so99316012obc.2 for ; Wed, 13 Jan 2016 13:52:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1C7lNiehkaRd9AGZACwQwC+7KTVpdQYqcGAkhyLILmw=; b=WyGHH4AJOUs0o0sA1rok2LnAUD3+zEuP1qydIpJ1L6uwSq7N2fEhKwcFbHTMIa5UGi eQQPlGlqxjSasQo9UDvMSALm5YQlUlondNV5TcrlIWunIPIfBm72xLnmbWX5PVwpPHnb V3C4Si90+hEw+BTtndEy/gAi9cEI2PeXThthvn2ftSF73KdDrkcRgXhlhSi2KDqQH1pT dk8UVIaPq/zk+MFe2Lc2fnixoh/lyP7j0npKXF3MbdjNdZ7OihWvt0pG2yb5s6fJkm+b gTpgEu6WAFcLqPwegHCl0rvaiQklh7HhvyYjYsWwvEoELz8q/HWbAq1AmTojQkott0Zt eYtw== X-Gm-Message-State: ALoCoQl68aq8R/nQg7zO8kfc1eA23zg8LqpFol1qSl/3GP1oUcIpEa/ZDJv5olmiAi3LcA8WrkFJ4m6zOCCLk/TQypxU6pt9vg== X-Received: by 10.182.131.194 with SMTP id oo2mr435622obb.84.1452721942605; Wed, 13 Jan 2016 13:52:22 -0800 (PST) Received: from rob-hp-laptop.herring.priv (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by smtp.googlemail.com with ESMTPSA id kf2sm1650334oeb.11.2016.01.13.13.52.19 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jan 2016 13:52:22 -0800 (PST) From: Rob Herring To: Dave Airlie Subject: [PATCH 3/4] drm: virtio-gpu: transfer dumb buffers to host on plane update Date: Wed, 13 Jan 2016 15:52:09 -0600 Message-Id: <1452721930-14714-4-git-send-email-robh@kernel.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1452721930-14714-1-git-send-email-robh@kernel.org> References: <1452721930-14714-1-git-send-email-robh@kernel.org> Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For dumb buffers, we need to transfer them to the host when updating a plane. Signed-off-by: Rob Herring --- 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; }