Merge tag 'drm-intel-next-fixes-2020-04-02' of git://anongit.freedesktop.org/drm...
[linux-2.6-microblaze.git] / drivers / gpu / drm / msm / msm_gem.h
index 9e0953c..30584ea 100644 (file)
@@ -157,7 +157,17 @@ struct msm_gem_submit {
                        uint32_t handle;
                };
                uint64_t iova;
-       } bos[0];
+       } bos[];
 };
 
+/* helper to determine of a buffer in submit should be dumped, used for both
+ * devcoredump and debugfs cmdstream dumping:
+ */
+static inline bool
+should_dump(struct msm_gem_submit *submit, int idx)
+{
+       extern bool rd_full;
+       return rd_full || (submit->bos[idx].flags & MSM_SUBMIT_BO_DUMP);
+}
+
 #endif /* __MSM_GEM_H__ */