From patchwork Tue Dec 1 06:44:01 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anuj Mittal X-Patchwork-Id: 106755 X-Patchwork-Delegate: anuj.mittal@oss.qualcomm.com Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.5895.1796107526601664271 for ; Mon, 30 Nov 2026 22:45:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@qualcomm.com header.s=qcppdkim1 header.b=dPjhzt1k; dkim=pass header.i=@oss.qualcomm.com header.s=google header.b=R+LI+gZs; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: oss.qualcomm.com, ip: 205.220.168.131, mailfrom: anuj.mittal@oss.qualcomm.com) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B12Ko6T305521 for ; Tue, 1 Dec 2026 06:45:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=HD3q7MKJY4l tZDnwhaUlokIpd0ZWnUST9F5/D6JOHcI=; b=dPjhzt1kZsbSorVXOmT/AogQ5Zo A12uTDJ5HuNCVafuahBi29qwdIyyW+51GSQVrAdYsJ8mQ3zXwiCL/vlO2CMhqzf9 H9gmMhPaCtpbt4TYQV0FJrWblOutgNuVqQJ2LC+sYIhUkVNNfGiXrVdJ6geOpQsC M6kmG6X8cjatFyzaftlObIg/4ffOfJ35fkUFeCCJeWGaPsEymphqoF+aknM/7UV3 449JbVGVHO3t7IrKY6S2AcJIpxNFgR4SIQQZn3OwYTLG/8JaE+eCCHFgvMmiRUJj ki0Hk2aRWNmrQG8IwV43CBhLCTqPgEmIcybzW655ycKWevGpxwASB7/x1cw== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j9gnbhu1w-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 01 Dec 2026 06:45:26 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-341eff9e381so16662698eec.1 for ; Mon, 30 Nov 2026 22:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796107525; x=1796712325; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=HD3q7MKJY4ltZDnwhaUlokIpd0ZWnUST9F5/D6JOHcI=; b=R+LI+gZs0Ei+XQw7p/y7oq5lMtQevvagIA1l2DKjNN3F88ZJlruTNMnVdBhBQLw+EY dbojNK6Xzt0ffvl+M67w19G+H+CLLRvi61RdGJyxAsrlS6EUadj0h5Cp9Wii8Kuxgj2O rT2VdMoi9a1cAOZrsTe69d9EEKF1qKviButJUNGEivN0hXxqof6z3U5OojjjjmjLrbyP oR/fM23gnRCh3I4P+UiaZXPAK3sv1VT7aP9/bh0xQYRwT2U3sLAgukpzZ9A1NNNgMqqh 3mF9csVnXHBaxGW9VIIze6sBAmYjLlcRbyzKGhu6wz/U/2JLPRzSR7ZUMY/kRUUzU1tg f16g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796107525; x=1796712325; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=HD3q7MKJY4ltZDnwhaUlokIpd0ZWnUST9F5/D6JOHcI=; b=hgb1z4Sz2ClZuzDnt5wDzjm2j9/MoZyxy6BwtFtHQ8L/ZVEkqoLBJvx2aNzY7TgmZY 9Sh7RgOQVe48SHj+1TfcFJnlU6l76Ad9oArxOcQM7bzBycJBQesRdZFYvqmsh8uZ8U6k PR1vcZqM5e+R5wyWwe3TN5fr30Y5fL4HC0OcO+oI/yewx0ucBtecb1gYjdOGbj4EoeeL mMM6tjnyugiXlT3coMhXFwczSt9sFIwT4RMouhXCwc1ZdML0nRx0o7jPwajBh5MoVR6d g9B6N/ncYJ2HSNT81509IwknqZbRor/ayQuzMsTlChH1qPA6syCF6keczufOQTmW1dMY hvNA== X-Gm-Message-State: APuU4Z/atYe8Tc76tA0227AM9InmkAsuARC6rmOrxdfFoKf0nsDKhApJ NyjsAwWgSZl555J/rMNKzFfTSKv+94C4XNScnu4ER2p105f9lrA7tn00WjWV4H/iKnMeNCP2Nu6 JSDFB5NwCE/3o3SehjuCYJWIRnALtZ+nnm4o6sbJ/e6HkUYnpvtxGd+Iqthc5hYbK9R5DMP+gnB ZTKkYRoLL3hTmmqnSVzIO/tQ== X-Gm-Gg: AZFdTZfJBss6YpSmtAkwjizeEhfj12g0As+dMwjxdMQ0Xy6kSJV67bmk3pi9YDB5eA1 lSiunPwLdd8PbX812nM7kckkpfOX/TtM1sM0AU7LNCEe8qm6FX1JQli43dolPOa8K6cIhhFOx0g mQ1qsZJ1YgdQRcCzd0JaDqCfIeAn5B+A6b5H3BGpdXJaDFqBqG6XWiQI1ExXmVPtl6t+NsjeMEX OaBl4loZHJb4LlP+BQayw673deEx08+LCXG7pdizrqlYqJF6mM8H3Ctf3cl3BwswX+FrX9wXjex n6t0xaBF1eXVDDvR9oQ/sMDgPkJJpT7S0RnOf7SsI1y3ITNgG2uvvVBpEv9g0iLFpteUsyegiF9 TNZrQjKGBsJayis3cvNBqIK0Vh1bXN5DptsmG/g6ahhhZUx/ThPmxFUCfSVMixRobgXqAMk72NW TU+C3f X-Received: by 2002:a05:693c:87d5:20b0:36d:9900:bb92 with SMTP id 5a478bee46e88-386a0ab6830mr28036389eec.10.1796107525489; Mon, 30 Nov 2026 22:45:25 -0800 (PST) X-Received: by 2002:a05:693c:87d5:20b0:36d:9900:bb92 with SMTP id 5a478bee46e88-386a0ab6830mr28036369eec.10.1796107524741; Mon, 30 Nov 2026 22:45:24 -0800 (PST) Received: from hu-anujmitt-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-38566cd46c5sm132830468eec.11.2026.11.30.22.45.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 22:45:24 -0800 (PST) From: Anuj Mittal To: openembedded-devel@lists.openembedded.org Subject: [wrynose][meta-oe][PATCH 45/45] vboxguestdrivers: fix vboxvideo build on kernels with restore force parameter Date: Tue, 1 Dec 2026 12:14:01 +0530 Message-ID: <20261201064402.3934788-45-anuj.mittal@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261201064402.3934788-1-anuj.mittal@oss.qualcomm.com> References: <20261201064402.3934788-1-anuj.mittal@oss.qualcomm.com> MIME-Version: 1.0 X-Authority-Analysis: v=2.4 cv=Y9BtIReN c=1 sm=1 tr=0 ts=6b0e6d06 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=pGLkceISAAAA:8 a=uz5923xnkEZ66WxJeMIA:9 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDAyNiBTYWx0ZWRfX+goKnFnFExxi GL3KApMAd1dE+W8esmo4N9Vp9qeDR1w604XSdiy4FvblawGmHKJvS6VJF5fDgiT2gwOTCbuQ5cg F30a8z92OhL0PMaK21uqoeAJNFld5og= X-Proofpoint-GUID: 24eZTe8EsZUsA5GGfhQtyBC0aJS2Zx0y X-Proofpoint-ORIG-GUID: 24eZTe8EsZUsA5GGfhQtyBC0aJS2Zx0y X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDAyNiBTYWx0ZWRfX9PQV5bOJ3qC5 6eVE57TWud3ivKfLdUNEehFZ4QZa/zuqrXgrvJ8u+EioaH1enMFNKhHCiIHUfadV63/1N1Eegx3 yA4gZPkMXLnWPD32ZCHjXK6N6eBkfSFZ16uK3vr9j+9FO/1q6oWlXYMuCD3sdg+COiA9y2+PoH0 T4o9BsTiOMThBIzXlOIQQDx4IwEJq62aViyCFbB2G815zQxdC9ToS97fjae0T4+z9Zg1dPhCi8M LjnZCj/ADAWQoGKWsuS4P0ZPtMS6022qeMq6AojiMqmzGM3E/FMi6bznJjoHSU2gT2xBcP6iAd6 kNbQ5vcP/kAWPrDvS43NtoFSZMFDf5X0QBBYvrsZNF35+UGyzc2jKBRd5WPZW21L1A1myZZLfSx P1+Vk2zZdoUMVUWnLoCeXoYoZ8jgp3mNqiUk8SKbFD2+86kIYQBzmj3SqPkezMxMZrDuBXiDXAC yvHLNeqoe0RALTJbayA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-01_01,2026-11-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010026 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 06:45:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133739 From: Anuj Mittal Linux commit 943240d342f1 ("drm/client: Pass force parameter to client restore") added a bool force parameter to drm_fb_helper_restore_fbdev_mode_unlocked(). vboxvideo only passes it for kernels >= 6.19, but the commit was backported to v6.18.55 as a Stable-dep-of, so the build fails with: vbox_main.c:561:17: error: too few arguments to function 'drm_fb_helper_restore_fbdev_mode_unlocked'; expected 2, have 1 Extend the existing patch with a VBOX_DRM_FB_HELPER_RESTORE_HAS_FORCE escape hatch and set it from do_compile when the kernel headers declare the force parameter. Signed-off-by: Anuj Mittal --- ...-build-decide-if-drm_fb_helper_alloc.patch | 27 +++++++++++++++++-- .../vboxguestdrivers_7.2.8.bb | 11 +++++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vboxvideo-let-the-build-decide-if-drm_fb_helper_alloc.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vboxvideo-let-the-build-decide-if-drm_fb_helper_alloc.patch index 9f19fb4efd..ba4b1e8bfa 100644 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vboxvideo-let-the-build-decide-if-drm_fb_helper_alloc.patch +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-vboxvideo-let-the-build-decide-if-drm_fb_helper_alloc.patch @@ -25,12 +25,24 @@ headers it is actually compiling against. Leaving VBOX_NO_DRM_FB_HELPER_ALLOC_INFO undefined keeps the previous behaviour, so this is a no-op for anyone building the way VirtualBox intends. +Similarly, Linux commit 943240d342f1 ("drm/client: Pass force parameter to +client restore") added a bool force parameter to +drm_fb_helper_restore_fbdev_mode_unlocked(). vbox_main.c only passes it for +RTLNX_VER_MIN(6,19,0), but the commit was also backported to v6.18.55, where +the build fails with + + vbox_main.c:561:17: error: too few arguments to function 'drm_fb_helper_restore_fbdev_mode_unlocked'; expected 2, have 1 + +Add a VBOX_DRM_FB_HELPER_RESTORE_HAS_FORCE escape hatch for that as well. + Upstream-Status: Pending Signed-off-by: Khem Raj +Signed-off-by: Anuj Mittal --- - vboxvideo/vbox_fb.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) + vboxvideo/vbox_fb.c | 9 ++++++++- + vboxvideo/vbox_main.c | 2 +- + 2 files changed, 9 insertions(+), 2 deletions(-) --- a/vboxvideo/vbox_fb.c +++ b/vboxvideo/vbox_fb.c @@ -50,3 +62,14 @@ Signed-off-by: Khem Raj info = helper->info; #elif RTLNX_VER_MIN(6,2,0) || RTLNX_RHEL_RANGE(8,9, 8,99) || RTLNX_RHEL_RANGE(9,3, 9,99) info = drm_fb_helper_alloc_info(helper); +--- a/vboxvideo/vbox_main.c ++++ b/vboxvideo/vbox_main.c +@@ -553,7 +553,7 @@ void vbox_driver_lastclose(struct drm_device *dev) + { + struct vbox_private *vbox = dev->dev_private; + +-#if RTLNX_VER_MIN(6,19,0) ++#if RTLNX_VER_MIN(6,19,0) || defined(VBOX_DRM_FB_HELPER_RESTORE_HAS_FORCE) + if (vbox->fbdev) + drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper, false); + #elif RTLNX_VER_MIN(3,16,0) || RTLNX_RHEL_MAJ_PREREQ(7,1) diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb index 3cb0ed1f6e..8404d58be1 100644 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.2.8.bb @@ -64,9 +64,14 @@ do_configure:prepend() { # compile and install mount utility do_compile() { vbox_kcflags="" - if [ -e "${STAGING_KERNEL_DIR}/include/drm/drm_fb_helper.h" ] && - ! grep -q drm_fb_helper_alloc_info "${STAGING_KERNEL_DIR}/include/drm/drm_fb_helper.h"; then - vbox_kcflags="-DVBOX_NO_DRM_FB_HELPER_ALLOC_INFO" + fb_helper_h="${STAGING_KERNEL_DIR}/include/drm/drm_fb_helper.h" + if [ -e "$fb_helper_h" ]; then + if ! grep -q drm_fb_helper_alloc_info "$fb_helper_h"; then + vbox_kcflags="$vbox_kcflags -DVBOX_NO_DRM_FB_HELPER_ALLOC_INFO" + fi + if grep -A1 "^int drm_fb_helper_restore_fbdev_mode_unlocked(" "$fb_helper_h" | grep -q "bool force"; then + vbox_kcflags="$vbox_kcflags -DVBOX_DRM_FB_HELPER_RESTORE_HAS_FORCE" + fi fi oe_runmake all KCFLAGS="$vbox_kcflags"