diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2009-02-13 09:50:45 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2009-02-13 09:50:45 +0800 |
commit | 824b2f0c5530c3196901c961757e6677b042caf3 (patch) | |
tree | b6e627c26b6904257d3646bfbfdb9248a86acce6 /src/i830_sdvo.c | |
parent | 62c0c2f5549a51c5df209f7353a19ca301f221be (diff) |
SDVO: fix usage for SET_TV_FORMAT and GET_SDTV_RESOLUTION_SUPPORT command
They both needs parameters.
Diffstat (limited to 'src/i830_sdvo.c')
-rw-r--r-- | src/i830_sdvo.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c index 9cce3160..5c2a4b10 100644 --- a/src/i830_sdvo.c +++ b/src/i830_sdvo.c @@ -1635,9 +1635,13 @@ i830_sdvo_check_tv_format(xf86OutputPtr output) SDVO_NAME(dev_priv)); format.ntsc_m = TRUE; - i830_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, NULL, 0); + i830_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, &format, + sizeof(format)); status = i830_sdvo_read_response(output, NULL, 0); + if (status != SDVO_CMD_STATUS_SUCCESS) + return; } + memcpy(&dev_priv->tv_format, &format, sizeof(format)); } static DisplayModePtr @@ -1647,6 +1651,7 @@ i830_sdvo_get_tv_modes(xf86OutputPtr output) struct i830_sdvo_priv *dev_priv = intel_output->dev_priv; DisplayModePtr modes = NULL; struct i830_sdvo_sdtv_resolution_reply *res = &dev_priv->sdtv_resolutions; + struct i830_sdvo_sdtv_resolution_request tv_res; uint8_t status; float refresh = 60; /* XXX */ @@ -1654,7 +1659,10 @@ i830_sdvo_get_tv_modes(xf86OutputPtr output) /* Read the list of supported input resolutions for the selected TV format. */ - i830_sdvo_write_cmd(output, SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT, NULL, 0); + memset(&tv_res, 0, sizeof(tv_res)); + memcpy(&tv_res, &dev_priv->tv_format, sizeof(tv_res)); + i830_sdvo_write_cmd(output, SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT, + &tv_res, sizeof(tv_res)); status = i830_sdvo_read_response(output, res, sizeof(*res)); if (status != SDVO_CMD_STATUS_SUCCESS) return NULL; |