From patchwork Wed May 22 18:28:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 164858 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1194532ili; Wed, 22 May 2019 11:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHdQb3ZjACtHhkrRd17z+czh9ndyVIP2UWtvik1wHUb8EqQYe3DrK7Udo+lxErgYDjVgDb X-Received: by 2002:a63:2d87:: with SMTP id t129mr91780519pgt.451.1558549721837; Wed, 22 May 2019 11:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558549721; cv=none; d=google.com; s=arc-20160816; b=grMMhnwwyM134cFrbY+YLL/YeKhbSZYtijy/qyLg/kuE4WokInQmjAjVYZ0i4p1YU8 LqdTMnO2odht4lzqawC5vgoim27uKbJhpMyXXtoF7jpnXcF4SW5sLdLanRZHSGzyQACo 9L4fEoLTjKdOzVtBWEkoMV3ACbppiy9TwHhnONiKJpJ+ElFFb7emNOeDPmyb11LHtSiT GxrRXd8pK262wH6ZDPZAJ01H3UfEe3uUMSrjyO5hK21Xai6YbHptB9dVwH3YBVgQta7c t4c780ngVCF79vcfrVPlgtOTb/SLnNBblTH1E6GlreMMWgShdtuTcICUX+4oBtjOAc2V 5axw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=I/LDHXELtSFHkGuAPdkWvuoJzSpeqXMV/5JDCyi7VAM=; b=JoRhT+viIVIa5h9IE8uPaFI0tRTUOTewRP9AcWV82avQFbpHlgYpDf17EOmS3Dg/YR B3rhDE44whRMJQDWUN3SheqMLNOJHG9SpWBmwqR5COkivOkm6EXrRWub5mVq3RR2Stdj e9Il+wiwRf4JdARweFnW76BB+t6YMnxXgvt4zzLqnwgweHjwNSv6s0eLCLRYhgoe4Ndq EPh6Df+7w8YBQZ9VeJyayXaX38y1rOTEhlBI4YFRfAj8CbtNdLNwp+3C5HqIvP28zmlh W4OjwgKNfBaB8abkHR3wUIJ0CerdxLmtlkQjVRWaWKOA2InHswJq8LwX8vwADebdruU9 eGsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=MBKQH3me; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id a12si25886934pgb.30.2019.05.22.11.28.38; Wed, 22 May 2019 11:28:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=MBKQH3me; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 470677E397; Wed, 22 May 2019 18:28:36 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by mail.openembedded.org (Postfix) with ESMTP id 3AC797E0D0 for ; Wed, 22 May 2019 18:28:34 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id a5so1462389pls.12 for ; Wed, 22 May 2019 11:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pnWZVRkagcx0U/vfCg/TsqRTm/bbGVa88umtecLUX1c=; b=MBKQH3meDChJJY19Bk6zTiabLUWg9RasNuPvhFjBuAZyJXEBb8f54c6pVBRnc1BJQu uAbGgittwm0bB6IAsiIrImsxBW5KSLNZz21zgg5xSvuonLGAdhdADifMCOotDUkyi2Er tlDe3UAUI99z6D5BRLjGFPOnz0IuiN35Kalgc5d8somMj3zbczAv/t/n7gkXkABC+ZXx sdTgtyvMVw5dFf0UugqinIOadQ47OPSgFmy38kcMpEmNQyygjwr84c3m99MX19m0wMjg lMLdaHKIJiJouj2LW7GgHHyODFRQ8xSv8gUJuy9NoSMB0YBkizEZYBDOwj0spC5J/S9A o9qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pnWZVRkagcx0U/vfCg/TsqRTm/bbGVa88umtecLUX1c=; b=RHXXCMSsrQ6/AEoQhGrdgGSJom3tlatrpyLziBSuS6yWNg8UNTR7NKhua5/sJVJk1N ettbedYTZ89AVeAA7HqLusrCz7WF+mIQvCFLfZ+0c/coq6tBvW8ItwJbCpLnYHoTrtT6 Yss1zE6RG8CVsAXS4Pow9BBHPOqBfw95lD1eUei5kIwLHvj4tob/deo5P5+NOHO3sEOH hB+g8NKkAcKogFy2atmHFjkje4vuC7oiYsszsT4DZozW46xXu+IT1qN6ikdNsNeRXDUK 6VTM1UDRVxp6w6WYtycZAZhfCfl5hAseTIrfVN83IsU3P26tit0PxU1AX9wHeX5SXSFm +BGw== X-Gm-Message-State: APjAAAW0dySLYLPsv6XgfGvcfTvd8w4kCelCG9i9MQbOy6bo2NnsfoiJ 47tjLJGizxSpSBKYPLPEYqtNM2VWYvo= X-Received: by 2002:a17:902:9a4c:: with SMTP id x12mr21712535plv.298.1558549714317; Wed, 22 May 2019 11:28:34 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net ([2601:646:8500:6bc6::3506]) by smtp.gmail.com with ESMTPSA id 79sm44072001pfz.144.2019.05.22.11.28.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 May 2019 11:28:33 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 22 May 2019 11:28:27 -0700 Message-Id: <20190522182827.24463-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [OE-core] [PATCH V2] mesa: Fix a case when gbm is enabled but DRIDRIVERS is not defined X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This is a typical scenario with arm platforms, with meson if DRIDRIVERS is empty then dri is disabled automatically, but gbm needs dri2 enabled for it to have proper backend, in autotools we could use --enable-gbm --enable-dri and get correct behaviour but with meson enabling dri2 only works if DRIDRIVERS is not empty This fixes mesa-gl build for rpi machines when using userland graphics Signed-off-by: Khem Raj Signed-off-by: Andrei Gherzan --- v2: Add explicit meson knob to enable dri ...Allow-enable-DRI-without-DRI-drivers.patch | 45 +++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 2 +- meta/recipes-graphics/mesa/mesa_19.0.3.bb | 1 + 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch -- 2.21.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch b/meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch new file mode 100644 index 0000000000..52d670a296 --- /dev/null +++ b/meta/recipes-graphics/mesa/files/0001-Allow-enable-DRI-without-DRI-drivers.patch @@ -0,0 +1,45 @@ +From 8e0a58c8eea7ed70071cac139655700fdfa16445 Mon Sep 17 00:00:00 2001 +From: Andrei Gherzan +Date: Wed, 22 May 2019 18:32:07 +0100 +Subject: [PATCH] Allow enable DRI without DRI drivers + +Upstream-status: Pending +Signed-off-by: Andrei Gherzan +--- + meson.build | 2 +- + meson_options.txt | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 53d02e3..9a8578f 100644 +--- a/meson.build ++++ b/meson.build +@@ -119,7 +119,7 @@ with_dri_r200 = _drivers.contains('r200') + with_dri_nouveau = _drivers.contains('nouveau') + with_dri_swrast = _drivers.contains('swrast') + +-with_dri = _drivers.length() != 0 and _drivers != [''] ++with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != ['']) + + _drivers = get_option('gallium-drivers') + if _drivers.contains('auto') +diff --git a/meson_options.txt b/meson_options.txt +index ccf7065..5174320 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -34,6 +34,12 @@ option( + choices : ['auto', 'true', 'false'], + description : 'enable support for dri3' + ) ++option( ++ 'dri', ++ type : 'boolean', ++ value : false, ++ description : 'enable support for dri' ++) + option( + 'dri-drivers', + type : 'array', +-- +2.17.1 + diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index cd3ddfd822..3ecfb8506c 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -70,7 +70,7 @@ DRIDRIVERS_class-nativesdk = "swrast" DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915" # "dri" requires "opengl" -PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm" +PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm" PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence" # Vulkan drivers need dri3 enabled diff --git a/meta/recipes-graphics/mesa/mesa_19.0.3.bb b/meta/recipes-graphics/mesa/mesa_19.0.3.bb index 36faa4a99d..8a72df1014 100644 --- a/meta/recipes-graphics/mesa/mesa_19.0.3.bb +++ b/meta/recipes-graphics/mesa/mesa_19.0.3.bb @@ -3,6 +3,7 @@ require ${BPN}.inc 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.build-make-TLS-GLX-optional-again.patch \ + file://0001-Allow-enable-DRI-without-DRI-drivers.patch \ " SRC_URI[md5sum] = "d03bf14e42c0e54ebae5730712ccc408"