Re: [PATCH v4 00/18] Enable drm/imagination BXM-4-64 Support for LicheePi 4A

Michal Wilczynski
2025-02-03T16:33:13Z

On 1/31/25 16:39, Matt Coster wrote:
> On 28/01/2025 19:47, Michal Wilczynski wrote:
>> The LicheePi 4A board, featuring the T-HEAD TH1520 SoC, includes an Imagination
>> Technologies BXM-4-64 GPU. Initial support for this GPU was provided through a
>> downstream driver [1]. Recently, efforts have been made to upstream support for
>> the Rogue family GPUs, which the BXM-4-64 is part of [2].
>>
>> While the initial upstream driver focused on the AXE-1-16 GPU, newer patches
>> have introduced support for the BXS-4-64 GPU [3]. The modern upstream
>> drm/imagination driver is expected to support the BXM-4-64 as well [4][5]. As
>> this support is being developed, it's crucial to upstream the necessary glue
>> code including clock and power-domain drivers so they're ready for integration
>> with the drm/imagination driver.
>>
>> Recent Progress:
>>
>> Firmware Improvements:
>> Since August, the vendor has provided updated firmware
>> [6][7] that correctly initiates the firmware for the BXM-4-64.
>>
>> Mesa Driver Testing:
>> The vendor-supplied Mesa driver [8] partially works with Vulkan examples, such
>> as rendering a triangle using Sascha Willems' Vulkan samples [9]. Although the
>> triangle isn't rendered correctly (only the blue background appears), shader
>> job submissions function properly, and IOCTL calls are correctly invoked. For
>> testing, we used the following resources:
>>
>> Kernel Source: Custom kernel with necessary modifications [10].
>> Mesa Driver: Vendor-provided Mesa implementation [11].
>>
>> Dependencies:
>> Testing required a functional Display Processing Unit (DPU) and HDMI driver,
>> which are currently not upstreamed. Efforts are underway to upstream the DPU
>> DC8200 driver used in StarFive boards [12], which is the same DPU used on the
>> LicheePi 4A. Once the DPU and HDMI drivers are upstreamed, GPU support can be
>> fully upstream.
>>
>> Testing Status:
>> This series has been tested by performing a probe-only operation, confirming
>> that the firmware begins execution. The probe function initiates firmware
>> execution and waits for the firmware to flip a specific status bit.
>>
>> [ 12.637880] powervr ffef400000.gpu: [drm] loaded firmware powervr/rogue_36.52.104.182_v1.fw
>> [ 12.648979] powervr ffef400000.gpu: [drm] FW version v1.0 (build 6645434 OS)
>> [ 12.678906] [drm] Initialized powervr 1.0.0 for ffef400000.gpu on minor 0
>>
>> Power Management:
>> Full power management capabilities require implementing the T-HEAD SoC AON
>> protocol messaging via the hardware mailbox. Support for the mailbox was merged
>> in kernel 6.13 [13], and the AON protocol implementation is part of this
>> series, since v2. Therefore this series support full power management
>> capabilities for the GPU driver.
>>
>> Thanks everyone for taking the time to review the last revision ! Your
>> guidance and the direction was very helpful.
>
> Hi Michal,
>
> This is awesome, thanks for contributing! I apologise for not responding
> to earlier versions (things have been pretty busy here), but they have
> very much been on my radar.
>
> I see you're already aware of my other B-Series patchs[3]; would you
> mind rebasing these changes on top of those? We're making some not
> insignificant changes to the bindings which will conflict with any new
> GPUs added in the meantime. I'll leave comments in this series where I
> suspect the conflicts will appear.
>
> Cheers,
> Matt

Hi Matt,

Thanks for your review, and no worries about the delay it’s totally
understandable. I appreciate the heads-up about the dt-bindings work in
progress. I just wanted to share a working solution for now, but I’ll
definitely rebase these patches once your changes are in place.

Cheers, Michal

>

>