[Intel-gfx] [PATCH v3] drm/i915/gt: move remaining debugfs interfaces into gt

Andi Shyti andi at etezian.org
Tue Mar 31 17:13:09 UTC 2020


Hi Chris,

On Tue, Mar 31, 2020 at 05:53:32PM +0100, Chris Wilson wrote:
> Quoting Andi Shyti (2020-03-31 17:45:08)
> > +static void intel_sseu_copy_subslices(const struct sseu_dev_info *sseu,
> > +                                     int slice, u8 *to_mask)
> > +{
> > +       int offset = slice * sseu->ss_stride;
> > +
> > +       memcpy(&to_mask[offset], &sseu->subslice_mask[offset], sseu->ss_stride);
> > +}
> 
> Worth moving all the sseu into their file? There's quite a few of them
> and each quite chunky.
> 
> > +static int interrupt_info_show(struct seq_file *m, void *data)
> 
> And if we start there, we might end up with debugfs_gt_irq.c as well?
> (Not that I see any use for this debugfs info :)

add a debufs_gt_sseu.c and debugfs_gt_irq.c, isn't it a bit
excessive? I also do agree that everything in one file looks a
bit stuffed.

> > +static int reset_get(void *data, u64 *val)
> > +{
> > +       struct intel_gt *gt = data;
> > +       int ret = intel_gt_terminally_wedged(gt);
> > +
> > +       switch (ret) {
> > +       case -EIO:
> > +               *val = 1;
> > +               return 0;
> > +       case 0:
> > +               *val = 0;
> > +               return 0;
> > +       default:
> > +               return ret;
> > +       }
> 
> reset_get? Ok if you document it as reporting wedged status :)
> 
> > +}
> > +
> > +static int reset_set(void *data, u64 val)
> > +{
> > +       struct intel_gt *gt = data;
> > +
> > +       /* Flush any previous reset before applying for a new one */
> > +       wait_event(gt->reset.queue,
> > +                  !test_bit(I915_RESET_BACKOFF, &gt->reset.flags));
> > +
> > +       intel_gt_handle_error(gt, val, I915_ERROR_CAPTURE,
> > +                             "Manually set wedged engine mask = %llx", val);
> 
> No hint of i915_wedged any more. Just "Manual reset engine mask %llx",
> or somesuch will do.

OK, I will try to improve the transition freom "wedged" to
"reset". Thanks.

Andi


More information about the Intel-gfx mailing list