From owner-freebsd-arch@freebsd.org Thu Feb 14 18:51:53 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFBE214DDBEB for ; Thu, 14 Feb 2019 18:51:53 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFD4A86871 for ; Thu, 14 Feb 2019 18:51:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x829.google.com with SMTP id 2so8081917qtb.5 for ; Thu, 14 Feb 2019 10:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CIICDHJj2nsda9h70leVJRhHoWt/tcHjNU71q86KFC0=; b=lXLOWJ70IePbeLV6sonkTjos/Ax8zOT3Vz14pMmqawV2Q8ItgbSFN7J2SxBLjtrry9 +mZNtJXjPJQ800kW5QpNCIiHbyE8YPKbZDJk7PtL5w0Adpl078PN94d1Kh7JIrWTLy9X XIlzv6PhhJgcGl/Ka2lPX/eLH1lR8Zti/aSPM7m1ymwbsvQxHR6fR3NjDAJGRWYadhcf PrRTyM0zJ1Q+8Fl6u3LqRRV0bgNEwwLcc0/rE4Bga+xJ3TKIcVhRzauOkXUr+ghbWaO3 vLitRoLlOmwrlY6A7lSwZ/6B+1rQx0Iii//MeeYMECwaKxR6Gpel4QCewafbn1PHP1Gq fGZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CIICDHJj2nsda9h70leVJRhHoWt/tcHjNU71q86KFC0=; b=DUJ00qqpcQnGNG0PPaznhRiB/9xI9PWGqK3JxImEhvjr2275rBRNnpV8ZjLxo3TmFH T6AAcZDvelx/WEUX4gIV3EAwi3SU43BnVNOgmXg6j2N64PYkShJc6mxV5nnI/ruDlRe2 jH7+BfSqfVKJefOZzam+RMk4S9+dy63afjbmD+EhO4n9UpfeK9iWGhytYU1q+cTGISJ2 ZcX5TFL1SZ8cxmwa80dpuMcH9kDsUmXDbq4q0Whi53LUTbpuww3oal0Y0aBRSIlhg6MC Lw/t/BcR5CTqSNFDsDfpk6RULexSl58I9BoxslBsfREtNziznQzwCTDzt5s8IjhCm0rH OQBw== X-Gm-Message-State: AHQUAuYc184jelnr7lmjVvfj9evuqCuhAakO5OFZzoTc8K576YLHHutZ O2thpuRirSJXIayepn0xIJi+hkOkUN/yfeSeLRbafc4R5Vk= X-Google-Smtp-Source: AHgI3Ib5pBQvmkytLD7sFSAopvStmF3iBzjyUP/mSMp9DE1FegfE6Qib4dRBS88bPUErTkbk5MDghsG9eAKoYLhxuEM= X-Received: by 2002:a0c:b068:: with SMTP id l37mr4275028qvc.21.1550170312024; Thu, 14 Feb 2019 10:51:52 -0800 (PST) MIME-Version: 1.0 References: <20190214180101.GB67712@troutmask.apl.washington.edu> <20190214182419.GA67872@troutmask.apl.washington.edu> In-Reply-To: <20190214182419.GA67872@troutmask.apl.washington.edu> From: Warner Losh Date: Thu, 14 Feb 2019 11:51:41 -0700 Message-ID: Subject: Re: "DRM removal soon" is premature To: Steve Kargl Cc: "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: AFD4A86871 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=lXLOWJ70 X-Spamd-Result: default: False [-5.59 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; URIBL_BLOCKED(0.00)[gappssmtp.com.multi.uribl.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; NEURAL_HAM_SHORT(-0.80)[-0.795,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[9.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.78)[ip: (-9.31), ipnet: 2607:f8b0::/32(-2.56), asn: 15169(-1.98), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 18:51:53 -0000 On Thu, Feb 14, 2019 at 11:24 AM Steve Kargl < sgk@troutmask.apl.washington.edu> wrote: > On Thu, Feb 14, 2019 at 11:08:18AM -0700, Warner Losh wrote: > > On Thu, Feb 14, 2019 at 11:01 AM Steve Kargl < > > sgk@troutmask.apl.washington.edu> wrote: > > > > > Warner, > > > > > > I'm not subscribed to freebsd-arch (well I am now!) > > > > > > drm-legacy-kmod is broken on i386-*-freebsd due > > > to r343567. I posted about this issue in > > > freebsd-current, freebsd-x11 lists. Find yourself > > > a post r343567 system, build drm-legacy-kmod, and > > > xorg and see what happens. > > > > > > > > > > https://lists.freebsd.org/pipermail/freebsd-current/2019-February/072802.html > > > > https://lists.freebsd.org/pipermail/freebsd-x11/2019-February/022754.html > > > > > > The in-tree versions don't even compile, how are they better than the > > drm-legacy-kmod modules which do, but don't work for some people (and do > > for others)? > > > > The in-tree version does not compile because someone disconnected > drm2 from the build. r342567 would not have happen if drm2 was > not disconnected. Technically, it's just off by default. It's still connected to the build. We just don't have a good way to lint the code, as drm isn't in i386 NOTES. > In your original post (which I cannot respond > to as I came too late to freebsd-arch), you wrote > > Since the drm-legacy-kmod or the drm-kmod packages seem to be > stable and working well for most people, the time has come to > finish the removal of most of the drm code in FreeBSD. > > I'm pointing out the fallacy of that statement for anyone > running freebsd-current on i386 who uses drm-legacy-kmod. > Hence my qualification of "most people" :) > Niclas proposed a fixed for drm-legacy-kmod here > > https://lists.freebsd.org/pipermail/freebsd-x11/2019-February/022759.html > > I reported on testing his proposed fix here > > https://lists.freebsd.org/pipermail/freebsd-x11/2019-February/022760.html > > and here > > https://lists.freebsd.org/pipermail/freebsd-x11/2019-February/022762.html You might try this fix instead, though I don't think it will matter. I think the breakage you're seeing is a result of a subtle dependency in the drm2/ttm code with FreeBSD's vm system. Even had it been connected to the build and fixed at the time, I don't think it would have mattered. diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index 010afe6d8b3b..20083ff0fb53 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -1498,11 +1498,11 @@ int ttm_bo_global_init(struct drm_global_reference *ref) tries = 0; retry: glob->dummy_read_page = vm_page_alloc_contig(NULL, 0, req, - 1, 0, VM_MAX_ADDRESS, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); + 1, 0, 0xfffffffful, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); if (unlikely(glob->dummy_read_page == NULL)) { if (tries < 1 && vm_page_reclaim_contig(req, 1, - 0, VM_MAX_ADDRESS, PAGE_SIZE, 0)) { + 0, 0xfffffffful, PAGE_SIZE, 0)) { tries++; goto retry; } Since that will eliminate the possibility that PAE is defined and giving a bigger max. Though it also likely won't matter if you have < 4GB of RAM in your machine. Obviously, this patch is not committable, but if it works it tells us something. But as I said, I doubt this will work as there's something subtle (likely the size of a variable or struct element) in ttm that's now out of sync. Warner