From mboxrd@z Thu Jan 1 00:00:00 1970 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 121FCC433DF for ; Sat, 4 Jul 2020 13:41:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 C25602084C for ; Sat, 4 Jul 2020 13:41:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C25602084C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A65FA6E02A; Sat, 4 Jul 2020 13:41:21 +0000 (UTC) Received: from asavdk3.altibox.net (asavdk3.altibox.net [109.247.116.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 399CE6E02A for ; Sat, 4 Jul 2020 13:41:20 +0000 (UTC) Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id B194C20026; Sat, 4 Jul 2020 15:41:17 +0200 (CEST) Date: Sat, 4 Jul 2020 15:41:15 +0200 From: Sam Ravnborg To: Mark Cave-Ayland Subject: Re: Panic booting qemu-system-sparc64 with bochs_drm Message-ID: <20200704134115.GA755192@ravnborg.org> References: <671ea432-7e2b-ab37-225e-fd32aef9a3e3@ilande.co.uk> <20200704072305.GA689588@ravnborg.org> <02fbd875-f6fd-da20-6835-778bdd6426c3@ilande.co.uk> <485ded46-c1a3-1eab-eb95-1a771543fbaf@ilande.co.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <485ded46-c1a3-1eab-eb95-1a771543fbaf@ilande.co.uk> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=f+hm+t6M c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=3GLR1-XzZKwA:10 a=2Bvo7i-APzZpiiyVkC0A:9 a=iyIOAsMQKWBWs_df:21 a=5sHLvZY-hUYu8ohq:21 a=CjuIK1q_8ugA:10 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Mark. On Sat, Jul 04, 2020 at 02:09:38PM +0100, Mark Cave-Ayland wrote: > On 04/07/2020 12:11, Mark Cave-Ayland wrote: > > > According to gdbstub the destination address in $g3 looks like this: > > > > Breakpoint 1, 0x00000000007ad8e4 in cfb_imageblit () > > (gdb) i r $g3 > > g3 0x100220000 4297195520 > > > > > > The 0x100220000 address still isn't right. On sun4u the PCI address space is mapped > > at physical address 0x1fe00000000 and adding these two together gives 0x1ff00220000 > > which seems closer, but still not the correct framebuffer address 0x1ff22000000 which > > is reported at boot: > > > > [ 9.007161] [drm] Found bochs VGA, ID 0xb0c5. > > [ 9.007840] [drm] Framebuffer size 16384 kB @ 0x1ff22000000, mmio @ 0x1ff23000000. > > As a comparison, I took the last known good commit 7a0483ac4ffc~1: "drm/bochs: add > basic prime support" and added some debug in cfb_imageblit() to allow me to pick out > p->screen_base: > > (gdb) i r $o1 > o1 0x1ff22000000 2195298713600 > > When running git master with your patch in the same way I get a completely different > value: > > (gdb) i r $o1 > o1 0x100050000 4295294976 > > Does p->screen_base need to be initialised differently when using the cfb helpers? I think what is happening is that the bochs driver request a shadow copy for the frambuffer. And with the change to fbops we now use the cfb_ functions to write to the shadow framebuffer - which is not in any IO space. So this does not work. So maybe all we need is the fix in drm_fb_helper_dirty_blit_real(). If you try to undo the change so fbops is set to &drm_fbdev_fb_ops, but keep the fix in drm_fb_helper_dirty_blit_real() how does it then behave? I did not find time to follow your instructions to test this myself with qemu - sorry. Sam > > > ATB, > > Mark. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel