Skip to content

Commit

Permalink
Print sync range class
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Jackson <ajax@redhat.com>
  • Loading branch information
nwnk committed Aug 15, 2012
1 parent 2cb1854 commit c8effb8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion edid-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ detailed_block(unsigned char *x, int in_extension)
int v_max_offset = 0, v_min_offset = 0;
int is_cvt = 0;
has_range_descriptor = 1;
char *range_class = "";
/*
* XXX todo: implement feature flags, vtd blocks
* XXX check: ranges are well-formed; block termination if no vtd
Expand Down Expand Up @@ -255,23 +256,29 @@ detailed_block(unsigned char *x, int in_extension)
*/
switch (x[10]) {
case 0x00: /* default gtf */
range_class = "GTF";
break;
case 0x01: /* range limits only */
range_class = "bare limits";
break;
case 0x02: /* secondary gtf curve */
range_class = "GTF with icing";
break;
case 0x04: /* cvt */
range_class = "CVT";
is_cvt = 1;
break;
default: /* invalid */
range_class = "invalid";
break;
}

if (x[5] + v_min_offset > x[6] + v_max_offset)
has_valid_range_descriptor = 0;
if (x[7] + h_min_offset > x[8] + h_max_offset)
has_valid_range_descriptor = 0;
printf("Monitor ranges: %d-%dHz vertical, %d-%dkHz horizontal",
printf("Monitor ranges (%s): %d-%dHz V, %d-%dkHz H",
range_class,
x[5] + v_min_offset, x[6] + v_max_offset,
x[7] + h_min_offset, x[8] + h_max_offset);
if (x[9])
Expand Down

0 comments on commit c8effb8

Please sign in to comment.