From patchwork Fri Nov 29 10:17:20 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: 846117 Delivered-To: patch@linaro.org Received: by 2002:adf:f2c4:0:b0:382:43a8:7b94 with SMTP id d4csp747896wrp; Fri, 29 Nov 2024 02:18:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVv7N7jpf5aTYw5borncw2gDM0fvouxIBnep+EG7FjOl/4Ix9BGtYbPvdwjHGrYcJrx52mCQg==@linaro.org X-Google-Smtp-Source: AGHT+IEbSDOJ57the0VyczX628QzN3B99/6vFTQdiU3QMAY7lmYy8reR2V++nNL+UTKH2y6gZoPW X-Received: by 2002:a05:622a:cf:b0:461:4907:ded9 with SMTP id d75a77b69052e-466b35f0a91mr185788021cf.30.1732875488536; Fri, 29 Nov 2024 02:18:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732875488; cv=none; d=google.com; s=arc-20240605; b=ahdsnu4+OK8yzS63DVMPH/cm0eLqz9B8gSFArueCdkltJd7SosMvAknd4DnhcQoEnr WbIH6f5Aj6xQ+FQJiw5QodHjiHjmT/zt7AmFwF7OHEa7JPIoZc6kl+6UH2AHhxRk6QUI yA5mRztETJT7lH1GzY4Bn8kKe3OjlhAvMYDbL8qkJqMxBADRGofcGZQqKHnMr4fyw5p6 1mZhq0ARjYuelzvDGtjC2piFINRAtTNxwgbRx2AzFA6DmTO7FtS/OuWBJ+wJownnAvPF HOAVxgYfNR8UPS4Ije27WusevewzphO4ThshJP9N4IQSit1v+tWdWdeppJTW9Sqew1zp QyFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=vnmzBmtiMniQtfyoIrkF0lH5OiNVvtRvyQ3ryvXvacc=; fh=FZmmMKRp3rc00qJXxX8wdN6J9g7CaKYtEdtDtIMJ8Tc=; b=f0ub+SBLThRPihe1ueiWhkz2Vij2aFDUlVjVJJv3+BeGQldXIYQGeonl1SDLW7TAbQ uo9lcoePxYYkCbcoxnf0/vIH7aTL6dGTfDeyiLIEG3hJLHpS5dQqck4I2URoesosTkV5 tdxafpb3Jxe4Bc1eMb4x5oRVBT/C/7RsTUIk0JVA+rC6RgEUmgzwkqZw8FKFrrNpWwVA sRrXXSHY6C8U8U0iOj9loZf8bEYLpRtWzy3ti4a5uW1yPrAXQ5T/WCCFw5+zPmh+v0WG 4IZuNhe/78vepleEq6YC7dLCKeQC4BRGyJ1D4ERw7p95zJGF/sG5/x1BVuC8/owpgDuy V8CA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UgjQDgat; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c410314asi39452921cf.317.2024.11.29.02.18.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Nov 2024 02:18:08 -0800 (PST) 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=UgjQDgat; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGy44-0002Qu-TF; Fri, 29 Nov 2024 05:17:32 -0500 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 1tGy43-0002Qj-Nc for qemu-devel@nongnu.org; Fri, 29 Nov 2024 05:17:31 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGy42-0002j8-6Y for qemu-devel@nongnu.org; Fri, 29 Nov 2024 05:17:31 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-434a1639637so15842175e9.1 for ; Fri, 29 Nov 2024 02:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732875448; x=1733480248; 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=vnmzBmtiMniQtfyoIrkF0lH5OiNVvtRvyQ3ryvXvacc=; b=UgjQDgat4fAFvvD2Me/MxnAd+TGjEB9BqQAwEKugzHNy9BFe+VBuO7TeCCf+R9vono uocMVV2K0SmTeLOoZ4ae9r05a3hMw5IRIx8cbYcZxGSIQ02ZTSDGnU7H7TYm27iWr4ey sVyIFN4SgItl5O8nH2Aj1vkvfYjzMT2dstc2g22UKgUmIOTHDMJS+yBekuwdK9oZi4LL RTWMjvBYc+pBJhCEp21xIU+o1Os1cFTI4JwBH7g/1fTuZzCLOoyc4oKS+Zk+eebSt/Bs KxpHfd3CoQMrmZZCZkZRH6vsCBX1GQMJbNRi9KmfiPSDuIHs4FXVNdb56sLg1ztFBfgz 3wFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732875448; x=1733480248; 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=vnmzBmtiMniQtfyoIrkF0lH5OiNVvtRvyQ3ryvXvacc=; b=XKEN4mC1czs+l9foh031EAmEDZAL/zp5UQgg+Qtu6lD0EeWg5qhzFsa7f2CtqUNRgk H79vo2Nr9gcUFn3INJQHMiQFi/83246G0ZGKMAZJDg/7RBO03qoly5jZLc4GP3jaKTnd iqbhnJqgIoYlpWkHvpZNIWD70DH+Te+6E0cYyFi4MGRgajTc26yjkMpSsdhH0z82r3Gr nEcMKOFf37FBxKFVM+QZRldbY+05boszlGOYRwLXicLYMkpr8+unrIZUh6d58zopyOKn DzwDNmYRjfUVoSJTWkbG9ymi4thtJ3u9/RvcVhNELzGaa4Ko/B5ylkSrCbhh/64h0Ozh XyIA== X-Gm-Message-State: AOJu0Yw2r+Fws7mBSTXHH3JJaI/qcjamfvzABeCK6VPzRoAmeyW9dw8S Rkc1Zgqj/tR7ORZ9xgKplzTiw8tl5gD0stlxEz03WVAjJnKaPSnQJPV8Qr1ZZ58Wb5RmYRa/HuL X X-Gm-Gg: ASbGncut+lM+Dn41owKrEL1Jkekcy4z0+exZpoo6MMFraXSuzGYIWgX7+tFW+8MYIPw p5PLHbSclXF0gDbcZ/kFIjZXkZAzoWpskvpT3tKVlLD1EtVQnWwU0ktdV5VbDWVESdzsLwgDe2m IQcTAzkXfG8UJB4ASKI5lHrjXTJgl9PVJglTIJTOQSVTLgd+iLPBXKVq2vEpyXATHFQY4Sn8gz8 zQzSEs5ouLrJK5GiRfkDoq3+yGgfE7MmJc5yeXnQ8mntS1LgaIiV3dJO/b5Dg327rxK57yTxAzL 3hRusU1XTBq1xcalnQ6U60Xacz0ziQ== X-Received: by 2002:a05:600c:1e88:b0:434:a5d1:9905 with SMTP id 5b1f17b1804b1-434a9de439bmr86903045e9.26.1732875448052; Fri, 29 Nov 2024 02:17:28 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434b0d9bec1sm49095455e9.5.2024.11.29.02.17.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 Nov 2024 02:17:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Benjamin Herrenschmidt , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PATCH-for-9.2? v2 1/2] hw/display/vga: Do not reset 'big_endian_fb' in vga_common_reset() Date: Fri, 29 Nov 2024 11:17:20 +0100 Message-ID: <20241129101721.17836-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241129101721.17836-1-philmd@linaro.org> References: <20241129101721.17836-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 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 The 'pci-vga' device allow setting a 'big-endian-framebuffer' property since commit 3c2784fc864 ("vga: Expose framebuffer byteorder as a QOM property"). Similarly, the 'virtio-vga' device since commit 8be61ce2ce3 ("virtio-vga: implement big-endian-framebuffer property"). Both call vga_common_reset() in their reset handler, respectively pci_secondary_vga_reset() and virtio_vga_base_reset_hold(), which reset 'big_endian_fb', overwritting the property. This is not correct: the hardware is expected to keep its configured endianness during resets. Move 'big_endian_fb' assignment from vga_common_reset() to vga_common_init() which is called once when the common VGA state is initialized. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Benjamin Herrenschmidt --- hw/display/vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 892fedc8dce..b074b58c90d 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1873,7 +1873,6 @@ void vga_common_reset(VGACommonState *s) s->cursor_start = 0; s->cursor_end = 0; s->cursor_offset = 0; - s->big_endian_fb = s->default_endian_fb; memset(s->invalidated_y_table, '\0', sizeof(s->invalidated_y_table)); memset(s->last_palette, '\0', sizeof(s->last_palette)); memset(s->last_ch_attr, '\0', sizeof(s->last_ch_attr)); @@ -2266,6 +2265,7 @@ bool vga_common_init(VGACommonState *s, Object *obj, Error **errp) * all target endian dependencies from this file. */ s->default_endian_fb = target_words_bigendian(); + s->big_endian_fb = s->default_endian_fb; vga_dirty_log_start(s); From patchwork Fri Nov 29 10:17:21 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: 846118 Delivered-To: patch@linaro.org Received: by 2002:adf:f2c4:0:b0:382:43a8:7b94 with SMTP id d4csp748065wrp; Fri, 29 Nov 2024 02:18:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCX+1OUaPKyhbKWjWcqkK2eqOMzxKeQ3YAM5h8K6lnb9/BYL71ZjORFO/x07LjQ96/AV/2LqEQ==@linaro.org X-Google-Smtp-Source: AGHT+IHZpD4G01C/WX9LFgQ14PJi3uErjQlPlpKlLw9Q4lwfUOJdHGgDZ9WHI1Q2Vm3t9tJtXKvl X-Received: by 2002:a05:622a:88:b0:466:9507:624d with SMTP id d75a77b69052e-466b3531fbfmr156011401cf.27.1732875508647; Fri, 29 Nov 2024 02:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732875508; cv=none; d=google.com; s=arc-20240605; b=BQ9vv9bYPcum4Omd7DmKxa3nRanBF1WHwwsECA8loELcw6BoJyukKI5D453UZLc/ld AHI7PlKt5LSydAhgZ2Yw24/GfRWXRv+v3GaKIRHYjHQ5AQGp3Rl+YsfwxDE+8vj12Uby VccVNCTtuj4BmXqxbF0zOWmbnX6IM4Aqpn2z6Rfpi7riQb5yVRKH7hoDySRGgfDQQkvE 1KuKLdcHSblLfih9LHCtwu/n68Sigr3GsOjUNk+mRZC2bGqQDQnTUW+eT7/NVJKdRW05 PyTxr7tBjYp6Qr/LQq7T2jnG03mRCoFdY/VOj70SBO23lrHh40ooqpNb98vJ/9ps24+n tbOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=0P3q4DMKMIpQLw5XNROBR41JdakZ6VH4T3cx52YGOPg=; fh=FZmmMKRp3rc00qJXxX8wdN6J9g7CaKYtEdtDtIMJ8Tc=; b=h/agRfoXfEzslTlxHa1cK+YHuXUduL3021FQEJ+3hTbbNtlyQp6P9sP83KPWMvvnKq dEXcaQbCvNdiFcZBycUF88IKmKplxvwHmIJbkZMpVgBe8gvvfA2qcA/D6oKO4mJUiLVI 36CllcCwB+tRVYDdDQIQ3wgvkC4q/kUdu4WE9ZK6KUGsAp3s/yZun1GvPgX20U8GC/Zy g3VyL7cZvd43y9kGop/cmvKyaygILYOBvHBrE5/LMH/iBms9LNofbxvFwKfabMXbx5Vl 5yqxExQ3d9/jsyhBPgYc9nL7KgqYvCKUdan9iy2Xf4cP3rRqgZMONywJZvcA/N49uP6F bCqQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHueWyPl; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-466c4054463si48302981cf.43.2024.11.29.02.18.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Nov 2024 02:18:28 -0800 (PST) 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=dHueWyPl; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGy49-0002RS-HE; Fri, 29 Nov 2024 05:17:37 -0500 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 1tGy48-0002RK-6d for qemu-devel@nongnu.org; Fri, 29 Nov 2024 05:17:36 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGy46-0002o2-Mb for qemu-devel@nongnu.org; Fri, 29 Nov 2024 05:17:35 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4349f160d62so15419025e9.2 for ; Fri, 29 Nov 2024 02:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732875452; x=1733480252; 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=0P3q4DMKMIpQLw5XNROBR41JdakZ6VH4T3cx52YGOPg=; b=dHueWyPlWUjnMqj7H8sOaR/MkZhLBx50U60mRK3zeoThxJWIUi2g5oUBR7Hwd9w28B nTk88c9GBk2FS27a1EetJo2bPAdvz6gRdeHjDpk1qDIMY83kxnkz2wi/Bbi3k51PiIBb of/RP66jIicHmGVWhtoRPjzvEhuGwug1ySDmPyLHPfWydnXVVa1IepD2+sXimjjiGm3q rJ9q0+BPucCc2wcTtmi4eqdAX/cuNPHbhc+5fmByXajIFmP6k0Pj17ueiM7DjP9AgUk6 i7ZP+BEM1vDaU9j3DEGB25oNzwQamGGsCVj5PLBwDygDKyep9rdzoJGv/Jt+l2+2r9B4 EEYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732875452; x=1733480252; 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=0P3q4DMKMIpQLw5XNROBR41JdakZ6VH4T3cx52YGOPg=; b=FZdLrGBJEj+jcwILz8DMTs6QTRDp1J0c1WDoJ1b0t+Uctmwr/tIFcreXPdfYBjzVOM wMMrtNJgRTGf1NSipja95Z7ANA0n+QoeSY6UGUt5HeEZ64GizrTHBvti22q4QZQjmkzN +89m/SaE9KGT2hL2C3eBc3Km2QBATnPJtgjU/IUpelhg9rgR+Al1ixjL0PT2N5cRDP33 9R3ZVe9jF7r8bjxy7JTYS89477oL5bOot+emh2Zx491yWjyYUbnQ3qL7jPb1NpBQADzM k4r1NidXpdcSRqsAoERgxyyz4iy8ju0+CnoDrNTrz8PfslOmGKnyWxw0Kbw4XFtdAtqX 49qQ== X-Gm-Message-State: AOJu0YwJVlWVzSVtOsmnn9W6n/sB7hPtBRS92IfGdCNALZWMbSKmmh7E ZWfIGSmoiyjsF245xYc9+QgJ8eFo9bsp2fre5rnDoyR9v1PMEMq+e6MNbTZ8/2UM7HML9ueWk3E h X-Gm-Gg: ASbGncvLfDD0yOFfsjLmGZv3qHztX3xnvKOIJ9m7zTMUwPhe0W2BUs4eYnQGCYKJJmX UXHTzN0SUM8d+XXp0u1OGaa/pkpQw7CG5bYrdDUkwHvtUvOlXKu0zAplSw/xpJmPgBe4u/MmXxW OtZOIicuFutruVimVG47JuBn0oBRuwOPhfNFIin07X6qtZWeH4q0WdhdiyTAR7UXYsVD5tiZ1bS kV02u2rTYY7Q+gyCPrcibkezK0SwB35eakWAIZsMgXYx2bOI2iKyEQQG3p3R6adxJDHCTqAEMOX qFG3gbSHI/3npv92o91VFsZC1s1BaQ== X-Received: by 2002:a05:600c:6d46:b0:434:a5d1:9917 with SMTP id 5b1f17b1804b1-434a9de4533mr83226665e9.21.1732875452611; Fri, 29 Nov 2024 02:17:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385ccd36557sm4036801f8f.24.2024.11.29.02.17.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 29 Nov 2024 02:17:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Michael S. Tsirkin" , Benjamin Herrenschmidt , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PATCH v2 2/2] hw/display/vga: Remove pointless VGACommonState::default_endian_fb Date: Fri, 29 Nov 2024 11:17:21 +0100 Message-ID: <20241129101721.17836-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241129101721.17836-1-philmd@linaro.org> References: <20241129101721.17836-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 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 'default_endian_fb' value is always target_words_bigendian(), remove it as it isn't very useful. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga_int.h | 1 - hw/display/vga.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index f77c1c11457..5dcdecfd422 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -135,7 +135,6 @@ typedef struct VGACommonState { bool full_update_text; bool full_update_gfx; bool big_endian_fb; - bool default_endian_fb; bool global_vmstate; /* hardware mouse cursor support */ uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; diff --git a/hw/display/vga.c b/hw/display/vga.c index b074b58c90d..6dbbbf49073 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -2116,7 +2116,7 @@ static bool vga_endian_state_needed(void *opaque) * default one, thus ensuring backward compatibility for * migration of the common case */ - return s->default_endian_fb != s->big_endian_fb; + return s->big_endian_fb != target_words_bigendian(); } static const VMStateDescription vmstate_vga_endian = { @@ -2264,8 +2264,7 @@ bool vga_common_init(VGACommonState *s, Object *obj, Error **errp) * into a device attribute set by the machine/platform to remove * all target endian dependencies from this file. */ - s->default_endian_fb = target_words_bigendian(); - s->big_endian_fb = s->default_endian_fb; + s->big_endian_fb = target_words_bigendian(); vga_dirty_log_start(s);