From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Sam Ravnborg <sam@ravnborg.org>, Gerd Hoffmann <kraxel@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: Panic booting qemu-system-sparc64 with bochs_drm
Date: Tue, 7 Jul 2020 22:06:23 +0100 [thread overview]
Message-ID: <adce7077-45e7-132b-7640-fb32ad5c6dc0@ilande.co.uk> (raw)
In-Reply-To: <20200707195243.GA17970@ravnborg.org>
On 07/07/2020 20:52, Sam Ravnborg wrote:
> Hi Gerd.
>
> On Tue, Jul 07, 2020 at 09:03:41AM +0200, Gerd Hoffmann wrote:
>>> Yes, that's correct - I can confirm that the simplified diff below works:
>>>
>>> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
>>> index 5609e164805f..83af05fac604 100644
>>> --- a/drivers/gpu/drm/drm_fb_helper.c
>>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>>> @@ -399,7 +399,7 @@ static void drm_fb_helper_dirty_blit_real(struct drm_fb_helper
>>> *fb_helper,
>>> unsigned int y;
>>>
>>> for (y = clip->y1; y < clip->y2; y++) {
>>> - memcpy(dst, src, len);
>>> + fb_memcpy_tofb(dst, src, len);
>>
>> fb_memcpy_tofb is #defined to sbus_memcpy_toio @ sparc which looks
>> wrong to me given that this is a pci not a sbus device. sparc also has
>> memcpy_toio which looks better to me.
> Looked at sbus_memcpy_toio and memcpy_toio for sparc64.
> They are essential the same. Only read bytes in little-endian format,
> the other read bytes in big-endian format. So thats the same.
>
> I will prepare a proper patch with focus on fixin sparc64 only.
Thanks Sam! If you want to add me as a CC then I'm happy to test if needed.
>> There are blit helpers in drm_format_helper.c which already use
>> memcpy_toio(), I guess we should do the same here. Not fully sure we
>> can use memcpy_toio() unconditionally here. Given that a shadow
>> framebuffer makes sense only in case the real framebuffer is not in
>> normal ram we probably can.
> Not so sure about this part.
> We unconditionally enable the use of a shadow framebuffer.
> But on some archs the framebuffer is not in io space - but then
> on these architectures memcpy_toio boils down to a simple memcpy.
> So maybe in the end everything is fine.
I'm afraid this part is beyond my current knowledge of the various framebuffer
implementations within the kernel :/
ATB,
Mark.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2020-07-07 21:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 21:57 Panic booting qemu-system-sparc64 with bochs_drm Mark Cave-Ayland
2020-07-03 22:54 ` Mark Cave-Ayland
2020-07-04 7:23 ` Sam Ravnborg
2020-07-04 11:11 ` Mark Cave-Ayland
2020-07-04 13:09 ` Mark Cave-Ayland
2020-07-04 13:41 ` Sam Ravnborg
2020-07-04 14:16 ` Mark Cave-Ayland
2020-07-04 14:52 ` Sam Ravnborg
2020-07-06 19:36 ` Mark Cave-Ayland
2020-07-07 7:03 ` Gerd Hoffmann
2020-07-07 16:17 ` Mark Cave-Ayland
2020-07-07 17:38 ` Gerd Hoffmann
2020-07-07 19:52 ` Sam Ravnborg
2020-07-07 21:06 ` Mark Cave-Ayland [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=adce7077-45e7-132b-7640-fb32ad5c6dc0@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).