Merge tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[cascardo/linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_mode.h
index 81bd964..7b0eff7 100644 (file)
@@ -39,6 +39,8 @@
 #include <drm/drm_plane_helper.h>
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
+#include <linux/hrtimer.h>
+#include "amdgpu_irq.h"
 
 struct amdgpu_bo;
 struct amdgpu_device;
@@ -283,7 +285,7 @@ struct amdgpu_display_funcs {
        u32 (*hpd_get_gpio_reg)(struct amdgpu_device *adev);
        /* pageflipping */
        void (*page_flip)(struct amdgpu_device *adev,
-                        int crtc_id, u64 crtc_base);
+                         int crtc_id, u64 crtc_base, bool async);
        int (*page_flip_get_scanoutpos)(struct amdgpu_device *adev, int crtc,
                                        u32 *vbl, u32 *position);
        /* display topology setup */
@@ -339,6 +341,8 @@ struct amdgpu_mode_info {
        int                     num_dig; /* number of dig blocks */
        int                     disp_priority;
        const struct amdgpu_display_funcs *funcs;
+       struct hrtimer vblank_timer;
+       enum amdgpu_interrupt_state vsync_timer_enabled;
 };
 
 #define AMDGPU_MAX_BL_LEVEL 0xFF
@@ -530,7 +534,7 @@ struct amdgpu_framebuffer {
                                ((em) == ATOM_ENCODER_MODE_DP_MST))
 
 /* Driver internal use only flags of amdgpu_get_crtc_scanoutpos() */
-#define USE_REAL_VBLANKSTART           (1 << 30)
+#define USE_REAL_VBLANKSTART           (1 << 30)
 #define GET_DISTANCE_TO_VBLANKSTART    (1 << 31)
 
 void amdgpu_link_encoder_connector(struct drm_device *dev);
@@ -587,10 +591,10 @@ int amdgpu_align_pitch(struct amdgpu_device *adev, int width, int bpp, bool tile
 void amdgpu_print_display_setup(struct drm_device *dev);
 int amdgpu_modeset_create_props(struct amdgpu_device *adev);
 int amdgpu_crtc_set_config(struct drm_mode_set *set);
-int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
-                         struct drm_framebuffer *fb,
-                         struct drm_pending_vblank_event *event,
-                         uint32_t page_flip_flags);
+int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
+                                struct drm_framebuffer *fb,
+                                struct drm_pending_vblank_event *event,
+                                uint32_t page_flip_flags, uint32_t target);
 extern const struct drm_mode_config_funcs amdgpu_mode_funcs;
 
 #endif