summaryrefslogtreecommitdiff
path: root/src/i830_tv.c
diff options
context:
space:
mode:
authorRobert Lowery <rglowery@exemail.com.au>2008-12-03 09:48:23 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-12-03 09:48:23 +0800
commit07f5a8223187c1abc79c104d2fa5859a54cecd30 (patch)
tree758d659b61859a8ae7f18585f29534194de138ab /src/i830_tv.c
parent00ae7a571b6413aa2530e4f1310f8f4646631946 (diff)
TV: add support to set TV margins in xorg.conf
Diffstat (limited to 'src/i830_tv.c')
-rw-r--r--src/i830_tv.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 09a46e95..d507a0ce 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1691,6 +1691,8 @@ i830_tv_init(ScrnInfoPtr pScrn)
I830OutputPrivatePtr intel_output;
struct i830_tv_priv *dev_priv;
uint32_t tv_dac_on, tv_dac_off, save_tv_dac;
+ char *mon_option_lst = NULL;
+ char *tv_format = NULL;
if (pI830->quirk_flag & QUIRK_IGNORE_TV)
return;
@@ -1745,21 +1747,23 @@ i830_tv_init(ScrnInfoPtr pScrn)
dev_priv->tv_format = NULL;
- /* BIOS margin values */
- dev_priv->margin[TV_MARGIN_LEFT] = 54;
- dev_priv->margin[TV_MARGIN_TOP] = 36;
- dev_priv->margin[TV_MARGIN_RIGHT] = 46;
- dev_priv->margin[TV_MARGIN_BOTTOM] = 37;
-
if (output->conf_monitor)
- {
- char *tv_format;
-
- tv_format = xf86findOptionValue (output->conf_monitor->mon_option_lst, "TV Format");
- if (tv_format)
- dev_priv->tv_format = xstrdup (tv_format);
- }
- if (!dev_priv->tv_format)
+ mon_option_lst = output->conf_monitor->mon_option_lst;
+
+ /* BIOS margin values */
+ dev_priv->margin[TV_MARGIN_LEFT] = xf86SetIntOption (mon_option_lst,
+ "Left", 54);
+ dev_priv->margin[TV_MARGIN_TOP] = xf86SetIntOption (mon_option_lst,
+ "Top", 36);
+ dev_priv->margin[TV_MARGIN_RIGHT] = xf86SetIntOption (mon_option_lst,
+ "Right", 46);
+ dev_priv->margin[TV_MARGIN_BOTTOM] = xf86SetIntOption (mon_option_lst,
+ "Bottom", 37);
+
+ tv_format = xf86findOptionValue (mon_option_lst, "TV Format");
+ if (tv_format)
+ dev_priv->tv_format = xstrdup (tv_format);
+ else
dev_priv->tv_format = xstrdup (tv_modes[0].name);
output->driver_private = intel_output;