From: Samuel Pitoiset <samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [RFC PATCH 4/8] nv50: configure the ring buffer for reading back PM counters
Date: Sun, 28 Jun 2015 09:45:36 +0200 [thread overview]
Message-ID: <558FA620.3080408@gmail.com> (raw)
In-Reply-To: <CAKb7UvgZ8km4FPKkmcpU_4-yGNZ1ELy+uP5YJO_RZ-Ab6v6t9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 06/26/2015 01:04 AM, Ilia Mirkin wrote:
> Yeah, this whole thing has to be guarded by a drm version check,
> otherwise it'll end up with errors in dmesg I assume. Perhaps only
> allocate screen->query when the drm version matches, and gate things
> on that for the rest of the code?
Yes, this sounds good to me.
>
> On Mon, Jun 22, 2015 at 4:53 PM, Samuel Pitoiset
> <samuel.pitoiset@gmail.com> wrote:
>> To write data at the right offset, the kernel has to know some
>> parameters of this ring buffer, like the number of domains and the
>> maximum number of queries.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
>> ---
>> src/gallium/drivers/nouveau/nv50/nv50_screen.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
>> index 3a99cc8..53817c0 100644
>> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
>> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
>> @@ -441,6 +441,13 @@ nv50_screen_init_hwctx(struct nv50_screen *screen)
>>
>> BEGIN_NV04(push, SUBC_SW(NV01_SUBCHAN_OBJECT), 1);
>> PUSH_DATA (push, screen->sw->handle);
>> + BEGIN_NV04(push, SUBC_SW(0x0190), 1);
>> + PUSH_DATA (push, screen->query->handle);
>> + // XXX: Maybe add a check for DRM version here ?
>> + BEGIN_NV04(push, SUBC_SW(0x0600), 1);
>> + PUSH_DATA (push, NV50_HW_PM_RING_BUFFER_MAX_QUERIES);
>> + BEGIN_NV04(push, SUBC_SW(0x0604), 1);
>> + PUSH_DATA (push, NV50_HW_PM_RING_BUFFER_NUM_DOMAINS);
> FYI you can do BEGIN_NV04(..., 2), since they're sequential.
I'm going to make the change.
>
>> BEGIN_NV04(push, NV50_3D(COND_MODE), 1);
>> PUSH_DATA (push, NV50_3D_COND_MODE_ALWAYS);
>> --
>> 2.4.4
>>
>> _______________________________________________
>> Nouveau mailing list
>> Nouveau@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-06-28 7:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 20:53 [RFC PATCH 0/8] nv50: expose global performance counters Samuel Pitoiset
2015-06-22 20:53 ` [RFC PATCH 1/8] nouveau: implement the nvif hardware performance counters interface Samuel Pitoiset
[not found] ` <1435006399-2088-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-22 20:53 ` [RFC PATCH 2/8] nv50: allocate a software object class Samuel Pitoiset
2015-06-22 20:53 ` [RFC PATCH 3/8] nv50: allocate and map a notifier buffer object for PM Samuel Pitoiset
[not found] ` <1435006399-2088-4-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-25 23:02 ` Ilia Mirkin
2015-06-28 7:42 ` [Nouveau] " Samuel Pitoiset
2015-06-22 20:53 ` [RFC PATCH 8/8] nv50: enable GL_AMD_performance_monitor Samuel Pitoiset
2015-06-22 20:53 ` [RFC PATCH 4/8] nv50: configure the ring buffer for reading back PM counters Samuel Pitoiset
[not found] ` <1435006399-2088-5-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-25 23:04 ` Ilia Mirkin
[not found] ` <CAKb7UvgZ8km4FPKkmcpU_4-yGNZ1ELy+uP5YJO_RZ-Ab6v6t9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-28 7:45 ` Samuel Pitoiset [this message]
2015-06-22 20:53 ` [RFC PATCH 5/8] nv50: prevent NULL pointer dereference with pipe_query functions Samuel Pitoiset
[not found] ` <1435006399-2088-6-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-22 20:52 ` Ilia Mirkin
2015-06-22 21:02 ` [Nouveau] " Samuel Pitoiset
[not found] ` <558877D9.8040501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-23 6:57 ` [Mesa-dev] " Michel Dänzer
[not found] ` <55890375.10901-otUistvHUpPR7s880joybQ@public.gmane.org>
2015-06-23 7:28 ` Samuel Pitoiset
2015-06-22 20:53 ` [RFC PATCH 6/8] nv50: add support for compute/graphics global performance counters Samuel Pitoiset
2015-06-25 23:09 ` [Nouveau] " Ilia Mirkin
[not found] ` <CAKb7Uvg4DpTHoK0K-tywYaX=9=UfxKnQTz-hbvCngn1-jnQaiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-28 7:54 ` Samuel Pitoiset
2015-06-22 20:53 ` [RFC PATCH 7/8] nv50: expose global performance counters to the HUD Samuel Pitoiset
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=558FA620.3080408@gmail.com \
--to=samuel.pitoiset-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.