Fix range end to the last value of timing table.
PATCH 1/1 Fix range end to the last value of timing table.
--- nva/set_timings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nva/set_timings.c +1 -1
@@ -506,7 +506,7 @@ shallow_dump(struct nvamemtiming_conf *conf)if (conf->range.start == (unsigned char )-1 ) conf->range.start =0 ;if (conf->range.end == (unsigned char )-1 ) - conf->range.end = conf->vbios.timing_entry_length; + conf->range.end = conf->vbios.timing_entry_length-1 ;fprintf (stderr,"Shallow mode: Will iterate between %i and %i\n" , conf->range.start, conf->range.end);
Signature · 1 line
1.9.1
A message that is not in the archive (sent off-list or not yet received): 1408993207-19530-1-git-send-email-titan.costa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 9 lines · Christian Costa
--- nva/set_timings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nva/set_timings.c +0
-0
nva/set_timings.c shallow_dump(struct nvamemtiming_conf *conf) · line 512
Quoted 8 lines
nva/set_timings.c +1
-1@@ -506,7 +506,7 @@ shallow_dump(struct nvamemtiming_conf *conf)if (conf->range.start == (unsigned char )-1 ) conf->range.start =0 ;if (conf->range.end == (unsigned char )-1 ) - conf->range.end = conf->vbios.timing_entry_length; + conf->range.end = conf->vbios.timing_entry_length-1 ;fprintf (stderr,"Shallow mode: Will iterate between %i and %i\n" , conf->range.start, conf->range.end);
Hey
I don't like this patch because it would create an output difference between the deep and the shallow test. Please check and propose another patch.
What are you trying to fix by the way? You don't like that range.end is not included?
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 19 lines · Martin Peres
Quoted 9 lines · Christian Costa
--- nva/set_timings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)nva/set_timings.c +0
-0nva/set_timings.c shallow_dump(struct nvamemtiming_conf *conf) · line 511
Quoted 7 lines
nva/set_timings.c +1
-1@@ -506,7 +506,7 @@ shallow_dump(struct nvamemtiming_conf *conf)if (conf->range.start == (unsigned char )-1 ) conf->range.start =0 ;if (conf->range.end == (unsigned char )-1 ) - conf->range.end = conf->vbios.timing_entry_length; + conf->range.end = conf->vbios.timing_entry_length-1 ; fprintf(stderr, "Shallow mode: Will iterate between %i and %i\n", conf->range.start, conf->range.end);Hey
Quoted 2 lines
I don't like this patch because it would create an output difference between the deep and the shallow test. Please check and propose another patch.
Hi Martin,
Yes. You're right. I didn't pay attention to deep_dump.
Quoted 4 lines
What are you trying to fix by the way? You don't like that range.end is not included?
I got confused with the message and tought there was an out of the bound access.
Looking more closely at the code says indeed that range.end is actually not included.
It doesn't seem straitforward. At least to me. I would change the code to make range.end included to avoid confusion. What do you think?
By the way, in deep_mode, crange.start and crange.end are calculated but not used at all. The loop iterates the whole entry:
for (i = 0; i < conf->vbios.timing_entry_length; i++)
Is it normal ?
While I am at it, I tried to understand what deep_mode does. Contrary to shallow_mode which tests the table value + 1, deep_mode tests all values between values of 2 entries. The code is as follows:
for (v = initial+1; v <= target; v++) {
conf->vbios.data[conf->vbios.timing_entry_offset + index] = v;
launch(conf, outf, index + 1 , COLOR);
}It works fine when initial value is lower than the target but does nothing in the other case. Looks like a bug, no?
Thanks
Christian