From patchwork Wed Sep 14 11:51:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 605720 Delivered-To: patch@linaro.org Received: by 2002:ab3:1c02:0:b0:1e7:4ce8:c350 with SMTP id u2csp715333lth; Wed, 14 Sep 2022 05:50:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5BuozAIzILF95O5eGhg/IN6B0fCL02gkWAL/YC187+KCod5uxxv/4bLcrHa8QUd6bugfOp X-Received: by 2002:a05:6214:c48:b0:4ac:b18d:c101 with SMTP id r8-20020a0562140c4800b004acb18dc101mr13187527qvj.107.1663159850508; Wed, 14 Sep 2022 05:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663159850; cv=none; d=google.com; s=arc-20160816; b=Pf1kLzUiPb+4k9ljP92TgZI7JvxiVHPSaXu2Jiums+Vasmb6O8pRcIkSrbn9W0H+mw ziEtbJSmTHmmGEA3td7dU0gQN8WHWm6+oHev31aH64K20yQmyiyFfzSbzFP8E9gak0G2 /kjPwktoiDCQbC3EGrANcYdlQS0LZJeQCCNVWfdeui8uXqPV6B88QTlJMbZht6wdQwCG N9vgJDE0mCHEcfCa7vDriN75X/UyI0dPHPl1RwWU0zg0kE72ounJ67Faw3nw3F9T1Su8 0YZZ8A6rojfSVZnxzFCosCiDh2inMRpkvxDw4Q5FmvJ2JFBD6ravY1jX8e2tjJCj2yMj bb7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=//e/ZN3ckKFpSJhex3jLrOtW1Ky/TB8tcKb8eFkaCDI=; b=ZOG5rAV0YNxC2UTDbM+3KahUl1g6eI0CnYKMlT8msMPnh615vEY16R2lMj/IVSgIf0 a1cDhE/29gaAGIAhTD+IGCR/mTmVOSyKtP4+WyLgi0CmcXPgfCxr46R33mBrnSiecmB8 iAuylSMgY8Q3IWFh3gKZsHXuVwtHrpTq2Lctj5mjGuiSjJBghYBFcag6BrD926tlr1cL W8IKRvKZ9jCuI0/o9SoaWwvN9GqKogkl5x+NJfs7AVgUo9Ms0uxxgyd9p4mt3tRoLkVV +auYnb/Hc+UqF5bWN07o9iS0S8cpWFSstPlJSjd3+Iy9LOx/J7NGRZZc9hod2nkYMSAL C3Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcXudYxf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bs35-20020a05620a472300b006bb9d4ecafasi1356423qkb.74.2022.09.14.05.50.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Sep 2022 05:50:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcXudYxf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYRqr-0005o6-Vn for patch@linaro.org; Wed, 14 Sep 2022 08:50:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYQwS-0008W1-N9 for qemu-devel@nongnu.org; Wed, 14 Sep 2022 07:52:32 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:34408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYQwJ-0008VH-3w for qemu-devel@nongnu.org; Wed, 14 Sep 2022 07:52:32 -0400 Received: by mail-wm1-x32d.google.com with SMTP id n35-20020a05600c502300b003b4924c6868so2144830wmr.1 for ; Wed, 14 Sep 2022 04:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=//e/ZN3ckKFpSJhex3jLrOtW1Ky/TB8tcKb8eFkaCDI=; b=fcXudYxfvCIg1xlg+rJyFOQklZezlXCOCfKu4sTOO9j2uxBpi9MdZxRD8bHWd5boBo 1JAq/CsbKLlOy/Ri657S75eX1ClCVNU1fJ7SI2dfUtqahjyCBd/wAyRJmLesvef9oO/8 INAeKrqSwLEcYIkwiV+nKO3ch19trhBN0ai/dc5DTaGBtgFkr7mmjUAg2GaNyt2nd7cH uxVC9lCh6w2AJTJk/W2x2yvRRLuVG94RcmYo6Tx03n+pbdpw1mDyPv/xYXcngAbsxSGR yitPlaWCQGlw0cPVDIFXHUt4utu+7W3eWuhSPVJMhQHi9VKhXLUEp21n1e0nXiDsICv/ cnOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=//e/ZN3ckKFpSJhex3jLrOtW1Ky/TB8tcKb8eFkaCDI=; b=sf1G5AXFDVKlSq+ui2tnbfgUwZXqtwGXkK+EyYjTId0IxaRTlnKcVourYPAr1/PSs/ zin35hXo/LjXjQABpjF8ITRCL9kKxWkzW8YhAv7o+HhTL8vlGT0w9sf5x7uBPS/ivPMR ng1cFfyWQnQCxhrnpUcuS9krQAce1lTnSskY4pQooM9Wx0/pyDphO76cfdJuE9Xu1QZz fEs+Ae/C8UMQ7vNZIddIV8YvPGpBhEMSirT6KURIv3s6mqipQI/014igYH1bQQOdwoc4 2HKvCKnuauHHJ4RJLaym0h2Wa3xg8GQH92ApxChbY32ZCrKtfjs2u0CF5BDiGb0CNLXR aFUA== X-Gm-Message-State: ACgBeo0s57fE7mbMGlsJv/1dF05N5IM5mrSFzmmM4KI/pp71lGcEZhbZ hphXRqrXLXhOnBLCfotKGZ8glnFHMR+sAYCx X-Received: by 2002:a1c:f009:0:b0:3b4:9398:49c9 with SMTP id a9-20020a1cf009000000b003b4939849c9mr2823677wmb.174.1663156341610; Wed, 14 Sep 2022 04:52:21 -0700 (PDT) Received: from stoup.. ([89.101.193.70]) by smtp.gmail.com with ESMTPSA id t9-20020a5d6909000000b0022a3a887ceasm13712970wru.49.2022.09.14.04.52.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 04:52:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Enrik Berkhan , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/20] hw/arm/bcm2835_property: Add support for RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS Date: Wed, 14 Sep 2022 12:51:59 +0100 Message-Id: <20220914115217.117532-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220914115217.117532-1-richard.henderson@linaro.org> References: <20220914115217.117532-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32d.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Enrik Berkhan In more recent Raspbian OS Linux kernels, the fb driver gives up immediately if RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS fails or no displays are reported. This change simply always reports one display. It makes bcm2835_fb work again with these more recent kernels. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Enrik Berkhan Message-Id: <20220812143519.59134-1-Enrik.Berkhan@inka.de> Signed-off-by: Richard Henderson --- hw/misc/bcm2835_property.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index e94e951057..890ae7bae5 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -270,6 +270,10 @@ static void bcm2835_property_mbox_push(BCM2835PropertyState *s, uint32_t value) stl_le_phys(&s->dma_as, value + 12, 0); resplen = 4; break; + case 0x00040013: /* Get number of displays */ + stl_le_phys(&s->dma_as, value + 12, 1); + resplen = 4; + break; case 0x00060001: /* Get DMA channels */ /* channels 2-5 */