From patchwork Wed Jun 20 17:43:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10478313 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 C8DA260383 for ; Wed, 20 Jun 2018 17:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B35622872E for ; Wed, 20 Jun 2018 17:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A823228D9A; Wed, 20 Jun 2018 17:43:44 +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 59EB12872E for ; Wed, 20 Jun 2018 17:43:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57C2B6E1DE; Wed, 20 Jun 2018 17:43:43 +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 58E99894C9 for ; Wed, 20 Jun 2018 17:43:42 +0000 (UTC) Received: by mail-qt0-x242.google.com with SMTP id l10-v6so397050qtj.0 for ; Wed, 20 Jun 2018 10:43:42 -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=CL9wwmsJZsrf4bZFwOxD0sT6bArZ60yOts6LlKfQmRQEkeZJ9WSNHb/dkBCU4Uz4H4 2IFIofCh55qGuj0kmDl+63GOv4mYehaAEuEip+6ZTc/CTmlvB3NaJ7xDlNlm27c6lID7 lM7DGPLm8Lb7yJxUwMTLUThWjYJ/EVh2FOuNR8d5FtkoXaR1uLT4WJZuHNFUK7d5TPzs LwMkboca1Gm7EiW4HODgmrZt5LIja52VVoqgRecVGYExxNeYjfyLDtXJxNqdRLCkDHPT Sl0/Oimenp5+VDqz9XrVL8SD5oG0XtR/s0WAZbo+Uq25MfcGJt8bce6+5aFxj9YnoJbF i76A== X-Gm-Message-State: APt69E0H+AxZ4ICmkGQI2314Yqy3ayngSnjNrMp7r5VS5SlaFR4mFzCp 7uuX0J092+tDyfHRfzdqwlA= X-Google-Smtp-Source: ADUXVKJ3oIodNXJe6ecj6dClTGA77O2RlcjgFlIuBcFSPRIEUwO7AJkWLHyqJqmf8ndHcQb1qudVaQ== X-Received: by 2002:a0c:bd0e:: with SMTP id m14-v6mr19410708qvg.164.1529516621560; Wed, 20 Jun 2018 10:43:41 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id d42-v6sm723089qtd.88.2018.06.20.10.43.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 10:43:41 -0700 (PDT) Date: Wed, 20 Jun 2018 14:43:38 -0300 From: Rodrigo Siqueira To: Gustavo Padovan , Sean Paul , Daniel Vetter , Haneen Mohammed Subject: [PATCH 2/4] drm/vkms: Add atomic helpers functions Message-ID: <8f1a2395378e5d1be02c9fe87a910e23c6ae7afb.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_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; }