From nobody Mon Feb 9 09:16:24 2026 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566461264; cv=none; d=zoho.com; s=zohoarc; b=jazLn+w3Uf9q3w8QcvlwtX8Psae0vibBfMooOX4FNmCATdn1qnsd/YcR3JUF+jFjttkk1K97E5BsHgJhZ9wUE9wTV1mOMljwmBAy9HY642lyItC+O/+mPYWVgBqn5m3Od1kn3sxGjLW7qSRcUDXuyYdPD3k9qBucyHBgerNB8Rs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566461264; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=b7joo7V9X+WB+J05lrUGAV3ekIjZdgtM00wK6O5z8i4=; b=GPzyBAYLHs00nYNTwX9iZXBQtqVkdbq0bYzHSiNSQ8MTYVYo+5xsNtZoK315H/yDChce/zfTpiykU4BJFk09wJ0P+yT1qRs1fZLoeqd/HPm6zQ7Dg69AEcSsrgi4TGoPIBCCOmRGoBzXxSeZ2QQOhfDIDa/WZOTj/1R9mO579R4= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1566461264805129.53047871176875; Thu, 22 Aug 2019 01:07:44 -0700 (PDT) Received: from localhost ([::1]:39064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0i8C-0000LN-Vp for importer@patchew.org; Thu, 22 Aug 2019 04:07:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53900) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0i5l-0007LF-Dg for qemu-devel@nongnu.org; Thu, 22 Aug 2019 04:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0i5j-0005nt-Mr for qemu-devel@nongnu.org; Thu, 22 Aug 2019 04:05:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40728) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i0i5j-0005nP-GP for qemu-devel@nongnu.org; Thu, 22 Aug 2019 04:05:07 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0850111A441; Thu, 22 Aug 2019 08:05:06 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED3895DE5C; Thu, 22 Aug 2019 08:05:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 235CB97A1; Thu, 22 Aug 2019 10:05:03 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 22 Aug 2019 10:04:57 +0200 Message-Id: <20190822080503.12063-4-kraxel@redhat.com> In-Reply-To: <20190822080503.12063-1-kraxel@redhat.com> References: <20190822080503.12063-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.66]); Thu, 22 Aug 2019 08:05:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/8] 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-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan 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 Message-id: 292e70a92b7fbfd9a4120d433dbdcfda4e5f6c3c.1565558093.git.balaton= @eik.bme.hu Signed-off-by: Gerd Hoffmann --- 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 6cdcbef238fe..eb54f6842fed 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.18.1