From: Eric Anholt <eric@anholt.net>
To: Rob Herring <robh@kernel.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
david.emett@broadcom.com, thomas.spurden@broadcom.com
Subject: Re: [PATCH] drm/v3d: Use the new shmem helpers to reduce driver boilerplate.
Date: Thu, 14 Mar 2019 12:11:19 -0700 [thread overview]
Message-ID: <87sgvptgo8.fsf@anholt.net> (raw)
In-Reply-To: <CAL_JsqLeyDahEpWkj=3ogEcbz84qFQTj=wBZDTDoyNjbRz3Ccg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]
Rob Herring <robh@kernel.org> writes:
> On Thu, Mar 14, 2019 at 11:34 AM Eric Anholt <eric@anholt.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@anholt.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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
prev parent reply other threads:[~2019-03-14 19:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190313004344.24169-1-robh@kernel.org>
2019-03-14 16:34 ` [PATCH] drm/v3d: Use the new shmem helpers to reduce driver boilerplate Eric Anholt
2019-03-14 16:47 ` Eric Anholt
2019-03-14 18:15 ` Rob Herring
2019-03-14 19:11 ` Eric Anholt [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=87sgvptgo8.fsf@anholt.net \
--to=eric@anholt.net \
--cc=david.emett@broadcom.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thomas.spurden@broadcom.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox