From: Thierry Reding <thierry.reding@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-samsung-soc@vger.kernel.org,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Mark Yao <mark.yao@rock-chips.com>
Subject: [PATCH 13/13] drm/irq: Move some prototypes to drm_crtc.h
Date: Tue, 16 Dec 2014 17:53:35 +0100 [thread overview]
Message-ID: <1418748815-15434-13-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1418748815-15434-1-git-send-email-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
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 <treding@nvidia.com>
---
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
--
2.1.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2014-12-16 16:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 16:53 [PATCH 01/13] drm/irq: Remove negative CRTC index special-case Thierry Reding
2014-12-16 16:53 ` [PATCH 02/13] drm/bochs: Store correct CRTC index in events Thierry Reding
2014-12-16 16:53 ` [PATCH 03/13] drm/exynos: " Thierry Reding
2014-12-16 16:53 ` [PATCH 04/13] drm/imx: Make pipe number unsigned Thierry Reding
2014-12-16 17:30 ` Philipp Zabel
2014-12-16 16:53 ` [PATCH 05/13] drm/imx: Store correct CRTC index in events Thierry Reding
2014-12-16 17:36 ` Philipp Zabel
2014-12-16 16:53 ` [PATCH 06/13] drm/rockchip: " Thierry Reding
2014-12-16 16:53 ` [PATCH 07/13] drm/sti: " Thierry Reding
2014-12-16 16:53 ` [PATCH 08/13] drm/irq: Check for valid VBLANK before dereference Thierry Reding
2014-12-17 3:11 ` Michel Dänzer
2014-12-16 16:53 ` [PATCH 09/13] drm/irq: Make pipe unsigned and name consistent Thierry Reding
2014-12-16 17:53 ` Daniel Vetter
2014-12-16 16:53 ` [PATCH 10/13] drm/irq: Add drm_crtc_vblank_count_and_time() Thierry Reding
2014-12-16 16:53 ` [PATCH 11/13] drm/irq: Document return values more consistently Thierry Reding
2014-12-16 18:02 ` Daniel Vetter
2014-12-16 16:53 ` [PATCH 12/13] drm/irq: Expel legacy API Thierry Reding
2014-12-16 17:59 ` Daniel Vetter
2014-12-16 18:00 ` Daniel Vetter
2014-12-16 16:53 ` Thierry Reding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1418748815-15434-13-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=benjamin.gaignard@linaro.org \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mark.yao@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox