From owner-freebsd-x11@freebsd.org Wed May 23 07:46:16 2018 Return-Path: Delivered-To: freebsd-x11@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 E418FEF3951 for ; Wed, 23 May 2018 07:46:15 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-ot0-x233.google.com (mail-ot0-x233.google.com [IPv6:2607:f8b0:4003:c0f::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76D947CC77 for ; Wed, 23 May 2018 07:46:15 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-ot0-x233.google.com with SMTP id l13-v6so24085023otk.9 for ; Wed, 23 May 2018 00:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=1HBju+jgYHXXgSe3YM2/esxELt5PnA2NhDbztdSRyDg=; b=NoeGsnvV7elw4b4LmVO9US03Y6R7xrnALOgXVRBqxrJVWH7MPn6Eao8g5xoh7C7ftR 6WRnCXkFQ28A3pTVNsHrZC3dpwoLNek6Uda4qQXaHtEF/aU6Ufbc6xxS5CDQ5MtGl/Ku Mk0kTn8Ir250S0oiZhPqtNFq18L/zZU3r8VOCDl63ZwSTioSFDP6WA61ZFGj5ykZV6E8 cEUbAXfPRt1W2qoI2pMeejfQJ0XsxE8UT+gLbSu+eusYVeLvH02AAgAUflssEIZQPZ6h 0O2m9fxKAYwBD4OlDEYzV5abGXD4klRTFQDwlXIyg/RIgTxU0hX+j0PLUHrlMvSX0t5n Iviw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=1HBju+jgYHXXgSe3YM2/esxELt5PnA2NhDbztdSRyDg=; b=AG5y1UrHr6cFAoylHpw2T8ELbxnLB5Jw/kwZ3N6NpxzqujwF5rX6YA+du8M2BTpmTl YL5vc8YIJSiPcqQLchDckJAkKr1K08kIvlS+4ZAZyWSXAq4som/NEx5H+mOO9ewxWapt bsYtUhLDoA2KDy2juQGcjJdl08cXrhRvJhx5fGnIKjxzZ/m2v+XR4lzOCi/3G30Huurg xXY3C1AMlh1ni5azdmT13OA48Ei0lIB6rVoZxQf1dUxc75hrlApTpWJazviHHSrYij2w ad2Y3aYHKdsQdSSGs1IUYFXYS3TnN+K5rfw6Gbe5vSPiZ5vpD7nvzg6uxTohEGDJyK+8 uQCQ== X-Gm-Message-State: ALKqPwf74rVn6siEcQUaTAYfwnEiuCifKlpp3Oxxa4us05T4B9WQnRcw d6AXDa+rvBprvodvKvt1a8N/bbuw X-Google-Smtp-Source: AB8JxZr+c6uijZ5x5uzG5zSRE44jO1GS8CQvzpyCp/i7X8U/DglhkbrBM+6fwSg9Ed9RfW1XG8aOjg== X-Received: by 2002:a9d:5c4:: with SMTP id 62-v6mr1005755otd.200.1527061574495; Wed, 23 May 2018 00:46:14 -0700 (PDT) Received: from jd.gmail.com ([81.174.250.12]) by smtp.gmail.com with ESMTPSA id t8-v6sm11006035otj.74.2018.05.23.00.46.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 00:46:13 -0700 (PDT) References: <20180522233017.zj7u3w42ytd3rnky@mail.bwidawsk.net> User-agent: mu4e 1.0; emacs 25.3.1 From: Johannes Lundberg To: Ben Widawsky Cc: x11-list freebsd Subject: Re: Help needed :) In-reply-to: <20180522233017.zj7u3w42ytd3rnky@mail.bwidawsk.net> Date: Wed, 23 May 2018 08:46:10 +0100 Message-ID: <8636yiq0fx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2018 07:46:16 -0000 Ben Widawsky writes: > On 18-05-22 15:33:33, Johannes Lundberg wrote: >> Hi Ben (and welcome to FreeBSD) (cc: graphics ml) >> > > Thank you very much. > >> You said in an earlier email that you are a long time developer in drm/i915 and >> I was hoping you could help us zone in on one particular issue. > > I have recently stepped down from graphics to move into FreeBSD (unfortunately, > for me the choice was mutually exclusive). > That's unfortunate. Are you (still) with Intel? >> >> Our drm-stable-kmod package is based on Linux 4.9 and is running without >> issues. >> >> drm-next-kmod is based on 4.11 and we have some vaapi rendering regression. >> >> Between 4.9 and 4.11 we restructured a lot, moving drm bits out of the kernel >> tree into it's own repo so bisecting to find where the problem was introduced >> is very difficult. >> >> The issue is here (with screenshots): https://github.com/FreeBSDDesktop/kms-drm >> /issues/32 >> >> Maybe you are familiar with what could be the reason behind the rendering >> issues with vaapi? >> > > The two issues look different to me. First one looks like csc fail, and the > second looks like I have no clue. On the first one, given the fact that the top > of the frame looks correct, I'd actually guess there is some synchronization > issue. I'd expect that to generate an error message from either libva, or the > DDX. The second one is 84 pixels of corruptions which makes zero sense to me. > Maybe a context leak? Something like: > https://bugs.freedesktop.org/show_bug.cgi?id=102774 > > Can you reproduce this with modesetting driver as well, or only SNA? Most Linux > distributions have switched to either Wayland, or modesetting driver by default. > I have myself never seen the render bug with glxgears, only the vaapi rendering issue. I've added a comment here: https://github.com/FreeBSDDesktop/kms-drm/issues/32 There's also a link to Google Drive with a movie recording of a playback. modesetting, intel uxa/sna, all the same. The only factor that has any effect is drm-4.9 to drm-4.11 update. >> Since then we have continued to merge updates from upstream and we're now >> almost ready to release our drm drivers based on 4.15. >> >> https://github.com/FreeBSDDesktop/kms-drm/tree/drm-v4.15 >> >> The vaapi rendering issue still remains unchanged but we're hoping to fix that >> for this release. > > So GL is okay with the update to 4.15, just not VAAPI? It looks like you always > require more than 1 GPU client to reproduce? Context leaking is the first guest. > Yes, except for vaapi, 4.15 seem pretty solid except for a couple of things we need to fix in linuxkpi. Is there any specific part of the code (source file) to look for vaapi decoding stuff? Do you have any recommendation for a starting point? >> >> Latest driver code: >> https://github.com/FreeBSDDesktop/kms-drm/tree/drm-v4.15/drivers/gpu/drm/i915 >> >> Our drm drivers depends on linuxkpi which is split in two parts, gplv2 and >> non-gplv2. >> >> Latest version of non-gplv2 linuxkpi for 4.15 has not yet been merged into >> upstream freebsd and can be found here: https://github.com/FreeBSDDesktop/ >> freebsd-base-graphics/tree/drm-v4.15-WIP/sys/compat/linuxkpi/common >> >> gplv2 parts are here: >> https://github.com/FreeBSDDesktop/kms-drm/tree/drm-v4.15/linuxkpi >> >> We are grateful for any clues you might have. > > Are there any messages from DRM subsystem other than this one? > https://github.com/FreeBSDDesktop/kms-drm/issues/32#issuecomment-370277555 This message: Failed to submit rendering commands (Bad address), disabling acceleration? Not sure. I think this happens sometimes with intel ddx and is not related to the vaapi rendering bug. I can try reproduce it and post a full log. > >> >> PS. If you're interested in FreeBSD and would like to join/help us, we'd be >> happy to have someone from upstream i915 onboard :) >> > > I would have loved for my employer to fund me to do this, but it was sadly not > meant to be. I'd be happy to help out here though even though my knowledge grows > more stale by the day. > We are very grateful for every bit :) >> Thanks >> /Johannes >>