Re: [PATCH 1/2] drm/radeon: fix the crash in benchmark functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 30, 2015 at 4:20 AM, Christian König
<deathsimple@xxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxxxxx
>> Signed-off-by: Ilija Hadzic <ihadzic@xxxxxxxxxxxxxxxxxxxxxx>
>
>
> 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@xxxxxxx>

Applied to my fixes tree.  thanks.  Also noted the relevant bug:
https://bugs.freedesktop.org/show_bug.cgi?id=88464

Alex

>
> 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@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]