On Fri, Jan 15, 2010 at 8:44 AM, Jerome Glisse <jgli...@redhat.com> wrote:
> In some rare case the wptr returned from the hw wasn't 0 and leaded
> to trick r600_process_irq that their were irq to process. Add a
> check to bail out if irq hasn't been initialized this will avoid
> oops provoqued by the rare wptr != 0 on initialization.
>
> Signed-off-by: Jerome Glisse <jgli...@redhat.com>

Reviewed-by: Alex Deucher <alexdeuc...@gmail.com>


> ---
>  drivers/gpu/drm/radeon/r600.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index a6a23a9..0f9a8c6 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -2473,8 +2473,12 @@ int r600_irq_set(struct radeon_device *rdev)
>                return -EINVAL;
>        }
>        /* don't enable anything if the ih is disabled */
> -       if (!rdev->ih.enabled)
> +       if (!rdev->ih.enabled) {
> +               r600_disable_interrupts(rdev);
> +               /* force the active interrupt state to all disabled */
> +               r600_disable_interrupt_state(rdev);
>                return 0;
> +       }
>
>        if (ASIC_IS_DCE3(rdev)) {
>                hpd1 = RREG32(DC_HPD1_INT_CONTROL) & ~DC_HPDx_INT_EN;
> @@ -2692,6 +2696,8 @@ int r600_irq_process(struct radeon_device *rdev)
>        bool queue_hotplug = false;
>
>        DRM_DEBUG("r600_irq_process start: rptr %d, wptr %d\n", rptr, wptr);
> +       if (!rdev->ih.enabled)
> +               return IRQ_NONE;
>
>        spin_lock_irqsave(&rdev->ih.lock, flags);
>
> --
> 1.6.5.2
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to