From patchwork Wed Jun 20 17:44:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10478325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4CC54601D7 for ; Wed, 20 Jun 2018 17:44:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3848228DFB for ; Wed, 20 Jun 2018 17:44:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C4FD28E15; Wed, 20 Jun 2018 17:44:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3613228DFB for ; Wed, 20 Jun 2018 17:44:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5DA936E622; Wed, 20 Jun 2018 17:44:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4C336E622 for ; Wed, 20 Jun 2018 17:44:13 +0000 (UTC) Received: by mail-qt0-x242.google.com with SMTP id a18-v6so382128qtj.4 for ; Wed, 20 Jun 2018 10:44:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lVNjZl3qq2beGWZWdeiKGW5w02B21gJruhwcwq5AFPs=; b=WYPVc9LB8mO3XYHbU2vo9YM0nM+zIeN6/r9csY1PmDwSsZZ5ANsSdRuY+1mcediYLH ewI9NLJtwAG1fN9dAgoJSI/Mig/ifkm00OI2EhxNAn9FmI7t+xysMx15cNCNa8ohPshA BHLaLwXoWrD5Zpl2PTmyHyjPD4iuWJGUfnCvlORajSmz8mqRmWXMnAk8r623TZVgW9UE E//CAHhRFyXG6QqBf4ZNtsexyNWTWGQ9dWLyG+UY6WB4EbEzk6+lrcQMvGB6lY084X6R OVOChVQvCwNOzu57kPMBQuWHVFK4k8UmW/0Ad0HO2Ww6szX/NBJ5GvCZ6SkQZiV5tfNw EfnA== X-Gm-Message-State: APt69E02SCF02RnY9R/pImJfrqglVHI8Av+OyqNdOgx1daLJaeLhuXwO lZF6LIPlzDo8skJZv+QGDPw= X-Google-Smtp-Source: ADUXVKKvTqMHxjDN4rjusORl7xuo38gwDOe4yHYY3LYbm0/+ITmVfYlfY6crzcok3UXMWTeY0BwMLA== X-Received: by 2002:a0c:946a:: with SMTP id i39-v6mr19387052qvi.139.1529516652922; Wed, 20 Jun 2018 10:44:12 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id l9-v6sm1720543qtp.25.2018.06.20.10.44.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 10:44:12 -0700 (PDT) Date: Wed, 20 Jun 2018 14:44:09 -0300 From: Rodrigo Siqueira To: Gustavo Padovan , Sean Paul , Daniel Vetter , Haneen Mohammed Subject: [PATCH 4/4] drm/vkms: Add plane helper struct Message-ID: <5cd8199e93880c282643c2a09ae86ecb7bfff322.1529515748.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180512 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the struct drm_plane_helper_funcs and the required atomic hooks. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_plane.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index 2c25b1d6ab5b..f7f63143f6d0 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -19,6 +19,22 @@ static const struct drm_plane_funcs vkms_plane_funcs = { .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, }; +static int vkms_plane_atomic_check(struct drm_plane *plane, + struct drm_plane_state *state) +{ + return 0; +} + +static void vkms_primary_plane_update(struct drm_plane *plane, + struct drm_plane_state *old_state) +{ +} + +static const struct drm_plane_helper_funcs vkms_primary_helper_funcs = { + .atomic_check = vkms_plane_atomic_check, + .atomic_update = vkms_primary_plane_update, +}; + struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev) { struct drm_device *dev = &vkmsdev->drm; @@ -42,5 +58,7 @@ struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev) return ERR_PTR(ret); } + drm_plane_helper_add(plane, &vkms_primary_helper_funcs); + return plane; }