Commit Graph

13 Commits

Author SHA1 Message Date
Quentin Schulz
91a694e250 enable HW VPU decoding for SoCs that have stateless VPUs
v4l2codecs is the gstreamer plugin for V4L2 stateless video hardware
decoding. The Rockchip SoCs that have a VPU all seems to be based on
Hantro, RKVDEC or RKVDECv2, all stateless encoding/decoding VPUs.

Therefore, let's enable VPU decoding in Gstreamer whenever possible,
when the SoC supports it.

PX30, RK3066, RK3188, RK3288, RK3328, RK3399, RK356x and RK3588(s) all
have at least one Hantro VPU.

RK3328, RK3399, RK356x and RK3588(s) all have at least one
RKVDEC/RKVDECv2 VPU (though not necessarily supported in the upstream
kernel just yet).

=== PX30
Tested on PX30 Ringneck with with Haikou+Haikou Video Demo adapter:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_h264.mov
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2slh264dec)
- gstreamer1.0-plugins-base (for parsebin)

A few frames are dropped every other second for 1080p but otherwise
smooth.

=== RK3399
Tested on RK3399 Puma with Haikou:

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slh264dec ! waylandsink

with FILE storing the path to any h264 file, e.g.
https://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_1080p_h264.mov
https://download.blender.org/demo/movies/BBB/bbb_sunflower_2160p_30fps_normal.mp4.zip

Needed packages are:
- weston
- gstreamer1.0-plugins-bad (for waylandsink and v4l2codecs)
- gstreamer1.0-plugins-base (for parsebin)

=== RK3588

Tested on a RK3588 Tiger with Haikou+Haikou Video Demo adapter - on a
downstream v6.6 (upstream-based, not Rockchip BSP-based) with DSI
patches - :

$ gst-launch-1.0 filesrc location=$FILE ! parsebin ! v4l2slav1dec ! fakesink

with FILE storing the path to any AV1 file, e.g.
http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/cmaf/spark-8b-59.94fps/spark_606kbps_432p.mp4
https://woolyss.com/f/av1-nosound-chimera.mp4
https://woolyss.com/f/av1-opus-sita.webm

Needed packages are:
- gstreamer1.0-plugins-bad (for fakesink and v4l2slav1dec)
- gstreamer1.0-plugins-base (for parsebin)

For some reason though, waylandsink is very choppy. Combining
fpsdisplaysink with fakesink shows a ~60fps when decoding the 432p file,
~24fps for the two others.
Note that 10b-depth isn't supported (at least in my setup).

Reviewed-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2024-08-29 19:27:56 -04:00
Quentin Schulz
50fdb975cf add rockchip MACHINEOVERRIDES
Add "rockchip" to the MACHINEOVERRIDES so that it can be used to easily
identify things that apply only to Rockchip-based devices and keeping
other devices untouched.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2024-06-06 13:20:19 -04:00
Anthony Davies
265e8c3df2 allow KERNEL_IMAGETYPE override
Update machine include files to allow overriding of KERNEL_IMAGETYPE.

[
with the following 2 tweaks by Trevor:
- remove the "v3" from the commit's subject
- extended patch to rk3308 and rk3588s, which were added in between this patch
  being submitted, and this patch being applied
]

Signed-off-by: Anthony Davies <anthony.t.davies@gmail.com>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2023-11-16 17:34:24 -05:00
Trevor Woerner
dd1fc4abcf linux-yocto: remove non-rockchip archs
Remove the non-rockchip architectures from the kernel build since these are
all a waste of build time, filesystem space, and runtime memory.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2023-09-16 07:38:36 -04:00
Trevor Woerner
6fed2791f1 override syntax fixup
The _virtual notation is not an override. These syntax "fixes" need to be
reverted.

In the case of the kernel override, when it was added, the rock-pi-e needed
the latest kernel (linux-yocto-dev) but now the default linux-yocto kernel
will suffice. So this mistake actually switched the rock-pi-e from
linux-yocto-dev back to linux-yocto inadvertently but at a time when
linux-yocto-dev was no longer required.

In the case of the bootloader overrides, u-boot was always the default, so
these overrides were always redundant.

Therefore, in the end, simply removing these overrides is the best way
forward (considering these aren't doing anything, and the builds are working
fine regardless).

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-12-13 17:32:36 -05:00
Khem Raj
4ed72a368a machines: Adjust for new location of tune files in core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-19 10:14:35 -04:00
Trevor Woerner
335bfcbf8d switch to the new bitbake OVERRIDE syntax
With bitbake commit 7dcf317cc141dc980634f8c18bfa84f83e57206a
("bitbake: Switch to using new override syntax"), applied on
Aug 2, 2021, the OVERRIDE separator is now a colon instead of
an underscore. Therefore all builds performed with a bitbake
before this change must use a meta-rockchip commit before this
one, and any builds performed with a bitbake after this change
must use a meta-rockchip starting from this commit onwards.

Build-tested for all meta-rockchip MACHINEs.

Run tested on:
- tinker-board
- nanopi-m4-2gb
- rock64
- rock-pi-4b
- rock-pi-e

The tinker-board and rock-pi-e work fine. The rest of the boards
seem to have a, hopefully unrelated, issue running a
5.13-yocto-standard kernel. However, all boards work with the
5.10-yocto-standard kernel.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-08-04 21:59:14 -04:00
Trevor Woerner
2cf5a03eaa wic/wks cleanup
By exporting a couple more variables the wks file for every rockchip device
can be built from one template instead of having separate wks files for each
board and platform.

The following BSP variables were checked before and after this change to make
sure they remained valid/sensible:
- WKS_FILE
- UBOOT_SUFFIX
- SPL_BINARY
- IMAGE_FSTYPES

Built-tested for every MACHINE in this BSP.

Run-tested on the following devices to ensure they continue to boot correctly
to a cmdline (core-image-base):
- tinker-board
- rock-pi-e
- rock-pi-4b
- rock64
- nanopi-m4-2gb

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-30 12:11:52 -04:00
Trevor Woerner
62d4201415 conf/machine/include/rockchip-wic.inc: create
Create a conf/machine/include/rockchip-wic.inc file to contain all the common
wic/wks things for easy inclusion by any MACHINEs that use wic for their image
creation.

NOTE: the wic image type of rock-pi-e changed from "wic.xz" to "wic" which
      matches all the other meta-rockchip MACHINEs that use wic

The following variables were checked before and after to make sure they remain
correct/sensible:
- IMAGE_FSTYPES
- WKS_FILE_DEPENDS
- IMAGE_BOOT_FILES
- RK_CONSOLE_BAUD
- RK_CONSOLE_DEVICE
- RK_BOOT_DEVICE
- SERIAL_CONSOLES
- WICVARS

Build-tested for all currently-defined MACHINEs.

Boot-tested on the following boards to make sure they continue to boot to a
console correctly (core-image-base):
- tinker-board
- rock64
- rock-pi-4b
- rock-pi-e
- nanopi-m4-2gb

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-28 11:13:21 -04:00
Trevor Woerner
8cd56cdcd8 console cleanup
Consolidate all the various console definitions to the common
conf/machine/include/rockchip-defaults.inc file and create
RK_CONSOLE_BAUD and RK_CONSOLE_DEVICE variables that can be
reused in the wks files.

The following variables were checked before and after this patch
to make sure they are sensible:
- SERIAL_CONSOLES
- RK_CONSOLE_DEVICE
- RK_CONSOLE_BAUD

A boot test was performed on the following boards to make sure
they all continue to boot to a cmdline:
- tinker-board
- rock-pi-e
- nanopi-m4-2gb
- rock64
- rock-pi-4b

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2021-06-27 14:43:56 -04:00
Joshua Watt
ad65fd7736 rock-pi-4: Split our variant machines
Splits out the three variants of the rock-pi-4 (A, B & C) into their own
machines. Unfortunately, it is not possible to have a single machine
that works for all three, as there isn't any known ways for the
bootloader to distinguish them. The old rock-pi-4 machine is kept around
for use with older kernels

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2021-01-29 22:10:49 -05:00
Joshua Watt
d269803649 Use TF-A recipe from meta-arm
Converts the build to pull the canonical TF-A recipe from meta-arm
instead of duplicating it in this layer.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-06-25 16:38:48 -04:00
Joshua Watt
01467664da rk3399: Add generic rk3399 support
Adds support for the rk3399 SoC. Notably:
 *) Split out the default kernel config and image type from
    rockchip-defaults.inc now that not all support chips are ARMv7
 *) Apply a patch to Arm Trusted Firmware to fix a compile issue
 *) Arm Trusted Firmware requires the arm-none-eabi-native compiler to
    compile the M0 firmware.
 *) Modify u-boot to pull in the ATF files when compiling
 *) The rk3399 is support by the panfrost driver in mesa, so enable it

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2020-01-27 16:32:19 -05:00