All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Costa <titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH envytools] demmio: Add decoding of some MEM_TIMINGS registers for NVC0.
Date: Tue, 26 Aug 2014 04:06:18 +0200	[thread overview]
Message-ID: <53FBEB9A.9000702@gmail.com> (raw)
In-Reply-To: <53FBB903.7060900-GANU6spQydw@public.gmane.org>

Le 26/08/2014 00:30, Martin Peres a écrit :
> On 25/08/2014 20:58, Christian Costa wrote:
>> ---
>>   rnndb/memory/nvc0_pbfb.xml | 37 ++++++++++++++++++++++++++++++++++---
>>   1 file changed, 34 insertions(+), 3 deletions(-)
>>
>> diff --git a/rnndb/memory/nvc0_pbfb.xml b/rnndb/memory/nvc0_pbfb.xml
>> index 500cea9..e006dbe 100644
>> --- a/rnndb/memory/nvc0_pbfb.xml
>> +++ b/rnndb/memory/nvc0_pbfb.xml
>> @@ -49,23 +49,54 @@
>>               Most bitfields are unknown.
>>               </doc>
>>           <bitfield high="7" low="0" name="RP">
>> -            <doc> RAS# precharge. </doc>
>> +            <doc> RAS# Precharge. </doc>
>>           </bitfield>
>>           <bitfield high="15" low="8" name="RAS">
>> -            <doc>Activate to precharge delay. </doc>
>> +            <doc> Activate to precharge delay. </doc>
>>           </bitfield>
>>           <bitfield high="23" low="16" name="RFC">
>>               <doc> Refresh to activate delay. </doc>
>>           </bitfield>
>>           <bitfield high="31" low="24" name="RC">
>> -            <doc> Row cycle time. </doc>
>> +            <doc> Row Cycle time. </doc>
>> +        </bitfield>
>> +    </reg32>
>> +
>> +    <reg32 offset="0x290" name="MEM_TIMINGS_0" variants="NVC0-">
>> +        <doc> This, and the next 6 regs, are all related to memtimings.
>> +            A good place to read might be 
>> http://www.tweakers.fr/timings.html .
>> +            Most bitfields are unknown.
>> +            </doc>
>> +        <bitfield high="7" low="0" name="tRC">
>> +            <doc> Row Cycle time. </doc>
>> +        </bitfield>
>> +        <bitfield high="15" low="8" name="tRFC">
>> +            <doc> Refresh to activate delay. </doc>
>> +        </bitfield>
>> +        <bitfield high="23" low="17" name="tRAS">
>> +            <doc> Activate to precharge delay. </doc>
>> +        </bitfield>
>> +        <bitfield high="31" low="24" name="tRCD">
>> +            <doc> RAS# to CAS# Delay. </doc>
>>           </bitfield>
>>       </reg32>
>>         <reg32 offset="0x294" name="MEM_TIMINGS_1" variants="NVC0-">
>> +        <bitfield high="3" low="0" name="tCL">
>> +            <doc> Row Cycle time. </doc>
>> +        </bitfield>
>> +        <bitfield high="13" low="7" name="tCWL">
>> +            <doc> CAS# Write Latency. </doc>
>> +        </bitfield>
>>       </reg32>
>>         <reg32 offset="0x298" name="MEM_TIMINGS_2" variants="NVC0-">
>> +        <bitfield high="15" low="8" name="tWTR">
>> +            <doc> Write To Read delay. </doc>
>> +        </bitfield>
>> +        <bitfield high="23" low="15" name="tWR">
>> +            <doc> Write Recovery time. </doc>
>> +        </bitfield>
>>       </reg32>
>>         <reg32 offset="0x29c" name="MEM_TIMINGS_3" variants="NVC0-">
>
> Thanks for the patch but where did you get this knowledge? By 
> comparing with nv50 and the vbios table?

It's based on the code in nvbios.c:

                         reg_100220 = (tRCD << 24 | (tRAS&0x7f) << 17 | 
tRFC << 8 | tRC);
                         reg_100224 = 0x4c << 24 | (tUNK_11&0x0f) << 20 
| (tCWL << 7) | (tCL & 0x0f);
                         reg_100228 = 0x44000011 | tWR << 16 | tWTR << 8;
                         reg_10022c = tUNK_20 << 9 | tUNK_13;
                         reg_100230 = 0x42e00069 | tUNK_12 << 15;

                         printf("Registers: 290: 0x%08x 0x%08x 0x%08x 
0x%08x\n",
                         reg_100220, reg_100224,
                         reg_100228, reg_10022c);
                         printf("           2a0: 0x%08x 0x%08x 0x%08x 
0x%08x\n",
                         reg_100230, reg_100234,
                         reg_100238, reg_10023c);

      parent reply	other threads:[~2014-08-26  2:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 18:58 [PATCH envytools] demmio: Add decoding of some MEM_TIMINGS registers for NVC0 Christian Costa
     [not found] ` <1408993096-18883-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 18:58   ` [PATCH envytools] docs: Fix some spelling and remove some trailing spaces Christian Costa
     [not found]     ` <1408993096-18883-2-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 22:32       ` Martin Peres
2014-08-25 18:58   ` [PATCH envytools] nva: Clean up nva tools doc Christian Costa
     [not found]     ` <1408993096-18883-3-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 22:35       ` Martin Peres
     [not found]         ` <53FBBA3F.50405-GANU6spQydw@public.gmane.org>
2014-08-25 22:55           ` Ilia Mirkin
     [not found]             ` <CAKb7Uvj4=vM0kSQB3npNyeMT3=AjMy6mTE5-iFu-ZqHpOCCq+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-26  2:30               ` Christian Costa
2014-08-26  2:20           ` Christian Costa
2014-08-25 18:58   ` [PATCH envytools] nvbios: Return an error if mem train subentries is above the limit to avoid stack corruption Christian Costa
2014-08-25 18:58   ` [PATCH envytools] nvbios: Write missing null terminating byte Christian Costa
     [not found]     ` <1408993096-18883-5-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 22:37       ` Martin Peres
2014-08-25 18:58   ` [PATCH envytools] nvbios: Check if HWEA entry length == -1 Christian Costa
2014-08-25 18:58   ` [PATCH envytools] Don't try to use bios->pars if NULL (parse_pcir function has probably failed) Christian Costa
     [not found]     ` <1408993096-18883-7-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-25 19:09       ` Ilia Mirkin
     [not found]         ` <CAKb7UvhnRp55JtHgW7WOxmwUXWeUO_Ow4ub0LoGHWMhTx005rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-26  2:32           ` Christian Costa
2014-08-25 22:30   ` [PATCH envytools] demmio: Add decoding of some MEM_TIMINGS registers for NVC0 Martin Peres
     [not found]     ` <53FBB903.7060900-GANU6spQydw@public.gmane.org>
2014-08-26  2:06       ` Christian Costa [this message]

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=53FBEB9A.9000702@gmail.com \
    --to=titan.costa-re5jqeeqqe8avxtiumwx3w@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.