-
-
Save mthierry/dde5724f48454aeff748c1dc7a1d1c5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c | |
index 7935959..0731950 100644 | |
--- a/drivers/gpu/drm/i915/i915_guc_submission.c | |
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c | |
@@ -969,10 +969,16 @@ static void guc_move_to_next_buf(struct intel_guc *guc) | |
smp_wmb(); | |
/* All data has been written, so now move the offset of sub buffer. */ | |
+#if IS_ENABLED(CONFIG_DEBUG_PREEMPT) | |
+ preempt_disable(); | |
+#endif | |
relay_reserve(guc->log.relay_chan, guc->log.obj->base.size); | |
/* Switch to the next sub buffer */ | |
relay_flush(guc->log.relay_chan); | |
+#if IS_ENABLED(CONFIG_DEBUG_PREEMPT) | |
+ preempt_enable(); | |
+#endif | |
} | |
static void* guc_get_write_buffer(struct intel_guc *guc) | |
@@ -1007,7 +1013,13 @@ static void guc_read_update_log_buffer(struct intel_guc *guc) | |
log_buffer_state = src_data_ptr = guc->log.buf_addr; | |
/* Get the pointer to local buffer to store the logs */ | |
+#if IS_ENABLED(CONFIG_DEBUG_PREEMPT) | |
+ preempt_disable(); | |
+#endif | |
dst_data_ptr = log_buffer_snapshot_state = guc_get_write_buffer(guc); | |
+#if IS_ENABLED(CONFIG_DEBUG_PREEMPT) | |
+ preempt_enable(); | |
+#endif | |
/* Actual logs are present from the 2nd page */ | |
src_data_ptr += PAGE_SIZE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment