Re: [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Dec 2013, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote:
> Touching the VGA registers risks a hard machine hang, at least on this
> ivb machine after removing a conflicting efifb. This is more than likely
> related to the discovery that VGA IO decode on the more recent PCH
> platforms is terminally broken.

Please double check the config space address. At a glance, it looks like
we should be using SNB_GMCH_CTRL since SNB. Might explain the issues?

> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 7db292c469af..d9b91a585dbf 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11341,6 +11341,9 @@ int intel_modeset_vga_set_state(struct drm_device *dev, bool state)
>  		return -EIO;
>  	}
>  
> +	if (!!(gmch_ctrl & INTEL_GMCH_VGA_DISABLE) == !state)
> +		return 0;
> +

I think I'd use a temp gmch_ctrl, make the change below on that, and
then compare the new and old values. Just to avoid the use of negatives
so much. Either way, the patch is

Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

*iff* it's still needed with the verified config space address.


BR,
Jani.

>  	if (state)
>  		gmch_ctrl &= ~INTEL_GMCH_VGA_DISABLE;
>  	else
> -- 
> 1.8.5.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux