Re: [git pull] drm for 5.8-rc1

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

 



On Wed, Aug 12, 2020 at 8:24 AM Karol Herbst <kherbst@xxxxxxxxxx> wrote:
>
> On Wed, Aug 12, 2020 at 12:43 PM Karol Herbst <kherbst@xxxxxxxxxx> wrote:
> >
> > On Wed, Aug 12, 2020 at 12:27 PM Karol Herbst <kherbst@xxxxxxxxxx> wrote:
> > >
> > > On Wed, Aug 12, 2020 at 2:19 AM James Jones <jajones@xxxxxxxxxx> wrote:
> > > >
> > > > Sorry for the slow reply here as well.  I've been in the process of
> > > > rebasing and reworking the userspace patches.  I'm not clear my changes
> > > > will address the Jetson Nano issue, but if you'd like to try them, the
> > > > latest userspace changes are available here:
> > > >
> > > >    https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3724
> > > >
> > > > And the tegra-drm kernel patches are here:
> > > >
> > > >
> > > > https://patchwork.ozlabs.org/project/linux-tegra/patch/20191217005205.2573-1-jajones@xxxxxxxxxx/
> > > >
> > > > Those + the kernel changes addressed in this thread are everything I had
> > > > outstanding.
> > > >
> > >
> > > I don't know if that's caused by your changes or not, but now the
> > > assert I hit is a different one pointing out that
> > > nvc0_miptree_select_best_modifier fails in a certain case and returns
> > > MOD_INVALID... anyway, it seems like with your patches applied it's
> > > now way easier to debug and figure out what's going wrong, so maybe I
> > > can figure it out now :)
> > >
> >
> > collected some information which might help to track it down.
> >
> > src/gallium/frontends/dri/dri2.c:648 is the assert hit: assert(*zsbuf)
> >
> > templ is {reference = {count = 0}, width0 = 300, height0 = 300, depth0
> > = 1, array_size = 1, format = PIPE_FORMAT_Z24X8_UNORM, target =
> > PIPE_TEXTURE_2D, last_level = 0, nr_samples = 0, nr_storage_samples =
> > 0, usage = 0, bind = 1, flags = 0, next = 0x0, screen = 0x0}
> >
> > inside tegra_screen_resource_create modifier says
> > DRM_FORMAT_MOD_INVALID as template->bind is 1
> >
> > and nvc0_miptree_select_best_modifier returns DRM_FORMAT_MOD_INVALID,
> > so the call just returns NULL leading to the assert.
> >
> > Btw, this is on Xorg-1.20.8-1.fc32.aarch64 with glxgears.
> >
>
> So I digged a bit deeper and here is what tripps it of:
>
> when the context gets made current, the normal framebuffer validation
> and render buffer allocation is done, but we end up inside
> tegra_screen_resource_create at some point with PIPE_BIND_SCANOUT set
> in template->bind. Now the tegra driver forces the
> DRM_FORMAT_MOD_LINEAR modifier and calls into
> resource_create_with_modifiers.
>
> If it wouldn't do that, nouveau would allocate a tiled buffer, with
> that it's linear and we at some point end up with an assert about a
> depth_stencil buffer being there even though it shouldn't. If I always
> use DRM_FORMAT_MOD_INVALID in tegra_screen_resource_create, things
> just work.
>
> That's kind of the cause I pinpointed the issue down to. But I have no
> idea what's supposed to happen and what the actual bug is.

Yeah, the bug with tegra has always been "trying to render to linear
color + tiled depth", which the hardware plain doesn't support. (And
linear depth isn't a thing.)

Question is whether what it's doing necessary. PIPE_BIND_SCANOUT
(/linear) requirements are needed for DRI2 to work (well, maybe not in
theory, but at least in practice the nouveau ddx expects linear
buffers). However tegra operates on a more DRI3-like basis, so with
"client" allocations, tiled should work OK as long as there's
something in tegra to copy it to linear when necessary?

  -ilia
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux