[Intel-gfx] [PATCH] drm/i915: Allow LVDS on pipe A on gen4+

Pierre Willenbrock pierre at pirsoft.de
Tue Apr 6 10:49:03 CEST 2010


ykzhao schrieb:
> On Sun, 2010-04-04 at 03:46 +0800, Pierre Willenbrock wrote:
>> Adam Jackson schrieb:
>>> The gen4 docs say it works, so why not.  Tested on Ironlake.
>>>
>>
>> Looks like my i965 based laptop is not happy with this patch(well, the
>> version in erics repository). I get a black screen on LVDS(although
>> backlight works as always).
>>
>> The problem is not necessarily the inability of that chip to handle LVDS
>> on pipe A: The dot clock differs according to intel_reg_dumper, and i
>> get a new warning.
>>
>> Output of intel_reg_dumper with and without this patch is attached.
> 
> Hi, Pierre
>     Will you please try the following patch and see whether it can work for you?
>        

That one works, after changing intel_output to intel_encoder. (Although
intel_reg_dumper still complains, but now the dotclock is correct.)

Regards,
  Pierre
> 
> 
> The gen4 docs say it works, so why not.  Tested on Ironlake.
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    5 ++++-
>  drivers/gpu/drm/i915/intel_lvds.c    |    2 ++
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b27202d..05e2201 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3286,7 +3286,10 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
>  			lvds_reg = PCH_LVDS;
>  
>  		lvds = I915_READ(lvds_reg);
> -		lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT;
> +		lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;
> +		lvds &= ~LVDS_PIPEB_SELECT;
> +		if (pipe == 1)
> +			lvds |= LVDS_PIPEB_SELECT;
>  		/* set the corresponsding LVDS_BORDER bit */
>  		lvds |= dev_priv->lvds_border_bits;
>  		/* Set the B0-B3 data pairs corresponding to whether we're going to
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 93031a7..c810ad6 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -1056,6 +1056,8 @@ void intel_lvds_init(struct drm_device *dev)
>  
>  	intel_output->clone_mask = (1 << INTEL_LVDS_CLONE_BIT);
>  	intel_output->crtc_mask = (1 << 1);
> +	if (IS_I965G(dev))
> +		intel_output->crtc_mask |= (1 << 0);
>  	drm_encoder_helper_add(encoder, &intel_lvds_helper_funcs);
>  	drm_connector_helper_add(connector, &intel_lvds_connector_helper_funcs);
>  	connector->display_info.subpixel_order = SubPixelHorizontalRGB;




More information about the Intel-gfx mailing list