diff mbox series

[5/5] mesa: drop useless freedreno-fdperf PACKAGECONFIG

Message ID 20251010120125.2868011-5-dmitry.baryshkov@oss.qualcomm.com
State New
Headers show
Series [1/5] mesa: add opencl -> clang build dependency | expand

Commit Message

Dmitry Baryshkov Oct. 10, 2025, 11:59 a.m. UTC
File the fdperf dependency into the main freedreno tools dependencies
(by using conditional) and drop the extra freedreno-fdperf PACKAGECONFIG
which was created just to pull in the libconfig dependency.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Comments

Ross Burton Oct. 14, 2025, 3:12 p.m. UTC | #1
On 10 Oct 2025, at 12:59, Dmitry Baryshkov via lists.openembedded.org <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> -PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
> +TOOLS_DEPS_FREEDRENO = " ncurses libxml2 ${@bb.utils.contains('BBFILE_COLLECTIONS', 'openembedded-layer', 'libconfig', '', d)}"
> +TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ${TOOLS_DEPS_FREEDRENO}', '', d)}”

The packageconfig is slightly unconventional as it’s just a dependency, but it is deterministic.  We looked at this on the review call yesterday and nobody liked the fact that simply adding meta-oe causes mesa to reconfigure.

Ross
Dmitry Baryshkov Oct. 14, 2025, 3:23 p.m. UTC | #2
On Tue, 14 Oct 2025 at 18:13, Ross Burton <Ross.Burton@arm.com> wrote:
>
> On 10 Oct 2025, at 12:59, Dmitry Baryshkov via lists.openembedded.org <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> > -PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
> > +TOOLS_DEPS_FREEDRENO = " ncurses libxml2 ${@bb.utils.contains('BBFILE_COLLECTIONS', 'openembedded-layer', 'libconfig', '', d)}"
> > +TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ${TOOLS_DEPS_FREEDRENO}', '', d)}”
>
> The packageconfig is slightly unconventional as it’s just a dependency, but it is deterministic.  We looked at this on the review call yesterday and nobody liked the fact that simply adding meta-oe causes mesa to reconfigure.

Well... It also requires freedreno to be enabled in the PACKAGECONFIG
(which is done only by meta-qcom, which already has meta-oe as
LAYERRECOMMENDS).
I added freedreno-fdperf two years ago, but I don't think it serves
its purpose: there is no link between it and meta-oe, there are no
config options being toggled by it, it simply pulls in a dependency in
order to enable one of the tools. If libconfig was a part of OE-Core,
it would not have existed from the beginning. No other drivers have
such "split out" tools, etc. Thus, I think, it's a lesser evil to
merge it into the freedreno tools handling rather than having a
separate PACKAGECONFIG entry.
Ross Burton Oct. 14, 2025, 3:28 p.m. UTC | #3
On 14 Oct 2025, at 16:23, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote:
> 
> On Tue, 14 Oct 2025 at 18:13, Ross Burton <Ross.Burton@arm.com> wrote:
>> 
>> On 10 Oct 2025, at 12:59, Dmitry Baryshkov via lists.openembedded.org <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>> -PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
>>> +TOOLS_DEPS_FREEDRENO = " ncurses libxml2 ${@bb.utils.contains('BBFILE_COLLECTIONS', 'openembedded-layer', 'libconfig', '', d)}"
>>> +TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ${TOOLS_DEPS_FREEDRENO}', '', d)}”
>> 
>> The packageconfig is slightly unconventional as it’s just a dependency, but it is deterministic.  We looked at this on the review call yesterday and nobody liked the fact that simply adding meta-oe causes mesa to reconfigure.
> 
> Well... It also requires freedreno to be enabled in the PACKAGECONFIG
> (which is done only by meta-qcom, which already has meta-oe as
> LAYERRECOMMENDS).

Sure, but it’s still non-deterministic if freedreno is enabled, which is counter to everything we’ve been moving towards over the years.

Ross
Alexander Kanavin Oct. 14, 2025, 3:28 p.m. UTC | #4
On Tue, 14 Oct 2025 at 17:23, Dmitry Baryshkov via
lists.openembedded.org
<dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> Well... It also requires freedreno to be enabled in the PACKAGECONFIG
> (which is done only by meta-qcom, which already has meta-oe as
> LAYERRECOMMENDS).
> I added freedreno-fdperf two years ago, but I don't think it serves
> its purpose: there is no link between it and meta-oe, there are no
> config options being toggled by it, it simply pulls in a dependency in
> order to enable one of the tools. If libconfig was a part of OE-Core,
> it would not have existed from the beginning. No other drivers have
> such "split out" tools, etc. Thus, I think, it's a lesser evil to
> merge it into the freedreno tools handling rather than having a
> separate PACKAGECONFIG entry.

The mesa build items that require the libconfig dependency should be
enabled through an explicit meson option rather than something
floating that checks for presence of libconfig, and the necessary
patch should be offered upstream first.

Alex
Dmitry Baryshkov Oct. 14, 2025, 3:46 p.m. UTC | #5
On Tue, 14 Oct 2025 at 18:28, Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> On Tue, 14 Oct 2025 at 17:23, Dmitry Baryshkov via
> lists.openembedded.org
> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> > Well... It also requires freedreno to be enabled in the PACKAGECONFIG
> > (which is done only by meta-qcom, which already has meta-oe as
> > LAYERRECOMMENDS).
> > I added freedreno-fdperf two years ago, but I don't think it serves
> > its purpose: there is no link between it and meta-oe, there are no
> > config options being toggled by it, it simply pulls in a dependency in
> > order to enable one of the tools. If libconfig was a part of OE-Core,
> > it would not have existed from the beginning. No other drivers have
> > such "split out" tools, etc. Thus, I think, it's a lesser evil to
> > merge it into the freedreno tools handling rather than having a
> > separate PACKAGECONFIG entry.
>
> The mesa build items that require the libconfig dependency should be
> enabled through an explicit meson option rather than something
> floating that checks for presence of libconfig, and the necessary
> patch should be offered upstream first.

Ack, I can propose that patch upstream.
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index ee00214111c2..db12fdce6b86 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -148,11 +148,8 @@  TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
 TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
 
 # dependencies for tools.
-TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
-
-# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
-# treatment in addition to the usual 'freedreno tools'.
-PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
+TOOLS_DEPS_FREEDRENO = " ncurses libxml2 ${@bb.utils.contains('BBFILE_COLLECTIONS', 'openembedded-layer', 'libconfig', '', d)}"
+TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ${TOOLS_DEPS_FREEDRENO}', '', d)}"
 
 PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
 PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled, expat"