From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.48.128.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796509509; b=CCPbqLMN0qM4+5IxrupPO1xlbpRKKzSO7UW4T7Tx9rTYqvPv7Q5i2LoBrvmLpMpn+6Zs +oX3ijx/IHvJ6u+m/KDooGwd/6XBlH/OWtz1QhUYJANcHdgbTlqPfYLDFnDkPaLevaPwR YbHEBnCImviChwGqAvwwUzkAtPqfP2Xr6AwaDpa67RbafTlh2F3aRgNmpb05W5jo2yeRP uTdxhKaykvIO0f4+ng4EofmS/ZmNTOyudwFBTDZZRcY7SdhGY46jKm7v5oh13FJppWiiU FoscveK6qTJgXs20QPfRMGjsvbcvt11uAOp6hzlZSrbSpMiNbYQwqhXoS1GY5Gm3B7w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796509509; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Date:MIME-Version: User-Agent:From:Subject:To:Content-Language:Content-Type: Content-Transfer-Encoding:X-Spam-Level; bh=+NEc0rQtUiqa7fHk0QgRdFZ2Nf7YixaVu5ZrxV8VoSg=; b=C9Jq8d2NiCulynTAIFy8P3RxMV1jhEA+Rpi56es1wzPesVWu68STJMdW+OX1dLz3zmqE /FFILcsDdaugyZ01zwW1vptGegegzdsPK3SkrtgOM8vguqm8YuUGRo9q0tnalXNU0P4BM XPRFAWuQ65uVya1sp0WQ35+kzvfAvgAbd44Vdcxchup85mBJMay8dQFEq+bk7H26JtBrZ VD6v1F8pDrklf2CohiIaAUEu5UUYRxIUf8wuypzeEAyt6avyofGjjAmtnAXrtasfYy+kj yXB0/KanGIFi1gOvXv8536MK1BMCKveaw5Ss9Ad7T0MoJU8AOcKu+MBatIiN6vl8ypw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=a1.net; spf=pass smtp.mailfrom=a1.net; dkim=pass header.d=a1.net header.i=@a1.net header.a=rsa-sha256 header.s=resmail1 header.b=n+9u6ORB; arc=none smtp.remote-ip=194.48.128.4 Received: from smtpout20.a1.net (smtpout20.a1.net [194.48.128.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1D0606A31F; Sat, 5 Dec 2026 22:25:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CD1D0606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=a1.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=a1.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=a1.net header.i=@a1.net header.a=rsa-sha256 header.s=resmail1 header.b=n+9u6ORB Received: from [192.168.0.2] (unknown [100.64.120.221]) by smtpout20.a1.net (Postfix) with ESMTPA id 4jhjbb05f7zGrqnr; Sat, 5 Dec 2026 23:24:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=a1.net; s=resmail1; t=1796509499; 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; bh=+NEc0rQtUiqa7fHk0QgRdFZ2Nf7YixaVu5ZrxV8VoSg=; b=n+9u6ORB6LPcgZHIO77DWkNxFDcCK1ocAnE87QoQJD9QWnnXIM6ibPq/FhIMgC2T0k0/b4 vTSK1lJJgflAk3f0fY8qHJhnMB5nvnzeeS2CWZlpHzOJ4fT8I6gznOQpd+/QmVOA6AtisO KbZspi2+iDf5l4X3myqVqwESY27NVmNpR3zx/D5ESQfoOZ6i3dAxZcchechV7B5a7yttEU UInGx3SMjiDwmT6bua/im1ch9fAweXUdow7kjl7eCcV9d37/2K9eFZhXQvZeQ2gLc17st9 p0zg7OmI3P+IVWwayxdTYpda06bmnqsZjM2U4xvjoDecZp05uCMga7H4lXpf4D9bR7+Y9H VXbvlmoOCuIVMRxmrfFxtIe54uGnHIuKkVqzuEuEd4iTYQw8jVPXTgWp6Zu3+hvCCcgPvM LyreLy3lyoQuX2GH9625y8URsQicLs2uMC2foc5K0gWKhddN4xOloJWL2LvPJmZmvGCO+0 wqqzfPgLacoYwo6zpzPb+czkMVU54BxiRlBi21raJaQR0jFsqAmcyh6fIcnMBCqF+LRTBW GByCHDjXtcWCJxw+OoVzI5ofphf2TeJRM1sdhI1mJzXD3SRB3BgB5hdaYtdKLW5DwZOe3T VB68rjSZE40oxBxaQ28t6V0wZrU/KOTB/obCPfeNzUGNy7Ieo7nUg= Message-ID: Date: Sat, 5 Dec 2026 23:24:42 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Johann Klammer Subject: [PATCH 06/08] viafb: fix and expand list of display modes To: FlorianSchandinat@gmx.de, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: ** this adds several lo-resolution modes. the lo-re modes only work on IGA1. IGA2 lacks the necessary. clock divider and doublescan. also fixes some modes that failed to modeset because dimensions weren't multiples of eight (1366x768), one that was mismatched between fb.modes and the table(1440x1050) and thus failed to set. 1024x600 had excessive line jitter. GPT6 changed the margins to. center it on the display and modified the clock. The chatbot's suspicion was that the pll running with rdiv==0 {99, 99, 29, 0} (48.88 MHz) has a bad duty cycle or oscillates, or that the hblank calculation was off by one. What originally fixed it was flipping the hsync bit via '' python3 -c 'f=open("/dev/port","wb",buffering=0); f.seek(0x3c2); f.write(b"\x0f")' '' chatbot says that's not valid by the VESA standard, so dropped. Anyway, there was a bug. now it's gone. The fudged timing seems to have fixed it. After I got X working, I get snow at 1920x1080 60 Hz@32bpp on ME6000. Likely a bandwidth problem as the clock is over 133MHz. Reducing the frequency helped, so there's a 1920x1080 50Hz mode in there now. I had tried a reduced blanking too, but those. seem not to work ok on a vga output. Reducing bpp helps, too. Co-developed-by: [GPT-6] Signed-off-by: Johann Klammer --- diff '--color=auto' -uprN -x '*.o' -x '*.ko' -x '*.mod*' -x '*.a' -x '*.cmd' -x modules.order -x Module.symvers -x .tmp_versions linux-7.3.0-gentoo.orig/drivers/video/fbdev/via/viamode.c linux-7.3.0-gentoo.work/drivers/video/fbdev/via/viamode.c --- linux-7.3.0-gentoo.orig/drivers/video/fbdev/via/viamode.c 2026-11-04 08:38:55.000000000 +0100 +++ linux-7.3.0-gentoo.work/drivers/video/fbdev/via/viamode.c 2026-12-05 21:33:03.392382585 +0100 @@ -255,6 +255,33 @@ struct VPITTable VPIT = { /********************/ static const struct fb_videomode viafb_modes[] = { + /* 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio */ + { NULL, 70, 320, 200, 79440, 24, 8, 20, 4, 48, 1, 0,FB_VMODE_DOUBLE,0 }, + /* 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio */ + { NULL, 60, 320, 240, 79440, 24, 8, 16, 5, 48, 1, 0, FB_VMODE_DOUBLE,0 }, + /* 320x240 @ 72 Hz, 36.5 kHz hsync */ + { NULL, 72, 320, 240, 63492, 24, 8, 16, 4, 48, 2, 0, FB_VMODE_DOUBLE,0 }, + /* 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio */ + { NULL, 56, 400, 300, 55555, 64, 16, 10, 1, 32, 1, 0,FB_VMODE_DOUBLE,0 }, + /* 400x300 @ 60 Hz, 37.8 kHz hsync */ + { NULL, 60, 400, 300, 50000, 48, 16, 11, 1, 64, 2, 0, FB_VMODE_DOUBLE,0 }, + /* 400x300 @ 72 Hz, 48.0 kHz hsync */ + { NULL, 72, 400, 300, 40000, 32, 24, 11, 19, 64, 3, 0, FB_VMODE_DOUBLE,0 }, + /* 480x300 @ 56 Hz, 35.2 kHz hsync, 8:5 aspect ratio */ + {NULL, 56, 480, 300, 46176, 80, 16, 10, 1, 40, 1, 0, FB_VMODE_DOUBLE,0 }, + /* 480x300 @ 60 Hz, 37.8 kHz hsync */ + {NULL, 60, 480, 300, 41858, 56, 16, 11, 1, 80, 2, 0, FB_VMODE_DOUBLE,0 }, + /* 480x300 @ 63 Hz, 39.6 kHz hsync */ + {NULL, 63, 480, 300, 40000, 56, 16, 11, 1, 80, 2, 0,FB_VMODE_DOUBLE,0 }, + /* 480x300 @ 72 Hz, 48.0 kHz hsync */ + {NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,FB_VMODE_DOUBLE, 0 }, + /* 512x384 @ 60 Hz, 48.4 kHz hsync, 4:3 aspect ratio */ + { NULL, 60, 512, 384, 30769, 80, 16, 15, 1, 64, 3, 0, FB_VMODE_DOUBLE, 0 }, + /* 512x384 @ 78 Hz, 31.50 kHz hsync */ + { NULL, 78, 512, 384, 49603, 48, 16, 16, 1, 64, 3, 0, FB_VMODE_NONINTERLACED,0 }, + /* 512x384 @ 85 Hz, 34.38 kHz hsync */ + { NULL, 85, 512, 384, 45454, 48, 16, 16, 1, 64, 3, 0,FB_VMODE_NONINTERLACED,0 }, + {NULL, 60, 640, 240, 39682, 48, 16, 16, 5, 96, 1, 0, FB_VMODE_DOUBLE, 0}, {NULL, 60, 480, 640, 40285, 72, 24, 19, 1, 48, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 640, 480, 39682, 48, 16, 33, 10, 96, 2, 0, 0, 0}, {NULL, 75, 640, 480, 31746, 120, 16, 16, 1, 64, 3, 0, 0, 0}, @@ -272,7 +299,7 @@ static const struct fb_videomode viafb_m {NULL, 60, 848, 480, 31565, 104, 24, 12, 3, 80, 5, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 856, 480, 31517, 104, 16, 13, 1, 88, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1024, 512, 24218, 136, 32, 15, 1, 104, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, - {NULL, 60, 1024, 600, 20423, 144, 40, 18, 1, 104, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, + {NULL, 60, 1024, 600, 20202, 112, 88, 10, 1, 120, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1024, 768, 15385, 160, 24, 29, 3, 136, 6, 0, 0, 0}, {NULL, 75, 1024, 768, 12703, 176, 16, 28, 1, 96, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 85, 1024, 768, 10581, 208, 48, 36, 1, 96, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 0, 0}, @@ -294,12 +321,11 @@ static const struct fb_videomode viafb_m {NULL, 75, 1280, 1024, 7409, 248, 16, 38, 1, 144, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 85, 1280, 1024, 6351, 224, 64, 44, 1, 160, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1360, 768, 11759, 208, 72, 22, 3, 136, 5, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 0, 0}, - {NULL, 60, 1368, 768, 11646, 216, 72, 23, 1, 144, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 50, 1368, 768, 14301, 200, 56, 19, 1, 144, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1368, 768, 11646, 216, 72, 23, 1, 144, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1440, 900, 9372, 232, 80, 25, 3, 152, 6, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 75, 1440, 900, 7311, 248, 96, 33, 3, 152, 6, FB_SYNC_VERT_HIGH_ACT, 0, 0}, - {NULL, 60, 1440, 1040, 7993, 248, 96, 33, 1, 152, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, + {NULL, 60, 1440, 1050, 7993, 248, 96, 33, 1, 152, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1600, 900, 8449, 256, 88, 26, 3, 168, 5, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1600, 1024, 7333, 272, 104, 32, 1, 168, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1600, 1200, 6172, 304, 64, 46, 1, 192, 3, FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 0, 0}, @@ -314,6 +340,7 @@ static const struct fb_videomode viafb_m {NULL, 60, 1280, 720, 13484, 216, 112, 20, 5, 40, 5, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 50, 1280, 720, 16538, 176, 48, 17, 1, 128, 3, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1920, 1080, 5776, 328, 128, 32, 3, 200, 5, FB_SYNC_VERT_HIGH_ACT, 0, 0}, + {NULL, 50, 1920, 1080, 7067, 312, 112, 26, 3, 200, 5, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1920, 1200, 5164, 336, 136, 36, 3, 200, 6, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 60, 1400, 1050, 8210, 232, 88, 32, 3, 144, 4, FB_SYNC_VERT_HIGH_ACT, 0, 0}, {NULL, 75, 1400, 1050, 6398, 248, 104, 42, 3, 144, 4, FB_SYNC_VERT_HIGH_ACT, 0, 0} };