From patchwork Tue Dec 16 16:53:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5502281 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CDC52BEEA8 for ; Tue, 16 Dec 2014 16:54:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D681A20A26 for ; Tue, 16 Dec 2014 16:54:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5DBA20A28 for ; Tue, 16 Dec 2014 16:54:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751688AbaLPQyd (ORCPT ); Tue, 16 Dec 2014 11:54:33 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:37413 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176AbaLPQyd (ORCPT ); Tue, 16 Dec 2014 11:54:33 -0500 Received: by mail-pd0-f182.google.com with SMTP id p10so14283815pdj.27 for ; Tue, 16 Dec 2014 08:54:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4hYrX9IzupaNv6DctXV+b3nbvDLN4IElm8h2ju2bsYk=; b=ZYHRrJSZ3AKkrymi4Nuk2Kw6chz//aNqjgq/j8VO7cpGYE9AUkjyQo8632JQzvjowJ 29eRVzHZEk4INhRv2tmaLVQ1saVMGq4c7539ghs7QJZlQbm+I9lO3PNoBhWRwLC9YpzP 08dPRLfpFIQDaaNRnZ91wAyFiFcvljv7+FjcBEOvXVVXHZG0kDGgcbNRmdASNS4SkO/3 n6F3wlQRzgvNk6k09741J9dGs4SGerpogr/SsHH3UfBZWX0o1HuAEhN92jYSPQT4mAcm S4ma3cb55dqK8MGJZTQg0jhMtk1vBQKiF5TkYh7QnyL7/Fii1bXLjGqFrkg4f39FSaWr Hj4Q== X-Received: by 10.68.135.197 with SMTP id pu5mr62032034pbb.105.1418748872451; Tue, 16 Dec 2014 08:54:32 -0800 (PST) Received: from localhost ([216.228.120.20]) by mx.google.com with ESMTPSA id pd9sm1480199pdb.35.2014.12.16.08.54.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 08:54:31 -0800 (PST) From: Thierry Reding To: dri-devel@lists.freedesktop.org Cc: Daniel Vetter , Inki Dae , Philipp Zabel , Gerd Hoffmann , Mark Yao , Benjamin Gaignard , linux-samsung-soc@vger.kernel.org Subject: [PATCH 13/13] drm/irq: Move some prototypes to drm_crtc.h Date: Tue, 16 Dec 2014 17:53:35 +0100 Message-Id: <1418748815-15434-13-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com> References: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding The new prototypes that deal with struct drm_crtc * directly are better located in include/drm/drm_crtc.h along with the other functions that deal with CRTCs. Signed-off-by: Thierry Reding --- include/drm/drmP.h | 17 ++++------------- include/drm/drm_crtc.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 7baef1dff5f3..4809b6f8be8b 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -1069,27 +1069,16 @@ extern int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs); extern int drm_wait_vblank(struct drm_device *dev, void *data, struct drm_file *filp); extern u32 drm_vblank_count(struct drm_device *dev, int pipe); -extern u32 drm_crtc_vblank_count(struct drm_crtc *crtc); extern u32 drm_vblank_count_and_time(struct drm_device *dev, unsigned int pipe, struct timeval *vblanktime); -extern u32 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, - struct timeval *vblanktime); extern void drm_send_vblank_event(struct drm_device *dev, unsigned int pipe, struct drm_pending_vblank_event *e); -extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc, - struct drm_pending_vblank_event *e); extern bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe); -extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc); extern int drm_vblank_get(struct drm_device *dev, unsigned int pipe); extern void drm_vblank_put(struct drm_device *dev, unsigned int pipe); -extern int drm_crtc_vblank_get(struct drm_crtc *crtc); -extern void drm_crtc_vblank_put(struct drm_crtc *crtc); extern void drm_wait_one_vblank(struct drm_device *dev, unsigned int pipe); -extern void drm_crtc_wait_one_vblank(struct drm_crtc *crtc); extern void drm_vblank_off(struct drm_device *dev, unsigned int pipe); extern void drm_vblank_on(struct drm_device *dev, unsigned int pipe); -extern void drm_crtc_vblank_off(struct drm_crtc *crtc); -extern void drm_crtc_vblank_on(struct drm_crtc *crtc); extern void drm_vblank_cleanup(struct drm_device *dev); extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, @@ -1098,8 +1087,6 @@ extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, unsigned flags, const struct drm_crtc *refcrtc, const struct drm_display_mode *mode); -extern void drm_calc_timestamping_constants(struct drm_crtc *crtc, - const struct drm_display_mode *mode); /** * drm_crtc_vblank_waitqueue - get vblank waitqueue for the CRTC @@ -1107,6 +1094,10 @@ extern void drm_calc_timestamping_constants(struct drm_crtc *crtc, * * This function returns a pointer to the vblank waitqueue for the CRTC. * Drivers can use this to implement vblank waits using wait_event() & co. + * + * XXX: Move this to include/drm/drm_crtc.h once per-CRTC VBLANK data has + * moved into struct drm_crtc. It can't currently be moved because drm_crtc.h + * doesn't know the definition of struct drm_device. */ static inline wait_queue_head_t *drm_crtc_vblank_waitqueue(struct drm_crtc *crtc) { diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index ea4dc4cc49c6..c1b639f55401 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1147,6 +1147,21 @@ extern int drm_crtc_init_with_planes(struct drm_device *dev, extern void drm_crtc_cleanup(struct drm_crtc *crtc); extern unsigned int drm_crtc_index(struct drm_crtc *crtc); +extern u32 drm_crtc_vblank_count(struct drm_crtc *crtc); +extern u32 drm_crtc_vblank_count_and_time(struct drm_crtc *crtc, + struct timeval *vblanktime); +extern void drm_crtc_send_vblank_event(struct drm_crtc *crtc, + struct drm_pending_vblank_event *e); +extern bool drm_crtc_handle_vblank(struct drm_crtc *crtc); +extern int drm_crtc_vblank_get(struct drm_crtc *crtc); +extern void drm_crtc_vblank_put(struct drm_crtc *crtc); +extern void drm_crtc_wait_one_vblank(struct drm_crtc *crtc); +extern void drm_crtc_vblank_off(struct drm_crtc *crtc); +extern void drm_crtc_vblank_on(struct drm_crtc *crtc); + +extern void drm_calc_timestamping_constants(struct drm_crtc *crtc, + const struct drm_display_mode *mode); + /** * drm_crtc_mask - find the mask of a registered CRTC * @crtc: CRTC to find mask for