ChromeOS Freedreno Update
Transcript of ChromeOS Freedreno Update
![Page 1: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/1.jpg)
ChromeOS Freedreno UpdateRob ClarkXDC2021
![Page 2: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/2.jpg)
Snapdragon Chromebooks
● Introducing Trogdor and Strongbad!● Upstream Kernel Support
○ AFAIK the first CE snapdragon devices to ship with upstream kernel support○ Before they shipped
● Open Source Graphics Drivers○ AFAIK the first CE arm devices to ship with FOSS graphics○ All in upstream mesa○ Before they shipped
![Page 3: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/3.jpg)
Current Status
● Gallium: GLES v3.2● Turnip: Vulkan v1.1
○ With a few remaining CTS fails○ 7 extensions away from v1.2
● Supports all four generations of a6xx● Lots of nice developer tools
○ isaspec, crashdec, fdperf, etc● Perfetto
○ Performance counters: standalone daemon○ Render stage timeline
![Page 4: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/4.jpg)
In the early days
● Starting at Google● Big push for feature completeness
○ Geometry Shaders○ Tessellation Shaders○ Sample shading, blend-advanced, robustness, etc, etc
● Gitlab-CI!
![Page 5: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/5.jpg)
In the early day (continued)
● Fixing lots of bugs!○ All the deqp’s..○ All the play-store games..
● Work starts on mediump● And a618 bringup
![Page 6: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/6.jpg)
Trogdor.. the burninator!
● First “real” devices○ Well, reference design
● More bug fixes○ 100% deqp (and skqp) pass○ There are a lot of games in play store
![Page 7: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/7.jpg)
Trogdor.. the burninator! (continued)
● Focus shifts to moar fps○ mediump○ Shader compiler improvements: sched/ra/cf○ LRZ improvements: early-lrz-late-z○ Plumbing UBWC thru android○ Shader disk-cache
● Then focus shifts to system performance○ big.LITTLE: little janks, big Aarrrg○ SCHED_FIFO vs SCHED_OTHER ??? Check this○ etc
![Page 8: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/8.jpg)
Recent History
● Lazor ships :-)● Initial Performance hiccups :-(
○ Shrinker vs zram swap!○ Lock contention
■ Make count_objects() lockless■ Reduce critical section in scan_objects()
● Perfetto - improved system level visibility
![Page 9: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/9.jpg)
![Page 10: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/10.jpg)
Recent History (continued)
● CPU optimizations○ u_threaded_context○ Async shader compile○ Userspace fences and submit merging
● Kernel improvements○ Recent gpu devfreq rework○ drm/scheduler conversion
● GL_VENDOR/GL_RENDERER shenanigans● Oh, and gles32
○ All the copy_image sharp edges
![Page 11: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/11.jpg)
GPU devfreq
● Idle time at higher freqs, busy time at lower freqs● Solution combination of:
○ Longer sampling period○ Idle clamp to fmin○ Idle->Active boost
![Page 12: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/12.jpg)
Gitlab CI: fd-farm
● 25 runners○ 9x a630 (sdm845 cheza)○ 8x a530 (apq8096 db820c)○ 8x a307 (apq8016 db410c)
● a630 coverage○ 100% deqp-egl/gles2/3/31[*]○ 10% deqp-gles31 with ASAN○ 33% vk○ traces, traces-restricted, traces-performance○ piglit
● a530 coverage○ 100% deqp-gles2○ 50% deqp-gles3/31
● a306 coverage○ 100% deqp-gles2/3○ Traces
● 500-1000 jobs/day
![Page 13: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/13.jpg)
Gitlab CI: shipping green ToT
● How to uprev:○ git fetch upstream main ○ git merge upstream/main○ Play games.. I mean test
● Roughly every 4-6 weeks● It’s actually worked pretty well
![Page 14: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/14.jpg)
demo
![Page 15: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/15.jpg)
The codez
● https://chromium.googlesource.com/chromiumos/third_party/mesa/+/refs/heads/chromeos-freedreno
● https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/heads/chromeos-5.4
● https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/heads/chromeos-5.10
Also Useful:
● https://gitlab.freedesktop.org/jbarnes/cros-util
![Page 16: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/16.jpg)
Other Useful Things
● SuzyQ!● usb-c hub with ethernet & power● usb-c thumb drive● https://gitlab.freedesktop.org/jbarnes/cros-util● https://docs.mesa3d.org/android.html#replacing-android-drivers-on-chrome-os
![Page 17: ChromeOS Freedreno Update](https://reader031.fdocuments.in/reader031/viewer/2022012416/6170e032329d3662045dad41/html5/thumbnails/17.jpg)
Thank You