From patchwork Thu Dec 30 13:56:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1574180 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UDzw/jq0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JPqbZ1Sfcz9sPC for ; Fri, 31 Dec 2021 00:57:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 82E1940203; Thu, 30 Dec 2021 13:57:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Jl1lXBZ_FKF; Thu, 30 Dec 2021 13:57:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id CC653414E6; Thu, 30 Dec 2021 13:57:42 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 505D91BF408 for ; Thu, 30 Dec 2021 13:56:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 3FD4B80BD1 for ; Thu, 30 Dec 2021 13:56:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qfUAGqbVum7n for ; Thu, 30 Dec 2021 13:56:44 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7D92380C02 for ; Thu, 30 Dec 2021 13:56:44 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id e5so50591754wrc.5 for ; Thu, 30 Dec 2021 05:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OBz07dqVbMtHtLOuxS/XsoePeOqRa3qQtYIWpGRaEeo=; b=UDzw/jq0Wbfhya+DfL2bkSJD1rXWj/vxMzulkyZ6qZNRGZGyYh04gMVbLNUsex6/T+ +uKEhsfi/v6+maUxIPxIZH5K8ssegKaxWR78c8wfL3rdXOLsmBTyeh3v4eF1KOnvp7l3 XdIf8XZ7xrofZd/yy3+6jYzvg9gEzuFgSgypEdgG6wWYj8SJhr41qVQb17pAndsQ5QNq taFeOKUY5iL9g8dMntV4i/GgGN1zit0GcYqrsEL/4+PJbgLghgbm4qr/En87h+/nG+dO 5huDoDZoiW9+mrWNJlyY82OVMEwpzam6f4nWUdIX79Ce8YoQ7nFwJrTXCr7oVOnsjmR2 UYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OBz07dqVbMtHtLOuxS/XsoePeOqRa3qQtYIWpGRaEeo=; b=67f/tQVlLhD8l8Fmoh5fuDmur/oVdbjCkmBrcwvkdJzSoG4WUkvkZ1Jgn/5CAzY+Lj jCkRXtvqI9+ZHdZm9ioeeFw2/57Ee1bZ8IEAx4I4b0awDQSI6RZej+BfCACQ55s/UuBF jieVuHlE3/Z2rqqvGYA4HO3R8cICXISXlAweymZPo2hXeiA17F6Zjq7THijNbakEm5KH Mb8E8m2No3itJFoHTc0keWId7WAc7EbWNTKtadnPWSIBIgX0Il70N3Pcq4x4Okh1CF1O pclXO9DbqDCAb3cM16KJp03ksklSzST+9wkAwltEvjkNSea8/QWMTK/ZGGr+KghtFMuf vWng== X-Gm-Message-State: AOAM533Mnb2w7AAVpRGiPsqSQFdeFVA9ONGGck2/VaD25IN7Kcq5BapC wjE0fUgf5EjS+ZWleOfgsSDzEb6oPO0= X-Google-Smtp-Source: ABdhPJwYgJP7I4sxt2m0cIjyitnzcYzYz1EgDGaUC1uwgubQ4xn+YBQgsnDfJ4JCAuktZffx/j45EA== X-Received: by 2002:a05:6000:1817:: with SMTP id m23mr24780232wrh.684.1640872602788; Thu, 30 Dec 2021 05:56:42 -0800 (PST) Received: from atlas.home (2a01cb058f8a18003dbee9eed79eb521.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:3dbe:e9ee:d79e:b521]) by smtp.gmail.com with ESMTPSA id l7sm24353765wms.1.2021.12.30.05.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Dec 2021 05:56:42 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Thu, 30 Dec 2021 14:56:21 +0100 Message-Id: <20211230135621.2255847-7-romain.naour@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211230135621.2255847-1-romain.naour@gmail.com> References: <20211230135621.2255847-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 7/7] package/x11r7/xdriver_xf86-video-ati: Guard local variable priv only used with glamor X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bernd Kuhls , Romain Naour Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Fixes: radeon_present.c: In function ‘radeon_present_check_flip’: radeon_present.c:281:21: error: invalid use of undefined type ‘struct radeon_pixmap’ 281 | if (priv && priv->fb_failed) | ^~ Signed-off-by: Romain Naour Cc: Bernd Kuhls --- ...-variable-priv-only-used-with-glamor.patch | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 package/x11r7/xdriver_xf86-video-ati/0003-Guard-local-variable-priv-only-used-with-glamor.patch diff --git a/package/x11r7/xdriver_xf86-video-ati/0003-Guard-local-variable-priv-only-used-with-glamor.patch b/package/x11r7/xdriver_xf86-video-ati/0003-Guard-local-variable-priv-only-used-with-glamor.patch new file mode 100644 index 0000000000..0a23c54cce --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/0003-Guard-local-variable-priv-only-used-with-glamor.patch @@ -0,0 +1,66 @@ +From a78e31b5fffadd73b00483f21e54bd144f1b439a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michel=20D=C3=A4nzer?= +Date: Fri, 26 Mar 2021 17:42:10 +0100 +Subject: [PATCH] Guard local variable priv only used with glamor +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes compile errors with glamor disabled: + +../../src/radeon_present.c: In function ‘radeon_present_check_flip’: +../../src/radeon_present.c:281:21: error: invalid use of undefined type ‘struct radeon_pixmap’ + 281 | if (priv && priv->fb_failed) + | ^~ +../../src/radeon_present.c:288:19: error: invalid use of undefined type ‘struct radeon_pixmap’ + 288 | if (priv && !priv->fb_failed) { + | ^~ +../../src/radeon_present.c:292:10: error: invalid use of undefined type ‘struct radeon_pixmap’ + 292 | priv->fb_failed = TRUE; + | ^~ + +(cherry picked from commit 3c7c84ed49564907a148ae99b03200e0be350060) +Signed-off-by: Romain Naour +--- + src/radeon_present.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/radeon_present.c b/src/radeon_present.c +index 494655c9..d010aa19 100644 +--- a/src/radeon_present.c ++++ b/src/radeon_present.c +@@ -254,7 +254,9 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, + xf86CrtcPtr xf86_crtc = crtc->devPrivate; + ScreenPtr screen = window->drawable.pScreen; + ScrnInfoPtr scrn = xf86_crtc->scrn; ++#ifdef USE_GLAMOR + struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap); ++#endif + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + RADEONInfoPtr info = RADEONPTR(scrn); + PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen); +@@ -278,10 +280,13 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, + return FALSE; + #endif + ++#ifdef USE_GLAMOR + if (priv && priv->fb_failed) + return FALSE; ++#endif + + if (!radeon_pixmap_get_fb(pixmap)) { ++#ifdef USE_GLAMOR + if (!priv) + priv = radeon_get_pixmap_private(pixmap); + +@@ -291,6 +296,7 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, + "normal if using PRIME render offloading)\n"); + priv->fb_failed = TRUE; + } ++#endif + + return FALSE; + } +-- +2.31.1 +