Patch "drm/i915/guc: Fix missing ecodes" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/i915/guc: Fix missing ecodes

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-i915-guc-fix-missing-ecodes.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c1eb875ef23ef0fceec53b170cf0fba94936c31b
Author: John Harrison <John.C.Harrison@xxxxxxxxx>
Date:   Fri Mar 10 22:37:12 2023 -0800

    drm/i915/guc: Fix missing ecodes
    
    [ Upstream commit 8df23e4c4f72f4e201c28e6fb0a67e2dbf30628a ]
    
    Error captures are tagged with an 'ecode'. This is a pseduo-unique magic
    number that is meant to distinguish similar seeming bugs with
    different underlying signatures. It is a combination of two ring state
    registers. Unfortunately, the register state being used is only valid
    in execlist mode. In GuC mode, the register state exists in a separate
    list of arbitrary register address/value pairs rather than the named
    entry structure. So, search through that list to find the two exciting
    registers and copy them over to the structure's named members.
    
    v2: if else if instead of if if (Alan)
    
    Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx>
    Reviewed-by: Alan Previn <alan.previn.teres.alexis@xxxxxxxxx>
    Fixes: a6f0f9cf330a ("drm/i915/guc: Plumb GuC-capture into gpu_coredump")
    Cc: Alan Previn <alan.previn.teres.alexis@xxxxxxxxx>
    Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@xxxxxxxxx>
    Cc: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>
    Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
    Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
    Cc: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
    Cc: Matt Roper <matthew.d.roper@xxxxxxxxx>
    Cc: Aravind Iddamsetty <aravind.iddamsetty@xxxxxxxxx>
    Cc: Michael Cheng <michael.cheng@xxxxxxxxx>
    Cc: Matthew Brost <matthew.brost@xxxxxxxxx>
    Cc: Bruce Chang <yu.bruce.chang@xxxxxxxxx>
    Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
    Cc: Matthew Auld <matthew.auld@xxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230311063714.570389-2-John.C.Harrison@xxxxxxxxx
    (cherry picked from commit 9724ecdbb9ddd6da3260e4a442574b90fc75188a)
    Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
index 13118609339ac..1e1fa20fb41c9 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
@@ -1556,6 +1556,27 @@ int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *ebuf,
 
 #endif //CONFIG_DRM_I915_CAPTURE_ERROR
 
+static void guc_capture_find_ecode(struct intel_engine_coredump *ee)
+{
+	struct gcap_reg_list_info *reginfo;
+	struct guc_mmio_reg *regs;
+	i915_reg_t reg_ipehr = RING_IPEHR(0);
+	i915_reg_t reg_instdone = RING_INSTDONE(0);
+	int i;
+
+	if (!ee->guc_capture_node)
+		return;
+
+	reginfo = ee->guc_capture_node->reginfo + GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE;
+	regs = reginfo->regs;
+	for (i = 0; i < reginfo->num_regs; i++) {
+		if (regs[i].offset == reg_ipehr.reg)
+			ee->ipehr = regs[i].value;
+		else if (regs[i].offset == reg_instdone.reg)
+			ee->instdone.instdone = regs[i].value;
+	}
+}
+
 void intel_guc_capture_free_node(struct intel_engine_coredump *ee)
 {
 	if (!ee || !ee->guc_capture_node)
@@ -1597,6 +1618,7 @@ void intel_guc_capture_get_matching_node(struct intel_gt *gt,
 			list_del(&n->link);
 			ee->guc_capture_node = n;
 			ee->guc_capture = guc->capture;
+			guc_capture_find_ecode(ee);
 			return;
 		}
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux