dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Christian Gmeiner <christian.gmeiner@gmail.com>,
	dri-devel@lists.freedesktop.org
Cc: etnaviv@lists.freedesktop.org, cphealy@gmail.com,
	linux+etnaviv@armlinux.org.uk
Subject: Re: [PATCH 05/21] drm/etnaviv: add performance monitor request validation
Date: Mon, 26 Jun 2017 15:11:39 +0200	[thread overview]
Message-ID: <1498482699.2431.8.camel@pengutronix.de> (raw)
In-Reply-To: <20170609102123.2417-6-christian.gmeiner@gmail.com>

Am Freitag, den 09.06.2017, 12:21 +0200 schrieb Christian Gmeiner:
> Check if the selected domain and signal combination exists.
> 
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 15 +++++++++++++++
>  drivers/gpu/drm/etnaviv/etnaviv_perfmon.h |  2 ++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
> b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
> index 9c6f284..b8dc5fa 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
> @@ -79,3 +79,18 @@ int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu,
>  
>  	return 0;
>  }
> +
> +int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr
> *r)
> +{
> +	const struct etnaviv_pm_domain *dom;
> +
> +	if (r->domain >= ARRAY_SIZE(doms))
> +		return -EINVAL;
> +
> +	dom = &doms[r->domain];
> +
> +	if (r->signal > dom->nr_signals)
> +		return -EINVAL;
> +
> +	return 0;
> +}
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h
> b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h
> index 4b2b518..f20b69c 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h
> @@ -40,4 +40,6 @@ int etnaviv_pm_query_dom(struct etnaviv_gpu *gpu,
>  int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu,
>  	struct drm_etnaviv_pm_signal *signal);
>  
> +int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr
> *r);
> +
>  #endif /* __ETNAVIV_PERFMON_H__ */
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-06-26 13:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 10:21 [PATCH 00/21] drm/etnaviv: support performance counters Christian Gmeiner
2017-06-09 10:21 ` [PATCH 01/21] drm/etnaviv: add infrastructure to query perf counter Christian Gmeiner
2017-06-09 10:21 ` [PATCH 02/21] drm/etnaviv: add uapi for perfmon feature Christian Gmeiner
2017-06-26 12:56   ` Lucas Stach
2017-07-02 10:04     ` Christian Gmeiner
2017-07-03  8:22       ` Lucas Stach
2017-06-09 10:21 ` [PATCH 03/21] drm/etnaviv: add internal representation of a perfmon request Christian Gmeiner
2017-06-09 10:21 ` [PATCH 04/21] drm/etnaviv: extend etnaviv_gpu_cmdbuf_new(..) with nr_pmrs Christian Gmeiner
2017-06-26 13:02   ` Lucas Stach
2017-07-02 10:04     ` Christian Gmeiner
2017-06-09 10:21 ` [PATCH 05/21] drm/etnaviv: add performance monitor request validation Christian Gmeiner
2017-06-26 13:11   ` Lucas Stach [this message]
2017-06-09 10:21 ` [PATCH 06/21] drm/etnaviv: copy pmrs from userspace Christian Gmeiner
2017-06-26 13:18   ` Lucas Stach
2017-07-02 10:16     ` Christian Gmeiner
2017-06-09 10:21 ` [PATCH 07/21] drm/etnaviv: add performance monitor request processing Christian Gmeiner
2017-06-09 10:21 ` [PATCH 08/21] drm/etnaviv: add 'sync point' support Christian Gmeiner
2017-06-26 13:30   ` Lucas Stach
2017-07-02 14:14     ` Christian Gmeiner
2017-06-09 10:21 ` [PATCH 09/21] drm/etnaviv: clear alloced event Christian Gmeiner
2017-06-26 13:30   ` Lucas Stach

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=1498482699.2431.8.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=christian.gmeiner@gmail.com \
    --cc=cphealy@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=linux+etnaviv@armlinux.org.uk \
    /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