@@ -1111,15 +1111,18 @@ static void guc_read_update_log_buffer(struct intel_guc *guc)
/* Just copy the newly written data */
if (read_offset <= write_offset) {
bytes_to_copy = write_offset - read_offset;
- memcpy(dst_data_ptr + read_offset,
- src_data_ptr + read_offset, bytes_to_copy);
+ i915_memcpy_from_wc(dst_data_ptr + read_offset,
+ src_data_ptr + read_offset,
+ bytes_to_copy);
} else {
bytes_to_copy = buffer_size - read_offset;
- memcpy(dst_data_ptr + read_offset,
- src_data_ptr + read_offset, bytes_to_copy);
+ i915_memcpy_from_wc(dst_data_ptr + read_offset,
+ src_data_ptr + read_offset,
+ bytes_to_copy);
bytes_to_copy = write_offset;
- memcpy(dst_data_ptr, src_data_ptr, bytes_to_copy);
+ i915_memcpy_from_wc(dst_data_ptr, src_data_ptr,
+ bytes_to_copy);
}
src_data_ptr += buffer_size;
@@ -1241,6 +1244,16 @@ static void guc_create_log(struct intel_guc *guc)
vma = guc->log.vma;
if (!vma) {
+ /* We require SSE 4.1 for fast reads from the GuC log buffer and
+ * it should be present on the chipsets supporting GuC based
+ * submisssions.
+ */
+ if (WARN_ON(!i915_memcpy_from_wc(NULL, NULL, 0))) {
+ /* logging will not be enabled */
+ i915.guc_log_level = -1;
+ return;
+ }
+
vma = guc_allocate_vma(guc, size);
if (IS_ERR(vma)) {
/* logging will be off */