<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body dir="auto"><div dir="auto">Dear Jocelyn</div><div dir="auto"><br></div><div dir="auto">Thanks for answer and help </div><div dir="auto"><br></div><div dir="auto">Ok, I will try linux 6.1 (could you confirm that every commit in 6.1 before 965361 should be relevant ?)</div><div dir="auto"><br></div><div dir="auto">If I need to have "~correct or better to say 'acceptable' year 2025 performances~" on AST2400 VGA card it's because at the hardware level if I select the NVIDIA discrete GPU as the main server video output, I lost all the server management benefits and capabilities of the AST2400 BMC (except PSU management) as I get a black screen... And it's dangerous as keyboard and mouse keep working on the black screen and so, can launch destructive actions without knowing it !</div><div dir="auto"><br></div><div dir="auto">Also I'm still surprise by Thomas answer as the aspeed drm drivers 1.15.1 is dated of December 2024... </div><div dir="auto">And Jammy Huang from AspeedTech teold me to contact here to upstream the ast_new adaptation I've made after he knows that I did version 1.15.1 work on mainline (Aspeed only support LTS kernel and their dkms package were not usable out-of-the-box on mainline)</div><div dir="auto"><br></div><div dir="auto">I may surely be wrong and some explanations could help me to understand which is the actual situation of ast driver in kernel tree.</div><div dir="auto"><br></div><div dir="auto">I would let you know the results in 6.1</div><div dir="auto"><br></div><div dir="auto">Again thanks a lot for help !</div><div dir="auto"><br></div><div dir="auto">Kind regards, </div><div id="composer_signature" dir="auto"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">Nicolas Baranger </div><div dir="auto"><br></div><div><br></div><div align="left" dir="auto" style="font-size:100%;color:#000000"><div>-------- Message d'origine --------</div><div>De : Jocelyn Falempe <jfalempe@redhat.com> </div><div>Date : 14/02/2025  10:11  (GMT+01:00) </div><div>À : Nicolas Baranger <nicolas.baranger@3xo.fr>, Thomas Zimmermann <tzimmermann@suse.de> </div><div>Cc : dri-devel@lists.freedesktop.org, airlied@redhat.com, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>, linux-kernel@vger.kernel.org </div><div>Objet : Re: Include ASPEED ast-drm 1.15.1 video driver in kernel tree </div><div><br></div></div>On 13/02/2025 10:27, Nicolas Baranger wrote:<br>> Dear Thomas<br>> <br>> Thanks for answer and help.<br>> <br>> Yes, due to .date total removal in linux 6.14 (https://github.com/ <br>> torvalds/linux/commit/cb2e1c2136f71618142557ceca3a8802e87a44cd <https:// <br>> github.com/torvalds/linux/commit/ <br>> cb2e1c2136f71618142557ceca3a8802e87a44cd>) the last DKMS sources are :<br>> https://xba.soartist.net/ast-drm_nba_20250211/nba-dkms/ <br>> nba_last_src_20250212/src/ <https://xba.soartist.net/ast- <br>> drm_nba_20250211/nba-dkms/nba_last_src_20250212/src/><br>> <br>> You can also find this sources in directory drivers/gpu/drm/ast_new of <br>> the tarball https://xba.soartist.net/ast-drm_nba_20250211/nba-kernel/ <br>> linux-6.14.0.1-ast1.15.1-rc2_nba0_20250212.tar.gz <https:// <br>> xba.soartist.net/ast-drm_nba_20250211/nba-kernel/linux-6.14.0.1- <br>> ast1.15.1-rc2_nba0_20250212.tar.gz><br>> <br>> I'm surprised by the fact the in-kernel driver 0.1.0 is more advanced <br>> than Aspeed version 1.15.1 because on my system it has very poor <br>> rendering and is very slow, twinkle is high and had poor colors.<br>> The screen flickering is high and it's like if I was using a very old <br>> cathode ray tube monitor (In fact I'm using a SAMSUNG LCD monitor which <br>> is perfectly functionnal and which display a nice and eyes confortable <br>> picture when using ast 1.15.1 driver or the video output of the Nvidia <br>> GPU ).<br>> <br>> <br>> My testing system is a test Xeon server with an AST2400 BMC with its AST <br>> VGA card as the main video output (to be able to have a screen on the <br>> BMC KVM) +a discrete NVIDIA GPU I'm using for GPGPU and 3D rendering <br>> with Nvidia prime render offload.<br>> What I constat with embed kernel driver 0.1.0 is that the Xeon processor <br>> is doing the video job for example when watching a video, and it's not <br>> the case with version 1.15.1 even when displaying on the AST VGA card a <br>> vulkan rotating cube (compute by nvidia GPU with nvidia prime but <br>> display by the AST VGA card of the AST2400).<br>> Note that with in-kernel version 0.1.0 it's nearly impossible to make <br>> round the vulkan cube at more than half a round by  second where it's <br>> working (very) fine for a 32MB video memory card with version 1.15.1 as <br>> you can see in the video present in the online directory<br>> <br>> I'm not developer or kernel developer so be sure that I wouldn't have <br>> done all this work if the in-kernel ast version 0.1.0 was usable out-of- <br>> the-box<br>> <br>> Sure you can give me a patch I will test on this server (building <br>> mainline+ast_new yesterday tooks 19 minutes on this server)<br>> <br>> PS:<br>> here is a 'git diff linux-6.14.0.1-ast-rc2/drivers/gpu/drm/ast <br>> linux-6.14.0.1-ast-rc2/drivers/gpu/drm/ast_new'<br>> https://xba.soartist.net/ast-drm_nba_20250211/nba-dump/ast- <br>> fullpatch.patch <https://xba.soartist.net/ast-drm_nba_20250211/nba-dump/ <br>> ast-fullpatch.patch><br>> Diff is about 250+ kb so the 2 drivers seems to have nothing to do with <br>> each others...<br>> <br>> Thanks again for help<br>> <br>> Kind regards<br>> Nicolas<br>> <br>> <br>> Le 2025-02-13 08:57, Thomas Zimmermann a écrit :<br>> <br>>> Hi Nicolas<br>>><br>>> Am 12.02.25 um 19:58 schrieb Nicolas Baranger:<br>>>> Dear maintener<br>>><br>>> That's mostly me and Jocelyn.<br>>><br>>>><br>>>> I did include ast-drm driver version 1.15.1 (in replacement of <br>>>> version 0.1.0) on the new mainline kernel too (6.14.0-rc2) and I <br>>>> issue a new dkms patch<br>>>><br>>>> Last DKMS patch had been sucessfully tested on mainline.<br>>>> And last ast.ko version 1.15.1 included in linux tree had also been <br>>>> sucessfully tested<br>>>><br>>>> Online directory is updated with :<br>>>> - new DKMS patch<br>>>> - new DKMS srouces<br>>>> - new DKMS debian package<br>>>> - new tarball of mainline included ast_new ported in kernel tree<br>>>> - new kernel debian package (mainline with ast_new)<br>>>><br>>>><br>>>> NB: online directory is here: https://xba.soartist.net/ast- <br>>>> drm_nba_20250211/ <https://xba.soartist.net/ast-drm_nba_20250211/><br>>>><br>>>> Please let me know what I should do to see this change in linux-next<br>>><br>>> I'm having a little trouble with figuring out which of the many driver <br>>> sources is the relevant one. Am I correct to assume it's the one at<br>>><br>>> https://xba.soartist.net/ast-drm_nba_20250211/nba-dkms/ <br>>> nba_last_src_20250212/src/ <https://xba.soartist.net/ast- <br>>> drm_nba_20250211/nba-dkms/nba_last_src_20250212/src/><br>>><br>>><br>>> About that driver: Although the official driver reports an ancient <br>>> version number, it is an up-to-date driver. It is actually more up-to- <br>>> date than Aspeed's package. Both drivers share source code and a few <br>>> years ago there was an effort to bring the kernel's driver up to the <br>>> same feature set. Since then, the kernel's driver has been updated, <br>>> reworked and improved.<br>>><br>>> About the performance: From what I can tell, the only significant <br>>> difference in these drivers is memory management. Your ast_new driver <br>>> uses an older algorithm that we replaced quite a few releases ago. The <br>>> old version was unreliable on systems with little video memory, so we <br>>> had to replace it.  I don't know why the new code should be slower though.<br><br>Regarding the performances of ast driver, I remember doing profiling <br>some times ago, and when running glxgears (with llvmpipe), 65% of the <br>CPU time was wasted in page fault <br>(https://elixir.bootlin.com/linux/v6.13.2/source/drivers/gpu/drm/drm_gem_shmem_helper.c#L534)<br>But as this driver is mostly used for console/basic desktop usage, I <br>didn't investigate more.<br><br>If I remember correctly, the switch to shmem, is because some devices <br>have only 16MB of memory, and 1920x1200x32bits takes ~9MB, so it's not <br>possible to have double buffering in this case. (And this is required by <br>most desktop environment).<br><br>The switch to shmem was done with "f2fa5a99ca81c drm/ast: Convert ast to <br>SHMEM", and introduced in v6.2. So maybe if you can try with a v6.1 <br>kernel, using the built-in ast driver and report if it has better <br>performances.<br><br>Best regards,<br><br>-- <br><br>Jocelyn<br><br>>><br>>> If I give you a patch against a recent Linux kernel, are you capable <br>>> of building the patched kernel and testing that change on your system?<br>>><br>>> Best regards<br>>> Thomas<br>>><br>>><br>>>><br>>>> Thanks for help<br>>>><br>>>> Kind regards<br>>>> Nicolas Baranger<br>>>><br>>>><br>>>> Le 2025-02-11 19:15, Nicolas Baranger a écrit :<br>>>><br>>>>> Dear maintener<br>>>>><br>>>>> For my own usage, I did make work the ASPEED ast-drm 1.15.1 video <br>>>>> driver on mainline kernel (6.13.0 + 6.13.1).<br>>>>><br>>>>> ASPEED video driver is availiable here:<br>>>>> https://www.aspeedtech.com/file/support/Linux_DRM_1.15.1_4.tar.gz <br>>>>> <https://www.aspeedtech.com/file/support/Linux_DRM_1.15.1_4.tar.gz><br>>>>><br>>>>> But it only work for LTS kernel<br>>>>> So I modify the DKMS package and I build a new Debian DKMS package <br>>>>> with the adapted  source.<br>>>>> My patch can be find here :<br>>>>> https://xba.soartist.net/ast-drm_nba_20250211/nba-dkms/astdiff.patch <br>>>>> <https://xba.soartist.net/ast-drm_nba_20250211/nba-dkms/astdiff.patch><br>>>>> See the README:<br>>>>> https://xba.soartist.net/ast-drm_nba_20250211/nba-dkms/README <br>>>>> <https://xba.soartist.net/ast-drm_nba_20250211/nba-dkms/README><br>>>>><br>>>>> Using this new 'ast 1.15.1' driver, performance are amazing compared <br>>>>> to the 'ast' driver include in kernel tree, specially when using a <br>>>>> discrete GPU and offloading VULKAN / 3D on it but using AST VGA card <br>>>>> as the main video card and as the main and only video output (the <br>>>>> discrete GPU is used only for offloading 3D or for cuda/opencl)<br>>>>><br>>>>> So to make things easier, I include the new 'ast 1.15.1' driver in <br>>>>> kernel tree as AST_NEW : linux-6.13.1-ast/drivers/gpu/drm/ast_new'<br>>>>> It's working fine as you can see on this video :<br>>>>> https://xba.soartist.net/ast-drm_nba_20250211/ <br>>>>> vulcan_nvidia_prime_render_offload_on_ast_vga_card.webm <https:// <br>>>>> xba.soartist.net/ast-drm_nba_20250211/ <br>>>>> vulcan_nvidia_prime_render_offload_on_ast_vga_card.webm> I upload <br>>>>> all the work I've done here :<br>>>>> https://xba.soartist.net/ast-drm_nba_20250211/ <https:// <br>>>>> xba.soartist.net/ast-drm_nba_20250211/><br>>>>><br>>>>> See the global README :<br>>>>> https://xba.soartist.net/ast-drm_nba_20250211/README <https:// <br>>>>> xba.soartist.net/ast-drm_nba_20250211/README><br>>>>><br>>>>> and the README in nba-kernel sub-directory :<br>>>>> https://xba.soartist.net/ast-drm_nba_20250211/nba-kernel/README <br>>>>> <https://xba.soartist.net/ast-drm_nba_20250211/nba-kernel/README><br>>>>><br>>>>> I'm not a developer so please let me know if I made the things the <br>>>>> right way and if this new 'ast 1.15.1' driver can be ported to <br>>>>> linux-next or linux-? ?<br>>>>> If you need more explanations, do not hesitate to contact me, I <br>>>>> would be happy to help<br>>>>><br>>>>> Kind regards<br>>>>> Nicolas Baranger<br><br></body></html>