OSDN Git Service

Merge remote-tracking branch 'airlied/drm-next' into topic/vblank-rework
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / include / drm / drmP.h
index be1160f..e748b42 100644 (file)
@@ -598,11 +598,11 @@ struct drm_master {
 /* Flags and return codes for get_vblank_timestamp() driver function. */
 #define DRM_CALLED_FROM_VBLIRQ 1
 #define DRM_VBLANKTIME_SCANOUTPOS_METHOD (1 << 0)
-#define DRM_VBLANKTIME_INVBL             (1 << 1)
+#define DRM_VBLANKTIME_IN_VBLANK         (1 << 1)
 
 /* get_scanout_position() return flags */
 #define DRM_SCANOUTPOS_VALID        (1 << 0)
-#define DRM_SCANOUTPOS_INVBL        (1 << 1)
+#define DRM_SCANOUTPOS_IN_VBLANK    (1 << 1)
 #define DRM_SCANOUTPOS_ACCURATE     (1 << 2)
 
 /**
@@ -996,6 +996,16 @@ struct drm_device {
         */
        bool vblank_disable_allowed;
 
+       /*
+        * If true, vblank interrupt will be disabled immediately when the
+        * refcount drops to zero, as opposed to via the vblank disable
+        * timer.
+        * This can be set to true it the hardware has a working vblank
+        * counter and the driver uses drm_vblank_on() and drm_vblank_off()
+        * appropriately.
+        */
+       bool vblank_disable_immediate;
+
        /* array of size num_crtcs */
        struct drm_vblank_crtc *vblank;
 
@@ -1182,8 +1192,6 @@ 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 u32 drm_get_last_vbltimestamp(struct drm_device *dev, int crtc,
-                                    struct timeval *tvblank, unsigned flags);
 extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
                                                 int crtc, int *max_error,
                                                 struct timeval *vblank_time,
@@ -1224,7 +1232,7 @@ extern void drm_put_dev(struct drm_device *dev);
 extern void drm_unplug_dev(struct drm_device *dev);
 extern unsigned int drm_debug;
 
-extern unsigned int drm_vblank_offdelay;
+extern int drm_vblank_offdelay;
 extern unsigned int drm_timestamp_precision;
 extern unsigned int drm_timestamp_monotonic;