From patchwork Wed Jul 14 05:57:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12376045 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49F77C07E9A for ; Wed, 14 Jul 2021 05:58:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D86B8613A9 for ; Wed, 14 Jul 2021 05:58:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D86B8613A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3Xuk-0007Df-3N for qemu-devel@archiver.kernel.org; Wed, 14 Jul 2021 01:58:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Xtw-0005wh-1X for qemu-devel@nongnu.org; Wed, 14 Jul 2021 01:57:44 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:51153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3Xtt-0006CH-Go for qemu-devel@nongnu.org; Wed, 14 Jul 2021 01:57:43 -0400 Received: by mail-pj1-x102b.google.com with SMTP id cu14so929870pjb.0 for ; Tue, 13 Jul 2021 22:57:41 -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=I3kxQt5hc18HfS2svD8c3yB7tmQ3wPjUahxRVkwl6E0=; b=adTCpxhxIYKpVL185Gbb5SaVu3Wf+LFEhGDV76FZ32zUn/wZy8E+C+qwp/Wb1HCVd7 kdpHjpBQK6aR+hiWjz9Yd6qTJzKPVxvhHAVYYWoQH83IXyfdwUG9OrVIHpsGr5SHdlyg GqeND8RA7h5brxnC2WsGDpu5R3oxYPR6yaUGhG+uRoLkHXjVsC5/Dhuco2qQdKK17Npx idWP161Z09tfAW4mSYe9UoVV0koeM2qpI+D3gQJYQCQ694tP6U5KLpPwzeAc3P14qM30 d7SEUSjUjwLsKY82RpCxhI5EDzRD783OPfBcL209EHZMBas/Zep2GIEuSi8gCqRlOWoF nNjw== 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=I3kxQt5hc18HfS2svD8c3yB7tmQ3wPjUahxRVkwl6E0=; b=oRuqBkbkFsLdbaEEfh00g0x2AyeDFMvFpwpBAHs3SWC55ge0wn2o5wR267zQC7Wm62 S9k0EN1RAN/WJjwsdIyEdu0DriZrMLy2Pvy7VL29vdOi5IX2bVgYxMS9NIG2X0wWU878 Pjyza/CdKgRojTfi/5lXOBnrkiDfRhrtVbQDwAx+ejvISg2wr3eeS8R0IdyJW7m/If2c ziAjeMThkqLU5osM98XUx8r35LaFmjZluZukkURgVymK8x7G/tZQTydCpzYbH20tyynl TdtWZeI5KCMkTyA/EWzU260N3Z/nc+pgghuzrMEDyTwShYfXO/k2Z0laxSbAqvyLBr7g fiQw== X-Gm-Message-State: AOAM531oDAXLRiGVwEe/KC19sQbEJp1fg1fRgExhpYeYkMgasQJ6y4jt FrKf18H6uUr1sT/Ir14IGBZdoY6oxfpAFg== X-Google-Smtp-Source: ABdhPJwtIyGBXZyLkGxwYzEsCLjzrwj9Q9yb+1i9Hec5vADuAxejjfABGu562FguskxZY39HLri+rA== X-Received: by 2002:a17:90a:e612:: with SMTP id j18mr2224218pjy.196.1626242259962; Tue, 13 Jul 2021 22:57:39 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c360:8200:580a:d13f:a86e:77e4]) by smtp.gmail.com with ESMTPSA id b33sm1174716pgb.92.2021.07.13.22.57.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jul 2021 22:57:39 -0700 (PDT) From: Akihiko Odaki To: Subject: [PATCH] ui/spice: Use HAVE_SPICE_GL for OpenGL checks Date: Wed, 14 Jul 2021 14:57:35 +0900 Message-Id: <20210714055735.86050-1-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=akihiko.odaki@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Akihiko Odaki , Gerd Hoffmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Some code in ui/spice used CONFIG_OPENGL for OpenGL conditionals, but SPICE also depends on CONFIG_GBM and SPICE server whose version is 0.13.1 or later for OpenGL. Always use HAVE_SPICE_GL, which defines the precise condition. Signed-off-by: Akihiko Odaki Reviewed-by: Marc-André Lureau --- ui/spice-app.c | 3 ++- ui/spice-core.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/spice-app.c b/ui/spice-app.c index 641f4a9d53e..7e71e18da9a 100644 --- a/ui/spice-app.c +++ b/ui/spice-app.c @@ -27,6 +27,7 @@ #include #include "ui/console.h" +#include "ui/spice-display.h" #include "qemu/config-file.h" #include "qemu/option.h" #include "qemu/cutils.h" @@ -175,7 +176,7 @@ static void spice_app_display_early_init(DisplayOptions *opts) qemu_opt_set(qopts, "addr", sock_path, &error_abort); qemu_opt_set(qopts, "image-compression", "off", &error_abort); qemu_opt_set(qopts, "streaming-video", "off", &error_abort); -#ifdef CONFIG_OPENGL +#ifdef HAVE_SPICE_GL qemu_opt_set(qopts, "gl", opts->has_gl ? "on" : "off", &error_abort); display_opengl = opts->has_gl; #endif diff --git a/ui/spice-core.c b/ui/spice-core.c index 86d43783aca..0371055e6c1 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -1039,6 +1039,6 @@ static void spice_register_config(void) opts_init(spice_register_config); module_opts("spice"); -#ifdef CONFIG_OPENGL +#ifdef HAVE_SPICE_GL module_dep("ui-opengl"); #endif