From patchwork Thu Jun 21 12:17:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10479801 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 3443D604D3 for ; Thu, 21 Jun 2018 12:17:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21E1229117 for ; Thu, 21 Jun 2018 12:17:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 167AC29238; Thu, 21 Jun 2018 12:17:32 +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 1245029117 for ; Thu, 21 Jun 2018 12:17:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FFBD6E814; Thu, 21 Jun 2018 12:17:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1A9526E814 for ; Thu, 21 Jun 2018 12:17:29 +0000 (UTC) Received: by mail-qk0-x241.google.com with SMTP id s190-v6so1568364qke.10 for ; Thu, 21 Jun 2018 05:17:29 -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=RAPi/zw+CYStbNLuako89kan7Z3AExBCDGD6x1wsXmPE6rWmqdrd0QPHT5lbWzoiNu 8dowP22OH+2j9j+uHpj6SiykmSxM6UUMluQ8fh3jA2yQVt9h/i/czgmtM8AgrNqfqVef GPcKpQUH199aFXfSO4Q1h7r1zjmhzI9jB5BNlVi2I53ED4Ly2pVkiBqsS4wU7mSBsY26 fnIAu9LD7vE73bNYpfLrDFNhCM0FLwzUDl3pSIhD2Zrn2svd+R4bPx+mztn/YyreCVVQ 2AWQCZHo1RAdo8xXJX6mSQ52EtboX4R/npRLAFvacVkqI1MDuBJZngPoN3xFLe4zl+ve eKwg== X-Gm-Message-State: APt69E23nu6nHq0LRVSp9qrM+ohr4S6Xby4OtXyxT1nlVOW6aw9Bffhm j6dmXHUY7y4bqj5pQxuUcEE= X-Google-Smtp-Source: ADUXVKJhOwaPlPKgL2tRw8MTkQ+Nkl1yc0k9imCWZA7gAKF0nGJsRv7nGmtmvuVtw3GYZqemnIpmtQ== X-Received: by 2002:a37:8103:: with SMTP id c3-v6mr21157888qkd.246.1529583448252; Thu, 21 Jun 2018 05:17:28 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id t6-v6sm2762834qtn.86.2018.06.21.05.17.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 05:17:27 -0700 (PDT) Date: Thu, 21 Jun 2018 09:17:25 -0300 From: Rodrigo Siqueira To: Gustavo Padovan , Sean Paul , Daniel Vetter , Haneen Mohammed Subject: [PATCH V2 5/5] drm/vkms: Add plane helper struct Message-ID: <5cd8199e93880c282643c2a09ae86ecb7bfff322.1529582970.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; }