From patchwork Thu Jun 21 12:16:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10479793 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 329F860230 for ; Thu, 21 Jun 2018 12:16:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 205D329238 for ; Thu, 21 Jun 2018 12:16:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 151BB2923D; Thu, 21 Jun 2018 12:16:48 +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 CF01A29238 for ; Thu, 21 Jun 2018 12:16:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AECAA6E7D6; Thu, 21 Jun 2018 12:16:46 +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 E0CAB6E7D6 for ; Thu, 21 Jun 2018 12:16:44 +0000 (UTC) Received: by mail-qt0-x242.google.com with SMTP id z6-v6so2584979qti.2 for ; Thu, 21 Jun 2018 05:16:44 -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=BXRfD+k33pJHwxaBzE49JY3gqqEbxA8/OlCEJQpSngc=; b=M990bcFE/lxaWEpnrz+0p31ERgvYIT7BWby6WHMARfC/JQn3bmjaxasgx+SP6JMRP7 kRViD8485SKdW4tdqCuUwyGdjLWbDLd6I64lGwmf5edTPIU2oxZ846mQs7u+HCzr7SHu hVDCWdxne2nzgkRF+/AllZ+M4aw9AtZVH69OZZXege+BXqs+dsZL7fOLCGtNYEhJrV9S HgPi97slM/nzS/taocqU4j4X/m7BT00QRwT/Y02DTvIX1+nPi3X/nlMaSlVFAuPmFUBa JGg8HTgz4u9P8FOeWMwBqeYhN8vXTW7/Mo6PlER36VIP9nz1rh1yBfLts08TYj7MgpPI 7oLA== X-Gm-Message-State: APt69E1Er4gRmYv1SloIBXgR6x1ItDyblZG+6+tR2dmpy2JB7Fgg5YcR lGfpw611KG8cM8i5rW2dka8= X-Google-Smtp-Source: ADUXVKJ7am1qAwtIIWp/nz4UQpg13MN6WdwaLz6e0XAQgbXakC2gK7t1xUWQLTcSjbzEgcKhvNT3og== X-Received: by 2002:ac8:2759:: with SMTP id h25-v6mr23026078qth.259.1529583404098; Thu, 21 Jun 2018 05:16:44 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id j13-v6sm4485868qtj.23.2018.06.21.05.16.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 05:16:43 -0700 (PDT) Date: Thu, 21 Jun 2018 09:16:41 -0300 From: Rodrigo Siqueira To: Gustavo Padovan , Sean Paul , Daniel Vetter , Haneen Mohammed Subject: [PATCH V2 3/5] drm/vkms: Add atomic helpers functions Message-ID: <8f1a2395378e5d1be02c9fe87a910e23c6ae7afb.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_crtc_helper_funcs with simple atomic_check and atomic_enable functions. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_crtc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index bf76cd39ece7..84cc05506b09 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -19,6 +19,22 @@ static const struct drm_crtc_funcs vkms_crtc_funcs = { .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, }; +static int vkms_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_crtc_state *state) +{ + return 0; +} + +static void vkms_crtc_atomic_enable(struct drm_crtc *crtc, + struct drm_crtc_state *old_state) +{ +} + +static const struct drm_crtc_helper_funcs vkms_crtc_helper_funcs = { + .atomic_check = vkms_crtc_atomic_check, + .atomic_enable = vkms_crtc_atomic_enable, +}; + int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, struct drm_plane *primary, struct drm_plane *cursor) { @@ -31,5 +47,7 @@ int vkms_crtc_init(struct drm_device *dev, struct drm_crtc *crtc, return ret; } + drm_crtc_helper_add(crtc, &vkms_crtc_helper_funcs); + return ret; }