From patchwork Thu Mar 16 09:40:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 21063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6815FC6FD1F for ; Thu, 16 Mar 2023 09:41:16 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mx.groups.io with SMTP id smtpd.web10.8407.1678959668858680714 for ; Thu, 16 Mar 2023 02:41:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NVzsCXB+; spf=pass (domain: gmail.com, ip: 209.85.208.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id x3so4981462edb.10 for ; Thu, 16 Mar 2023 02:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678959667; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DjWwJ+HzMLGsNCsJYUyCfLocm52s4dHYJE75IWvJq9w=; b=NVzsCXB+eOiUHMakIAFjPF4WF13cpyIQ+wHzzeQ0woefMYu4FM13nnu8mbUbwWD84n w2zMmY4CXU6wMMEfp2nPJs/PoF3fb8C7J1xtVSg7uoMXTG3ovjSXI5hndSATkBgDbsc+ EYMg55od2HvvXIFM9SmxlZ7FTUimNgzvpkiiEWXyWhCILxG4T72YFWvZq14AOV0VxleV qIBIKi4NMFixoOtMT3H799NjXnPzBoLRSvnNL6khyDbXBuWqTRizzFzjCQZwwQk9moAl 9YhPNks58ZQI5OFrSYkEGF909oRPeZOOVevmXoVYiaFvQ2hpgdogUVYAnxvNieTpbXGu J2Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678959667; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DjWwJ+HzMLGsNCsJYUyCfLocm52s4dHYJE75IWvJq9w=; b=7EzOT5NJuobkJSwPDQMm3sFaQpFAke+UL7TzOI7GbRoKVmtHkFVp6IhPSrK8oZwHF4 LolnhsJqMgjk6KYIWwEqaw1gRbwzk8Fh12N1+z/oRcAuXLGORH8oaCJjVjiGSyJuio/m xN2d0n8CesO3U5pCOzass2kPvQuUTvN2FbJn4EPgZTc8qm6JpN9nG09vcq+CaXvxW4Cb yWqeipPtMXYGrM31q64ASb4pSEssZkSXKUEZaTw0+bZAW7Sl9Z4MzIUwRBHsWZICXwVE 4yKWqX0xG+/rGsxtxTsrmuskGgpgB+8wcL9E+WErtNj26C/NHQ7Cwe2FcalV1xCIbZ/+ hvZw== X-Gm-Message-State: AO0yUKVQPQjGNZYmSTdjusLWZt1zlQ28EtPFZUyweLqD+2qYBfp+tZWy kjIdTh8a9ihVLE/RrgQvA2m10A97GVk= X-Google-Smtp-Source: AK7set8UvyDRAxSbRW/95wUXZj/ur3teBnl5ZOePfk6pzcJFXqzqovYzLwofGfAlBDafEx735yr4Dw== X-Received: by 2002:a17:907:1caa:b0:92c:138e:ff1f with SMTP id nb42-20020a1709071caa00b0092c138eff1fmr12373907ejc.18.1678959667190; Thu, 16 Mar 2023 02:41:07 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id lf28-20020a170907175c00b00923221f4062sm3621661ejc.112.2023.03.16.02.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 02:41:06 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Date: Thu, 16 Mar 2023 10:40:57 +0100 Message-Id: <20230316094102.2628727-1-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Mar 2023 09:41:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178691 With mesa 23.0, it is not longer possible to use the host drivers, as mesa upstream has added strict checks for matching builds between drivers and libraries that load them. Add a check and a hint to runqemu so that there is a helpful error when there is no native/nativesdk opengl/virgl support. Signed-off-by: Alexander Kanavin --- scripts/runqemu | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 38aa35fdd4..0240dd533c 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -450,30 +450,16 @@ class BaseConfig(object): self.set("MACHINE", arg) def set_dri_path(self): - # As runqemu can be run within bitbake (when using testimage, for example), - # we need to ensure that we run host pkg-config, and that it does not - # get mis-directed to native build paths set by bitbake. - env = os.environ.copy() - try: - del env['PKG_CONFIG_PATH'] - del env['PKG_CONFIG_DIR'] - del env['PKG_CONFIG_LIBDIR'] - del env['PKG_CONFIG_SYSROOT_DIR'] - except KeyError: - pass - try: - dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True, env=env) - except subprocess.CalledProcessError as e: - raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.") - self.qemu_environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip() - - # This preloads uninative libc pieces and therefore ensures that RPATH/RUNPATH - # in host mesa drivers doesn't trick uninative into loading host libc. - preload_items = ['libdl.so.2', 'librt.so.1', 'libpthread.so.0'] - uninative_path = os.path.dirname(self.get("UNINATIVE_LOADER")) - if os.path.exists(uninative_path): - preload_paths = [os.path.join(uninative_path, i) for i in preload_items] - self.qemu_environ['LD_PRELOAD'] = " ".join(preload_paths) + drivers_path = os.path.join(self.bindir_native, '../lib/dri') + if not os.path.exists(drivers_path) or not os.listdir(drivers_path): + raise RunQemuError(""" +qemu has been built without opengl support and accelerated graphics support is not available. +To enable it, add: +DISTRO_FEATURES_NATIVE:append = " opengl" +DISTRO_FEATURES_NATIVESDK:append = " opengl" +to your build configuration. +""") + self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path def check_args(self): for debug in ("-d", "--debug"): From patchwork Thu Mar 16 09:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 21064 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A7E3C7618D for ; Thu, 16 Mar 2023 09:41:16 +0000 (UTC) Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) by mx.groups.io with SMTP id smtpd.web11.8295.1678959669343716741 for ; Thu, 16 Mar 2023 02:41:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Zz8c87jA; spf=pass (domain: gmail.com, ip: 209.85.208.52, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f52.google.com with SMTP id o12so4987959edb.9 for ; Thu, 16 Mar 2023 02:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678959668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E2JulSsT0PkuDB3bP33TEJAHOSVx6nPyWIVUQptsZ5U=; b=Zz8c87jAaPmYGCJ15poVulUa1U6U0/gQjN9Bh3kHvv+yh2mKnTMH2JdWKWRDu4VX0u ZAptlMdfmMh+/levJ8N6l9OQ/yS+DIfFlVAVuR4laTggNbOWCvU4TUf859yhMCV7kzfV zw89xSj4CW9oU+q84ZIY1SMRQ9nIM0v1epMAigZKfdricndT8mVaMb48ftUqYE/v9Lhs KoCzQczUs/bOl9d8F8l0UCUOBOJqxBhmc5ooT+ZbiMnm1+wefxUEeRFb11o5VRdS4LZb zq0Zl71piZU9dF31HTr6e61sAAKNcVWWkNJwRLyTBn1l5XVEnQJVPRrtQr0tFQrA/vK8 1HPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678959668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E2JulSsT0PkuDB3bP33TEJAHOSVx6nPyWIVUQptsZ5U=; b=CZFXZM7yXZe0RtPYM80xl/S7xoi5XQlDMOXRx44R6rjCsJKGGFhs4SbewoBHMlTjzs 0JfQtScXALiMppmGHqvKhkZcYBNh7UsJS5JBIhG19b8ZHSSDxjiiQhd21YEj+NdqkAPa ieC/QraLS00yIvzJLh1salgiPYVcnWjkXEhE1sCqJbLfffQ34UNVr3hi3qfa8Zto7e3n IbRDz6buZarTBxYQsmIg8dI+t4SdpzwOygVLHsgFTdLF5i7jf9iS9RSKVy3sXJYH56+C wEol5Rifxl10T087MhgmTUGOFAl7bW7tBlI1s824A+2IboWHu9xwKuzqWXKS+Ea2ZixN Me0g== X-Gm-Message-State: AO0yUKWAMG17MUMI1xsGURigXIp5j0QZPGdpqYR0wDsMA9SX04ZJFdqx QQWacKseO5c2OAakbPTdu7plrpTHTsA= X-Google-Smtp-Source: AK7set+tVXwtoQpthiWVKEAkvEiLlGuFwZJ+urOiIcHWHrK00tQhJb419dPGKVWIYZM9/cpiRF+cAQ== X-Received: by 2002:a17:906:656:b0:8b1:7841:9f28 with SMTP id t22-20020a170906065600b008b178419f28mr8817439ejb.55.1678959667626; Thu, 16 Mar 2023 02:41:07 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id lf28-20020a170907175c00b00923221f4062sm3621661ejc.112.2023.03.16.02.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 02:41:07 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 2/6] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Date: Thu, 16 Mar 2023 10:40:58 +0100 Message-Id: <20230316094102.2628727-2-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230316094102.2628727-1-alex@linutronix.de> References: <20230316094102.2628727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Mar 2023 09:41:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178692 This prevents accidental builds of it when native/nativesdk opengl is not actually enabled (which may cause undesirable lengthening of dependency chains or build failures because those dependencies don't enable options required for mesa). Signed-off-by: Alexander Kanavin --- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index c0b8f65625..775aab9297 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -51,7 +51,7 @@ inherit meson pkgconfig python3native gettext features_check BBCLASSEXTEND = "native nativesdk" -ANY_OF_DISTRO_FEATURES:class-target = "opengl vulkan" +ANY_OF_DISTRO_FEATURES = "opengl vulkan" PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}" From patchwork Thu Mar 16 09:40:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 21066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B9F3C761A6 for ; Thu, 16 Mar 2023 09:41:16 +0000 (UTC) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mx.groups.io with SMTP id smtpd.web10.8408.1678959669659635423 for ; Thu, 16 Mar 2023 02:41:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h62XIAtx; spf=pass (domain: gmail.com, ip: 209.85.208.47, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f47.google.com with SMTP id cy23so4948203edb.12 for ; Thu, 16 Mar 2023 02:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678959668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WprWMwGmRDHOqzmvPNh/rpZr+OLpAM3z+UfkN8tqm0s=; b=h62XIAtxPI0UV+Jg7qxlf/9Dc416CjPwhIRznjVPkh+jzhfzzQdURRaqHK7T6r4/3Y xpbq0GEg1WhheZwRBqbYC0xnOmWmyMhA0snYFx3CqaBzyCmTtWjW4db92TatPF6oSpjY 3/MewuOnasvJjh1QN/aiC+HjyMxGgcSKn1zDDNmNqfYcnv4MgJRCp7yYOqOyG4Us/zM9 ooBWUfaD72ZsWgAdaegytEwf+ep6dVQUmc9g3VQkLpzmMC4anNNzQA2vFBg3Ecrzy10d 6PEBBzvZhQ3h4b4FVdbZ81kcMiWkA2eqkIuOIaV9E2sk+auVQjaUEvYUJMInu4ADeP07 5E+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678959668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WprWMwGmRDHOqzmvPNh/rpZr+OLpAM3z+UfkN8tqm0s=; b=einkyAmgCtQiEZxb5lXwlatU+hgH6TBLBuUeAImuTp7fAbk32b39lU6KMMJ0b+Jf4y LD1jGDx3ZXcwroMtoJPLKw3NlrTg29/wKLDQsFy3ePTWqK6MbjJz18B/uzsyIHNcv/UA Wia87EvtRMu+vHTQ5bt1i53HC54hKpQzH+dO6ss2yVP14g1c1IohL1fzpSjFdMHWBcfl +C9fxCCDthNcelgUUwy/5qd/Ni3qwSVLT8jZ0dJ4pHaiIq7oh5Qty04uJ8edtt4wnmwN mzXCrGXB46mFxqWFZ9y2E7pahyGpk35UFzubBTXpAnKRaqnypGxtuG4ZvfJ9vPZ5s2I1 Gcrg== X-Gm-Message-State: AO0yUKXO3UHQUZh9V1aIeMnUnolcmkYDz5gBXQCMkgCOdUOcHN+3v6ev lA6eURW1HA7r/iLNsO5TJDc9mR/zH0s= X-Google-Smtp-Source: AK7set+8hb6787paSTPdYGeahqeH80xZsPRN7cKehD5otEDXIpY1Xtleau1BVUyJvTbcF7fdmXE9Tw== X-Received: by 2002:a05:6402:204:b0:4fc:73dc:5def with SMTP id t4-20020a056402020400b004fc73dc5defmr5201207edv.41.1678959668112; Thu, 16 Mar 2023 02:41:08 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id lf28-20020a170907175c00b00923221f4062sm3621661ejc.112.2023.03.16.02.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 02:41:07 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/6] mesa: enable a rich set of drivers for native builds Date: Thu, 16 Mar 2023 10:40:59 +0100 Message-Id: <20230316094102.2628727-3-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230316094102.2628727-1-alex@linutronix.de> References: <20230316094102.2628727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Mar 2023 09:41:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178693 Without this, the only available driver would be swrast (without llvmpipe) which is far too slow to be practical, and so qemu wouldn't be able to perform accelerated graphics. The one major dependency pulled in by this change is llvm-native which takes just under three minutes on my machine. If this is undesitable, opengl can be removed from DISTRO_FEATURES_NATIVE. Signed-off-by: Alexander Kanavin --- meta/recipes-graphics/mesa/mesa.inc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 775aab9297..dd15046438 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -89,6 +89,8 @@ PACKAGECONFIG = " \ ${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', d)} \ " +PACKAGECONFIG:append:class-native = "gallium-llvm r600" + # "gbm" requires "opengl" PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" @@ -102,8 +104,10 @@ PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence" # Vulkan drivers need dri3 enabled # amd could be enabled as well but requires gallium-llvm with llvm >= 3.9 VULKAN_DRIVERS = "" -VULKAN_DRIVERS:append:x86:class-target = ",intel" -VULKAN_DRIVERS:append:x86-64:class-target = ",intel" +VULKAN_DRIVERS:append:x86 = ",intel" +VULKAN_DRIVERS:append:x86-64 = ",intel" +# i686 is a 32 bit override for mesa-native +VULKAN_DRIVERS:append:i686 = ",intel" VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}" PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers" @@ -149,8 +153,10 @@ PACKAGECONFIG[zink] = "" GALLIUMDRIVERS = "swrast" # gallium swrast was found to crash Xorg on startup in x32 qemu GALLIUMDRIVERS:x86-x32 = "" -GALLIUMDRIVERS:append:x86:class-target = ",i915,iris,crocus" -GALLIUMDRIVERS:append:x86-64:class-target = ",i915,iris,crocus" +GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus" +GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus" +# i686 is a 32 bit override for mesa-native +GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus" GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" @@ -162,8 +168,10 @@ GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', ' # radeonsi requires LLVM GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}" -GALLIUMDRIVERS_LLVM:append:x86:class-target = ",svga" -GALLIUMDRIVERS_LLVM:append:x86-64:class-target = ",svga" +GALLIUMDRIVERS_LLVM:append:x86 = ",svga" +GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga" +# i686 is a 32 bit override for mesa-native +GALLIUMDRIVERS_LLVM:append:i686 = ",svga" PACKAGECONFIG[r600] = "" PACKAGECONFIG[virgl] = "" From patchwork Thu Mar 16 09:41:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 21065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7ACBCC7618A for ; Thu, 16 Mar 2023 09:41:16 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web10.8409.1678959670062438562 for ; Thu, 16 Mar 2023 02:41:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BAXvZgKa; spf=pass (domain: gmail.com, ip: 209.85.208.41, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id w9so5107693edc.3 for ; Thu, 16 Mar 2023 02:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678959668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ool8CY/rV+TxRAGpPCbgJhqayGlaxflLhFKQOjS5WYw=; b=BAXvZgKaByBl+xIryASmp5qT56O5HtFqhx9Riz+vOHxFPiKKJacFMuSjBE3XvS477M ZfVZlCUsWf93xUvHdoSbNXGJrLoKtlrwBLrLymGpqjNVAz/7nRFQ7XO/3Bps78+6jBg7 0OdB8X4pOeaREVF5hFiJg2m0iFYHk3dmcw/GodpHknuCGN5GUNZ+ZQ0aCCNiCOIS8N13 CzgfoXi95q0AN0dTWWA8RwXGxQLwv9iAvwk8EfGc5tIOayJlL9/In3X1TM8ahAiKKAtw wP2u+qD3vhm1FTWn/dhR+MXsm6wK4nqhR7c6H2AaPmo4CBrLY2CQUHp6IFKDgRnMc5zj 9ZjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678959668; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ool8CY/rV+TxRAGpPCbgJhqayGlaxflLhFKQOjS5WYw=; b=iLJQ/gc2YjNMFazGkY4uoFjdOAtq+/q3kvN4g7fNY0O4VT7nAopTwXgt/ZzpVRBw+C BX2OkPoJUPiZyU6/mTWnPaCEo0RyHE8AGNkzJYY5uEdf79PFDv5qcWcJuUtVmaFR2wdU 7caH2p53zwllkvZulQW+5H/pqvEHRJ0yr4tb10cW4CX8DeC/1/DoKA+Ysm2AZIwO8aZG UgG4EDSzostyNq42iCWGPf2eFToiAYY89AFzdY9UlHU8xS2SUTlyjYAbMzugtYDnMJtr f2eiYE1FkNHmgh5Fbd4OCVADCTiZWkGbt20fHGDSeQs8slUOhN2jkt5Ddo+ueHHrwbTw PdUA== X-Gm-Message-State: AO0yUKUlLNKiYtDo5ncO9gZs7u1NKEXDewCxQuzc2wvz092PcU+K8kgM 82zN6HgcHR4RlN0v4DyVFbG67fSacHU= X-Google-Smtp-Source: AK7set+sJPnrIy8xdSEeckqy+mWyZZPQN7hF0lD1bw2Y3miiknzv7Xa1s59TXj/E4d+P5MavrhYZDQ== X-Received: by 2002:a17:906:f1d2:b0:8b1:7fe9:162e with SMTP id gx18-20020a170906f1d200b008b17fe9162emr9839575ejb.47.1678959668587; Thu, 16 Mar 2023 02:41:08 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id lf28-20020a170907175c00b00923221f4062sm3621661ejc.112.2023.03.16.02.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 02:41:08 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Date: Thu, 16 Mar 2023 10:41:00 +0100 Message-Id: <20230316094102.2628727-4-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230316094102.2628727-1-alex@linutronix.de> References: <20230316094102.2628727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Mar 2023 09:41:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178694 Also, enable that, if opengl is in native DISTRO_FEATURES: this allows mesa-native to build drivers that rely on libllvm, particularly llvmpipe, which is a (sort of) accelerated software renderer that is the only option on build hosts without dedicated or supported GPUs. Signed-off-by: Alexander Kanavin --- meta/recipes-devtools/llvm/llvm_git.bb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index b4e983d2d0..f133653903 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb @@ -57,9 +57,11 @@ def get_llvm_arch(bb, d, arch_var): def get_llvm_host_arch(bb, d): return get_llvm_arch(bb, d, 'HOST_ARCH') -PACKAGECONFIG ??= "" +PACKAGECONFIG ??= "libllvm" +PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}" # if optviewer OFF, force the modules to be not found or the ones on the host would be found PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" +PACKAGECONFIG[libllvm] = "" # # Default to build all OE-Core supported target arches (user overridable). @@ -102,14 +104,15 @@ do_compile:prepend:class-target() { } do_compile() { + if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then ninja -v ${PARALLEL_MAKE} -} - -do_compile:class-native() { + else ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen + fi } do_install() { + if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then DESTDIR=${D} ninja -v install # llvm harcodes usr/lib as install path, so this corrects it to actual libdir @@ -121,9 +124,10 @@ do_install() { # reproducibility sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake + fi } -do_install:class-native() { +do_install:append:class-native() { install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} ln -sf llvm-config${PV} ${D}${bindir}/llvm-config From patchwork Thu Mar 16 09:41:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 21068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B2BBC7619A for ; Thu, 16 Mar 2023 09:41:16 +0000 (UTC) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by mx.groups.io with SMTP id smtpd.web10.8410.1678959670646066844 for ; Thu, 16 Mar 2023 02:41:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=RY05wDHn; spf=pass (domain: gmail.com, ip: 209.85.208.46, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f46.google.com with SMTP id cn21so5256777edb.0 for ; Thu, 16 Mar 2023 02:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678959669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F0h/ycjSNTtNFiA8KIvGnLEj5WGEOZbfDQa3ZO+PLDg=; b=RY05wDHnPwqMg54oDcboaMpq7TQhaSeLNyaEg+A1s4vxaGN1bhD8vut6frq0JeZAWp XN5P6ILgy7LvxU9ECyjeW9hSaLkyVkhIggWBO5NNtzshVSME4bFgjwFcaLSJwjlwsphC 8i3gXSlrTJlLhtG8uVSYOQmQkePId7S5ZR8grG39R2KNEFXOy5t/fd6cF3ilN9FAANNH bGy4IUox9xVaC9p28tmZ8JkN/hATwJwtuSTe+4GJyQNKHeWW00E8kqOIEkYT7fTVaBZO HuFdFr9cNgT9Spz/qLNv5WXsYj1ee/VteH+6fL9whfQxIgUekXb0kA5BPwupa5MRgXpB 3SeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678959669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F0h/ycjSNTtNFiA8KIvGnLEj5WGEOZbfDQa3ZO+PLDg=; b=5Dt9G2j4078iTHSB0X+4DHGWO/JgIQjSTzLE6SCU1aG97y3y2cHxFy17nSJMhztt1j 1n1Nma2qsUbgwxwqEOiT8HV13fNLJ1ofW29qozXgu7z1YpKzdsNGnQiJrzhb4UM1eo4h sGLg4hwA1ONbmNqP0+VHKkVponPY1pdlXGBuupVFRgJN2NjFqn62OzBIkHLcXtMp9Ce9 ecZal3wmUewEu4axDN5KD7tu7KX3xNdoGFdPahwDMZKBbFD4CwldjrO5WwlDaWYx6Mwv GMsJJ6LpPO8QIfutls5bVq/t5xmjcc2FBiqKT4ep6PCO15S/fdIpLTZ6nHyt8eXldwdK kDSg== X-Gm-Message-State: AO0yUKXPifBwugckeo5q1s5cBQlozhFH4MGQ16DeXopVv+ANuLfMNGqV xD1T5XgJljfxSTQCtzYlQpWKKT0haRI= X-Google-Smtp-Source: AK7set8aN9XLVgibNnrsD+IdteCJ9Qn5cD+ZF+ykR6ygjL/sl3n2aU2u1GTdMJlq48FzOb1f9BBTJg== X-Received: by 2002:a17:906:1999:b0:930:18f5:d016 with SMTP id g25-20020a170906199900b0093018f5d016mr2213060ejd.15.1678959669000; Thu, 16 Mar 2023 02:41:09 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id lf28-20020a170907175c00b00923221f4062sm3621661ejc.112.2023.03.16.02.41.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 02:41:08 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 5/6] mesa: do not strip rpaths from dri drivers Date: Thu, 16 Mar 2023 10:41:01 +0100 Message-Id: <20230316094102.2628727-5-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230316094102.2628727-1-alex@linutronix.de> References: <20230316094102.2628727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Mar 2023 09:41:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178695 This was needed back when we used upstream llvm-config which would add bogus rpaths into the drivers; nowadays it is replaced with a oe-specific wrapper. The particular reason is that mesa-native relies on having rpaths to work correctly (i.e. find other native libraries in the same sysroot location). Signed-off-by: Alexander Kanavin --- meta/recipes-graphics/mesa/mesa.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index dd15046438..b082b49400 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -247,9 +247,6 @@ do_install:append () { rm -f ${D}${libdir}/gallium-pipe/*.la rm -f ${D}${libdir}/gbm/*.la - # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used - chrpath --delete ${D}${libdir}/dri/*_dri.so || true - # libwayland-egl has been moved to wayland 1.15+ rm -f ${D}${libdir}/libwayland-egl* rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc From patchwork Thu Mar 16 09:41:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 21067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D502C7618E for ; Thu, 16 Mar 2023 09:41:16 +0000 (UTC) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mx.groups.io with SMTP id smtpd.web11.8296.1678959671284595093 for ; Thu, 16 Mar 2023 02:41:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YZDXOsYw; spf=pass (domain: gmail.com, ip: 209.85.208.54, mailfrom: alex.kanavin@gmail.com) Received: by mail-ed1-f54.google.com with SMTP id y4so5111174edo.2 for ; Thu, 16 Mar 2023 02:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678959669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fnnT1WBCwGpGpmO8NTAxq01YQ833Ry4VTlIeSVpdtWQ=; b=YZDXOsYwK/wtAP/DWMPsoRFZHV3mJMETLj2LTf76te9XWAvbjc2bLAgCaWp44ijH3l OQ/RZNrHwDMfcpbNNHWxO69yvByWieCAcHKzREaSbNINQ41VVNPZaI76iFoEvaGXpyQf XJeEY8njlcB7OSE/biyv5pJ9ItaZ6A2C/SzZUp0CMDUgnpYFplQB4tEFE2NMcXfA5Lso iODohzn+UVReU1t6dUGpZOm5nianZpQVdqvis6RExXDR+gFdNn/+1w0IZxrul6XifqAi GmhmBUQj6r2Fg5Fo6bo+S5enzIHSlnNdYwXP/B19xVUIk2ihPhWRbpitqLtaG71WN1es eHnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678959669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fnnT1WBCwGpGpmO8NTAxq01YQ833Ry4VTlIeSVpdtWQ=; b=ihtrB6q7OXqPSkslJn7bLuc/NPvh1Org4Hw0ugcUaKhWMSScmYQe1nApH+fxq6OJbL t1wniGkkaDJqDLEy08qcd3KT0XTzjwWpdJHomuVwOSumhbo6QCmGqoNntvgFIKVDdT+k TZqYcg0t0OUMUXRne+Fz0GlG8GptAzG0Xfo/7+3zKTb0hFBM13kErH5gL8VZ+v2wF9Zx gY7q2L2126NuEc8dx7iEtb8ic7MynPwUmOCsmfzWXCUBcaN/HTVyCqGyUMUz0xXoMLo/ w1mihy5Ed7cx+wL/bpPnBjyNFrVmL6zn4jV4g7O+apoOlpR1bmjn+yPYb4TEFWMR8oop 6gNQ== X-Gm-Message-State: AO0yUKU/6XNmVI+VZy/q3ZYmpJBmlLWJHRUQ4RuSbMx/9bSRVrzMm/E3 xVQaZjbBk7DSiOx7QzsByy3UENqO0jI= X-Google-Smtp-Source: AK7set+jdWfDYhLxA7XWnw4ztJ3/l2jqyMvarm3X6/KKt+x21O2IgmG2FxlQvpW2uK+HfnMnT3ls+w== X-Received: by 2002:a17:906:b319:b0:92b:5c67:c660 with SMTP id n25-20020a170906b31900b0092b5c67c660mr9508702ejz.69.1678959669434; Thu, 16 Mar 2023 02:41:09 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id lf28-20020a170907175c00b00923221f4062sm3621661ejc.112.2023.03.16.02.41.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 02:41:09 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0 Date: Thu, 16 Mar 2023 10:41:02 +0100 Message-Id: <20230316094102.2628727-6-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230316094102.2628727-1-alex@linutronix.de> References: <20230316094102.2628727-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 16 Mar 2023 09:41:16 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178696 Drop patches: 0001-gbm-backend-fix-gbm-compile-without-dri.patch 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch (backports) 0001-util-format-Check-for-NEON-before-using-it.patch (upstream submission has stalled with unanswered concerns from upstream; patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE) Signed-off-by: Alexander Kanavin --- ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 ------------- ...-backend-fix-gbm-compile-without-dri.patch | 65 ------------------- ...ormat-Check-for-NEON-before-using-it.patch | 47 -------------- .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} | 0 meta/recipes-graphics/mesa/mesa.inc | 5 +- .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} | 0 6 files changed, 1 insertion(+), 160 deletions(-) delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%) rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%) diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch deleted file mode 100644 index 3ab22889bf..0000000000 --- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001 -From: Jami Kettunen -Date: Tue, 31 Aug 2021 00:15:58 +0300 -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build - -Upstream-Status: Backport - -Fixes the following error I noticed when building against aarch64 with -musl libc: - - In file included from ../src/freedreno/decode/crashdec.h:38, - from ../src/freedreno/decode/crashdec.c:40: - ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint' - 104 | static inline uint - | ^~~~ - ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'? - 105 | pm4_calc_odd_parity_bit(uint val) - | ^~~~ - | int - -Signed-off-by: Jami Kettunen -Part-of: ---- - src/freedreno/common/freedreno_pm4.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h -index 8f958953d693..091247e709a0 100644 ---- a/src/freedreno/common/freedreno_pm4.h -+++ b/src/freedreno/common/freedreno_pm4.h -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt) - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF) - #define type3_pkt_size(pkt) ((((pkt) >> 16) & 0x3FFF) + 1) - --static inline uint --pm4_calc_odd_parity_bit(uint val) -+static inline unsigned -+pm4_calc_odd_parity_bit(unsigned val) - { - return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^ - ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^ --- -2.39.2 - diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch deleted file mode 100644 index 6541671b7a..0000000000 --- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001 -From: Vincent Davis Jr -Date: Wed, 28 Dec 2022 16:28:01 -0600 -Subject: [PATCH] gbm/backend: fix gbm compile without dri - -Upstream-Status: Backport - -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447 -https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60 - -At mesa version 22.2.3 patch wasn't introduced until after. - -Commit introduces a fix that allows for gbm to be built with an empty -backend. There are situation especially in a Yocto/OE cross compilation -environment where you want to build with an empty backend. The particular -situation is as such: - -The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl, -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build -errors such as: - -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend': -| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend' -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4): - undefined reference to `gbm_dri_backend' -| collect2: error: ld returned 1 exit status - -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled - -Add fix to bypasses compilation issue by excluding gbm dri backend. If -HAVE_DRI || HAVE_DRIX not specified. - -Acked-by: David Heidelberg -Signed-off-by: Vincent Davis Jr ---- - src/gbm/main/backend.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c -index 974d0a76a4e..feee0703495 100644 ---- a/src/gbm/main/backend.c -+++ b/src/gbm/main/backend.c -@@ -42,7 +42,9 @@ - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b)) - -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) - extern const struct gbm_backend gbm_dri_backend; -+#endif - - struct gbm_backend_desc { - const char *name; -@@ -51,7 +53,9 @@ struct gbm_backend_desc { - }; - - static const struct gbm_backend_desc builtin_backends[] = { -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3) - { "dri", &gbm_dri_backend }, -+#endif - }; - - #define BACKEND_LIB_SUFFIX "_gbm" --- -2.34.1 - diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch deleted file mode 100644 index d22ff3c8a8..0000000000 --- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch +++ /dev/null @@ -1,47 +0,0 @@ -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 2 Dec 2021 19:57:42 -0800 -Subject: [PATCH] util/format: Check for NEON before using it - -This fixes build on rpi0-w and any other machine which does not have -neon unit and is not used as FPU unit - -Fixes errors e.g. - -In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35: -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled" - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032] -Signed-off-by: Khem Raj - ---- - src/util/format/u_format.c | 2 +- - src/util/format/u_format_unpack_neon.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c -index c071250..0880984 100644 ---- a/src/util/format/u_format.c -+++ b/src/util/format/u_format.c -@@ -1184,7 +1184,7 @@ static void - util_format_unpack_table_init(void) - { - for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) { --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM) - const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format); - if (unpack) { - util_format_unpack_table[format] = unpack; -diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c -index a4a5cb1..1e4f794 100644 ---- a/src/util/format/u_format_unpack_neon.c -+++ b/src/util/format/u_format_unpack_neon.c -@@ -23,7 +23,7 @@ - - #include - --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__) -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM) - - /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics - * unless you tell it "no really". diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb similarity index 100% rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index b082b49400..8f72f25c17 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -17,12 +17,9 @@ PE = "2" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ - file://0001-util-format-Check-for-NEON-before-using-it.patch \ - file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ - file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \ " -SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9" +SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)" diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb similarity index 100% rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb