intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Mahesh Kumar <mahesh1.kumar@intel.com>, intel-gfx@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	daniel.vetter@intel.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH V2 4/4] drm/crc: add pre_crc_read function
Date: Wed, 22 Aug 2018 12:37:05 +0200	[thread overview]
Message-ID: <5566adda-c9ab-3cc6-185a-e1cb7f45ae2e@linux.intel.com> (raw)
In-Reply-To: <20180821083858.26275-5-mahesh1.kumar@intel.com>

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.

For the first 3 patches:
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>  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:
>  	 *


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-08-22 10:37 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 [this message]
2018-08-22 16:54     ` Rodrigo Vivi
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=5566adda-c9ab-3cc6-185a-e1cb7f45ae2e@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mahesh1.kumar@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).