All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: allow setting generic data pointer
Date: Fri, 6 Mar 2020 03:15:36 +0200	[thread overview]
Message-ID: <20200306011536.GA1530@intel.intel> (raw)
In-Reply-To: <fdf01ba2-57ab-d51a-7f62-27f4cc1c1168@intel.com>

Hi Daniele,

> > diff --git a/drivers/gpu/drm/i915/gt/debugfs_gt.c b/drivers/gpu/drm/i915/gt/debugfs_gt.c
> > index 75255aaacaed..9112a8585caf 100644
> > --- a/drivers/gpu/drm/i915/gt/debugfs_gt.c
> > +++ b/drivers/gpu/drm/i915/gt/debugfs_gt.c
> > @@ -26,15 +26,14 @@ void debugfs_gt_register(struct intel_gt *gt)
> >   	debugfs_gt_pm_register(gt, root);
> >   }
> > -void debugfs_gt_register_files(struct intel_gt *gt,
> > -			       struct dentry *root,
> > -			       const struct debugfs_gt_file *files,
> > -			       unsigned long count)
> > +void __intel_gt_debugfs_register_files(struct intel_gt *gt, struct dentry *root,
> > +				       const struct debugfs_gt_file *files,
> > +				       unsigned long count, void *data)
> >   {
> >   	while (count--) {
> >   		if (!files->eval || files->eval(gt))
> 
> IMO the files->eval() function should also use the provided data instead of
> intel_gt. This will also allow us to drop the intel_gt parameter in this
> function, which in turn means we can use this function directly from all the
> levels.

do you mean something like this:

-       bool (*eval)(const struct intel_gt *gt);
+       bool (*eval)(void *data);

?

I am missing the use case, though, what is it that cannot be
reached by the gt so that it needs to be more generic?

Do you want to use it at i915 level?

Thanks for the review,
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-06  1:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 23:59 [Intel-gfx] [PATCH] drm/i915/gt: allow setting generic data pointer Andi Shyti
2020-03-06  0:31 ` Daniele Ceraolo Spurio
2020-03-06  1:15   ` Andi Shyti [this message]
2020-03-06  1:27     ` Daniele Ceraolo Spurio
2020-03-06 10:47       ` Andi Shyti
2020-03-06  6:44 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-03-06  6:58 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2020-03-06  7:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-07  0:36 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200306011536.GA1530@intel.intel \
    --to=andi.shyti@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.