From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: matthijsvanduin@gmail.com, airlied@linux.ie, daniel@ffwll.ch,
linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org,
merlijn@wizzup.org, philipp@uvos.xyz,
laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH v3] drm: omapdrm: Export correct scatterlist for TILER backed BOs
Date: Thu, 2 Dec 2021 11:13:13 +0200 [thread overview]
Message-ID: <56fc4b66-c7c6-586e-229d-6850d561c6f7@ideasonboard.com> (raw)
In-Reply-To: <1637309180-31032-1-git-send-email-ivo.g.dimitrov.75@gmail.com>
Hi,
On 19/11/2021 10:06, Ivaylo Dimitrov wrote:
> Memory of BOs backed by TILER is not contiguous, but omap_gem_map_dma_buf()
> exports it like it is. This leads to (possibly) invalid memory accesses if
> another device imports such a BO.
>
> Fix that by providing sg that correctly describes TILER memory layout.
> Align TILER allocations to page, so importer to be able to correctly set
> its MMU if have one. Set export size accounting for the alignment. Also,
> make sure to destroy sg on unpin, as it is no longer valid.
>
> Tested on Motorola Droid4 by using GPU (sgx540) to render.
>
> Suggested-by: Matthijs van Duin <matthijsvanduin@gmail.com>
> Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
> ---
> drivers/gpu/drm/omapdrm/omap_gem.c | 79 ++++++++++++++++++++++++++++++-
> drivers/gpu/drm/omapdrm/omap_gem.h | 2 +
> drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 34 ++-----------
> 3 files changed, 85 insertions(+), 30 deletions(-)
I'll pick this to my work branch which I use every day, and let it be
there for a few days. If I don't see any issues, I'll push to drm-misc-next.
Tomi
next prev parent reply other threads:[~2021-12-02 9:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-13 9:40 [PATCH] drm: omapdrm: Export correct scatterlist for TILER backed BOs Ivaylo Dimitrov
2021-11-13 9:45 ` Ivaylo Dimitrov
2021-11-13 9:53 ` [PATCH v2] " Ivaylo Dimitrov
2021-11-15 8:42 ` Tomi Valkeinen
2021-11-15 9:23 ` Matthijs van Duin
2021-11-15 10:37 ` Tomi Valkeinen
2021-11-15 14:05 ` Ivaylo Dimitrov
2021-11-15 13:55 ` Ivaylo Dimitrov
2021-11-15 15:37 ` Tomi Valkeinen
2021-11-15 17:15 ` Ivaylo Dimitrov
2021-11-16 6:42 ` Tomi Valkeinen
2021-11-16 8:27 ` Ivaylo Dimitrov
2021-11-16 10:20 ` Tomi Valkeinen
2021-11-16 11:12 ` Ivaylo Dimitrov
2021-11-16 16:10 ` Ivaylo Dimitrov
2021-11-19 6:42 ` Ivaylo Dimitrov
2021-11-19 8:06 ` [PATCH v3] " Ivaylo Dimitrov
2021-11-25 8:17 ` Ivaylo Dimitrov
2021-12-02 9:13 ` Tomi Valkeinen [this message]
2021-11-15 18:45 ` Ivaylo Dimitrov
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=56fc4b66-c7c6-586e-229d-6850d561c6f7@ideasonboard.com \
--to=tomi.valkeinen@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=ivo.g.dimitrov.75@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=matthijsvanduin@gmail.com \
--cc=merlijn@wizzup.org \
--cc=philipp@uvos.xyz \
/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;
as well as URLs for NNTP newsgroup(s).