[PATCH] drm/nouveau: fix TTM_PL_TT memtype on pre-nv50 (original) (raw)

Maarten Lankhorst maarten.lankhorst at canonical.com
Sun Feb 16 02:43:51 PST 2014


op 16-02-14 05:27, Ilia Mirkin schreef:

Commit a55409066 ("drm/nv50-: map TTMPLSYSTEM through a BAR for CPU access") made it possible to work with tiled memory. However mem->mmnode is not a nouveaumem for AGP-using pre-NV50 cards, but a drmmmnode, as created by the ttmbomanagerfunc. As such, extend the untiled check to explicitly include all pre-nv50 cards.

Reported-by: Ronald <ronald645 at gmail.com> Bugzilla: https://bugs.freedesktop.org/showbug.cgi?id=74613 Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- Hmmm... this seems like a really fragile semantic, I wonder if more mem->mmnode usages have to be audited. But this one's quick and easy. I'd rather see something a little more solid around dealing with these differences, but not sure how without reading all the ttm gunk. Perhaps just make sure it's always a nouveaumem by wrapping the ttmbomanager logic? drivers/gpu/drm/nouveau/nouveaubo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveaubo.c b/drivers/gpu/drm/nouveau/nouveaubo.c index 488686d..4aed171 100644 --- a/drivers/gpu/drm/nouveau/nouveaubo.c +++ b/drivers/gpu/drm/nouveau/nouveaubo.c @@ -1249,7 +1249,7 @@ nouveauttmiomemreserve(struct ttmbodevice *bdev, struct ttmmemreg *mem) mem->bus.isiomem = !dev->agp->cantuseaperture; } #endif - if (!node->memtype) + if (nvdevice(drm->device)->cardtype < NV50 || !node->memtype) /* untiled */ break; /* fallthrough, tiled memory */ Acked-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>



More information about the dri-devel mailing list