@@ -773,14 +773,30 @@ err:
static void guc_move_to_next_buf(struct intel_guc *guc)
{
+#ifdef CONFIG_DEBUG_FS
+ /* nothing to do here, all managed by relay */
return;
+#endif
}
static void* guc_get_write_buffer(struct intel_guc *guc)
{
void *base_addr = NULL;
+#ifdef CONFIG_DEBUG_FS
+ if (!guc->log_relay_chan)
+ return NULL;
+
+ /* Get the pointer to relay sub buffer and copy data into it ourselves.
+ * Could have used the relay_write() but we anyways need the pointer
+ * to update the state data in first page so to be consistent directly
+ * write to all pages of sub buffer.
+ */
+ base_addr =
+ relay_reserve(guc->log_relay_chan, guc->log_obj->base.size);
+
return base_addr;
+#endif
}
static void guc_read_update_log_buffer(struct drm_device *dev)