From patchwork Mon Mar 18 10:05:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 780908 Delivered-To: patch@linaro.org Received: by 2002:a5d:46c1:0:b0:33e:7753:30bd with SMTP id g1csp1346468wrs; Mon, 18 Mar 2024 03:06:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUxJpYNVdhB8WBDLgWKrbpOCkovoXW+iOMclJVJM8lGkqsD8ZCDuV/G23eknhiwb87r0OQojI/+PK5EwGa40O+G X-Google-Smtp-Source: AGHT+IFHFQBLtIEYANT4zl0LwlGRfSYuN5rfBJx/QG8Kop0wH4Yk4ZnIW/+vg415/k0Bl5aPW5uO X-Received: by 2002:a05:6214:713:b0:690:baff:8029 with SMTP id c19-20020a056214071300b00690baff8029mr10748767qvz.38.1710756374775; Mon, 18 Mar 2024 03:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710756374; cv=none; d=google.com; s=arc-20160816; b=Fk0GKynGKISodmppw/i1gtPfhPxdZtggF538eGxZYRE99/6XTuKjC7xgFy4uIL4qai cXAPQJnVNvI202WYNCZ0EOhJ9S99TKIqXPEwduKZzF67p5Rk5RWnl9o6sKgIbe8rYtVN K3EalA1H5wBDjHTNpNOw4CbIbvdlfB+fubTZ6D3myKUCv9UbLuoKs05QiOUxEyZzw8jr p5Gne+H1Q/J5HrcYQByyGfxo8buzJS7lzGouZhEYA4JXr9nUNp+dxfnT3mFUtLKa8E7S KEi1nv/DVrQvrBXtu8m80Z9yosrjWxYUpWMMi1X3FAvD2LeHhExU4e7y6jGKfK+0wN2B KghQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aAPJ6Y+kJMuu6R/0QHRDn6EQ8anTjPlXcNycKPDDQr4=; fh=KUAlKLrL/1V6YIm+DLAbV/OwrOTdGgaYBZrzeVbcM0g=; b=0MLqzCnUIRjTKXbCk6krp58c+Ma+oJvr18CJx4T4kuQcq6+IEzZiUuJDNCGvzhbDub KoTG2QRusN5efFUJL+j71eP8DW9AgYik7uDBtx3SUkQlRbeqrUXrcyvxurqNMopCILQn XFwpd3JHlMsGI0Y84Uw0ncdQ9QPHPRsQz78qTUWVfkeqiZrM+5NQbyg7Cfl3haqHRntq JMf9hKdRExHfxjk7lJNY3vUKYMh8u45KkIo9/khR8dSTjp4954XAP3OVa52vlpJe4l4D u6ioyhlGTefEAxSeXvYeFW8lSNvEZv+nJxYWuFwu6/gUD7V12de+iNe6/MJw9eC/v6Je 5lOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wpyiEdi3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jv10-20020a05621429ea00b0069614874058si2338984qvb.436.2024.03.18.03.06.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2024 03:06:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wpyiEdi3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rm9sf-0001IR-62; Mon, 18 Mar 2024 06:06:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rm9sc-0001HK-NZ for qemu-devel@nongnu.org; Mon, 18 Mar 2024 06:06:06 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rm9sb-00062i-5w for qemu-devel@nongnu.org; Mon, 18 Mar 2024 06:06:06 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2d4541bf57eso54065881fa.2 for ; Mon, 18 Mar 2024 03:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710756363; x=1711361163; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aAPJ6Y+kJMuu6R/0QHRDn6EQ8anTjPlXcNycKPDDQr4=; b=wpyiEdi3RnAwIOaYW2JmRdsMsI2uYGPkfU4dlBakQ67a5gmAeuFgDb/GFdP8FsZkiS uckJT5789sw+6wLXVpyBTIZx3J/7aK29HXbJ+TsP2qMEwgcSvqFtL+ncL9dBd9s0JE1m 5PuznFD7EBARaocvPJz8egvOyEBEtAN9E+M8Knp4ps9ik38z1S7dFgXGhkgjz6p8xiTI sArP/Jvl0lob+i3E6+iLTVC+EavOqbBb+WGyaGMMx0XA0RT+uOKT2wc18hgNkhoXKd/U p42S5jt3R0dg3T/ceF2WXq7T7rP+wWUZi3YiqU+RIt86GRVhCwGOYSSwcEZwSz9J7KT5 pbwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710756363; x=1711361163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aAPJ6Y+kJMuu6R/0QHRDn6EQ8anTjPlXcNycKPDDQr4=; b=Siz4C32lB2L5xM26IIxz3dgr9i5fgoZ1U5gnHJNYBe2vE5NmsiCsZI+dipsmIrUB15 zCdlF2BKeTSaPfmoHVOrBKII11awaIsz0yYTPzNiyOYEV1MxbtEqfUAr2PeVazyZAYbV E5T2zSNadUWQKPCe4npDo8z15hFiWpr1GxirzVE3wdJXhbcWc/dK4fRJq40nWHHkscD/ kUrgwTdLP4AiGrf8Wv9rRlNtPlWZinadoAnJqe5I5HHaV3mVBf70u+suwjfL/8zGR6Ub jozINSguIybGzBFWONpkkU3k+yiyUuD01qxY8Qllr38nAc2yDXtTTrDZRCk4mSYfeBSD mmRg== X-Gm-Message-State: AOJu0YwQLNUZ2ONu8UrjKMcUYXHU1E4ME7J1Y5Q3oMv28pAOyN5eo7xl ex8w5dk1IK+glWTkNUum2oG23fUAI5qJ8hXMovthoyw78sVkwbjYIH6fP5yPSW5aEXZH+i11WLf +PWk= X-Received: by 2002:a2e:b8c6:0:b0:2d4:aae0:1d77 with SMTP id s6-20020a2eb8c6000000b002d4aae01d77mr1405796ljp.39.1710756363125; Mon, 18 Mar 2024 03:06:03 -0700 (PDT) Received: from m1x-phil.lan (vit94-h02-176-184-29-165.dsl.sta.abo.bbox.fr. [176.184.29.165]) by smtp.gmail.com with ESMTPSA id f5-20020adffcc5000000b0033e7b05edf3sm9432360wrs.44.2024.03.18.03.06.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 03:06:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Gerd Hoffmann , qemu-arm@nongnu.org, Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 3/3] ui/console: Add 'rotate_arcdegree' field to allow per-console rotation Date: Mon, 18 Mar 2024 11:05:42 +0100 Message-ID: <20240318100543.78846-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240318100543.78846-1-philmd@linaro.org> References: <20240318100543.78846-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=philmd@linaro.org; helo=mail-lj1-x229.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add the 'rotate_arcdegree' field to QemuConsole and remove the use of the 'graphic_rotate' global. Signed-off-by: Philippe Mathieu-Daudé --- ui/console-priv.h | 1 + ui/console.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/console-priv.h b/ui/console-priv.h index 88569ed2cc..6e54b476d9 100644 --- a/ui/console-priv.h +++ b/ui/console-priv.h @@ -31,6 +31,7 @@ struct QemuConsole { const GraphicHwOps *hw_ops; void *hw; CoQueue dump_queue; + unsigned rotate_arcdegree; QTAILQ_ENTRY(QemuConsole) next; }; diff --git a/ui/console.c b/ui/console.c index 84aee76846..a36674bacf 100644 --- a/ui/console.c +++ b/ui/console.c @@ -37,7 +37,6 @@ #include "trace.h" #include "exec/memory.h" #include "qom/object.h" -#include "sysemu/sysemu.h" #include "console-priv.h" @@ -210,17 +209,17 @@ void qemu_console_set_window_id(QemuConsole *con, int window_id) void qemu_console_set_rotate(QemuConsole *con, unsigned arcdegree) { - graphic_rotate = arcdegree; + con->rotate_arcdegree = arcdegree; } bool qemu_console_is_rotated(QemuConsole *con) { - return graphic_rotate != 0; + return con->rotate_arcdegree != 0; } unsigned qemu_console_get_rotate_arcdegree(QemuConsole *con) { - return graphic_rotate; + return con->rotate_arcdegree; } void graphic_hw_invalidate(QemuConsole *con)