From nobody Sat May 11 20:22:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1710756436; cv=none; d=zohomail.com; s=zohoarc; b=Da0bTUwCEn98HCQ/1LIUf6KGTk+NFBW4JY/GQlLlVSnl+F7WopvNpiVWPSptoY92kZ6n0lLBCNKoiuucosTQUKGLIti23QXPck0jgPoNH7qutWmG/HRSLvFCUpB1spcsKQ2J1Q4V95GweY4+fbi4vtru0ktCnmiREoed+hwRYRE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710756436; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CYjr201DlEJ4l0jHNZURE4npfEFxYjcehCBVscFCuRE=; b=G3yLFfOPLw30nNEeORAMbmzqdaIshsykWDWCDxJD78Qy2G/T1WNVsxnXQNHZuvIPhzDNN6b9gIDecarh8KNrSFEUJpqR4a0qU507RORU4YNjj5mgS792Sz9lcf/AEaIxDOunJoXTZdCVkS+UFZdOQJZoBnVqPcWywriwIuK5pvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710756436180183.74816064197864; Mon, 18 Mar 2024 03:07:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rm9sa-0001FZ-Sj; Mon, 18 Mar 2024 06:06:05 -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 1rm9sS-0001F4-Ko for qemu-devel@nongnu.org; Mon, 18 Mar 2024 06:05:56 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rm9sQ-000610-St for qemu-devel@nongnu.org; Mon, 18 Mar 2024 06:05:56 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4140aadfe2eso9370225e9.1 for ; Mon, 18 Mar 2024 03:05:52 -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 hg12-20020a05600c538c00b004140f81e513sm3398470wmb.37.2024.03.18.03.05.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 03:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710756351; x=1711361151; 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=CYjr201DlEJ4l0jHNZURE4npfEFxYjcehCBVscFCuRE=; b=wED3Wv2Fg9AZfwtxDpYxlZSx5DRIp75AHQxbYjEkPKDCfEeNXfConYrbtOcQbfOW0w g0GYBZZe39zE9q2pvf9Z1bYzFZOhcZl715y+4ONbgobnmnBGs2Noa97RXIlvVn0omz7s 2pg4kxDRnjhkOVA119JmSZfSEREHeiZHN2P7QHw+w70/Sdup3F5M/N+z9doi85yEFG7X FeoZJqJ+/CZ3eKQjQ4nwR382dFWaw7YW9pVq+vPmi72JbvIHyqh8fM+yVPdb8XzBQk5h Ukw+O+ByrFIJ6eYxhoC4nFpEdgDBeK5YaAOY0yStgm4GfvKBVNsZJb47AGNz4xCJwF+n FV+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710756351; x=1711361151; 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=CYjr201DlEJ4l0jHNZURE4npfEFxYjcehCBVscFCuRE=; b=ML9pLUeQHrd85/Rm3LGHBbQoTioPLthqcMySXSJGdCy+w+3V9HiuqDsp/lZVguTfFK RIRIzr4K4E81HO8Bg7AUxJ0xnXMa6NY9E3X7duyXH7/NYbfOEWjcuQ782nItoNS++abi B/plRT1ypWML0fRe30VozYEbao0o4cAoTHiT9nNp1XIRXVSy6xpD8GaJ5z0Fl4TEc5CN ys0vWtB92QApMczMU0nTkcLV4PlcBVlUyENrUxyG3LTB7P8we12aPUiGdVZRr9XOJYeq VK7D/xIWgqXtRRB2cnVNQzH2QxPjOcp9t26KTTN4vPWiTYq774zsYHxc2TEucZ7j5lmJ NH3g== X-Gm-Message-State: AOJu0YyoWKygSZ/gAxAjvzNGHK3ocYttpyMxNClr0ixfzNnkyPHArsic e2jtA+6qEb6cbzwBno2pJb3DSLf0agy2jWMqz5DjpLfJ1gGO/qJC1AowVeERs8y2oY4fWz7AF6B BRzA= X-Google-Smtp-Source: AGHT+IFtyiiDnkj1FgS7yzKffl96QJpzZsBKwPZzeLa/dJfHDKJk3lOs19OMYEwg+u2OLHoR45DjVQ== X-Received: by 2002:a05:600c:198a:b0:414:860:bdc5 with SMTP id t10-20020a05600c198a00b004140860bdc5mr3998787wmq.17.1710756351440; Mon, 18 Mar 2024 03:05:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 1/3] ui/console: Introduce API to change console orientation Date: Mon, 18 Mar 2024 11:05:40 +0100 Message-ID: <20240318100543.78846-2-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1710756437145100001 Extract the following methods: - qemu_console_set_rotate() - qemu_console_is_rotated() - qemu_console_get_rotate_arcdegree() Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/ui/console.h | 3 +++ ui/console.c | 16 ++++++++++++++++ ui/input.c | 9 ++++----- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index a4a49ffc64..86ba36e391 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -422,15 +422,18 @@ bool qemu_console_is_visible(QemuConsole *con); bool qemu_console_is_graphic(QemuConsole *con); bool qemu_console_is_fixedsize(QemuConsole *con); bool qemu_console_is_gl_blocked(QemuConsole *con); +bool qemu_console_is_rotated(QemuConsole *con); char *qemu_console_get_label(QemuConsole *con); int qemu_console_get_index(QemuConsole *con); uint32_t qemu_console_get_head(QemuConsole *con); int qemu_console_get_width(QemuConsole *con, int fallback); int qemu_console_get_height(QemuConsole *con, int fallback); +unsigned qemu_console_get_rotate_arcdegree(QemuConsole *con); /* Return the low-level window id for the console */ int qemu_console_get_window_id(QemuConsole *con); /* Set the low-level window id for the console */ void qemu_console_set_window_id(QemuConsole *con, int window_id); +void qemu_console_set_rotate(QemuConsole *con, unsigned arcdegree); =20 void console_select(unsigned int index); void qemu_console_resize(QemuConsole *con, int width, int height); diff --git a/ui/console.c b/ui/console.c index 832055675c..84aee76846 100644 --- a/ui/console.c +++ b/ui/console.c @@ -37,6 +37,7 @@ #include "trace.h" #include "exec/memory.h" #include "qom/object.h" +#include "sysemu/sysemu.h" =20 #include "console-priv.h" =20 @@ -207,6 +208,21 @@ void qemu_console_set_window_id(QemuConsole *con, int = window_id) con->window_id =3D window_id; } =20 +void qemu_console_set_rotate(QemuConsole *con, unsigned arcdegree) +{ + graphic_rotate =3D arcdegree; +} + +bool qemu_console_is_rotated(QemuConsole *con) +{ + return graphic_rotate !=3D 0; +} + +unsigned qemu_console_get_rotate_arcdegree(QemuConsole *con) +{ + return graphic_rotate; +} + void graphic_hw_invalidate(QemuConsole *con) { if (!con) { diff --git a/ui/input.c b/ui/input.c index dc745860f4..951806bf05 100644 --- a/ui/input.c +++ b/ui/input.c @@ -1,5 +1,4 @@ #include "qemu/osdep.h" -#include "sysemu/sysemu.h" #include "qapi/error.h" #include "qapi/qapi-commands-ui.h" #include "trace.h" @@ -179,10 +178,10 @@ static int qemu_input_transform_invert_abs_value(int = value) return (int64_t)INPUT_EVENT_ABS_MAX - value + INPUT_EVENT_ABS_MIN; } =20 -static void qemu_input_transform_abs_rotate(InputEvent *evt) +static void qemu_input_transform_abs_rotate(QemuConsole *src, InputEvent *= evt) { InputMoveEvent *move =3D evt->u.abs.data; - switch (graphic_rotate) { + switch (qemu_console_get_rotate_arcdegree(src)) { case 90: if (move->axis =3D=3D INPUT_AXIS_X) { move->axis =3D INPUT_AXIS_Y; @@ -341,8 +340,8 @@ void qemu_input_event_send_impl(QemuConsole *src, Input= Event *evt) qemu_input_event_trace(src, evt); =20 /* pre processing */ - if (graphic_rotate && (evt->type =3D=3D INPUT_EVENT_KIND_ABS)) { - qemu_input_transform_abs_rotate(evt); + if (qemu_console_is_rotated(src) && (evt->type =3D=3D INPUT_EVENT_KIND= _ABS)) { + qemu_input_transform_abs_rotate(src, evt); } =20 /* send event */ --=20 2.41.0 From nobody Sat May 11 20:22:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1710756438; cv=none; d=zohomail.com; s=zohoarc; b=jSQ/LLqap+TwcCP82tlbTiEh+kbx+UFdffONWlgvQ1iwtv95oDZYuz5l0JyuUEMyhuLfUbpuJcARETXsgZjPHs2YHsA94qjZfRRBLGt1pYKxWD92/V2NrvgOcBj6vSyu9HyyBvmZSCzsHZ9OkvzomBnP21WgD2bCT9ilxLTbFn8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710756438; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SFthmmsYp+m5f9owLwx+hyTocTKSDvu4WqZSfWH+cu8=; b=P75DIf6A6rjW/CykGPZyWfLLxJWTVayiUi8xEz/RVGBiZmFM3RSvAl7yc+uBw2Kpskosa2ZOaF1vBK0o3UIJsMCmu1AC0o+5SIKI5j5gAmifVfVM/kBr955WhreHZ8qTKE1tkdGFQSKyhqasB1t2HkdAZChdmxCX533pms4vnTI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17107564382741009.1461255063313; Mon, 18 Mar 2024 03:07:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rm9sd-0001Ht-Bu; Mon, 18 Mar 2024 06:06:07 -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 1rm9sY-0001FY-DJ for qemu-devel@nongnu.org; Mon, 18 Mar 2024 06:06:03 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rm9sW-00061h-DH for qemu-devel@nongnu.org; Mon, 18 Mar 2024 06:06:01 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-34005b5927eso1018472f8f.1 for ; Mon, 18 Mar 2024 03:05:58 -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 r15-20020a5d694f000000b0033ec6a1b37esm9489265wrw.8.2024.03.18.03.05.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Mar 2024 03:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710756357; x=1711361157; 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=SFthmmsYp+m5f9owLwx+hyTocTKSDvu4WqZSfWH+cu8=; b=inchz0MLLvsW9u/sAZDtO3gU4sM0uXlgM1hAy1BlidQNUnUVqPG0rq67Izbx6Tv7+8 0N5f3Rzq7GUgQrUrpVL2hzNClHWR18AqUOT+1uM4awnZr9crv8vAGpj6tXrkY7xmfbgI oWEJC8TrmfuYQn8sA4qbNpHiVjBMNsnfwzx9PwRDWPT1DJj+47Vk34F24jMMZpsO8mZY 7yh1/rur6DNQ2EA2F3DK/2sioOBvc/jIA7Ql6BP9NNcP1FeeMcidGWcMnSuSf1zK4rFX gzkJeElyH4sPkfjt0PyB4khMg7ZfR6gCPFsXJSaCWzEUD3u6RALOqEC7wn7i/pD0bXxR DxOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710756357; x=1711361157; 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=SFthmmsYp+m5f9owLwx+hyTocTKSDvu4WqZSfWH+cu8=; b=nTWT86HA1sKL0wiN/1lZilZ5Ly5cAGGFa1B+vMW57RB0fjfCNOLfK5dJKZWmm1ZXd3 Tjwn3altyjS1AjpY2uSjtlPR3u2hsQliOJxSDub3KpQvMMseKd1H/RRyEos7YFagz7cJ CcgcJ8oq3gauei8BzN5xtuv+2X/WMKZmK61y5zwQY+bdM2uqJiAfjwZmnzA3zBcvRzI3 Qx5sHF/UdqKfKKtw4MaVYxebZ3TsBqb/irV18Cgh29EXvg5qYrOTZTeZ4SAQXIjTE17x 0l7Q5gklnUI+536OmH7194IgFOAnB6uhAKoN5JWW4QeWcrk72rpbBmB2EsyfWXTPpKQd Ui0g== X-Gm-Message-State: AOJu0YwNZ8IaPVk79Ae+7qSIOJHp1lq7sxZRPZRXlDSkifI0Nm7MmCMi DBVMo1L7LikKkHfIlbL+PMSgRbY/a6uJXzl3UUwkC5Ju9I0KCDxSqzfPCZoSlh/OEd/dGec3RIY JATI= X-Google-Smtp-Source: AGHT+IEkQbMURGcd+GowJ6dmmdpvTofChR6UhvHYnQSi6h49OdpIrmxUzplNdgFSUQU1KewM/zE7qg== X-Received: by 2002:a05:6000:ecd:b0:33e:be35:d449 with SMTP id ea13-20020a0560000ecd00b0033ebe35d449mr7811193wrb.44.1710756357044; Mon, 18 Mar 2024 03:05:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-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=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.1 2/3] hw/display/pxa2xx_lcd: Set rotation angle using qemu_console_set_rotate Date: Mon, 18 Mar 2024 11:05:41 +0100 Message-ID: <20240318100543.78846-3-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1710756439118100005 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/pxa2xx_lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/pxa2xx_lcd.c b/hw/display/pxa2xx_lcd.c index a9d0d981a0..7d03fa57d0 100644 --- a/hw/display/pxa2xx_lcd.c +++ b/hw/display/pxa2xx_lcd.c @@ -1439,6 +1439,7 @@ PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem, memory_region_add_subregion(sysmem, base, &s->iomem); =20 s->con =3D graphic_console_init(NULL, 0, &pxa2xx_ops, s); + qemu_console_set_rotate(s->con, graphic_rotate); =20 vmstate_register(NULL, 0, &vmstate_pxa2xx_lcdc, s); =20 --=20 2.41.0 From nobody Sat May 11 20:22:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1710756375; cv=none; d=zohomail.com; s=zohoarc; b=l5XWusiZ18AYLVfp8sM15lau9QJKCo03CAYDBGOILrx0yqltCAzlmPDjN79YMEG2/GI50FSgeeCfPaNXK3xAyRVkIBI0by4HbjvyfGkCvU7roVnDDq8BVHStviCWdvc5Uv+AM332A75bs3YH6h5LOiVjALftpEEBxX6VfbtXLl8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710756375; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aAPJ6Y+kJMuu6R/0QHRDn6EQ8anTjPlXcNycKPDDQr4=; b=AOXAe432NcSFLS+R9nNhYt0/XwhZOZcMZAa7YL53mfoBNs7SZqipJwKybL7PaJG1hPuABQnyGfHzSmKlJ6GW4Fb4Mw45QWCXv23IkwMIIofOUBiYdnlvQ2UQr+oiRd9q/+ZR0m8MsQk4R9sf8VMnvaMhGnTYGI4RjfGPAobxTrE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1710756375593182.03429896070088; Mon, 18 Mar 2024 03:06:15 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IEqsw+lL9+FVAYGG+mLpHqoNjzXU00T8eEJK7vM15ygPCVUjJ/fErDrrS8XCOE5beEiEDV0yQ== 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) From: =?UTF-8?q?Philippe=20Mathieu-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=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1710756376927100001 Add the 'rotate_arcdegree' field to QemuConsole and remove the use of the 'graphic_rotate' global. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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; =20 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" =20 #include "console-priv.h" =20 @@ -210,17 +209,17 @@ void qemu_console_set_window_id(QemuConsole *con, int= window_id) =20 void qemu_console_set_rotate(QemuConsole *con, unsigned arcdegree) { - graphic_rotate =3D arcdegree; + con->rotate_arcdegree =3D arcdegree; } =20 bool qemu_console_is_rotated(QemuConsole *con) { - return graphic_rotate !=3D 0; + return con->rotate_arcdegree !=3D 0; } =20 unsigned qemu_console_get_rotate_arcdegree(QemuConsole *con) { - return graphic_rotate; + return con->rotate_arcdegree; } =20 void graphic_hw_invalidate(QemuConsole *con) --=20 2.41.0