From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, dri-devel@lists.freedesktop.org
Subject: Re: Panic booting qemu-system-sparc64 with bochs_drm
Date: Tue, 7 Jul 2020 17:17:17 +0100 [thread overview]
Message-ID: <bd01d325-6580-c96f-5a05-fd296b49cf2b@ilande.co.uk> (raw)
In-Reply-To: <20200707070341.wpxyrlkrtbhghtro@sirius.home.kraxel.org>
On 07/07/2020 08:03, 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.
>
> 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.
Thanks Gerd - I've just tested the diff below with memcpy_toio() and that works too:
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 5609e164805f..4d05b0ab1592 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);
+ memcpy_toio(dst, src, len);
src += fb->pitches[0];
dst += fb->pitches[0];
}
Presumably there is some existing mechanism that ensures SPARC will always choose a
shadow framebuffer?
ATB,
Mark.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-07-07 16:17 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 [this message]
2020-07-07 17:38 ` Gerd Hoffmann
2020-07-07 19:52 ` Sam Ravnborg
2020-07-07 21:06 ` Mark Cave-Ayland
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=bd01d325-6580-c96f-5a05-fd296b49cf2b@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).