Re: [Intel-gfx] [PATCH 3/6] drm/i915/guc: More debug print updates - GuC reg capture

2023-02-06 Thread John Harrison

On 2/4/2023 00:19, Teres Alexis, Alan Previn wrote:

So i do have one request - but its a nit - for the following case, should it be 
a guc_warn instead of a guc_dbg?
(last hunk in this patch)
"No register capture node found for 0x%04X / 0x%08X\n",
ce->guc_id.id, ce->lrc.lrca);"
Did that get discussed in the original code review? I vaguely recall 
some reason for it not being a warning. But maybe I'm thinking of 
something else?



Otherwise LGTM,
Reviewed-by: Alan Previn 

On Thu, 2023-02-02 at 16:11 -0800, john.c.harri...@intel.com wrote:

From: John Harrison 

Update a bunch more debug prints to use the new GT based scheme.

Signed-off-by: John Harrison 
---
  .../gpu/drm/i915/gt/uc/intel_guc_capture.c| 51 ---
  1 file changed, 21 insertions(+), 30 deletions(-)

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 fc3b994626a4f..5f6e3594dda62 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
@@ -15,6 +15,7 @@

alan:snip




Re: [Intel-gfx] [PATCH 3/6] drm/i915/guc: More debug print updates - GuC reg capture

2023-02-04 Thread Teres Alexis, Alan Previn
So i do have one request - but its a nit - for the following case, should it be 
a guc_warn instead of a guc_dbg?
(last hunk in this patch)
"No register capture node found for 0x%04X / 0x%08X\n",
ce->guc_id.id, ce->lrc.lrca);"

Otherwise LGTM,
Reviewed-by: Alan Previn 

On Thu, 2023-02-02 at 16:11 -0800, john.c.harri...@intel.com wrote:
> From: John Harrison 
> 
> Update a bunch more debug prints to use the new GT based scheme.
> 
> Signed-off-by: John Harrison 
> ---
>  .../gpu/drm/i915/gt/uc/intel_guc_capture.c| 51 ---
>  1 file changed, 21 insertions(+), 30 deletions(-)
> 
> 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 fc3b994626a4f..5f6e3594dda62 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
> @@ -15,6 +15,7 @@

alan:snip


[Intel-gfx] [PATCH 3/6] drm/i915/guc: More debug print updates - GuC reg capture

2023-02-02 Thread John . C . Harrison
From: John Harrison 

Update a bunch more debug prints to use the new GT based scheme.

Signed-off-by: John Harrison 
---
 .../gpu/drm/i915/gt/uc/intel_guc_capture.c| 51 ---
 1 file changed, 21 insertions(+), 30 deletions(-)

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 fc3b994626a4f..5f6e3594dda62 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c
@@ -15,6 +15,7 @@
 #include "guc_capture_fwif.h"
 #include "intel_guc_capture.h"
 #include "intel_guc_fwif.h"
+#include "intel_guc_print.h"
 #include "i915_drv.h"
 #include "i915_gpu_error.h"
 #include "i915_irq.h"
@@ -353,7 +354,6 @@ guc_capture_alloc_steered_lists_xe_hpg(struct intel_guc 
*guc,
   u32 ipver)
 {
struct intel_gt *gt = guc_to_gt(guc);
-   struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
struct sseu_dev_info *sseu;
int slice, subslice, i, iter, num_steer_regs, num_tot_regs = 0;
const struct __guc_mmio_reg_descr_group *list;
@@ -402,7 +402,7 @@ guc_capture_alloc_steered_lists_xe_hpg(struct intel_guc 
*guc,
}
}
 
-   drm_dbg(>drm, "GuC-capture found %d-ext-regs.\n", num_tot_regs);
+   guc_dbg(guc, "capture found %d ext-regs.\n", num_tot_regs);
guc->capture->extlists = extlists;
 }
 
@@ -477,7 +477,6 @@ guc_capture_list_init(struct intel_guc *guc, u32 owner, u32 
type, u32 classid,
  struct guc_mmio_reg *ptr, u16 num_entries)
 {
u32 i = 0, j = 0;
-   struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
const struct __guc_mmio_reg_descr_group *reglists = 
guc->capture->reglists;
struct __guc_mmio_reg_descr_group *extlists = guc->capture->extlists;
const struct __guc_mmio_reg_descr_group *match;
@@ -509,8 +508,7 @@ guc_capture_list_init(struct intel_guc *guc, u32 owner, u32 
type, u32 classid,
}
}
if (i < num_entries)
-   drm_dbg(>drm, "GuC-capture: Init reglist short %d out 
%d.\n",
-   (int)i, (int)num_entries);
+   guc_dbg(guc, "Got short capture reglist init: %d out %d.\n", i, 
num_entries);
 
return 0;
 }
@@ -540,12 +538,11 @@ guc_capture_getlistsize(struct intel_guc *guc, u32 owner, 
u32 type, u32 classid,
size_t *size, bool is_purpose_est)
 {
struct intel_guc_state_capture *gc = guc->capture;
-   struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
struct __guc_capture_ads_cache *cache = 
>ads_cache[owner][type][classid];
int num_regs;
 
if (!gc->reglists) {
-   drm_warn(>drm, "GuC-capture: No reglist on this 
device\n");
+   guc_warn(guc, "No capture reglist for this device\n");
return -ENODEV;
}
 
@@ -557,9 +554,9 @@ guc_capture_getlistsize(struct intel_guc *guc, u32 owner, 
u32 type, u32 classid,
if (!is_purpose_est && owner == GUC_CAPTURE_LIST_INDEX_PF &&
!guc_capture_get_one_list(gc->reglists, owner, type, classid)) {
if (type == GUC_CAPTURE_LIST_TYPE_GLOBAL)
-   drm_warn(>drm, "Missing GuC-Err-Cap reglist 
Global!\n");
+   guc_warn(guc, "Missing capture reglist: global!\n");
else
-   drm_warn(>drm, "Missing GuC-Err-Cap reglist 
%s(%u):%s(%u)!\n",
+   guc_warn(guc, "Missing capture reglist: 
%s(%u):%s(%u)!\n",
 __stringify_type(type), type,
 __stringify_engclass(classid), classid);
return -ENODATA;
@@ -592,7 +589,6 @@ intel_guc_capture_getlist(struct intel_guc *guc, u32 owner, 
u32 type, u32 classi
 {
struct intel_guc_state_capture *gc = guc->capture;
struct __guc_capture_ads_cache *cache = 
>ads_cache[owner][type][classid];
-   struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
struct guc_debug_capture_list *listnode;
int ret, num_regs;
u8 *caplist, *tmp;
@@ -623,7 +619,7 @@ intel_guc_capture_getlist(struct intel_guc *guc, u32 owner, 
u32 type, u32 classi
 
caplist = kzalloc(size, GFP_KERNEL);
if (!caplist) {
-   drm_dbg(>drm, "GuC-capture: failed to alloc cached 
caplist");
+   guc_dbg(guc, "Failed to alloc cached register capture list");
return -ENOMEM;
}
 
@@ -653,7 +649,6 @@ intel_guc_capture_getnullheader(struct intel_guc *guc,
void **outptr, size_t *size)
 {
struct intel_guc_state_capture *gc = guc->capture;
-   struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
int tmp = sizeof(u32) * 4;
void *null_header;
 
@@ -665,7 +660,7 @@ intel_guc_capture_getnullheader(struct intel_guc *guc,
 
null_header = kzalloc(tmp, GFP_KERNEL);
if