[Intel-gfx] [PATCH] TV: add option to set TV connector type

Julien Cristau jcristau at debian.org
Thu Feb 19 16:28:04 CET 2009


Hi Zhenyu,

On Thu, 2009-02-19 at 16:58 +0800, Zhenyu Wang wrote:
> @@ -1816,6 +1821,23 @@ i830_tv_init(ScrnInfoPtr pScrn)
>      else
>  	dev_priv->tv_format = xstrdup (tv_modes[0].name);
>  
> +    tv_type = xf86findOptionValue (mon_option_lst, "TV Connector");
> +    if (tv_type) {
> +	dev_priv->force_type = TRUE;
> +	if (strcmp(tv_type, "S-Video") == 0)
> +	    dev_priv->type = TV_TYPE_SVIDEO;
> +	else if (strcmp(tv_type, "Composite") == 0)
> +	    dev_priv->type = TV_TYPE_COMPOSITE;
> +	else if (strcmp(tv_type, "Component") == 0)
> +	    dev_priv->type = TV_TYPE_COMPONENT;
> +	else
> +	    dev_priv->force_type = FALSE;
> +    }

you might want to output a warning in the log here if you don't
recognize the value and ignore it?

> +
> +    if (dev_priv->force_type)
> +	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> +		"Force TV Connector type as %s\n", tv_type);
> +
>      output->driver_private = intel_output;
>      output->interlaceAllowed = FALSE;
>      output->doubleScanAllowed = FALSE;

Cheers,
Julien



More information about the Intel-gfx mailing list