From patchwork Wed Jan 13 21:52:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 8028531 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 10A20BEEE5 for ; Wed, 13 Jan 2016 21:52:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 590E620522 for ; Wed, 13 Jan 2016 21:52:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D85BA2052F for ; Wed, 13 Jan 2016 21:52:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70DFE72022; Wed, 13 Jan 2016 13:52:21 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 41E9A6E7D7 for ; Wed, 13 Jan 2016 13:52:19 -0800 (PST) Received: by mail-oi0-f49.google.com with SMTP id k206so103394324oia.1 for ; Wed, 13 Jan 2016 13:52:19 -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=AW8XFLiNwuiqtRtzDh8Fa6ctpPP8TP4DemPDG5Z6824=; b=RUmLW8gJSNbUvq/hJ0R/FAdDVCjPzMsgJNfF3zKJlGsrBySs/q7i/00hMGW2co1Uba IeM79/ZcVGc5h3bPx8SmqlN4UCBDBLleBolaG+QM374fh2Y9I9SM8vRqzvHT1tU/WoZJ +pxMPaVS5uK/y9hHiUV9lNFnDsMxRv4vkw75PIyHvIBgSlupIYKPd4kpSoAKttYNeOdm 4+3u7Q9woOA+UJqD4BjOr6Te+F5dwS8sB38Y0jACH4R7xHzx2TuAarjyjgaeZg66ziCp DgUS1UoQ3kHbDo3DgMyOxJhG1dGCHR2b8cYt2KH7GXUTGS6aLh33SHJFtxjtdS0W44z4 ApQA== X-Gm-Message-State: ALoCoQn+QBhGG+h8fPahQ/UxIY3qwxKNoZS7fI3gvWwI7Qpoo1EWVXzKMI5X2BcBtYn9cbQV5hinCGHpwN+OpHxQEhW1BE65Nw== X-Received: by 10.202.189.7 with SMTP id n7mr404382oif.55.1452721938505; Wed, 13 Jan 2016 13:52:18 -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.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jan 2016 13:52:18 -0800 (PST) From: Rob Herring To: Dave Airlie Subject: [PATCH 1/4] drm: virtio-gpu: get the fb from the plane state for atomic updates Date: Wed, 13 Jan 2016 15:52:07 -0600 Message-Id: <1452721930-14714-2-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 When using the atomic API, plane->fb is not set when calling virtio_gpu_plane_atomic_update. Use plane->state->fb instead. Signed-off-by: Rob Herring --- drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index 4a74129..6b9ad59 100644 --- a/drivers/gpu/drm/virtio/virtgpu_plane.c +++ b/drivers/gpu/drm/virtio/virtgpu_plane.c @@ -68,8 +68,8 @@ static void virtio_gpu_plane_atomic_update(struct drm_plane *plane, struct virtio_gpu_object *bo; uint32_t handle; - if (plane->fb) { - vgfb = to_virtio_gpu_framebuffer(plane->fb); + if (plane->state->fb) { + vgfb = to_virtio_gpu_framebuffer(plane->state->fb); bo = gem_to_virtio_gpu_obj(vgfb->obj); handle = bo->hw_res_handle; } else {