[Nouveau] [PATCH envytools] nvamemtiming: Make deep mode take range into account and treat range end as included
Christian Costa
titan.costa at gmail.com
Sat Aug 30 10:05:18 PDT 2014
---
nva/set_timings.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/nva/set_timings.c b/nva/set_timings.c
index 7376486..6cd831c 100644
--- a/nva/set_timings.c
+++ b/nva/set_timings.c
@@ -448,14 +448,14 @@ deep_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, "Deep mode: Will iterate between %i and %i\n", conf->range.start, conf->range.end);
launch(conf, outf, 0, NO_COLOR);
/* iterate through the vbios timing values */
- for (i = 0; i < conf->vbios.timing_entry_length; i++) {
+ for (i = conf->range.start; i <= conf->range.end; i++) {
uint8_t orig = conf->vbios.data[conf->vbios.timing_entry_offset + i];
if (timing_value_types[i] == VALUE ||
@@ -506,14 +506,14 @@ 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);
launch(conf, outf, 0, NO_COLOR);
/* iterate through the vbios timing values */
- for (i = conf->range.start; i < conf->range.end; i++) {
+ for (i = conf->range.start; i <= conf->range.end; i++) {
uint8_t orig = conf->vbios.data[conf->vbios.timing_entry_offset + i];
if (timing_value_types[i] == VALUE ||
--
1.9.1
More information about the Nouveau
mailing list