All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Ilija Hadzic <ilijahadzic@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Ilija Hadzic <ihadzic@research.bell-labs.com>, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/radeon: fix the crash in benchmark functions
Date: Fri, 30 Jan 2015 10:20:36 +0100	[thread overview]
Message-ID: <54CB4CE4.9070106@vodafone.de> (raw)
In-Reply-To: <1422596324-1737-1-git-send-email-ihadzic@research.bell-labs.com>

Am 30.01.2015 um 06:38 schrieb Ilija Hadzic:
> radeon_copy_dma and radeon_copy_blit must be called with
> a valid reservation object. Otherwise a crash will be provoked.
> We borrow the object from destination BO.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>

Ah, yes stumbled over that as well but didn't had time to make a patch 
for it. So thanks a lot for taking care.

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

Regards,
Christian.

> ---
>   drivers/gpu/drm/radeon/radeon_benchmark.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c b/drivers/gpu/drm/radeon/radeon_benchmark.c
> index 9e7f23d..87d5fb2 100644
> --- a/drivers/gpu/drm/radeon/radeon_benchmark.c
> +++ b/drivers/gpu/drm/radeon/radeon_benchmark.c
> @@ -34,7 +34,8 @@
>   
>   static int radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size,
>   				    uint64_t saddr, uint64_t daddr,
> -				    int flag, int n)
> +				    int flag, int n,
> +				    struct reservation_object *resv)
>   {
>   	unsigned long start_jiffies;
>   	unsigned long end_jiffies;
> @@ -47,12 +48,12 @@ static int radeon_benchmark_do_move(struct radeon_device *rdev, unsigned size,
>   		case RADEON_BENCHMARK_COPY_DMA:
>   			fence = radeon_copy_dma(rdev, saddr, daddr,
>   						size / RADEON_GPU_PAGE_SIZE,
> -						NULL);
> +						resv);
>   			break;
>   		case RADEON_BENCHMARK_COPY_BLIT:
>   			fence = radeon_copy_blit(rdev, saddr, daddr,
>   						 size / RADEON_GPU_PAGE_SIZE,
> -						 NULL);
> +						 resv);
>   			break;
>   		default:
>   			DRM_ERROR("Unknown copy method\n");
> @@ -120,7 +121,8 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size,
>   
>   	if (rdev->asic->copy.dma) {
>   		time = radeon_benchmark_do_move(rdev, size, saddr, daddr,
> -						RADEON_BENCHMARK_COPY_DMA, n);
> +						RADEON_BENCHMARK_COPY_DMA, n,
> +						dobj->tbo.resv);
>   		if (time < 0)
>   			goto out_cleanup;
>   		if (time > 0)
> @@ -130,7 +132,8 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size,
>   
>   	if (rdev->asic->copy.blit) {
>   		time = radeon_benchmark_do_move(rdev, size, saddr, daddr,
> -						RADEON_BENCHMARK_COPY_BLIT, n);
> +						RADEON_BENCHMARK_COPY_BLIT, n,
> +						dobj->tbo.resv);
>   		if (time < 0)
>   			goto out_cleanup;
>   		if (time > 0)

_______________________________________________
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:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30  5:38 [PATCH 1/2] drm/radeon: fix the crash in benchmark functions Ilija Hadzic
2015-01-30  5:38 ` [PATCH 2/2] drm/radeon: fix the crash in test functions Ilija Hadzic
2015-01-30  9:20 ` Christian König [this message]
2015-01-30 15:05   ` [PATCH 1/2] drm/radeon: fix the crash in benchmark functions Alex Deucher

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=54CB4CE4.9070106@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ihadzic@research.bell-labs.com \
    --cc=ilijahadzic@gmail.com \
    --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.