From patchwork Tue May 26 06:22:39 2020 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: 281918 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B08F7C433E1 for ; Tue, 26 May 2020 06:24:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 75EEE20870 for ; Tue, 26 May 2020 06:24:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="r9vBj7SX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75EEE20870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdT0P-0008EN-Mb for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:24:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzL-0006QR-02; Tue, 26 May 2020 02:22:59 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:52916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzK-0002Se-9Q; Tue, 26 May 2020 02:22:58 -0400 Received: by mail-wm1-x342.google.com with SMTP id r9so2018508wmh.2; Mon, 25 May 2020 23:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SgLfard/QkYYaxVOCOSV6DhAdq/g3xj9+l6N2FqFR44=; b=r9vBj7SX91M+JbFbuINmfHYf+CRoECvQsK5TM99jK0b56LpXVtgXMYTPPP4bRHhBlC vgvh6TW7/sG65gfJJGGFTRXnkeFbKszcqvGpyESOMZ4R3Xn1mXrRQXjv/PNrFCBjL1ZN yfvBlTMSsNBich3WdzYRcQnwPlMq4zd2ZpI5fq7BoNHzWPSadDeznYLGRjEGAO2Il0NV Xz9w2QOuDI1XUXLbmiCcQRf8NS64+Sx6wP0otHac5uQ4tm0/iVU3S2BqFai2va6Y9o0s hplUpNjPu5LMLZGnWRSrUfz5QgIVsoLzhY6bJEVEOqCOvwMNaE9zlPtLGh7N6hJVQeOs SWAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SgLfard/QkYYaxVOCOSV6DhAdq/g3xj9+l6N2FqFR44=; b=bgZju4zsUSnFdbPRlNr+5K4+L4jUaI/brLiLQ3+OXZTdOL4vLvAWPH9hrM2gGTHsnk eZsN1k/0BgL2/dtRXpagMNUd6bLLgHnylSzl0LG/GoBKiXKFWKwEdsNfMtyONEVGBWNw z788XxMqTf+UJ0h0Cmpd0LRjxBZ2cG4OCOfXqR0IUpACeB1papboP9oplcK2ZKkvdT4c gi6zX6o5BBtjgcBrOSiYrAVftob31JPOmcC/dWkRn0lw5sm5L9rsHzC2kkxDzQ/2n5zR hMVT2h/rZwZTl/Y72VmhzDskD7o6Kw1D+8Ub+KJ/qdaF1nTZ/xxBE2LH+Dby/9lidsFA 1l4w== X-Gm-Message-State: AOAM532YJ88N2TIk4ApnAafo5emiPsIN5X4Itsg0Pk2J0gQ1tGQEY51L CQNyBruy/OJXosiQKleBlCYmkqX5gxI= X-Google-Smtp-Source: ABdhPJxE8WfAg5pu0frxXboyl3hFsxZi4Kr5KAdXI22fqeOLBpz8OjBJIJBIUDLGmPRuppC9RkXXCA== X-Received: by 2002:a1c:9cd5:: with SMTP id f204mr21021904wme.105.1590474176489; Mon, 25 May 2020 23:22:56 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:22:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 01/14] hw/display/edid: Add missing 'qdev-properties.h' header Date: Tue, 26 May 2020 08:22:39 +0200 Message-Id: <20200526062252.19852-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Richard Henderson , Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" When trying to consume the DEFINE_EDID_PROPERTIES() macro by including "hw/display/edid.h", we get this build failure: include/hw/display/edid.h:24:5: error: implicit declaration of function ‘DEFINE_PROP_UINT32’ [-Werror=implicit-function-declaration] 24 | DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \ | ^~~~~~~~~~~~~~~~~~ Headers should be self-contained, and one shouldn't have to dig to find the missing headers. In this case "hw/qdev-properties.h" is missing. Add it. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/display/edid.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h index ff99dc0a05..23371ee82c 100644 --- a/include/hw/display/edid.h +++ b/include/hw/display/edid.h @@ -2,6 +2,7 @@ #define EDID_H #include "qom/object.h" +#include "hw/qdev-properties.h" typedef struct qemu_edid_info { const char *vendor; /* http://www.uefi.org/pnp_id_list */ From patchwork Tue May 26 06:22:44 2020 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: 281916 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6EDEC433E0 for ; Tue, 26 May 2020 06:26:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7CC5820870 for ; Tue, 26 May 2020 06:26:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A0Clr/Nm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CC5820870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdT2W-00041z-Lu for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:26:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzS-0006l2-V8; Tue, 26 May 2020 02:23:06 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:34898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzS-0002Tp-5I; Tue, 26 May 2020 02:23:06 -0400 Received: by mail-wr1-x441.google.com with SMTP id x14so13820001wrp.2; Mon, 25 May 2020 23:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=niKys0M9qCRdd5XE0vRzIcnavSTrjMmT5iXeBJ1UjZs=; b=A0Clr/NmfQGAjrdffxoKZ0zK5WUpCI8/5bUlZpe+cOPkiWEBvvcLL6JtpADF9lG7C5 enMQntACeD1VYmS4372X9a02/jd/tyuPa2GYZI2Fi5dtJEAITru38G+BMKpmR5j96CNp bDbij5rTSGwBzsa8V5phrSJzndHYa5bBm2z+8FH9ECQ/dHuv7SIuvGWRqJt7/Pyaqmw6 vw/Rlwdrfv7gLkSco5NSQGtpGyh+K1e9JRldZmUVdKrP+E49fOZEJN9I36jBYbZ2P5eH HhaNXcWnChtVoPPLomOL+IA4JpTC+oYHuptBBJa1H3hArWTYw/KyRxFO6bnr2QS/7KwC Y+nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=niKys0M9qCRdd5XE0vRzIcnavSTrjMmT5iXeBJ1UjZs=; b=dZhRRUBP7LQT1jzqZXKNfNRQGfLijvGenMni8A0frQiAvB1g4Sm6PMaZC/d9tLJqjj 6XzwmQQMhkfKl9IgMHnQikD14HCrs3487Dgi4eQWhO06SeGyK4B3EyFVecbHMWqoGU0m fqG7klfS5+yqsWZyvE07OTpJi+d+9fZ8KqMZM6z0qyOA4m1Yzjehtw1bea9nJrXaqgX+ MT8pK9iadfm5W7u+iiLjNxxElh5p4YV6cj66jaz/kHNL3xTxNkA4n1HIMtaVo0w5bjsU 211s30EmlXW3bpe1ZGkNsB5Fh/Zgc4R7III7Ccv0HM6tq+G0cyMEk4air2uG9cyPY6Nb KHkg== X-Gm-Message-State: AOAM531OdA8wLdmz+kLVYDSHGCcb2uGZwxqMI2N4TcjN9G6YgASlFmvV lGxTujYo5LwfOEkLLAp97/w= X-Google-Smtp-Source: ABdhPJy5QZSLW7kxwtrFiI5Y7aNsdbz9Bs6Ln08rGGpkszUO7YF4Ikag1EaPLmO1LxbPE7VmAgVcBw== X-Received: by 2002:adf:e752:: with SMTP id c18mr18168910wrn.353.1590474184018; Mon, 25 May 2020 23:23:04 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:23:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 06/14] hw/display/cirrus_vga: Convert debug printf() to trace event Date: Tue, 26 May 2020 08:22:44 +0200 Message-Id: <20200526062252.19852-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Convert the final bit of DEBUG_BITBLT to a tracepoint. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/cirrus_vga.c | 24 ++++++++++-------------- hw/display/trace-events | 1 + 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index 76e2dc5bb6..92c197cdde 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -53,7 +53,6 @@ */ //#define DEBUG_CIRRUS -//#define DEBUG_BITBLT /*************************************** * @@ -950,19 +949,16 @@ static void cirrus_bitblt_start(CirrusVGAState * s) s->cirrus_blt_dstaddr &= s->cirrus_addr_mask; s->cirrus_blt_srcaddr &= s->cirrus_addr_mask; -#ifdef DEBUG_BITBLT - printf("rop=0x%02x mode=0x%02x modeext=0x%02x w=%d h=%d dpitch=%d spitch=%d daddr=0x%08x saddr=0x%08x writemask=0x%02x\n", - blt_rop, - s->cirrus_blt_mode, - s->cirrus_blt_modeext, - s->cirrus_blt_width, - s->cirrus_blt_height, - s->cirrus_blt_dstpitch, - s->cirrus_blt_srcpitch, - s->cirrus_blt_dstaddr, - s->cirrus_blt_srcaddr, - s->vga.gr[0x2f]); -#endif + trace_vga_cirrus_bitblt_start(blt_rop, + s->cirrus_blt_mode, + s->cirrus_blt_modeext, + s->cirrus_blt_width, + s->cirrus_blt_height, + s->cirrus_blt_dstpitch, + s->cirrus_blt_srcpitch, + s->cirrus_blt_dstaddr, + s->cirrus_blt_srcaddr, + s->vga.gr[0x2f]); switch (s->cirrus_blt_mode & CIRRUS_BLTMODE_PIXELWIDTHMASK) { case CIRRUS_BLTMODE_PIXELWIDTH8: diff --git a/hw/display/trace-events b/hw/display/trace-events index c3043e4ced..bb089a5f5e 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -134,6 +134,7 @@ vga_cirrus_read_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x" vga_cirrus_write_io(uint32_t addr, uint32_t val) "addr 0x%x, val 0x%x" vga_cirrus_write_blt(uint32_t offset, uint32_t val) "offset 0x%x, val 0x%x" vga_cirrus_write_gr(uint8_t index, uint8_t val) "GR addr 0x%02x, val 0x%02x" +vga_cirrus_bitblt_start(uint8_t blt_rop, uint8_t blt_mode, uint8_t blt_modeext, int blt_width, int blt_height, int blt_dstpitch, int blt_srcpitch, uint32_t blt_dstaddr, uint32_t blt_srcaddr, uint8_t gr_val) "rop=0x%02x mode=0x%02x modeext=0x%02x w=%d h=%d dpitch=%d spitch=%d daddr=0x%08"PRIx32" saddr=0x%08"PRIx32" writemask=0x%02x" # sii9022.c sii9022_read_reg(uint8_t addr, uint8_t val) "addr 0x%02x, val 0x%02x" From patchwork Tue May 26 06:22:45 2020 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: 281915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D305C433E0 for ; Tue, 26 May 2020 06:28:47 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE1A520776 for ; Tue, 26 May 2020 06:28:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CzU7afDn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE1A520776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdT4w-000760-3J for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:28:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzU-0006oO-8q; Tue, 26 May 2020 02:23:08 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:44859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzT-0002Ty-Hn; Tue, 26 May 2020 02:23:07 -0400 Received: by mail-wr1-x444.google.com with SMTP id y17so10795364wrn.11; Mon, 25 May 2020 23:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Xkslp0bcUbSqRBvOaVQSgMmVi3d4Gn9gVFXVfSGdOCE=; b=CzU7afDn/BrEvMaSH98TXT4W9PACIV1YcfWxyjMs55LUiGmtUnIaOqeajwVGl2zpef nc9Rhv5za0ebqaE7h3wljCBH96II3Gl92jyogxwZpkJUXbFlsCzXX4janDF5wDb9ZpGO M75cQNfpQlu2h0auJIT6hkuiYSQ4pa3X5eAb/2fS3PBGlZoGhRuazjq4405v8AFtCRUm gO0kTyONHKFNikVUAl2YUYWRi/FmOpmjni5h6T6NRN4LAPSueSw9yfoJddd/QjIysGBZ iQBE3tQJusFJ4/gh2EhD80u2XX56H8/QGwYCX/RlPMTJpaeUE2se1UdwkpEhBDbH/9Zn 2dlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Xkslp0bcUbSqRBvOaVQSgMmVi3d4Gn9gVFXVfSGdOCE=; b=HswH8pgK3cA0RPuAqo0QS9aMtkfDyiyweqBadp9nZ+h8dBK+4TyS0SjCAnIQrPfWax KJ4ZWMrkjP8uPbZ/ZRXoNTUBuTrypY+TtRMWnFFKt79XZ2av1Ua7R1h0qh/O3xliBVQf VO4ose4l6DCjqr6ZH7fDux8/xupjqH+RjffiWlr+oisQy7i3FlKFMwRQlwGj50cx3Ekb 9newMWNJojb00+1xUHUq85jF44sngmxD+uzeQfSyBmOCXfaQBzDKCK9mNm98S3eWSw6+ 9SBreGqIeQpx/o9yA8ZhVk3iUjXApzhGcEDoohyIBFSNskbHg75YeIq6fFbbCeSva7yW Fyyw== X-Gm-Message-State: AOAM5300SljZft/gEQiAtzXGpK1rinWQ6zlOYUYiTcQYyF1ql6aRPXsl pgxgOTfzygkAJtaMLLxaJNiCUmuHEyM= X-Google-Smtp-Source: ABdhPJy7XOuIvuPd87YUcyvN9PZYOFHqfmyIpeRi6JHHiJCZ7llcN4A6zFOZagd33VrieZQPGQ5QxA== X-Received: by 2002:adf:e682:: with SMTP id r2mr17707267wrm.378.1590474185418; Mon, 25 May 2020 23:23:05 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:23:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 07/14] hw/display/dpcd: Fix memory region size Date: Tue, 26 May 2020 08:22:45 +0200 Message-Id: <20200526062252.19852-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The memory region size is 512K. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/dpcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c index 170545c605..0c1b7b35fb 100644 --- a/hw/display/dpcd.c +++ b/hw/display/dpcd.c @@ -1,5 +1,5 @@ /* - * dpcd.c + * Xilinx Display Port Control Data * * Copyright (C) 2015 : GreenSocs Ltd * http://www.greensocs.com/ , email: info@greensocs.com @@ -137,7 +137,7 @@ static void dpcd_init(Object *obj) { DPCDState *s = DPCD(obj); - memory_region_init_io(&s->iomem, obj, &aux_ops, s, TYPE_DPCD, 0x7FFFF); + memory_region_init_io(&s->iomem, obj, &aux_ops, s, TYPE_DPCD, 0x80000); aux_init_mmio(AUX_SLAVE(obj), &s->iomem); } From patchwork Tue May 26 06:22:46 2020 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: 281917 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74C90C433E0 for ; Tue, 26 May 2020 06:25:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BED820776 for ; Tue, 26 May 2020 06:25:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X1w3KNPC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BED820776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdT1V-00020h-Cr for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:25:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzV-0006se-Oy; Tue, 26 May 2020 02:23:09 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzU-0002UF-Tp; Tue, 26 May 2020 02:23:09 -0400 Received: by mail-wr1-x42a.google.com with SMTP id x6so5575156wrm.13; Mon, 25 May 2020 23:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Mw4XoFuB+WMIXi00bK5o6APoDCeHGuoxLk+0OqrWeM=; b=X1w3KNPC/efOP9Dly5RnGNrJeg9gdhY5nYvcGiOrQpMarPEln6Gw1VEAldogOakJ+q 4TUGOmFYEqk84i0Z+T2evAsj5JAHEGPB/L+3zZoQ/2TB+jEhsFuAsoDGAhYF5+rMxF1u Mwexl4jkGkI5ojlmg6jqYXB//tLp+a/011pgNbBO3Ktlt/aUIc8Qo0bK/JcZRALxU/2m gbyFLXsr0vvP+9/nCcQGEms+VtH9VtKzL3p+DHq7AXSX7cQIV/HmJHz9pCHBIX4SvHg9 avODktTW23EG5wjK+2qhkMiVShnS8hYTDI/3PfDIJozIMr0+4ScyWbr7yCF8l5N3vSrn X1ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3Mw4XoFuB+WMIXi00bK5o6APoDCeHGuoxLk+0OqrWeM=; b=C5ipFWyiK/ShNN2M/eEFSw0GIwyC7eoiQO6WnjrvMeT3sHxj5fZJUPfTROH7fi9WdO a5/DunsCO9deMKxFN+r8V/wmHno3bkV+Y8j74FoQxPNpyuVeF93Vhy7sYV8YT8g0PvyJ h/aOtETkcgO6ViWxP9YS22mdQyk7scHSW8JbaXTwMpNJbK8Y5Lkp2lP9ucqQDSjTJnk4 95HU8164DmS+QGUuP3JYDTOG300i3j+dgsnMqc7tZ55UdoHOy6GBCOtV6aP6SvvVd0au lfedohVrhYufKudmIcxmcEJkTherkq5z/5lADIH0BQuVTBehOVT5LjvSZEP3gRkb+j9+ jo2g== X-Gm-Message-State: AOAM530OeVeL+vbdFzm+p3Fr0Kva5CBEDLwCYQCjt3CpSez/zEuOXG2f +ZJ8LpjbDk2l1AIHg4SZzEY= X-Google-Smtp-Source: ABdhPJxomH1p6vGBdCie4o25BoV2MvvPXrcEeq8YR7YhjNqNW8eQnd6aoDX9T9dc9k0EUUdRDQ9Cfg== X-Received: by 2002:a5d:4b47:: with SMTP id w7mr7978941wrs.234.1590474186904; Mon, 25 May 2020 23:23:06 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:23:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 08/14] hw/display/dpcd: Convert debug printf()s to trace events Date: Tue, 26 May 2020 08:22:46 +0200 Message-Id: <20200526062252.19852-9-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Convert DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/dpcd.c | 16 +++------------- hw/display/trace-events | 4 ++++ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/hw/display/dpcd.c b/hw/display/dpcd.c index 0c1b7b35fb..64463654a1 100644 --- a/hw/display/dpcd.c +++ b/hw/display/dpcd.c @@ -32,16 +32,7 @@ #include "hw/misc/auxbus.h" #include "migration/vmstate.h" #include "hw/display/dpcd.h" - -#ifndef DEBUG_DPCD -#define DEBUG_DPCD 0 -#endif - -#define DPRINTF(fmt, ...) do { \ - if (DEBUG_DPCD) { \ - qemu_log("dpcd: " fmt, ## __VA_ARGS__); \ - } \ -} while (0) +#include "trace.h" #define DPCD_READABLE_AREA 0x600 @@ -70,8 +61,8 @@ static uint64_t dpcd_read(void *opaque, hwaddr offset, unsigned size) offset); ret = 0; } + trace_dpcd_read(offset, ret); - DPRINTF("read 0x%" PRIX8 " @0x%" HWADDR_PRIX "\n", ret, offset); return ret; } @@ -80,8 +71,7 @@ static void dpcd_write(void *opaque, hwaddr offset, uint64_t value, { DPCDState *e = DPCD(opaque); - DPRINTF("write 0x%" PRIX8 " @0x%" HWADDR_PRIX "\n", (uint8_t)value, offset); - + trace_dpcd_write(offset, value); if (offset < DPCD_READABLE_AREA) { e->dpcd_info[offset] = value; } else { diff --git a/hw/display/trace-events b/hw/display/trace-events index bb089a5f5e..72d4c9812c 100644 --- a/hw/display/trace-events +++ b/hw/display/trace-events @@ -157,3 +157,7 @@ artist_draw_line(unsigned int start_x, unsigned int start_y, unsigned int end_x, # cg3.c cg3_read(uint32_t addr, uint32_t val, unsigned size) "read addr:0x%06"PRIx32" val:0x%08"PRIx32" size:%u" cg3_write(uint32_t addr, uint32_t val, unsigned size) "write addr:0x%06"PRIx32" val:0x%08"PRIx32" size:%u" + +# dpcd.c +dpcd_read(uint32_t addr, uint8_t val) "read addr:0x%"PRIx32" val:0x%02x" +dpcd_write(uint32_t addr, uint8_t val) "write addr:0x%"PRIx32" val:0x%02x" From patchwork Tue May 26 06:22:47 2020 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: 281914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB0A3C433E0 for ; Tue, 26 May 2020 06:30:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 828E92073B for ; Tue, 26 May 2020 06:30:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cj+Z5OJD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 828E92073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdT6v-0001al-N2 for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:30:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzX-0006wN-0s; Tue, 26 May 2020 02:23:11 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzW-0002UQ-88; Tue, 26 May 2020 02:23:10 -0400 Received: by mail-wr1-x442.google.com with SMTP id x13so4549745wrv.4; Mon, 25 May 2020 23:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yn9oNpTD/XdTf2DEjAkyFUg8dJuNz3jGF81w8HFPrT8=; b=Cj+Z5OJDXje6OrxIPtC/pOTk/A8GILcMS8bEqcnmQs8Xd7Bt4SdPNteB3iLgzsCTYr 0r907ofrtp2JZkANGLQ85LK+xQWP4leINpXeqTSvND/KOIw3jpIT87ISFVZI9+fDKdKd jH361tcM8Rv52EfgDlMbSUX/cDiKplWsPfAdX9zje740JI20TzsLsAZuIXqvhi/YXUkN 5JSmipdY2jv5dAx5s/69+CH11WnUGYMkdaC8kEkw3iFTIM3cWhXHeFLg+MRBRskPC/uW mIOcuSmhxUtVNcDZHVix6+Y224wF2qTdPmnWk9h9298Kp/j2igjMfOrZJy7CoJHjcDVe WDRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Yn9oNpTD/XdTf2DEjAkyFUg8dJuNz3jGF81w8HFPrT8=; b=FIA6A9yBCtfpfRWipcgG/E2WIWPBt+a10v9UJgR7eT3BggzqbWxuZetJm2xmsrpT9L YYgeYWwycxBUEczWtArChFzUcCpQL8QxXhpAH0A/CD6vTY8j9qp42+kb0nDlBbpJZ2sA kwi5MlR/vZfNvEZnFokNAt9IH1qJsWbHvEdj1Pxv2PyWQX5buxGPV1epWg7337MSKUAk mvaaXk3tpeYfv54Nlr3mHKiw4+aIws0P9qaChsCWsrDlQkSohn+1dzHhNMbEIjNOOeg7 cab5qJFAfa6YCkT9GelAFJjKdVjP+w7MubPCQz0NOwbxJUg42ki0NDCMhRV8DHSMSYYo o4zQ== X-Gm-Message-State: AOAM533z+NSFCLBPHAhYXOfd+OU91HJhyRdQJMW97K33lXr/mv7wFfqV wr/QaC/oUkX/M3sgVK/i6KE= X-Google-Smtp-Source: ABdhPJyQJgC6Im2iv6SQVJj2fCbaI66cdfGMaddDYp+LZ4U/gYJTfm6gbgqaaX/CdSYHYNLtg+XW2g== X-Received: by 2002:adf:92c1:: with SMTP id 59mr4016354wrn.401.1590474188282; Mon, 25 May 2020 23:23:08 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:23:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 09/14] hw/display/xlnx_dp: Replace disabled DPRINTF() by error_report() Date: Tue, 26 May 2020 08:22:47 +0200 Message-Id: <20200526062252.19852-10-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" DPRINTF() calls are disabled by default, so when unexpected data is used, the whole process abort without information. Display a bit of information with error_report() before crashing. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/xlnx_dp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c index 3e5fb44e06..8d940cd8d1 100644 --- a/hw/display/xlnx_dp.c +++ b/hw/display/xlnx_dp.c @@ -1,5 +1,5 @@ /* - * xlnx_dp.c + * Xilinx Display Port * * Copyright (C) 2015 : GreenSocs Ltd * http://www.greensocs.com/ , email: info@greensocs.com @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "qemu/log.h" #include "qemu/module.h" #include "hw/display/xlnx_dp.h" @@ -465,7 +466,7 @@ static uint8_t xlnx_dp_aux_pop_tx_fifo(XlnxDPState *s) uint8_t ret; if (fifo8_is_empty(&s->tx_fifo)) { - DPRINTF("tx_fifo underflow..\n"); + error_report("%s: TX_FIFO underflow", __func__); abort(); } ret = fifo8_pop(&s->tx_fifo); @@ -525,6 +526,7 @@ static void xlnx_dp_aux_set_command(XlnxDPState *s, uint32_t value) qemu_log_mask(LOG_UNIMP, "xlnx_dp: Write i2c status not implemented\n"); break; default: + error_report("%s: invalid command: %u", __func__, cmd); abort(); } @@ -631,8 +633,8 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s) s->g_plane.format = PIXMAN_b8g8r8; break; default: - DPRINTF("error: unsupported graphic format %u.\n", - s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK); + error_report("%s: unsupported graphic format %u", __func__, + s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK); abort(); } @@ -647,8 +649,8 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s) s->v_plane.format = PIXMAN_x8b8g8r8; break; default: - DPRINTF("error: unsupported video format %u.\n", - s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK); + error_report("%s: unsupported video format %u", __func__, + s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK); abort(); } From patchwork Tue May 26 06:22:48 2020 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: 281913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAEE2C433DF for ; Tue, 26 May 2020 06:34:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C7E22073B for ; Tue, 26 May 2020 06:34:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N+s3qGCK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C7E22073B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdTA6-00050S-TL for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:34:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzY-00070k-H2; Tue, 26 May 2020 02:23:12 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:45922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzX-0002Uj-ME; Tue, 26 May 2020 02:23:12 -0400 Received: by mail-wr1-x442.google.com with SMTP id c3so14931015wru.12; Mon, 25 May 2020 23:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AtkGUe/9x5K/0wcu8anW+e68UuC/UG56c3D7rIQ17bs=; b=N+s3qGCKD6FJmaHREPt7Wc3sme0IhvdZYn6vjZw8o5ZiJMMbo6fd8+fiiAVTjEgVst UdakEIe7B6Y13/msLFz6pNHh3xALeSO8gjPnGpG4n2bBRV9oWR1xUKdbL+O3on+/wsRq dbCwiNwN1vCznET5GmHpl6BV6XAUuoGBEMDlal9cSmCVP/LXu4VW+F0jxV6N4IjbO4Rw llkq4mZy8qOSGr6LJR1fwhqG6fw4YB98ujmcoWwsO/DAVDfoE+H1uKWFg6D/jvA5fROH 6FZScIj1aPWbYIkur97SgvRmYjl2qzCKk269FvYgRO1jAiErcgx5sDdhpW3/xnwy6Hz2 izBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=AtkGUe/9x5K/0wcu8anW+e68UuC/UG56c3D7rIQ17bs=; b=GlthqNqii0gXriwAHyYjQuz/VvkjPZp1vF1+wFs9gft3Ko+u7BPRicy0PSVf2BboVk DPhTUyHEJLWoY2BYaA7s9no1WLOBfGUpmxp7rHeSt15Kw7Lp5fu0HKMDejYE6i+8l6c/ AC496MFR/SCa7vuEi7HZM+D6f7CoyVcMJhnW+Gq/MaHKUrvkja2As+syqPXOzO45KUYZ V0/ct4E6jWVDeNmqoYpZbW0H3qukokRre575hnr5o5yGJY1qBmT2VEc2BYmdl3vL9vDs ky3BSmHG2VcONyNiky7yvmTaHv7TOLNaVwrow3gUsOUl+HX/vGkpRaLb1RbN3ZH64Hb1 waSQ== X-Gm-Message-State: AOAM533TWjHJqsW4dsxmO3jH6FNWaBX/SBhWNtgQTARWWGN03LAtZhZ+ gV6LIK2ygX91+zOTaaTZL7c= X-Google-Smtp-Source: ABdhPJw4moBLGdha5DbkL2H4cIZFDiDAqMz6pslOU9o8FAZ9pD+PkXaL5KlyF0CuwbbI0ca7oSl6zQ== X-Received: by 2002:a5d:40d0:: with SMTP id b16mr18168651wrq.218.1590474189691; Mon, 25 May 2020 23:23:09 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:23:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 10/14] hw/display/vmware_vga: Replace printf() calls by qemu_log_mask(ERROR) Date: Tue, 26 May 2020 08:22:48 +0200 Message-Id: <20200526062252.19852-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Avoid flooding stdio by converting printf() calls to qemu_log_mask(GUEST_ERROR), which are disabled by default. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vmware_vga.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 58ea82e3e5..5c0fc49d9d 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -26,6 +26,7 @@ #include "qemu/module.h" #include "qemu/units.h" #include "qapi/error.h" +#include "qemu/log.h" #include "hw/loader.h" #include "trace.h" #include "ui/vnc.h" @@ -953,7 +954,8 @@ static uint32_t vmsvga_value_read(void *opaque, uint32_t address) ret = s->scratch[s->index - SVGA_SCRATCH_BASE]; break; } - printf("%s: Bad register %02x\n", __func__, s->index); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad register %02x\n", __func__, s->index); ret = 0; break; } @@ -1002,7 +1004,8 @@ static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value) s->new_width = value; s->invalidated = 1; } else { - printf("%s: Bad width: %i\n", __func__, value); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad width: %i\n", __func__, value); } break; @@ -1011,13 +1014,15 @@ static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value) s->new_height = value; s->invalidated = 1; } else { - printf("%s: Bad height: %i\n", __func__, value); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad height: %i\n", __func__, value); } break; case SVGA_REG_BITS_PER_PIXEL: if (value != 32) { - printf("%s: Bad bits per pixel: %i bits\n", __func__, value); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad bits per pixel: %i bits\n", __func__, value); s->config = 0; s->invalidated = 1; } @@ -1082,7 +1087,8 @@ static void vmsvga_value_write(void *opaque, uint32_t address, uint32_t value) s->scratch[s->index - SVGA_SCRATCH_BASE] = value; break; } - printf("%s: Bad register %02x\n", __func__, s->index); + qemu_log_mask(LOG_GUEST_ERROR, + "%s: Bad register %02x\n", __func__, s->index); } } From patchwork Tue May 26 06:22:51 2020 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: 281912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5AFBC433DF for ; Tue, 26 May 2020 06:35:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ABE2D2071A for ; Tue, 26 May 2020 06:35:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="viFYdDmZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABE2D2071A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdTBp-00070Z-S3 for qemu-devel@archiver.kernel.org; Tue, 26 May 2020 02:35:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34296) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdSzc-0007DL-HW; Tue, 26 May 2020 02:23:16 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:53265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdSzb-0002VR-Re; Tue, 26 May 2020 02:23:16 -0400 Received: by mail-wm1-x343.google.com with SMTP id l26so2014084wme.3; Mon, 25 May 2020 23:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xv8ZA3fcUN8kM/s02kASb+D+Ei0KDbMU50VMBXHzoSE=; b=viFYdDmZbCBLlLhjV4MJ2GuPWqOD6lmlmKFp6gfxbKIJIhnKjqy6XUmrCSig1iw2im ELFLij6uSv9htptmYvkp0f+GV3GVis+3DankPo/nnPnWG3A6+tGd1nNuvgZZduQ4rZcq FSkMPWZvqY1iyGueK1bWuVsrDffNKm3Y5B6kyUQ+IOoljEEgNZ/5yunOlFeHrR8AtOTg fSzVT7WydKNqTfoqtAJlGXSSKh2xAy8gc20HpWsvjUqEIVvlzMhvEC3+lqp82Jx1kfcu xo+i1AfSSnrb9HcDuuiNcjtSGlvPE2iadkdUEdo1YHBB2QoF0X0LyVJ3M/+N9YaOA1HW ugjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xv8ZA3fcUN8kM/s02kASb+D+Ei0KDbMU50VMBXHzoSE=; b=J41Dg+Q2yOki2aLVc2mBbl8t6P88SRDqVM6R8q9gB1yCVbtevn2KbWNe5h9ElJ8Ag2 TXbPlGfgGdOk/bKqFlT9kjqB/iYRpAWeu5rUBjw0qH2YvkC+TVoqmCGdooGoHUAXOUxp EA88ENhKuNI/k22/tJlkECHiq+2y0mtoaVfujOlRMGik7+AOc+1uGSmu1prhgodDFsWq r6x7LplLUbD/svYrb4xzMCTVv5zN6EMiBN4hOk0l4iRNbchXHEbtoydpKftR7htcSZV5 yZQsqE8RXV+wLCk1JZsVIQSwal9M8mrXkLpEoCBP+mXmovKwt3+ztwOgdAve8odk3c/e ItZw== X-Gm-Message-State: AOAM530JAEPT3AOLyIwSeByBeX5yYUTi91qAIRL1D7LFIgVFiot6F07F 6WU7XM3ybvDhqncidbasRp4= X-Google-Smtp-Source: ABdhPJwbFmyPavCjCLdltZDvtds2og8+eMCyocTM472tAvKJRS3AS5iMOxFc09D6y7oOrluBMzIglg== X-Received: by 2002:a1c:2644:: with SMTP id m65mr1832466wmm.178.1590474193955; Mon, 25 May 2020 23:23:13 -0700 (PDT) Received: from localhost.localdomain (71.red-88-21-204.staticip.rima-tde.net. [88.21.204.71]) by smtp.gmail.com with ESMTPSA id a16sm5764745wrx.8.2020.05.25.23.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 May 2020 23:23:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Gerd Hoffmann , qemu-devel@nongnu.org Subject: [PATCH 13/14] hw/display/omap_dss: Replace fprintf() call by qemu_log_mask(LOG_UNIMP) Date: Tue, 26 May 2020 08:22:51 +0200 Message-Id: <20200526062252.19852-14-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200526062252.19852-1-f4bug@amsat.org> References: <20200526062252.19852-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Peter Maydell , qemu-trivial@nongnu.org, Alistair Francis , Mark Cave-Ayland , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Igor Mitsyanko , qemu-arm@nongnu.org, "Edgar E. Iglesias" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Replace fprintf() call by qemu_log_mask(LOG_UNIMP), which is disabled by default. This avoid flooding the terminal when fuzzing the device. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/omap_dss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/omap_dss.c b/hw/display/omap_dss.c index 32dc0d6aa7..21fde58a26 100644 --- a/hw/display/omap_dss.c +++ b/hw/display/omap_dss.c @@ -619,7 +619,7 @@ static void omap_rfbi_transfer_start(struct omap_dss_s *s) if (s->rfbi.control & (1 << 1)) { /* BYPASS */ /* TODO: in non-Bypass mode we probably need to just assert the * DRQ and wait for DMA to write the pixels. */ - fprintf(stderr, "%s: Bypass mode unimplemented\n", __func__); + qemu_log_mask(LOG_UNIMP, "%s: Bypass mode unimplemented\n", __func__); return; }