Author Topic: Configure Xorg for AST2500 max resolution of 1920x1200 on Ubuntu Server 19.10  (Read 23056 times)

MPC7500

  • Hero Member
  • *****
  • Posts: 596
  • Karma: +41/-1
    • View Profile
    • Twitter
Interesting. Would be good to have a xorg log when 1200 is selected.

jirka

  • Newbie
  • *
  • Posts: 12
  • Karma: +1/-0
  • Ordinary Blackbird Owner
    • View Profile
    • Jirka's Notes
Code: [Select]
[    19.961] (II) modeset(0): Disabling kernel dirty updates, not required.
[    35.360] (II) modeset(0): Allocate new frame buffer 1920x1200 stride
[    35.362] (EE) modeset(0): failed to set mode: Cannot allocate memory
[    35.376] (EE) modeset(0): failed to set mode: Invalid argument
Probably sent from the sforza (a Blackbird workstation with Fedora) or the moose (a SGI O2).

MPC7500

  • Hero Member
  • *****
  • Posts: 596
  • Karma: +41/-1
    • View Profile
    • Twitter
Looks like a Kernel bug. I got a few Google results.

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
On Debian, 1920x1200 support for the Talos II's AST2500 was broken between Linux 5.5.0-2 and Linux 5.6.0-1.  My suspicion is that the breakage is because of Linux commit 9253f830c9166bfa6cc07d5ed59e174e9d5ec6ca.  This commit added a VRAM size check to the ast driver, which considers double-buffering as mandatory.  1920x1080 resolution at 4 bytes per pixel with 2 buffers is 16.6 MB, while bumping that to 1920x1200 results in 18.4 MB.  According to "lspci -v -s 0005:02:00.0", The Talos II's VRAM size is 16 MiB == 16.8 MB, which explains why 1920x1200 no longer works.

I asked on IRC, and dormito pointed out that the AST2500 supports both 16 MiB and 64 MiB VRAM size, and that in both cases, the VRAM is stolen from the BMC's RAM (512 MiB total).  The default configuration is controlled by a hardware pin (no idea why Raptor picked 16 MiB), but dormito thinks it may be possible to reconfigure the AST2500's VRAM size by writing to a register on the BMC (before the host boots).

In the meantime it definitely seems like a Linux bug should be filed about this, since single-buffered 1920x1200 used to work fine but no longer does.

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
Re: Configure Xorg for AST2500 max resolution of 1920x1200 on Ubuntu Server 19.10
« Reply #19 on: September 04, 2022, 02:31:20 am »
I see the same bug on an x86_64 Fedora 36 machine with an ASRock Rack Tommy 90-SC02P1-00UBNZ GPU (AST2510 chipset, 16 MiB VRAM just like the Talos II's AST2500).  Kernel 5.5.17-200.fc31.x86_64 works with 1920x1200 on that machine; Kernel 5.6.0-1.fc33.x86_64 does not (maxes out at 1920x1080).  That's consistent with the Debian results I got on my Talos II, and with the hypothesis that Linux commit 9253f830c9166bfa6cc07d5ed59e174e9d5ec6ca broke this.
« Last Edit: September 04, 2022, 02:33:42 am by JeremyRand »

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
Filed a bug with Red Hat, feel free to follow along there: https://bugzilla.redhat.com/show_bug.cgi?id=2136950

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
Filed a bug with upstream dri-devel at Dan HorĂ¡k's request, feel free to follow along there: https://lists.freedesktop.org/archives/dri-devel/2022-October/377090.html

ClassicHasClass

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +37/-0
  • Talospace Earth Orbit
    • View Profile
    • Floodgap
Thanks for doing this.

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
I can confirm that the bug is fixed in the drm-tip branch (as of 2022 November 20), as stated in the linked dri-devel thread.  Per the thread, the fix is expected to be released in Linux v6.3.

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
It looks like the fix has successfully advanced from drm-tip to drm-next, and is still on track for Linux 6.3: https://cgit.freedesktop.org/drm/drm/commit/?id=f2fa5a99ca81ce1056539e83c705f3d6bec62e31

I haven't had a chance to test drm-next yet, and probably will not have time to do so before the Linux 6.3 merge window opens in February.

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
Linux v6.3 release candidates are in Fedora Rawhide now, and I can confirm that the bug is fixed there (tested with Linux fedora 6.3.0-0.rc5.20230407gitf2afccfefe7b.46.fc39.ppc64le).

JeremyRand

  • Newbie
  • *
  • Posts: 25
  • Karma: +8/-0
    • View Profile
Linux v6.3 is now in Fedora stable, and 1920x1200 works fine there. \o/