From nobody Sat Jan 18 18:43:53 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yb596050Gz5kjWr; Sat, 18 Jan 2025 18:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yb5954j7Rz43f5; Sat, 18 Jan 2025 18:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737225833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bjCF+Ji1bbi249mHzOgHCiDOOzCpkl/syNwQVeQu3PU=; b=v1nZdD90AJKEkHYIB24FVzB0mg+aB/H9Pm2gqYJw56XmRHL9hGfgY/wbw60nK3JiCfsRPe 4RPwXtiEiuFhoPDQaRqC8NxD7y93VmKKzhBAHCEnFVU6sa+uaxQOXD02sYMVLDXv8sLGQY SWzMGRmnOpPBP0RTLyHP0hxdPhzRiNlJH5jIOxQDexiu1LeTBLb5Q1lM8hH3rDm8IqOjbG 2ONjmLZMPNRlXSKqlLn3hHcpIBLpCaiPAQoyJdW68dEPPy2en/VzYRWndMcEczUv88Getp ZvjUR2r8fv4ybFW+1Lj7TKdvBcR1NvojfMpLRD/BtGTrlyIe5pqxIdoFeGxmOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737225833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bjCF+Ji1bbi249mHzOgHCiDOOzCpkl/syNwQVeQu3PU=; b=tXpQYrx9Kdmi9kzRIvG275p6GBwHI2U+BvBND1CMyCRBeR0eRNvcXAuNG86NvsraSdeAEI E9/fjnt9dfEJn8kD8JK0op/kqKKJ/sjZ0kJpMU8jXyt7iy2GpMsyMxrBAl70PnzUGiSXoy lPkJvtWoZiZ40A0aX9pry41i8erB8WSpQ5CSBw0zzre+oY+LmVR0AINK/1Byx9vKLmEC5G qj7L8IjTR8G8uO2BHfNHp6D3PdOCO5krVy8UNfx3Xcg0NwShudOrLLcuYANtwqsyPQN3kM efb/Az1x5GEH3aFnLDNBy27CGm9flogOSckIwETcQfEU0rpSzj+O2Tx+OYywcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737225833; a=rsa-sha256; cv=none; b=wXrD8GgOJ/tEDsP/q5bqJP+Lr7crJAJ5Q7U7UtJCE0CsSjTjTniYuYaTaOEwwPXlOVv1ky GHIxfge++WZDfCuhg4A4zAfZN6ega6UVkzhjjQkUzw/lej3nlKV+/6UFGS9ohoZJmg+/kj x+rXHZdP9c7sBv8+53mLZmfEWTVny4rt23kgAQNg6oawwHiBXuE+oaWCDZH6JXqUDmhJM2 LIqNvFINKdkHMgIB8vPXDMOEI6PbfBCcaugwb56hbiFLa/Al9IDwMzZsTsZ+l6nI6Wy9QL MGdSQhR12MNS277clk8vumqp+OSXdhfhBCY8R2n8swoaQh1Qw17xaFCSXNiKDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yb5954Jjrz1m4; Sat, 18 Jan 2025 18:43:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50IIhrL4092545; Sat, 18 Jan 2025 18:43:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50IIhrdp092542; Sat, 18 Jan 2025 18:43:53 GMT (envelope-from git) Date: Sat, 18 Jan 2025 18:43:53 GMT Message-Id: <202501181843.50IIhrdp092542@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 0b3f2f14f04d - main - graphics/mesa-dri: Add upstream patch fixing the bogus close() call List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b3f2f14f04d3bbed2f5c4126a1b97245b854327 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=0b3f2f14f04d3bbed2f5c4126a1b97245b854327 commit 0b3f2f14f04d3bbed2f5c4126a1b97245b854327 Author: Gleb Popov AuthorDate: 2025-01-18 18:42:16 +0000 Commit: Gleb Popov CommitDate: 2025-01-18 18:43:46 +0000 graphics/mesa-dri: Add upstream patch fixing the bogus close() call PR: 283851 Approved by: x11 (maintainer timeout) --- graphics/mesa-dri/Makefile | 2 +- ...-159fb9691d792594b91e0fbc4c7823e1a191620d.patch | 50 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile index dec8ac255477..5b25c863ed67 100644 --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile @@ -1,6 +1,6 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ diff --git a/graphics/mesa-dri/files/patch-llvmpipe-159fb9691d792594b91e0fbc4c7823e1a191620d.patch b/graphics/mesa-dri/files/patch-llvmpipe-159fb9691d792594b91e0fbc4c7823e1a191620d.patch new file mode 100644 index 000000000000..c3c250a8b8df --- /dev/null +++ b/graphics/mesa-dri/files/patch-llvmpipe-159fb9691d792594b91e0fbc4c7823e1a191620d.patch @@ -0,0 +1,50 @@ +From 159fb9691d792594b91e0fbc4c7823e1a191620d Mon Sep 17 00:00:00 2001 +From: Lucas Fryzek +Date: Mon, 28 Oct 2024 13:02:26 -0400 +Subject: [PATCH] lp: Only close udmabuf handle if its valid + +Also change ifdef's from just `HAVE_LIBDRM` to check for both LIBDRM +and for UDMABUF HEADER. preventing unbalanced guards preventing part of +the code from being included if you just have LIBDRM or just have the +udmabuf headers. + +Fixes: 4cfaf10c ("llvmpipe: Only use udmabuf with libdrm") +Reviewed-by: Konstantin Seurer +Part-of: +--- + src/gallium/drivers/llvmpipe/lp_screen.c | 5 +++-- + src/gallium/drivers/llvmpipe/lp_screen.h | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c +index 8ede54a1fdf20..f85911b4703ac 100644 +--- src/gallium/drivers/llvmpipe/lp_screen.c ++++ src/gallium/drivers/llvmpipe/lp_screen.c +@@ -939,8 +939,9 @@ llvmpipe_destroy_screen(struct pipe_screen *_screen) + + glsl_type_singleton_decref(); + +-#ifdef HAVE_LIBDRM +- close(screen->udmabuf_fd); ++#if defined(HAVE_LIBDRM) && defined(HAVE_LINUX_UDMABUF_H) ++ if (screen->udmabuf_fd != -1) ++ close(screen->udmabuf_fd); + #endif + + #if DETECT_OS_LINUX +diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h b/src/gallium/drivers/llvmpipe/lp_screen.h +index f36628340b3af..63ce25d56d1d3 100644 +--- src/gallium/drivers/llvmpipe/lp_screen.h ++++ src/gallium/drivers/llvmpipe/lp_screen.h +@@ -75,7 +75,7 @@ struct llvmpipe_screen + + struct disk_cache *disk_shader_cache; + +-#ifdef HAVE_LIBDRM ++#if defined(HAVE_LIBDRM) && defined(HAVE_LINUX_UDMABUF_H) + int udmabuf_fd; + #endif + +-- +GitLab +