[Intel-gfx] [PATCH] SDVO: fix CREATE_PREFERRED_INPUT_TIMING command

Zhenyu Wang zhenyu.z.wang at intel.com
Fri Feb 13 07:05:38 CET 2009


---
 src/i830_sdvo.c      |    3 +++
 src/i830_sdvo_regs.h |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 5c2a4b1..233141c 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -594,9 +594,12 @@ i830_sdvo_create_preferred_input_timing(xf86OutputPtr output, uint16_t clock,
     struct i830_sdvo_preferred_input_timing_args args;
     uint8_t status;
 
+    memset(&args, 0, sizeof(args));
     args.clock = clock;
     args.width = width;
     args.height = height;
+    args.interlace = 0;
+    args.scaled = 0;
     i830_sdvo_write_cmd(output, SDVO_CMD_CREATE_PREFERRED_INPUT_TIMING,
 			&args, sizeof(args));
     status = i830_sdvo_read_response(output, NULL, 0);
diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h
index 6988d49..ab38355 100644
--- a/src/i830_sdvo_regs.h
+++ b/src/i830_sdvo_regs.h
@@ -101,6 +101,9 @@ struct i830_sdvo_preferred_input_timing_args {
     uint16_t clock;
     uint16_t width;
     uint16_t height;
+    uint8_t interlace:1;
+    uint8_t scaled:1;
+    uint8_t pad:6;
 } __attribute__((packed));
 
 /* I2C registers for SDVO */
-- 
1.5.6.5




More information about the Intel-gfx mailing list