From: Yu Zhao <yuzhao-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
soprwa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: pitch alignment questions
Date: Fri, 11 Jan 2019 14:37:47 -0700 [thread overview]
Message-ID: <20190111213747.GA148783@google.com> (raw)
In-Reply-To: <8033aaf7-2e86-9414-c68a-7b17e331f212-otUistvHUpPR7s880joybQ@public.gmane.org>
On Fri, Jan 11, 2019 at 04:27:44PM +0100, Michel Dänzer wrote:
> On 2019-01-10 6:56 p.m., Przemek Socha wrote:
> >
> > [ 147.846148] [drm:amdgpu_display_user_framebuffer_create [amdgpu]] Invalid
> > pitch: expecting 10752 but got 10624
> > [ 147.846155] [drm:drm_internal_framebuffer_create] could not create
> > framebuffer"
>
> Thanks, this confirms that the check is too strict. I've sent a patch
> reverting this as well.
>
>
> Yu, I like the idea behind your changes, but unfortunately it's more
> complicated than that. If you want to work on similar checks which
> accurately reflect the hardware constraints, people on the amd-gfx list
> should be able to help with that.
Hi Michel, sorry for the troubles.
Background: after we turned on iommu with amd_iommu=force_isolation,
we saw io page faults from amd gpu (stoney ridge). We tracked it
down to userspace using 32-pixel pitch alignment, which seems smaller
than the minimum alignment supported by the hw. Instead of rejecting
the alignment, we suspect, it uses 64-pixel alignment to do dma. The
larger alignment sometimes causes out of bound memory accesses, thus
the io page faults.
I created the following patch and hoped it could fix the problem:
https://lore.kernel.org/patchwork/patch/1029656/
Well, it does on our stoney ridge based chromebook but also breaks
other platforms.
So my questions to the amd gpu experts here:
1) how do properly validate pitch alignment passed to kernel space?
2) if it's not easy, what would invalid alignment cause at worst?
Thank you.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-01-11 21:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 9:44 BISECTED- amd-staging-drm-next, xorg-server segfault A6-6310 APU - R4 Mullins Przemek Socha
2019-01-10 11:25 ` Michel Dänzer
[not found] ` <70fd7291-8d04-f7f9-b31b-b19e9ba36f12-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-01-10 16:06 ` Przemek Socha
2019-01-10 16:22 ` Michel Dänzer
[not found] ` <641eb681-2952-19d9-5c74-01616a51c6ec-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-01-10 17:56 ` Przemek Socha
2019-01-11 15:27 ` Michel Dänzer
[not found] ` <8033aaf7-2e86-9414-c68a-7b17e331f212-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-01-11 21:37 ` Yu Zhao [this message]
[not found] ` <20190111213747.GA148783-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2019-01-14 17:44 ` pitch alignment questions Michel Dänzer
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=20190111213747.GA148783@google.com \
--to=yuzhao-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
--cc=soprwa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.