From patchwork Mon Feb 27 12:57:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Beschow X-Patchwork-Id: 1748706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) 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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UBzI+oG0; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQLF92sn8z1yX3 for ; Mon, 27 Feb 2023 23:59:57 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWd58-0003lj-21; Mon, 27 Feb 2023 07:58:18 -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 1pWd4z-0003jo-N2; Mon, 27 Feb 2023 07:58:10 -0500 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWd4x-00070N-FT; Mon, 27 Feb 2023 07:58:09 -0500 Received: by mail-ed1-x534.google.com with SMTP id d30so25399865eda.4; Mon, 27 Feb 2023 04:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=B5zggyZjvmOw/4139SlhqhQ6pnq8/WqaY6vuJBs+amg=; b=UBzI+oG0JE4hKfrY7YYcTYLk8/ibJrzJY6TJHM49zCFuWUcG8cdBbthv8hg85xnYWg UhB92wlD0msvEynoO72p2ZQw45nlzfYLsGeIKHxoJfdu1uNukVjVt+5knCggTCSi45Ee f4W3o4z7P7kjb1ElEGyHPIZeE+6bnrhd0QbHfIFmO+bbxcLWtIduTbr5JMekgNw94/l9 aWobYCgYsbfLaE2Dqrpe+jeprCjBYJjrqazBjm28haEeZhA+7jNL/qHna4ekoSsF9paV rTn2kRerphGuIKLO8KesIn+Wu1wGYisQ7N0R3ttvCoogXIiqEQ9DGB4Ikxbgc5UBoBX4 PmnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=B5zggyZjvmOw/4139SlhqhQ6pnq8/WqaY6vuJBs+amg=; b=C5pqcFLU16ViUDNrR/Sa2WSfPwPfdv1cxjnUEJjKgAowEd7HUGX+JoY2m8gfzHkE0A fCSe8SjwphrCMkkgjdT2iVnaCdLINXMJzfP18pxy+cPFTpkuLaU1ogdFls6ajUSYrc+4 9IP+8knnF5LRf2OMYOZEJCDVX41Ljn2QZyk958My/JnOK8XsE+uvYEmYlDeyCL2E2ykv kGlgf71kGQv3ec1DIemlbaTQ+zTAx3aNQMkS12yX9+5wEaC0mEOJCKlRBzmQx9N79hvF rxgJhfZrEcsyA6X9UolMRI9FFRCdmf7JffgukKlLkPrCF+uZTVvFEehBv3lV0RPW5Y5q pd5g== X-Gm-Message-State: AO0yUKVkEfhmaQRLlCq25bn7nHv+4vdQxEX88jufan1c2damU1UiI6YQ HiAxZ5eBSDZqbHVDkd/gWkSd81TZqNI= X-Google-Smtp-Source: AK7set+R8kAblSkFyQcdjCJ0pDCqUPVwonuRcsGj06lPEZACz4pnkCmkXd5WNnSVs+a5w7uUiTnSqA== X-Received: by 2002:a17:907:9543:b0:8b2:c2fc:178e with SMTP id ex3-20020a170907954300b008b2c2fc178emr26452671ejc.74.1677502684957; Mon, 27 Feb 2023 04:58:04 -0800 (PST) Received: from localhost.localdomain (dynamic-078-055-154-008.78.55.pool.telefonica.de. [78.55.154.8]) by smtp.gmail.com with ESMTPSA id bk4-20020a170906b0c400b008d7a8083dffsm3186414ejb.222.2023.02.27.04.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 04:58:04 -0800 (PST) From: Bernhard Beschow To: qemu-devel@nongnu.org Cc: Huacai Chen , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , BALATON Zoltan , Jiaxun Yang , qemu-ppc@nongnu.org, Gerd Hoffmann , Bernhard Beschow Subject: [PATCH v4 0/7] Pegasos2 fixes and audio output support Date: Mon, 27 Feb 2023 13:57:25 +0100 Message-Id: <20230227125732.20941-1-shentey@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=shentey@gmail.com; helo=mail-ed1-x534.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, FREEMAIL_FROM=0.001, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On behalve of Zoltan BALATON: Hello, This is marked v3 to avoid confusion with previously separate patches that already had v2, even if the series had no v2 yet. This series now includes all patches needed to get AmigaOS 4.1 run well on pegasos2 and add audio output to this board. It has 3 parts: patches 1-3 improve hw/display/sm501 model to avoid graphics problems that were present with AmigaOS; patches 4-6 fix PCI interrupt routing in VIA VT8231 model and in pegasos2 board that fixes PCI cards such as network or sound card not working before; finally patches 7-8 add basic implementation of the via-ac97 audio part of VT8231 (also used on VT82C686B) for output that is the default audio device on pegasos2. This version was re-tested by Rene Engel with latest AmigaOS version and runs as well as my original series did (posted a video with that before). This works now on an M1 MacStudio on macOS where it was unusable before. I've also tested it on Linux x86_64 with older AmigaOS version that also boots and makes sound and verified MorphOS still boots and also has sound now. One known problem with this version that includes Berhard's alternative vt82c686 patches is with MorphOS which uses level sensitive mode of the i8259 PIC that QEMU does not support so it hangs when multiple devices try to raise a shared IRQ. I could work around that in my otiginal series (see here: https://lists.nongnu.org/archive/html/qemu-ppc/2023-02/msg00403.html ) where this works and was also tested, that version is available here: https://osdn.net/projects/qmiga/scm/git/qemu/tree/pegasos2/ but I could not convince Bernhard so I now expect him to provide a work around for that. This isn't a blocker though as MorphOS already runs on mac99 and sam460ex and only available as a time limited demo (they only sell licenses for real hardware) so not really usable apart from testing anyway so getting it running on pegasos2 would be nice but not a prioriey, more important is that AmigaOS runs for which this is the only viable machine as sam460ex version runs much slower. So I'd like this to be merged for 8.0 as it is now or only minor chnages (or alternatively we can return to my series which was also tested the same way and apart from different VIA IRQ router modelling contains the same patches). Please review and let me know who will take care of merging this for 8.0. Regards, BALATON Zoltan v4: * Rebased onto "[PATCH v3 0/3] VT82xx PCI IRQ routing fixes" Based-on: <20230227123316.18719-1-shentey@gmail.com> "[PATCH v3 0/3] VT82xx PCI IRQ routing fixes" BALATON Zoltan (7): hw/display/sm501: Implement more 2D raster operations hw/display/sm501: Add fallbacks to pixman routines hw/display/sm501: Add debug property to control pixman usage hw/isa/vt82c686: Declare gpio inputs so it can be connected in board code hw/ppc/pegasos2: Fix PCI interrupt routing hw/audio/ac97: Split off some definitions to a header hw/audio/via-ac97: Basic implementation of audio playback hw/audio/ac97.h | 65 ++++++ include/hw/isa/vt82c686.h | 25 +++ hw/audio/ac97.c | 43 +--- hw/audio/via-ac97.c | 455 +++++++++++++++++++++++++++++++++++++- hw/display/sm501.c | 119 +++++++--- hw/isa/vt82c686.c | 3 +- hw/pci-host/mv64361.c | 4 - hw/ppc/pegasos2.c | 20 +- hw/audio/trace-events | 6 + hw/isa/trace-events | 1 + 10 files changed, 662 insertions(+), 79 deletions(-) create mode 100644 hw/audio/ac97.h