intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
	daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH V2 4/4] drm/crc: add pre_crc_read function
Date: Wed, 22 Aug 2018 09:54:28 -0700	[thread overview]
Message-ID: <20180822165428.GF2340@intel.com> (raw)
In-Reply-To: <5566adda-c9ab-3cc6-185a-e1cb7f45ae2e@linux.intel.com>

On Wed, Aug 22, 2018 at 12:37:05PM +0200, Maarten Lankhorst wrote:
> Op 21-08-18 om 10:38 schreef Mahesh Kumar:
> > This patch implements a callback function which will be called before
> > crc read. In this function driver can implement any preparation work
> > required for successfully reading CRC data.
> >
> > Changes Since V1:
> >  - rebase
> >
> > Cc: dri-devel@lists.freedesktop.org
> > Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> After some discussion with David on whether this can be upstreamed, he NACK'd it.
> Because there are no upstream users for this callback, it cannot be included upstream.
> It would be removed by the first person to notice there are no in-kernel users using it.

It makes sense.... After I posted the review yesterday I started thinking exactly
about this case... if would get easily removed in a clean-up for obvious reasons...

> For the first 3 patches:
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

thanks. pushed all 3 to drm-misc-next.

> >  drivers/gpu/drm/drm_debugfs_crc.c |  8 ++++++++
> >  include/drm/drm_crtc.h            | 14 ++++++++++++++
> >  2 files changed, 22 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c
> > index 00e743153e94..e303c194c080 100644
> > --- a/drivers/gpu/drm/drm_debugfs_crc.c
> > +++ b/drivers/gpu/drm/drm_debugfs_crc.c
> > @@ -274,6 +274,14 @@ static ssize_t crtc_crc_read(struct file *filep, char __user *user_buf,
> >  		return 0;
> >  	}
> >  
> > +	if (crtc->funcs->pre_crc_read) {
> > +		ret = crtc->funcs->pre_crc_read(crtc);
> > +		if (ret) {
> > +			spin_unlock_irq(&crc->lock);
> > +			return ret;
> > +		}
> > +	}
> > +
> >  	/* Nothing to read? */
> >  	while (crtc_crc_data_count(crc) == 0) {
> >  		if (filep->f_flags & O_NONBLOCK) {
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index b21437bc95bf..19c2bf63935e 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -761,6 +761,20 @@ struct drm_crtc_funcs {
> >  	 */
> >  	int (*verify_crc_source)(struct drm_crtc *crtc, const char *source,
> >  				 size_t *values_cnt);
> > +	/**
> > +	 * @pre_crc_read:
> > +	 *
> > +	 * Driver callback for performing any preparation work required by
> > +	 * driver before reading CRC
> > +	 *
> > +	 * This callback is optional if the driver does not support CRC
> > +	 * generation or no prework is required before reading the crc
> > +	 *
> > +	 * RETURNS:
> > +	 *
> > +	 * 0 on success or a negative error code on failure.
> > +	 */
> > +	int (*pre_crc_read)(struct drm_crtc *crtc);
> >  	/**
> >  	 * @get_crc_sources:
> >  	 *
> 
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-08-22 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21  8:38 [PATCH 0/4] Improve crc-core driver interface Mahesh Kumar
2018-08-21  8:38 ` [PATCH V3 1/4] drm/vkms/crc: Implement verify_crc_source callback Mahesh Kumar
2018-08-21  8:38 ` [PATCH V5 2/4] drm/crc: Cleanup crtc_crc_open function Mahesh Kumar
2018-08-21  8:38 ` [PATCH V4 3/4] Revert "drm: crc: Wait for a frame before returning from open()" Mahesh Kumar
2018-08-21  8:38 ` [PATCH V2 4/4] drm/crc: add pre_crc_read function Mahesh Kumar
2018-08-21 15:56   ` Rodrigo Vivi
2018-08-22 10:37   ` Maarten Lankhorst
2018-08-22 16:54     ` Rodrigo Vivi [this message]
2018-08-21  9:01 ` ✓ Fi.CI.BAT: success for Improve crc-core driver interface (rev14) Patchwork
2018-08-21  9:51 ` ✓ 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=20180822165428.GF2340@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.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).