Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@redhat.com>
To: Keith Packard <keithp@keithp.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Free hardware status page on unload when physically mapped
Date: Thu, 07 Oct 2010 15:43:43 +1000	[thread overview]
Message-ID: <1286430223.4928.5.camel@clockmaker-el6> (raw)
In-Reply-To: <1286425487-22515-1-git-send-email-keithp@keithp.com>

On Wed, 2010-10-06 at 21:24 -0700, Keith Packard wrote:
> A physically mapped hardware status page is allocated at driver load
> time but was never freed. Call the existing code to free this page at
> driver unload time on hardware which uses this kind.

the free_hws gets called after we disappear the mmio mapping for the
registers. it then writes a register after killing the hws, and oopses.

Dave.

> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 9d67b48..98bf1f0 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -2305,6 +2305,9 @@ int i915_driver_unload(struct drm_device *dev)
>  		intel_cleanup_overlay(dev);
>  	}
>  
> +	if (!I915_NEED_GFX_HWS(dev))
> +		i915_free_hws(dev);
> +
>  	intel_teardown_mchbar(dev);
>  
>  	pci_dev_put(dev_priv->bridge_dev);

  reply	other threads:[~2010-10-07  5:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  4:24 [PATCH] drm/i915: Free hardware status page on unload when physically mapped Keith Packard
2010-10-07  5:43 ` Dave Airlie [this message]
2010-10-07  8:19   ` Chris Wilson

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=1286430223.4928.5.camel@clockmaker-el6 \
    --to=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    /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