[Intel-gfx] [RFC][PATCH] drm/i915: set lvds dual channel according to VBT

Florian Mickler florian at mickler.org
Thu Jul 9 16:28:02 CEST 2009


On Tue,  7 Jul 2009 13:18:24 +0800
ling.ma at intel.com wrote:

> diff --git a/drivers/gpu/drm/i915/intel_bios.c
> b/drivers/gpu/drm/i915/intel_bios.c index da22863..cb8639f 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -32,6 +32,7 @@
>  
>  #define	SLAVE_ADDR1	0x70
>  #define	SLAVE_ADDR2	0x72
> +#define LVDS_DUAL_CHANNEL	0x2
>  
>  static void *
>  find_section(struct bdb_header *bdb, int section_id)
> @@ -104,19 +105,29 @@ parse_lfp_panel_data(struct drm_i915_private
> *dev_priv, struct lvds_dvo_timing *dvo_timing;
>  	struct drm_display_mode *panel_fixed_mode;
>  	int lfp_data_size;
> +	uint32_t channel_bits;
>  
>  	/* Defaults if we can't find VBT info */
>  	dev_priv->lvds_dither = 0;
>  	dev_priv->lvds_vbt = 0;
> +	dev_priv->lvds_dual_channel = 0;
>  
>  	lvds_options = find_section(bdb, BDB_LVDS_OPTIONS);
>  	if (!lvds_options)
>  		return;
>  
> +	/* Fetch lvds channel info */
> +	channel_bits = lvds_options->lvds_channel_bits &
> +		       (3 << lvds_options->panel_type);
> +	if (channel_bits) {
> +		channel_bits = channel_bits >>
> lvds_options->panel_type;
> +		if (channel_bits == LVDS_DUAL_CHANNEL)
> +			dev_priv->lvds_dual_channel = 1;
> +	}
> +
>  	dev_priv->lvds_dither = lvds_options->pixel_dither;
>  	if (lvds_options->panel_type == 0xff)
>  		return;
> -
>  	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
>  	if (!lvds_lfp_data)
>  		return;

i'm currently staring with an hexeditor at the rom. and have looked
into the Programmer’s Reference Manual and the OPRegion Spec, but
didn't find anything concrete about the channel-bits. 

Are you sure you have applied the right mask in this patch?
shifting by panel_type seems bogus to me. but i don't have any
expirience in this low-level sort of things, neither access to the
vbios specs...

Sincerely,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090709/26c6460f/attachment.sig>


More information about the Intel-gfx mailing list