From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559275; cv=none; d=zoho.com; s=zohoarc; b=ed6S4czhPZXLe9h/FRlA8bI3CApd1mN7mh78IT/NtChpwlQxfT1tgULhCYNroNzv6UsTgTBbkHqgUquzSrnsNRwwJamev0qtJhh/RZ5EgZLwsdRGnQriq1AECm2f3hbQEtKkU+wQZmiDEG7THkoyIP6hKY4b2+11p/HiZ+VaEy8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559275; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Vm/9BKCA7L+vhSd9ckDhfZFIXa/kZb04Ckn0lOuHvLc=; b=jPUvNxa8J1SkJPzHfWe1hlZWM6ka23RYS+SWE2MhhYqTZk7R/rGTjW9Llao9ihwP/4Ngy1E952O9zPP2ghoPaBS3M7csMvFDdvyphYJb9Goq+mh3TnXaP+t95U85hKd+RRq963/0QHJJ04F1CTl8iXYW8ZJQB+Tp5UyCH1G5gKc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565559275510375.97831088446844; Sun, 11 Aug 2019 14:34:35 -0700 (PDT) Received: from localhost ([::1]:41856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvU1-0003kk-NR for importer@patchew.org; Sun, 11 Aug 2019 17:34:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58179) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSy-00020A-Qf for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSw-00045z-V8 for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:28 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:55461) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSw-0003yO-NU for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:26 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 6CA4874C9B2; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id D50387456E2; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH 1/7] ati-vga: Add registers for getting apertures 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Some drivers (e.g. Linux radeon drm and MacOS) access these to find apertures to access card. Try to implement these but not sure these are correct yet. Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 15 +++++++++++++++ hw/display/ati_dbg.c | 5 +++++ hw/display/ati_regs.h | 5 +++++ 3 files changed, 25 insertions(+) diff --git a/hw/display/ati.c b/hw/display/ati.c index a747c4cc98..c8fc62505b 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -307,6 +307,21 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr,= unsigned int size) case CNFG_MEMSIZE: val =3D s->vga.vram_size; break; + case CONFIG_APER_0_BASE: + case CONFIG_APER_1_BASE: + val =3D pci_default_read_config(&s->dev, + PCI_BASE_ADDRESS_0, size) & 0xffffff= f0; + break; + case CONFIG_APER_SIZE: + val =3D s->vga.vram_size; + break; + case CONFIG_REG_1_BASE: + val =3D pci_default_read_config(&s->dev, + PCI_BASE_ADDRESS_2, size) & 0xffffff= f0; + break; + case CONFIG_REG_APER_SIZE: + val =3D memory_region_size(&s->mm); + break; case MC_STATUS: val =3D 5; break; diff --git a/hw/display/ati_dbg.c b/hw/display/ati_dbg.c index 88b3a11315..cbc52025d0 100644 --- a/hw/display/ati_dbg.c +++ b/hw/display/ati_dbg.c @@ -28,6 +28,11 @@ static struct ati_regdesc ati_reg_names[] =3D { {"CNFG_CNTL", 0x00e0}, {"GEN_RESET_CNTL", 0x00f0}, {"CNFG_MEMSIZE", 0x00f8}, + {"CONFIG_APER_0_BASE", 0x0100}, + {"CONFIG_APER_1_BASE", 0x0104}, + {"CONFIG_APER_SIZE", 0x0108}, + {"CONFIG_REG_1_BASE", 0x010c}, + {"CONFIG_REG_APER_SIZE", 0x0110}, {"MEM_CNTL", 0x0140}, {"MC_FB_LOCATION", 0x0148}, {"MC_AGP_LOCATION", 0x014C}, diff --git a/hw/display/ati_regs.h b/hw/display/ati_regs.h index d7155c93d5..81fb5302c0 100644 --- a/hw/display/ati_regs.h +++ b/hw/display/ati_regs.h @@ -46,6 +46,11 @@ #define CNFG_CNTL 0x00e0 #define GEN_RESET_CNTL 0x00f0 #define CNFG_MEMSIZE 0x00f8 +#define CONFIG_APER_0_BASE 0x0100 +#define CONFIG_APER_1_BASE 0x0104 +#define CONFIG_APER_SIZE 0x0108 +#define CONFIG_REG_1_BASE 0x010c +#define CONFIG_REG_APER_SIZE 0x0110 #define MEM_CNTL 0x0140 #define MC_FB_LOCATION 0x0148 #define MC_AGP_LOCATION 0x014C --=20 2.13.7 From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559321; cv=none; d=zoho.com; s=zohoarc; b=aI01blMBRhYn6FCZAdwbu2uspAdVZcU+Lj9axbbEhv3j/rDR9/YwWB2MvT7vwiDDVeje0lDYIVFyJS7BXBBh86vPMCrwyvSxzjVUYSF5zo4G3I1vNYGYTVLeAx8NrF5F46kmabDfBcTWPbnP1ChVh7I2Q6j8MAO769hOz1N4qIs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559321; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OFDeIyjrAkDhLYodK5UOF1TmBrFBTwY0iXmawL5LiwY=; b=dlEFgiAnVujgKxKlS0KvQ6+Zt89ydnh4ZLvq2z9dqrfP/kFvQvN8L9rXRNtWmhyrYP7p73QP7GB4McFgcBeLaa4UnHmNPYQLLIJEShMHBzNe1ClQCaaaaWUro4PeXsaN2omSvmPkTprnRIycbYmoaSBSPPoTMUF1m6pR+cDivQQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565559321609763.2496213510047; Sun, 11 Aug 2019 14:35:21 -0700 (PDT) Received: from localhost ([::1]:41874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvUm-0006Ew-Pe for importer@patchew.org; Sun, 11 Aug 2019 17:35:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58156) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSy-000208-20 for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSw-00045l-Uu for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:27 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:55460) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSw-0003yQ-NS for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:26 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 716CD74C9F1; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id D7C9874581E; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: <31ff69ca6959d090869907774faa1af7d2c02b2b.1565558093.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH 2/7] ati-vga: Add some register definitions for debugging 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add names for AMCGPIO regs to make it easier to identify these in trace output. This is where rage128p has the DDC from the DVI port among others but because we don't implement the flat panel controller we don't want to connect an EDID here to make sure drivers use the VGA output instead. But since these are often probed by drivers it helps to see what happens by logging these registers by name. Signed-off-by: BALATON Zoltan --- hw/display/ati_dbg.c | 4 ++++ hw/display/ati_regs.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hw/display/ati_dbg.c b/hw/display/ati_dbg.c index cbc52025d0..7e59c41ac2 100644 --- a/hw/display/ati_dbg.c +++ b/hw/display/ati_dbg.c @@ -23,6 +23,10 @@ static struct ati_regdesc ati_reg_names[] =3D { {"GPIO_DVI_DDC", 0x0064}, {"GPIO_MONID", 0x0068}, {"I2C_CNTL_1", 0x0094}, + {"AMCGPIO_MASK_MIR", 0x009c}, + {"AMCGPIO_A_MIR", 0x00a0}, + {"AMCGPIO_Y_MIR", 0x00a4}, + {"AMCGPIO_EN_MIR", 0x00a8}, {"PALETTE_INDEX", 0x00b0}, {"PALETTE_DATA", 0x00b4}, {"CNFG_CNTL", 0x00e0}, diff --git a/hw/display/ati_regs.h b/hw/display/ati_regs.h index 81fb5302c0..91947ab1e7 100644 --- a/hw/display/ati_regs.h +++ b/hw/display/ati_regs.h @@ -41,6 +41,10 @@ #define GPIO_DVI_DDC 0x0064 #define GPIO_MONID 0x0068 #define I2C_CNTL_1 0x0094 +#define AMCGPIO_MASK_MIR 0x009c +#define AMCGPIO_A_MIR 0x00a0 +#define AMCGPIO_Y_MIR 0x00a4 +#define AMCGPIO_EN_MIR 0x00a8 #define PALETTE_INDEX 0x00b0 #define PALETTE_DATA 0x00b4 #define CNFG_CNTL 0x00e0 --=20 2.13.7 From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559275; cv=none; d=zoho.com; s=zohoarc; b=NQjkiz10qb+kZMfPTvsFVJP1ZYHUCH2cEf2lmZophNLL8gg43CcaHxbI3uij4fU8KHUyn/obJdSI5+AOLrv49y4RyJOQtW42uNlks/hIXlrWUaHi1x4b4D+OQTPDpVHS/GPHXP7FY9So93rxQvfnpY1LRzhqQ23I4eBVQK8QJMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559275; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=7q++hoQzXm3nhS2SIxZuShRe1Ev7mv/8X5OsvQ56vfw=; b=XUOkOVEvhM8/pOtzRygx7Rh6EBYKXYm3/MmVmxQ69F8qm66P1/hlQWamr9fvCxVolYB1cjNEjT7+BQZHfc5+yIYHXBRfPUApHGSRzrxlwNwE0WKZCZMmt5Ygf/oOYVBS10sHzQ4jBxgcB5weWfiFTY6MMak6kBF8nsp4NUbTc2g= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 15655592753083.094584807916249; Sun, 11 Aug 2019 14:34:35 -0700 (PDT) Received: from localhost ([::1]:41852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvTq-0003bJ-6J for importer@patchew.org; Sun, 11 Aug 2019 17:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58189) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSy-00020E-VY for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSx-00046f-UK for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:28 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:55463) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSx-0003yP-OC for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:27 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 6B6A974C89D; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id DEFC9749FDB; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: <292e70a92b7fbfd9a4120d433dbdcfda4e5f6c3c.1565558093.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 Subject: [Qemu-devel] [PATCH 3/7] ati-vga: Fix GPIO_MONID register write 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Also update bitbang_i2c state when output bits are changed while enable bits are set. This fixes EDID access by the ATI FCode ROM. Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index c8fc62505b..699f38223b 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -564,12 +564,15 @@ static void ati_mm_write(void *opaque, hwaddr addr, addr - GPIO_MONID, data, size); /* * Rage128p accesses DDC used to get EDID via these bits. - * Only touch i2c when write overlaps 3rd byte because some - * drivers access this reg via multiple partial writes and - * without this spurious bits would be sent. + * Because some drivers access this via multiple byte writes + * we have to be careful when we send bits to avoid spurious + * changes in bitbang_i2c state. So only do it when mask is set + * and either the enable bits are changed or output bits chang= ed + * while enabled. */ if ((s->regs.gpio_monid & BIT(25)) && - addr <=3D GPIO_MONID + 2 && addr + size > GPIO_MONID + 2) { + ((addr <=3D GPIO_MONID + 2 && addr + size > GPIO_MONID + 2= ) || + (addr =3D=3D GPIO_MONID && (s->regs.gpio_monid & 0x60000)= ))) { s->regs.gpio_monid =3D ati_i2c(&s->bbi2c, s->regs.gpio_mon= id, 1); } } --=20 2.13.7 From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559422; cv=none; d=zoho.com; s=zohoarc; b=JWS/ehhnkiru9eqyPNVtamo1lM/OM8eKe4k4e7u/GCNF2MJINscjL/lVzgnmQF95oQyaW1MV1TTKKxf2zXAT7FgELO75QAhVWmoO4jwNBM1K7USEnq8RQlX0Bcw+vaa6UmZzaVEqGAO0Suq2h4thRAo5hbx3CxfByT/68tvR/VY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559422; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=9xybK3YFclDtZa1T9wDox6J5MtSgmgQ+PPQJtpk22G8=; b=Utlo4rEcBJuf/u0FveWB79hSCutpjpxJE0wC6byWJFB1o9VYwTSSYAntFc4DPd1WRvH+YHdVToI1fhO9l2k+qlIRzJOnMWduK9azQ7s/atdhE9Y6iSUXWUXuG1vRxr7zH6VPT8P6fNJ95dS0hZYqig9f9eJ2HHNjbWc539niLeo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565559422812860.7269790850345; Sun, 11 Aug 2019 14:37:02 -0700 (PDT) Received: from localhost ([::1]:41892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvWP-00008R-WA for importer@patchew.org; Sun, 11 Aug 2019 17:37:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58186) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSy-00020D-SC for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSy-00046r-1D for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:28 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:55472) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSx-000466-Qk for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:27 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 87D1F74CB05; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id E35C474AB63; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 Subject: [Qemu-devel] [PATCH 4/7] ati-vga: Fix cursor color with guest_hwcursor=true 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Fixes: a38127414bd007c5b6ae64c664d9e8839393277e Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/display/ati.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 699f38223b..b849f5d510 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -207,7 +207,7 @@ static void ati_cursor_draw_line(VGACommonState *vga, u= int8_t *d, int scr_y) } } else { color =3D (xbits & BIT(7) ? s->regs.cur_color1 : - s->regs.cur_color0) << 8 | 0xff; + s->regs.cur_color0) | 0xff000000; } if (vga->hw_cursor_x + i * 8 + j >=3D h) { return; /* end of screen, don't span to next line */ --=20 2.13.7 From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559383; cv=none; d=zoho.com; s=zohoarc; b=M1weqrkZD/asGBWSkIGfmHzvQCliGFGljEGdh+zGvfSCRBo8qbRoC/WQPyQZOBR96Y4DlW57JnAX+AzUV2dpnNvCgner0P8iF6hDMMkDSdnrm8HdNEwLsQeMwqmvkgkQaPK0hfGP5G76F+nlQq70npgntXM02ACRuYvOovNZedg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559383; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sLFFNi+Wif6FSdQDZLb+swOVXp+w3oDr3ZIGs9i5tR8=; b=jmtm0ug3o6iPDkoPNXIQEmUYXpgtABUuG8Hw8MoN8Isnb4vOv4n0q5GEYfqGISGO7sIQl+0sN8TaU2JAYEtBHI+89BpiAVDauHck3iT4kHK2Gc5FZQf0TOIYNZPlOfQrgx0KJIZysh9kcH+j6BHkCCtWi4E5Ob5V5cx4kp9wTN0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565559383379490.5968025419429; Sun, 11 Aug 2019 14:36:23 -0700 (PDT) Received: from localhost ([::1]:41886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvVm-0007hm-Hr for importer@patchew.org; Sun, 11 Aug 2019 17:36:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58180) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSy-00020B-R7 for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSw-00045q-Ux for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:28 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:55464) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSw-0003yS-NW for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:26 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 89BB974CC7E; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id E718B74B841; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH 5/7] ati-vga: Fix hardware cursor image offset 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The crtc_offset is not needed, cur_offset is relative to the start of vram not the start of displayed area. This fixes broken pointer image with MacOS that uses non-0 crtc_offset. Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index b849f5d510..bbcdd6bc83 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -132,9 +132,8 @@ static void ati_cursor_define(ATIVGAState *s) return; /* Do not update cursor if locked or rendered by guest */ } /* FIXME handle cur_hv_offs correctly */ - src =3D s->vga.vram_ptr + (s->regs.crtc_offset & 0x07ffffff) + - s->regs.cur_offset - (s->regs.cur_hv_offs >> 16) - - (s->regs.cur_hv_offs & 0xffff) * 16; + src =3D s->vga.vram_ptr + s->regs.cur_offset - + (s->regs.cur_hv_offs >> 16) - (s->regs.cur_hv_offs & 0xffff) * 1= 6; for (i =3D 0; i < 64; i++) { for (j =3D 0; j < 8; j++, idx++) { data[idx] =3D src[i * 16 + j]; @@ -190,8 +189,7 @@ static void ati_cursor_draw_line(VGACommonState *vga, u= int8_t *d, int scr_y) return; } /* FIXME handle cur_hv_offs correctly */ - src =3D s->vga.vram_ptr + (s->regs.crtc_offset & 0x07ffffff) + - s->cursor_offset + (scr_y - vga->hw_cursor_y) * 16; + src =3D s->vga.vram_ptr + s->cursor_offset + (scr_y - vga->hw_cursor_y= ) * 16; dp =3D &dp[vga->hw_cursor_x]; h =3D ((s->regs.crtc_h_total_disp >> 16) + 1) * 8; for (i =3D 0; i < 8; i++) { --=20 2.13.7 From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559323; cv=none; d=zoho.com; s=zohoarc; b=jzVXpAcNu9e7TPkAvrh90cPCXx01md2tAWrvyK7Bj7raI/5dchLiTGSd+1wAe+GbeM2fpAL0Yr1Ocp8xVJGxQ7sLPbcVJFibzD0o2hVkJUXOAHEGKEfxu5H6AFLT8qMx+uSEOzVN7gGd2m7+M2KHywWers/iCZvRA6ZDrQU6ST0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559323; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=+IvF60MCo7uUL5gt1o1dbr2eu3rHMGLUrM8BFntwTGA=; b=Gd0E/00D9hH9reBeTaVdPVdNfgpj5ptm7BeUd/Xmwp3XDUk9EqJScb1jOGjcnAO/hjD2tpOY9vYfc79qZhLQjL2A9zQZqMHVQdPFxLBCydj+S5T4dfVe6aVIPbbYreNcJ4KWe6sbO7Nol7GmEN2OLnYYRxHfqiwIR6osR+T2I04= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565559323515470.94525533003093; Sun, 11 Aug 2019 14:35:23 -0700 (PDT) Received: from localhost ([::1]:41876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvUo-0006LO-MR for importer@patchew.org; Sun, 11 Aug 2019 17:35:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58200) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSz-00020Q-BU for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSy-00047E-5B for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:29 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:55470) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSx-000464-RA for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:28 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 8D55874CE6F; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id EA4F974BE6A; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: <1c6fce457ef7e6f889e38dc0423791be92310a62.1565558093.git.balaton@eik.bme.hu> In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH 6/7] ati-vga: Attempt to handle CRTC offset not exact multiple of stride 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" MacOS uses non-0 offset so it needs this and the resulting vbe_start_addr seems correct but picture is still broken with OpenBIOS after FCode runs but that maybe due to firmware problems now. After boot, picture is now correct. It also occured to me that these CRTC regs are also present in VGA so I wonder if they should be shared in case some drivers try to poke them via VGA regs or these are a separate set of regs for extended mode. Added a comment noting this but drivers I've tried so far program the card accessing ati regs so I did not attempt to change it. Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index bbcdd6bc83..0bfe73179d 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -50,6 +50,7 @@ static void ati_vga_switch_mode(ATIVGAState *s) s->mode =3D EXT_MODE; if (s->regs.crtc_gen_cntl & CRTC2_EN) { /* CRT controller enabled, use CRTC values */ + /* FIXME Should these be the same as VGA CRTC regs? */ uint32_t offs =3D s->regs.crtc_offset & 0x07ffffff; int stride =3D (s->regs.crtc_pitch & 0x7ff) * 8; int bpp =3D 0; @@ -101,16 +102,23 @@ static void ati_vga_switch_mode(ATIVGAState *s) (s->regs.dac_cntl & DAC_8BIT_EN ? VBE_DISPI_8BIT_DAC : 0)); /* now set offset and stride after enable as that resets these= */ if (stride) { + int bypp =3D DIV_ROUND_UP(bpp, BITS_PER_BYTE); + vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_VIRT_WI= DTH); vbe_ioport_write_data(&s->vga, 0, stride); - if (offs % stride =3D=3D 0) { - vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_Y_O= FFSET); - vbe_ioport_write_data(&s->vga, 0, offs / stride); - } else { - /* FIXME what to do with this? */ - error_report("VGA offset is not multiple of pitch, " - "expect bad picture"); + stride *=3D bypp; + if (offs % stride) { + DPRINTF("CRTC offset is not multiple of pitch\n"); + vbe_ioport_write_index(&s->vga, 0, + VBE_DISPI_INDEX_X_OFFSET); + vbe_ioport_write_data(&s->vga, 0, offs % stride / bypp= ); } + vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_Y_OFFSE= T); + vbe_ioport_write_data(&s->vga, 0, offs / stride); + DPRINTF("VBE offset (%d,%d), vbe_start_addr=3D%x\n", + s->vga.vbe_regs[VBE_DISPI_INDEX_X_OFFSET], + s->vga.vbe_regs[VBE_DISPI_INDEX_Y_OFFSET], + s->vga.vbe_start_addr); } } } else { --=20 2.13.7 From nobody Fri Apr 26 07:40:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1565559273; cv=none; d=zoho.com; s=zohoarc; b=Pgkiz85s8NcGBccakEGQlnnKTSVzWVnrrC1ifg+HwOZlI7A5H0mL1dIdeHmpQKtwUsMb79h2vC8QVzEhFuyI7hiRFT54Igl7Z4cSDKWEQo+bEX2Wb6ZgE1dKCjKDhiUwmRY4IorYboDXoMTfjO1EcdKcJGcR4UQyXuHTDf5uTqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565559273; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=MJqoDWgLMbQIaOCN21XVzrwUDnA1IAdSL8ifRq2kd2k=; b=PoXwdR5326hG0in+LMjtrAOJ7YbSeDTwQggc/72lsKNxWsBC48RrsXdN3xn/DqfR6vvUfPI/4gGjoAesez9V2m7OcpX3hOLBuHYRu1yNfRq87xVhrOEWIJQ44I4ni+yI59VDGSPfv4gBXQE96P05Ds+/+5YtcjXNOrOOgzV5KUY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565559272723898.9181032893467; Sun, 11 Aug 2019 14:34:32 -0700 (PDT) Received: from localhost ([::1]:41854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvTw-0003dy-S6 for importer@patchew.org; Sun, 11 Aug 2019 17:34:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58195) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hwvSz-00020P-7w for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hwvSy-000478-3m for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:29 -0400 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:55471) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hwvSx-000465-QP for qemu-devel@nongnu.org; Sun, 11 Aug 2019 17:33:28 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id A29F974CED6; Sun, 11 Aug 2019 23:33:12 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id EDC1874C659; Sun, 11 Aug 2019 23:33:11 +0200 (CEST) Message-Id: In-Reply-To: References: From: BALATON Zoltan Date: Sun, 11 Aug 2019 23:14:53 +0200 MIME-Version: 1.0 To: qemu-devel@nongnu.org Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:738:2001:2001::2001 Subject: [Qemu-devel] [PATCH 7/7] ati-vga: Add limited support for big endian frame buffer aperture 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Set frame buffer endianness according to requested endianness for frame buffer apertures. We set frame buffer to big endian if any of the two apertures are set to big endian. Using different endianness for the two apertures is not implemented. This fixes inverted colors with MacOS and Xorg frame buffer driver but some Linux drivers may have endianness issues even on real hardware so this may not fix all cases. MorphOS uses aper0 in LE, Linux uses aper0 in BE and MacOS uses aper1 in BE but not sure about others or if MacOS also may need aper0 in which case we'll need a more complex fix but MacOS has other problems yet so for now this might work. Signed-off-by: BALATON Zoltan --- hw/display/ati.c | 10 +++++++++- hw/display/ati_int.h | 1 + hw/display/ati_regs.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 0bfe73179d..a365e2455d 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -90,7 +90,9 @@ static void ati_vga_switch_mode(ATIVGAState *s) DPRINTF("Switching to %dx%d %d %d @ %x\n", h, v, stride, bpp, = offs); vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_ENABLE); vbe_ioport_write_data(&s->vga, 0, VBE_DISPI_DISABLED); - s->vga.big_endian_fb =3D false; + s->vga.big_endian_fb =3D (s->regs.config_cntl & APER_0_ENDIAN = || + s->regs.config_cntl & APER_1_ENDIAN ? + true : false); /* reset VBE regs then set up mode */ s->vga.vbe_regs[VBE_DISPI_INDEX_XRES] =3D h; s->vga.vbe_regs[VBE_DISPI_INDEX_YRES] =3D v; @@ -310,6 +312,9 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, = unsigned int size) case PALETTE_DATA: val =3D vga_ioport_read(&s->vga, VGA_PEL_D); break; + case CNFG_CNTL: + val =3D s->regs.config_cntl; + break; case CNFG_MEMSIZE: val =3D s->vga.vram_size; break; @@ -604,6 +609,9 @@ static void ati_mm_write(void *opaque, hwaddr addr, data >>=3D 8; vga_ioport_write(&s->vga, VGA_PEL_D, data & 0xff); break; + case CNFG_CNTL: + s->regs.config_cntl =3D data; + break; case CRTC_H_TOTAL_DISP: s->regs.crtc_h_total_disp =3D data & 0x07ff07ff; break; diff --git a/hw/display/ati_int.h b/hw/display/ati_int.h index 31a1927b3e..5b4d3be1e6 100644 --- a/hw/display/ati_int.h +++ b/hw/display/ati_int.h @@ -39,6 +39,7 @@ typedef struct ATIVGARegs { uint32_t gpio_vga_ddc; uint32_t gpio_dvi_ddc; uint32_t gpio_monid; + uint32_t config_cntl; uint32_t crtc_h_total_disp; uint32_t crtc_h_sync_strt_wid; uint32_t crtc_v_total_disp; diff --git a/hw/display/ati_regs.h b/hw/display/ati_regs.h index 91947ab1e7..02046e97c2 100644 --- a/hw/display/ati_regs.h +++ b/hw/display/ati_regs.h @@ -317,6 +317,8 @@ #define X_MPLL_REF_DIV_MASK 0x000000FF =20 /* Config control values (CONFIG_CNTL) */ +#define APER_0_ENDIAN 0x00000003 +#define APER_1_ENDIAN 0x0000000c #define CFG_VGA_IO_DIS 0x00000400 =20 /* CRTC control values (CRTC_GEN_CNTL) */ --=20 2.13.7