From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 8918 invoked from network); 17 Apr 2023 07:55:24 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 17 Apr 2023 07:55:24 -0000 Received: from wopr.sciops.net ([216.126.196.60]) by 9front; Mon Apr 17 03:53:35 -0400 2023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sciops.net; s=20210706; t=1681717901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=StA8I5DxHBkq4eqzgpZMP9Q6ypfWqyY3UBKQRMFs7o8=; b=Ep3RZrex1U+yW/sT+j2PeOqF91ie1fH9Xtm8o6Slo2SPUjKg9hHVZxF1ulQqUWx94aOUbX 3zmFXDsX6c2tOvgoPYrFh0pjZcCUi+89BV/AhGUwEvK6NO+uCugIjIcKn0c7QwwUW/TN1p 5d63VFQUmzALMovrpAlE7tLJgj9Hl3E= Received: by wopr.sciops.net (OpenSMTPD) with ESMTPSA id 9aebf4e0 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO) for <9front@9front.org>; Mon, 17 Apr 2023 00:51:40 -0700 (PDT) Message-ID: Date: Mon, 17 Apr 2023 09:53:28 +0200 From: qwx@sciops.net To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: webscale immutable dependency DOM-scale database Subject: Re: [9front] displayport thinkpad x230 external monitor black screen Reply-To: 9front@9front.org Precedence: bulk On Sun Apr 9 08:58:34 +0200 2023, unobe@cpan.org wrote: > I figured out the problem--the DisplayPort link training needed to be > implemented more fully. I didn't know really much at all about > DisplayPort; that has changed. I've attached a patch that implements > pattern 1 & 2 training for HBR, along with fixing a couple other minor > things I came across.[1] > > I'd be curious if the patch works for you, igor and qwx. I don't see > why it wouldn't, but who knows. Reader be warned: I'm not a C > programmer, so I'm sure there's much that can be improved upon. Alright, sorry for taking so long. I'm going to test the patch on a w500 and a w520 (resp. gm965 and sandybridge, iirc) as soon as I'm able. I don't actually have any remarks on what you did itself, looks good; I only have one comment on style: please be consistent with the rest of the code, mostly add spacing around operators (for example the shifts), and remove useless parenthesis (less important). The only other thing: > + while(--i){ > + if(memcmp(tmp+i, magic, 8) == 0){ > + trace("magic begins at index %d, shifting\n", i); > + memcpy(buf, tmp+i, 256-i); > + memcpy(buf+(256-i), tmp, i); > + i = 1; > + } > + } Why not just a `break;' there? Anyway, not important. > To test my patch, I defined this test function to ensure I could get > my working display back. I didn't need to add anything to /lib/vgadb. > > fn lg { > @ { > rfork n; aux/realemu; cd /sys/src/cmd/aux/vga; mk; /sys/src/cmd/aux/vga/6.out -v -V -m igfx -l 2560x1080; sleep 5; aux/vga -m igfx -l 1366x768 > } > } You don't need to run aux/realemu unless you will use vesa, which you don't. Also, in practice, do you still have to run aux/vga twice, or is that just for testing? Do you need this function at all now, that is, does it not work by just having `monitor=auto' in plan9.ini? @k0ga: On Tue Apr 11 23:30:37 +0200 2023, k0ga@shike2.com wrote: > I have one DP monitor here (qwx do you remember that we used it for our tests > in the last hackathon ;) ?. I can try it but not in this week. Yes, please do :) In fact, I bid anyone who has igfx to please check for a regression :) Unfortunately, I don't have access for a few weeks to other machines. For reference, anything up to and including broadwell (x250 generation) that has its pci device id in /lib/vgadb and in /sys/src/cmd/aux/vga/igfx.c should still work with the integrated screen, and now possibly with an external screen through DP (not hdmi). Thanks again! Cheers, qwx