|
@@ -37,6 +37,20 @@
|
|
|
#define MAX_FB_BUFFER 4
|
|
|
#define DEFAULT_ZPOS -1
|
|
|
|
|
|
+#define _wait_for(COND, MS) ({ \
|
|
|
+ unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
|
|
|
+ int ret__ = 0; \
|
|
|
+ while (!(COND)) { \
|
|
|
+ if (time_after(jiffies, timeout__)) { \
|
|
|
+ ret__ = -ETIMEDOUT; \
|
|
|
+ break; \
|
|
|
+ } \
|
|
|
+ } \
|
|
|
+ ret__; \
|
|
|
+})
|
|
|
+
|
|
|
+#define wait_for(COND, MS) _wait_for(COND, MS)
|
|
|
+
|
|
|
struct drm_device;
|
|
|
struct exynos_drm_overlay;
|
|
|
struct drm_connector;
|
|
@@ -61,6 +75,8 @@ enum exynos_drm_output_type {
|
|
|
* @commit: apply hardware specific overlay data to registers.
|
|
|
* @enable: enable hardware specific overlay.
|
|
|
* @disable: disable hardware specific overlay.
|
|
|
+ * @wait_for_vblank: wait for vblank interrupt to make sure that
|
|
|
+ * hardware overlay is disabled.
|
|
|
*/
|
|
|
struct exynos_drm_overlay_ops {
|
|
|
void (*mode_set)(struct device *subdrv_dev,
|
|
@@ -68,6 +84,7 @@ struct exynos_drm_overlay_ops {
|
|
|
void (*commit)(struct device *subdrv_dev, int zpos);
|
|
|
void (*enable)(struct device *subdrv_dev, int zpos);
|
|
|
void (*disable)(struct device *subdrv_dev, int zpos);
|
|
|
+ void (*wait_for_vblank)(struct device *subdrv_dev);
|
|
|
};
|
|
|
|
|
|
/*
|