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

Jani Nikula jani.nikula at linux.intel.com
Tue Dec 17 10:21:27 CET 2013


On Mon, 16 Dec 2013, Chris Wilson <chris at chris-wilson.co.uk> 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 at chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  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 at intel.com>

*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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center



More information about the Intel-gfx mailing list