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 X-Patchwork-Id: 8028551 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B51379F8AA for ; Wed, 13 Jan 2016 21:52:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E20272052F for ; Wed, 13 Jan 2016 21:52:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 96CB720524 for ; Wed, 13 Jan 2016 21:52:25 +0000 (UTC) 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" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }