CHROMIUM: drm/rockchip: add GEM CPU acquire/release ioctls
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / rockchip / rockchip_drm_drv.h
index 2677b95d81d4fb2a32aaa6b3f6eb7a22851ae15b..6e0886944275e66d94ee7dcb21c2c819283427a9 100644 (file)
@@ -50,11 +50,22 @@ struct rockchip_atomic_commit {
        struct mutex lock;
 };
 
+/*
+ * Rockchip drm_file private structure.
+ *
+ * @gem_cpu_acquire_list: list of GEM objects we hold acquires on
+ */
+struct rockchip_drm_file_private {
+       struct list_head                gem_cpu_acquire_list;
+};
+
 /*
  * Rockchip drm private structure.
  *
  * @crtc: array of enabled CRTCs, used to map from "pipe" to drm_crtc.
  * @num_pipe: number of pipes for this device.
+ * @cpu_fence_context: fence context used for CPU acquire/release
+ * @cpu_fence_seqno: fence sequence number
  */
 struct rockchip_drm_private {
        struct drm_fb_helper fbdev_helper;
@@ -63,6 +74,10 @@ struct rockchip_drm_private {
 
        struct rockchip_atomic_commit commit;
        struct iommu_domain *domain;
+#ifdef CONFIG_DRM_DMA_SYNC
+       unsigned int cpu_fence_context;
+       atomic_t cpu_fence_seqno;
+#endif
 };
 
 void rockchip_drm_atomic_work(struct work_struct *work);