dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: David Weinehall <tao@kernel.org>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	linux-kernel@vger.kernel.org, David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [PATCH v11 3/4] drm/i915: Use new CRC debugfs API
Date: Tue, 15 Nov 2016 08:16:09 +0100	[thread overview]
Message-ID: <20161115071609.GI8202@suiko.acc.umu.se> (raw)
In-Reply-To: <87inrq2vee.fsf@intel.com>

On Mon, Nov 14, 2016 at 12:44:25PM +0200, Jani Nikula wrote:
> On Thu, 06 Oct 2016, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote:
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 23a6c7213eca..7412a05fa5d9 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -14636,6 +14636,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
> >  	.page_flip = intel_crtc_page_flip,
> >  	.atomic_duplicate_state = intel_crtc_duplicate_state,
> >  	.atomic_destroy_state = intel_crtc_destroy_state,
> > +	.set_crc_source = intel_crtc_set_crc_source,
> >  };
> >  
> >  /**
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> > index 737261b09110..31894b7c6517 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -1844,6 +1844,14 @@ void intel_color_load_luts(struct drm_crtc_state *crtc_state);
> >  /* intel_pipe_crc.c */
> >  int intel_pipe_crc_create(struct drm_minor *minor);
> >  void intel_pipe_crc_cleanup(struct drm_minor *minor);
> > +#ifdef CONFIG_DEBUG_FS
> > +int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name,
> > +			      size_t *values_cnt);
> > +#else
> > +static inline int intel_crtc_set_crc_source(struct drm_crtc *crtc,
> > +					    const char *source_name,
> > +					    size_t *values_cnt) { return 0; }
> > +#endif
> 
> "inline" here doesn't work because it's used as a function pointer.
> 
> Is it better to have a function that returns 0 for .set_crc_source, or
> to set .set_crc_source to NULL when CONFIG_DEBUG_FS=n?

I'd say that whenever we have a function pointer we should have a dummy
function without side-effects for this kind of things.


Kind regards, David

  reply	other threads:[~2016-11-15  7:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-06 15:21 [PATCH v11 0/4] New debugfs API for capturing CRC of frames Tomeu Vizoso
2016-10-06 15:21 ` [PATCH v11 1/4] drm/i915/debugfs: Move out pipe CRC code Tomeu Vizoso
2016-10-06 15:21 ` [PATCH v11 2/4] drm: Add API for capturing frame CRCs Tomeu Vizoso
2016-10-10 11:28   ` Tomeu Vizoso
2016-10-10 13:12   ` Emil Velikov
2016-10-11 10:12     ` Benjamin Gaignard
2016-10-17 14:47   ` Daniel Vetter
2016-10-06 15:21 ` [PATCH v11 3/4] drm/i915: Use new CRC debugfs API Tomeu Vizoso
2016-11-14 10:44   ` Jani Nikula
2016-11-15  7:16     ` David Weinehall [this message]
2016-11-15  8:27       ` Jani Nikula
2016-11-16 12:24         ` Tomeu Vizoso
2016-11-16 12:58           ` Jani Nikula
2016-11-16 14:04             ` Tomeu Vizoso
2016-11-16 14:08               ` Jani Nikula
2016-11-16 14:13                 ` Daniel Vetter
2016-10-06 15:21 ` [PATCH v11 4/4] drm/i915: Put "cooked" vlank counters in frame CRC lines Tomeu Vizoso

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=20161115071609.GI8202@suiko.acc.umu.se \
    --to=tao@kernel.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=tomeu.vizoso@collabora.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).