From patchwork Mon Feb 18 12:09:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: BALATON Zoltan X-Patchwork-Id: 1043929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=eik.bme.hu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4432q71j72z9s7h for ; Mon, 18 Feb 2019 23:14:23 +1100 (AEDT) Received: from localhost ([127.0.0.1]:57236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvhoO-00062W-BC for incoming@patchwork.ozlabs.org; Mon, 18 Feb 2019 07:14:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvhnf-000625-8v for qemu-devel@nongnu.org; Mon, 18 Feb 2019 07:13:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvhne-0006cW-9d for qemu-devel@nongnu.org; Mon, 18 Feb 2019 07:13:31 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:27830) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gvhna-0006Xe-1J for qemu-devel@nongnu.org; Mon, 18 Feb 2019 07:13:27 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 5BC1D7456A2; Mon, 18 Feb 2019 13:13:23 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id DAB0474569F; Mon, 18 Feb 2019 13:13:22 +0100 (CET) From: BALATON Zoltan Date: Mon, 18 Feb 2019 13:09:17 +0100 To: qemu-devel@nongnu.org Message-Id: <20190218121322.DAB0474569F@zero.eik.bme.hu> X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH v2] mips_fulong2e: Add on-board graphics chip X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , philmd@redhat.com, Aleksandar Markovic , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add (partial) emulation of the on-board GPU of the machine. This allows the PMON2000 firmware to run and should also work with Linux console but probably not with X yet. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Based-on: 20190218030257.624A7745694@zero.eik.bme.hu Reviewed-by: Aleksandar Markovic --- hw/mips/mips_fulong2e.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index eec6fd02c8..68bd030fc1 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -287,6 +287,7 @@ static void mips_fulong2e_init(MachineState *machine) I2CBus *smbus; MIPSCPU *cpu; CPUMIPSState *env; + DeviceState *dev; /* init CPUs */ cpu = MIPS_CPU(cpu_create(machine->cpu_type)); @@ -347,6 +348,11 @@ static void mips_fulong2e_init(MachineState *machine) vt82c686b_southbridge_init(pci_bus, FULONG2E_VIA_SLOT, env->irq[5], &smbus, &isa_bus); + /* GPU */ + dev = DEVICE(pci_create(pci_bus, -1, "ati-vga")); + qdev_prop_set_uint16(dev, "device_id", 0x5159); + qdev_init_nofail(dev); + /* Populate SPD eeprom data */ spd_data = spd_data_generate(DDR, ram_size, &err); if (err) {