lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87sgvptgo8.fsf@anholt.net>
Date:   Thu, 14 Mar 2019 12:11:19 -0700
From:   Eric Anholt <eric@...olt.net>
To:     Rob Herring <robh@...nel.org>
Cc:     dri-devel <dri-devel@...ts.freedesktop.org>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        david.emett@...adcom.com, thomas.spurden@...adcom.com
Subject: Re: [PATCH] drm/v3d: Use the new shmem helpers to reduce driver boilerplate.

Rob Herring <robh@...nel.org> writes:

> On Thu, Mar 14, 2019 at 11:34 AM Eric Anholt <eric@...olt.net> wrote:
>>
>> The new shmem helpers from Noralf and Rob abstract out a bunch of our
>> BO creation and mapping code.
>>
>> v2: Use the new sgt getter, and flag pages as dirty before freeing.
>>
>> Signed-off-by: Eric Anholt <eric@...olt.net>
>> ---
>>  drivers/gpu/drm/v3d/Kconfig   |   1 +
>>  drivers/gpu/drm/v3d/v3d_bo.c  | 317 ++++++++++------------------------
>>  drivers/gpu/drm/v3d/v3d_drv.c |  27 +--
>>  drivers/gpu/drm/v3d/v3d_drv.h |  14 +-
>>  drivers/gpu/drm/v3d/v3d_gem.c |  12 +-
>>  drivers/gpu/drm/v3d/v3d_irq.c |   8 +-
>>  drivers/gpu/drm/v3d/v3d_mmu.c |  11 +-
>>  7 files changed, 120 insertions(+), 270 deletions(-)
>
>> diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
>> index 945eaaaad016..b84d89c7b3fb 100644
>> --- a/drivers/gpu/drm/v3d/v3d_gem.c
>> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
>> @@ -201,7 +201,8 @@ v3d_attach_object_fences(struct v3d_bo **bos, int bo_count,
>>
>>         for (i = 0; i < bo_count; i++) {
>>                 /* XXX: Use shared fences for read-only objects. */
>> -               reservation_object_add_excl_fence(bos[i]->base.resv, fence);
>> +               reservation_object_add_excl_fence(bos[i]->base.base.resv,
>> +                                                 fence);
>
> All these 'bos[i]->base.base' occurrences are not the prettiest.
> Changing your bos array to a struct drm_gem_object ** instead would
> help. That's what I did for panfrost. Though I've not looked at were
> you actually need the v3d_bo.

Agreed that would probably be a goodcleanup, but I'm hoping I can land
the compute shaders first.  I've been doing a lot of rebasing of that
series and I want to just get it done.

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ