NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR/52438 CVS commit: src/sys/external/bsd/drm2/dist/drm/ttm
The following reply was made to PR kern/52438; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: Hauke Fath <hf%spg.tu-darmstadt.de@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost
Subject: Re: PR/52438 CVS commit: src/sys/external/bsd/drm2/dist/drm/ttm
Date: Wed, 2 Aug 2017 13:30:54 +0000
This is a multi-part message in MIME format.
--=_nBUd1T/x7U6TEjns63jM9dlmbnhRRTFP
Content-Transfer-Encoding: quoted-printable
> Date: Wed, 2 Aug 2017 12:00:10 +0200
> From: Hauke Fath <hf%spg.tu-darmstadt.de@localhost>
>=20
> On 08/02/17 11:55, Hauke Fath wrote:
> > DRM error in radeon_gem_object_create: Failed to allocate GEM object
> > (6414336, 2, 4096, -12)
> > =20
> > The latter went with garbage on the screen, and synchronization failu=
re,
> > which went away after switching back to text console.
>=20
> I can reproduce this effect by live-resizing a PDF (fairly simple, it's=20
> a mainboard manual) in mupdf.
Can you use dtrace? Can you print the arguments to bus_dmamap_create
while you trigger the failure?
If not, can you try the attached patch?
--=_nBUd1T/x7U6TEjns63jM9dlmbnhRRTFP
Content-Type: text/plain; charset="ISO-8859-1"; name="ttm_tt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="ttm_tt.patch"
Index: sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c,v
retrieving revision 1.10
diff -p -u -r1.10 ttm_tt.c
--- sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c 30 Jul 2017 13:43:48 -0000 =
1.10
+++ sys/external/bsd/drm2/dist/drm/ttm/ttm_tt.c 2 Aug 2017 13:30:10 -0000
@@ -266,6 +266,8 @@ int ttm_dma_tt_init(struct ttm_dma_tt *t
=20
if (ttm->num_pages > (SIZE_MAX /
MIN(sizeof(ttm_dma->dma_segs[0]), PAGE_SIZE))) {
+ printf("%s: ttm npages %lu too large\n", __func__,
+ ttm->num_pages);
error =3D ENOMEM;
goto fail0;
}
@@ -274,8 +276,19 @@ int ttm_dma_tt_init(struct ttm_dma_tt *t
error =3D bus_dmamap_create(ttm->bdev->dmat,
(ttm->num_pages * PAGE_SIZE), ttm->num_pages, PAGE_SIZE, 0,
BUS_DMA_WAITOK, &ttm_dma->dma_address);
- if (error)
+ if (error) {
+ printf("%s:"
+ " bus_dmamap_create(dmat=3D%p, size=3D%#zx,"
+ " nsegs=3D%zu, maxsegsz=3D%zu,"
+ " boundary=3D0, flags=3DBUS_DMA_WAITOK) failed: %d\n",
+ __func__,
+ ttm->bdev->dmat,
+ (bus_size_t)(ttm->num_pages * PAGE_SIZE),
+ (bus_size_t)ttm->num_pages,
+ (bus_size_t)PAGE_SIZE,
+ error);
goto fail1;
+ }
=20
return 0;
=20
--=_nBUd1T/x7U6TEjns63jM9dlmbnhRRTFP--
Home |
Main Index |
Thread Index |
Old Index