diff mbox series

ls1028a: hdp: Add config support for HDP firmware loading

Message ID 20220510102910.31459-1-yangbo.lu@nxp.com
State Accepted
Commit d49480637681c0939f7d86b41318e3cc45795036
Delegated to: Peng Fan
Headers show
Series ls1028a: hdp: Add config support for HDP firmware loading | expand

Commit Message

Yangbo Lu May 10, 2022, 10:29 a.m. UTC
From: Alison Wang <alison.wang@nxp.com>

This patch adds config support for HDP firmware loading on LS1028A.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 board/freescale/ls1028a/ls1028a.c            | 7 ++++++-
 configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 2 ++
 configs/ls1028aqds_tfa_defconfig             | 2 ++
 configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 2 ++
 configs/ls1028ardb_tfa_defconfig             | 2 ++
 5 files changed, 14 insertions(+), 1 deletion(-)

Comments

Michael Walle May 10, 2022, 2:18 p.m. UTC | #1
> From: Alison Wang <alison.wang@nxp.com>
> 
> This patch adds config support for HDP firmware loading on LS1028A.

FWIW, I really don't like this as this is just for a downstream kernel. For
the upstream kernel the firmware should be loaded by the kernel itself. But
unfortunately, there is no development there. (I have some half baked
patches though and can confirm, that firmware loading is working from
linux). Instead of this I'd like to see some work to support the DP PHY in
upstream linux as this is really the last missing piece to get graphics
working.

Now this is purely board related code, so it is probably fine. But in the
past the handling of purly downstream stuff was removed from upstream
u-boot anyway in favor of the upstream method. i.e. fixup of the
ls1028a-gpu node.

-michael
Vladimir Oltean May 10, 2022, 5:47 p.m. UTC | #2
On Tue, May 10, 2022 at 04:18:32PM +0200, Michael Walle wrote:
> > From: Alison Wang <alison.wang@nxp.com>
> > 
> > This patch adds config support for HDP firmware loading on LS1028A.
> 
> FWIW, I really don't like this as this is just for a downstream kernel.

This => what? I only see a config option. I searched the list and the
source code for CONFIG_VIDEO_LS_HDP_LOAD and I don't see any user...

> For the upstream kernel the firmware should be loaded by the kernel itself.

In principle I agree.

> But unfortunately, there is no development there. (I have some half
> baked patches though and can confirm, that firmware loading is working
> from linux). Instead of this I'd like to see some work to support the
> DP PHY in upstream linux as this is really the last missing piece to
> get graphics working.

It is? What did I miss?

> Now this is purely board related code, so it is probably fine. But in the
> past the handling of purly downstream stuff was removed from upstream
> u-boot anyway in favor of the upstream method. i.e. fixup of the
> ls1028a-gpu node.
> 
> -michael
Michael Walle May 10, 2022, 9:11 p.m. UTC | #3
Am 2022-05-10 19:47, schrieb Vladimir Oltean:
> On Tue, May 10, 2022 at 04:18:32PM +0200, Michael Walle wrote:
>> > From: Alison Wang <alison.wang@nxp.com>
>> >
>> > This patch adds config support for HDP firmware loading on LS1028A.
>> 
>> FWIW, I really don't like this as this is just for a downstream 
>> kernel.
> 
> This => what? I only see a config option. I searched the list and the
> source code for CONFIG_VIDEO_LS_HDP_LOAD and I don't see any user...

You are right, I didn't actually notice that. The whole loading thing
[1] is missing.

>> For the upstream kernel the firmware should be loaded by the kernel 
>> itself.
> 
> In principle I agree.
> 
>> But unfortunately, there is no development there. (I have some half
>> baked patches though and can confirm, that firmware loading is working
>> from linux). Instead of this I'd like to see some work to support the
>> DP PHY in upstream linux as this is really the last missing piece to
>> get graphics working.
> 
> It is? What did I miss?

I don't know? etnaviv is working [2 and more], mesa will be working soon
[3]. mali-dp500 should have been working all the time. So only the 
output
path is missing. If you are interested, this [4] is my take on the
support, which is actually working. But I haven't found any time to look
at it again. And I'm missing any documentation, so most information was
found out by educated guesses and comparing to the downstream driver.
I'd greatly appreciate any help ;)

[1] 
https://source.codeaurora.org/external/qoriq/qoriq-components/u-boot/tree/drivers/video/nxp/layerscape?h=integration
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/etnaviv?id=12495f4eb298963565e0bdd37d8096ab1136d89f
[3] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9255
[4] https://github.com/mwalle/linux/tree/feature-cdns-phy

-michael
diff mbox series

Patch

diff --git a/board/freescale/ls1028a/ls1028a.c b/board/freescale/ls1028a/ls1028a.c
index 71a086ef67..1a7806fad7 100644
--- a/board/freescale/ls1028a/ls1028a.c
+++ b/board/freescale/ls1028a/ls1028a.c
@@ -1,6 +1,6 @@ 
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2019, 2021 NXP
+ * Copyright 2019-2022 NXP
  */
 
 #include <common.h>
@@ -328,3 +328,8 @@  int checkboard(void)
 	return 0;
 }
 #endif
+
+void *video_hw_init(void)
+{
+	return NULL;
+}
diff --git a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig
index 2e4db036a4..26613168f1 100644
--- a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig
@@ -98,3 +98,5 @@  CONFIG_WDT_SP805=y
 CONFIG_RSA=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_VIDEO=y
+CONFIG_VIDEO_LS_HDP_LOAD=y
diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig
index 556f77e222..7e66e681fe 100644
--- a/configs/ls1028aqds_tfa_defconfig
+++ b/configs/ls1028aqds_tfa_defconfig
@@ -103,3 +103,5 @@  CONFIG_WDT=y
 CONFIG_WDT_SP805=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_VIDEO=y
+CONFIG_VIDEO_LS_HDP_LOAD=y
diff --git a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig
index 20cb844b01..024f9394b1 100644
--- a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig
@@ -92,3 +92,5 @@  CONFIG_WDT_SP805=y
 CONFIG_RSA=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_VIDEO=y
+CONFIG_VIDEO_LS_HDP_LOAD=y
diff --git a/configs/ls1028ardb_tfa_defconfig b/configs/ls1028ardb_tfa_defconfig
index fdfdf39c61..97e979ca97 100644
--- a/configs/ls1028ardb_tfa_defconfig
+++ b/configs/ls1028ardb_tfa_defconfig
@@ -101,3 +101,5 @@  CONFIG_WDT=y
 CONFIG_WDT_SP805=y
 CONFIG_OF_LIBFDT_OVERLAY=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_VIDEO=y
+CONFIG_VIDEO_LS_HDP_LOAD=y