Re: [PATCH v3 2/2] drm/i915/gt: Move power management debug files into a gt aware debugfs

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

 



Hi Chris,

> > +int intel_gt_pm_debugfs_register(struct intel_gt *gt)
> > +{
> > +       struct dentry *root = gt->debugfs_entry;
> > +       int i;
> > +
> > +       pr_info("ANDIII function start\n");
> > +       if (unlikely(!root))
> > +               return -ENODEV;
> > +
> > +       for (i = 0; i < ARRAY_SIZE(gt_pm_debugfs_files); i++) {
> > +               const struct gt_pm_debugfs_files *f = &gt_pm_debugfs_files[i];
> > +
> > +               if (f->eval && !f->eval(gt))
> > +                       continue;
> > +
> > +               debugfs_create_file(f->name, 0444, root, gt, f->fops);
> > +       }
> > +       pr_info("ANDIII function end\n");
> > +
> > +       return 0;
> 
> Looking better!

you liked my wonderful debugging printouts? :D

> Do we even need to keep the gt->debugfs_entry around?

Yes, that can be removed, indeed, I was thinking that perhaps in
the future we might need that pointer, but yes, definitely not
necessary.

> We are not going to ever do hotplug are we and so only
> need to populate once?

for example? do you mean something like files generated in
certain conditions, like during interrupts or files generated and
destroyed depending on the power state?

If so, you might want an interface for generating/destroying
files, but do we have such case now to really care about?

Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux