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 \(Arm\)" X-Patchwork-Id: 59682 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3625961lbb; Wed, 13 Jan 2016 13:52:25 -0800 (PST) X-Received: by 10.66.160.100 with SMTP id xj4mr783404pab.14.1452721943085; Wed, 13 Jan 2016 13:52:23 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id t76si4447744pfi.226.2016.01.13.13.52.22; Wed, 13 Jan 2016 13:52:23 -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 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" 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 {