All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	dri-devel@lists.freedesktop.org
Subject: Re: Panic booting qemu-system-sparc64 with bochs_drm
Date: Tue, 7 Jul 2020 21:52:43 +0200	[thread overview]
Message-ID: <20200707195243.GA17970@ravnborg.org> (raw)
In-Reply-To: <20200707070341.wpxyrlkrtbhghtro@sirius.home.kraxel.org>

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.

> 
> 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.

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-07-07 19:52 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 [this message]
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=20200707195243.GA17970@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.