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 1/2] drm/i915: Propagate PCI read/write errors during vga_set_state()
Date: Tue, 17 Dec 2013 11:14:32 +0200	[thread overview]
Message-ID: <874n676dqf.fsf@intel.com> (raw)
In-Reply-To: <1387209888-9117-1-git-send-email-chris@chris-wilson.co.uk>

On Mon, 16 Dec 2013, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> This has very little effect other than log the errors in case of failure,
> and we then hope for the best.

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

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index d0082a025c83..7db292c469af 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11336,12 +11336,21 @@ int intel_modeset_vga_set_state(struct drm_device *dev, bool state)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	u16 gmch_ctrl;
>  
> -	pci_read_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctrl);
> +	if (pci_read_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, &gmch_ctrl)) {
> +		DRM_ERROR("failed to read control word\n");
> +		return -EIO;
> +	}
> +
>  	if (state)
>  		gmch_ctrl &= ~INTEL_GMCH_VGA_DISABLE;
>  	else
>  		gmch_ctrl |= INTEL_GMCH_VGA_DISABLE;
> -	pci_write_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, gmch_ctrl);
> +
> +	if (pci_write_config_word(dev_priv->bridge_dev, INTEL_GMCH_CTRL, gmch_ctrl)) {
> +		DRM_ERROR("failed to write control word\n");
> +		return -EIO;
> +	}
> +
>  	return 0;
>  }
>  
> -- 
> 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

      parent reply	other threads:[~2013-12-17  9:11 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
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 ` Jani Nikula [this message]

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=874n676dqf.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