All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>, stable@vger.kernel.org
Subject: Re: [PATCH] drm/radeon: don't init gpuvm if accel is disabled (v2)
Date: Fri, 30 Jan 2015 10:18:08 +0100	[thread overview]
Message-ID: <54CB4C50.6080904@vodafone.de> (raw)
In-Reply-To: <1422545720-19456-1-git-send-email-alexander.deucher@amd.com>

Am 29.01.2015 um 16:35 schrieb Alex Deucher:
> If acceleration is disabled, it does not make sense
> to init gpuvm since nothing will use it.  Moreover,
> if radeon_vm_init() gets called it uses accel to try
> and clear the pde tables, etc. which results in a bug.
>
> v2: handle vm_fini as well
>
> Bug:
> https://bugs.freedesktop.org/show_bug.cgi?id=88786
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/radeon/radeon_kms.c | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
> index 3cf9c1f..686411e 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -605,14 +605,14 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
>   			return -ENOMEM;
>   		}
>   
> -		vm = &fpriv->vm;
> -		r = radeon_vm_init(rdev, vm);
> -		if (r) {
> -			kfree(fpriv);
> -			return r;
> -		}
> -
>   		if (rdev->accel_working) {
> +			vm = &fpriv->vm;
> +			r = radeon_vm_init(rdev, vm);
> +			if (r) {
> +				kfree(fpriv);
> +				return r;
> +			}
> +
>   			r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false);
>   			if (r) {
>   				radeon_vm_fini(rdev, vm);
> @@ -668,9 +668,9 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
>   					radeon_vm_bo_rmv(rdev, vm->ib_bo_va);
>   				radeon_bo_unreserve(rdev->ring_tmp_bo.bo);
>   			}
> +			radeon_vm_fini(rdev, vm);
>   		}
>   
> -		radeon_vm_fini(rdev, vm);
>   		kfree(fpriv);
>   		file_priv->driver_priv = NULL;
>   	}

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2015-01-30  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 15:35 [PATCH] drm/radeon: don't init gpuvm if accel is disabled (v2) Alex Deucher
2015-01-30  2:45 ` Michel Dänzer
2015-01-30  9:18 ` Christian König [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=54CB4C50.6080904@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.