Skip to content

Commit 814d5df

Browse files
authored
Merge pull request #2490 from nxp-upstream/weston-libdrm-update
Weston/libdrm update to lf-6.18.2
2 parents 5bbc1cf + cb69e1c commit 814d5df

6 files changed

Lines changed: 57 additions & 8 deletions

File tree

conf/machine/include/imx-base.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ PREFERRED_VERSION_weston:mx7-nxp-bsp ??= "10.0.5.imx"
597597
PREFERRED_VERSION_weston:imx-mainline-bsp = ""
598598

599599
# Use i.MX libdrm Version
600-
PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.123.imx"
600+
PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.127.imx"
601601

602602
PREFERRED_VERSION_glslang:imxvulkan ??= "1.3.275.0.imx"
603603
PREFERRED_VERSION_spirv-headers:imxvulkan ??= "1.3.275.0.imx"

recipes-graphics/drm/libdrm_2.4.123.imx.bb renamed to recipes-graphics/drm/libdrm_2.4.127.imx.bb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ DEPENDS = "libpthread-stubs"
1313

1414
SRC_URI = "${IMX_LIBDRM_SRC};branch=${SRCBRANCH}"
1515
IMX_LIBDRM_SRC ?= "git://github.com/nxp-imx/libdrm-imx.git;protocol=https"
16-
SRCBRANCH = "libdrm-imx-2.4.123"
17-
SRCREV = "c7c4953161a0f8f2cc7bee70284bf3263c9cfcf5"
16+
SRCBRANCH = "libdrm-imx-2.4.127"
17+
SRCREV = "ef5d39b51d2acfa66e165db89ba32ae32d55def5"
1818

1919
DEFAULT_PREFERENCE = "-1"
2020
COMPATIBLE_MACHINE = "(imx-nxp-bsp)"

recipes-graphics/wayland/weston-init.bbappend

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ PACKAGECONFIG_USE_G2D:mx8qm-nxp-bsp ?= ""
4545
PACKAGECONFIG_USE_G2D:mx8qxp-nxp-bsp ?= ""
4646
PACKAGECONFIG_USE_G2D:mx8dx-nxp-bsp ?= ""
4747
PACKAGECONFIG_USE_G2D:mx93-nxp-bsp ?= "use-g2d"
48+
PACKAGECONFIG_USE_G2D:mx943-nxp-bsp ?= "use-g2d"
4849

4950
USE_G2D_VALUE = "true"
5051
USE_G2D_VALUE:mx6-nxp-bsp = "1"
@@ -57,6 +58,18 @@ PACKAGECONFIG[size] = ",,"
5758
PACKAGECONFIG[use-g2d] = ",,"
5859
PACKAGECONFIG[xwayland] = ",,"
5960

61+
update_file() {
62+
sed -i -e "s,$1,$2," $3
63+
}
64+
65+
insert_line_before() {
66+
sed -i -e "/$1/i $2" $3
67+
}
68+
69+
insert_line_after() {
70+
sed -i -e "/$1/a $2" $3
71+
}
72+
6073
do_install:append() {
6174
# Replace the template variables
6275
sed -i -e 's,@bindir@,${bindir},g' ${D}${sysconfdir}/xdg/weston/weston.ini
@@ -91,4 +104,35 @@ do_install:append() {
91104
if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "no" ]; then
92105
sed -i -e "s/^xwayland=true/#xwayland=true/g" ${D}${sysconfdir}/xdg/weston/weston.ini
93106
fi
107+
108+
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
109+
# Add weston.log back, used by NXP for testing
110+
update_file "ExecStart=/usr/bin/weston " "ExecStart=/usr/bin/weston --log=\$\{XDG_RUNTIME_DIR\}/weston.log " ${D}${systemd_system_unitdir}/weston.service
111+
112+
# FIXME: weston should be run as weston, not as root
113+
update_file "User=weston" "User=root" ${D}${systemd_system_unitdir}/weston.service
114+
update_file "Group=weston" "Group=root" ${D}${systemd_system_unitdir}/weston.service
115+
116+
# FIXME: Upstream this change
117+
insert_line_before "ExecStart=" "ExecStartPre=+chvt 7" ${D}${systemd_system_unitdir}/weston.service
118+
119+
# FIXME: fix the underlying problem and drop this workaround
120+
insert_line_after "ExecStart=" "Restart=on-failure" ${D}${systemd_system_unitdir}/weston.service
121+
else
122+
# Install weston-socket.sh for sysvinit as well
123+
install -D -p -m0644 ${WORKDIR}/weston-socket.sh ${D}${sysconfdir}/profile.d/weston-socket.sh
124+
fi
125+
126+
# Include commented gbm-format
127+
if ! [ "${@bb.utils.contains('PACKAGECONFIG', 'gbm-format', 'yes', 'no', d)}" = "yes" ]; then
128+
sed -i -e "/^\[core\]/a #gbm-format=${GBM_FORMAT_VALUE}" ${D}${sysconfdir}/xdg/weston/weston.ini
129+
fi
130+
}
131+
132+
do_install:append:mx6-nxp-bsp() {
133+
update_file "--no-resizeable" "--no-clients-resize" ${D}${sysconfdir}/xdg/weston/weston.ini
134+
}
135+
136+
do_install:append:mx7-nxp-bsp() {
137+
update_file "--no-resizeable" "--no-clients-resize" ${D}${sysconfdir}/xdg/weston/weston.ini
94138
}

recipes-graphics/wayland/weston-init/imx-nxp-bsp/weston.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ touchscreen_calibrator=true
2121
#transform=rotate-90
2222

2323
[screen-share]
24-
command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
24+
command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-resizeable
2525
#start-on-startup=true

recipes-graphics/wayland/weston_10.0.5.imx.bb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,12 @@ LIC_FILES_CHKSUM:append = "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70"
161161
DEFAULT_PREFERENCE = "-1"
162162

163163
SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downloads/${BPN}-${PV}.tar.xz"
164-
SRC_URI:prepend = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} "
164+
SRC_URI:prepend = "${WESTON_SRC};branch=${SRCBRANCH} "
165+
WESTON_SRC ?= "git://github.com/nxp-imx/weston-imx.git;protocol=https"
165166
SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \
166167
file://0001-g2d-renderer.c-Include-sys-stat.h.patch"
167168
SRCBRANCH = "weston-imx-10.0.5"
168-
SRCREV = "7129417ae04de57f9596ccf27f74ef967660a64f"
169+
SRCREV = "5223a3c86177709d25f86a96622c0829da955a0e"
169170

170171
# Disable OpenGL for parts with GPU support for 2D but not 3D
171172
REQUIRED_DISTRO_FEATURES = "opengl"

recipes-graphics/wayland/weston_14.0.2.imx.bb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,21 @@ SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}
163163
SRC_URI:prepend = "${WESTON_SRC};branch=${SRCBRANCH} "
164164
WESTON_SRC ?= "git://github.com/nxp-imx/weston-imx.git;protocol=https"
165165
SRCBRANCH = "weston-imx-14.0.2"
166-
SRCREV = "c267ba8e6eed3a824e042a200bcc1b4c370ba88f"
166+
SRCREV = "be99fd1adad7e77c8c31926b09520ade5cdaca35"
167167

168168
PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}"
169169
PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11"
170170

171-
PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D}"
171+
PACKAGECONFIG:append = " ${PACKAGECONFIG_G2D} ${PACKAGECONFIG_PIPEWIRE}"
172172
PACKAGECONFIG_G2D ??= ""
173173
PACKAGECONFIG_G2D:imxgpu2d ??= "imxg2d"
174174
PACKAGECONFIG_G2D:mx93-nxp-bsp ??= "imxg2d"
175175
PACKAGECONFIG_G2D:mx943-nxp-bsp ??= "imxg2d"
176176

177+
PACKAGECONFIG_PIPEWIRE ??= ""
178+
PACKAGECONFIG_PIPEWIRE:mx8-nxp-bsp ??= "pipewire"
179+
PACKAGECONFIG_PIPEWIRE:mx9-nxp-bsp ??= "pipewire"
180+
177181
# Weston with i.MX G2D renderer
178182
PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
179183

0 commit comments

Comments
 (0)