public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state()
Date: Tue, 17 Dec 2013 11:21:27 +0200	[thread overview]
Message-ID: <871u1b6dew.fsf@intel.com> (raw)
In-Reply-To: <1387209888-9117-2-git-send-email-chris@chris-wilson.co.uk>

On Mon, 16 Dec 2013, Chris Wilson <chris@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@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@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@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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  reply	other threads:[~2013-12-17  9:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16 16:04 [PATCH 1/2] drm/i915: Propagate PCI read/write errors during vga_set_state() Chris Wilson
2013-12-16 16:04 ` [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state() Chris Wilson
2013-12-17  9:21   ` Jani Nikula [this message]
2013-12-17 11:45     ` Chris Wilson
2013-12-17 12:02       ` Chris Wilson
2013-12-17 14:34     ` [PATCH] drm/i915: Use the correct GMCH_CTRL register for Sandybridge+ Chris Wilson
2013-12-17 16:03       ` Jani Nikula
2013-12-17  9:14 ` [PATCH 1/2] drm/i915: Propagate PCI read/write errors during vga_set_state() Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871u1b6dew.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox