Bug 2136950 - ast: resolutions that require single-buffering (due to VRAM limitations) are unavailable
Summary: ast: resolutions that require single-buffering (due to VRAM limitations) are ...
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 36
Hardware: All
OS: Unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2022-10-22 01:15 UTC by Jeremy Rand
Modified: 2022-11-22 00:40 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)
Kernel log on 5.17.5-300.fc36.x86_64 (92.45 KB, text/plain)
2022-10-22 01:15 UTC, Jeremy Rand
no flags Details

Description Jeremy Rand 2022-10-22 01:15:25 UTC
Created attachment 1919533 [details]
Kernel log on 5.17.5-300.fc36.x86_64

1. Please describe the problem:

I have two machines with ASPEED GPU's (ast Linux driver).  One machine is x86_64, running an ASRock Rack Tommy 90-SC02P1-00UBNZ GPU (AST2510 chipset) with KDE Plasma Wayland; the other is ppc64le, running an integrated AST2500 GPU with KDE Plasma X11.  Both the AST2510 and AST2500 have 16 MiB VRAM according to lspci.  Both ASPEED GPU's are advertised as supporting up to 1920x1200 resolution, but KDE only detects a maximum resolution of 1920x1080.

Some additional information about this bug can be found at https://forums.raptorcs.com/index.php/topic,31.0.html .

2. What is the Version-Release number of the kernel:

5.17.5-300.fc36.x86_64 and 5.18.6-200.fc36.ppc64le.

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

5.5.17-200.fc31.x86_64 and 5.5.17-200.fc31.ppc64le work fine (max resolution detected by KDE is 1920x1200 as it should be, and that resolution works fine when selected).  5.6.0-1.fc33.x86_64 and 5.6.0-1.fc33.ppc64le have the issue (max resolution detected by KDE is 1920x1080).  I believe the bug was introduced by Linux commit 9253f830c9166bfa6cc07d5ed59e174e9d5ec6ca, which adds a VRAM size check that assumes double-buffering.  1920x1080 resolution at 4 bytes per pixel with 2 buffers is 16.6 MB, while bumping that to 1920x1200 results in 18.4 MB.  Since the VRAM size is 16 MiB == 16.8 MB, that explains the issue.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

* Add a GPU that uses the ast driver, which supports 1920x1200 resolution and has 16 MiB VRAM.
* Boot into KDE.
* Go to KDE System Settings -> Display and Monitor -> Display Configuration.
* Look at list of detected resolutions.
* KDE will only detect up to 1920x1080 resolution.

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

Yes, 6.1.0-0.rc0.20221007git4c86114194e6.5.fc38.ppc64le still has the issue.

6. Are you running any modules that not shipped with directly Fedora's kernel?:


7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.


Comment 1 Dan Horák 2022-10-24 08:25:40 UTC
Jeremy, thanks for the report, but unless this can be resolved by flipping a config option, it needs to be reported directly to upstream (likely via https://lists.freedesktop.org/mailman/listinfo/dri-devel). The Fedora kernel team doesn't have capacity for new development, they focus on the packaging work.

Comment 2 Jeremy Rand 2022-10-25 09:54:35 UTC
Thanks for pointing me in the right direction Dan.  I've filed a bug report upstream at https://lists.freedesktop.org/archives/dri-devel/2022-October/377090.html .

Comment 3 Jeremy Rand 2022-11-22 00:40:45 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.