All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Fabio Piparo <holofermes@gmail.com>,
	Javier Martinez Canillas <javierm@redhat.com>
Cc: "Maíra Canal" <mcanal@igalia.com>,
	"Melissa Wen" <mwen@igalia.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: drm/ssd130x: stale pixels when the GPU renders into the framebuffer
Date: Fri, 2 Oct 2026 10:18:53 +0200	[thread overview]
Message-ID: <4041bbf5-d864-43c7-8d3f-e05efd1ce65e@suse.de> (raw)
In-Reply-To: <CAB3Lz5Y-N4Tyecu19PMzeTseDrJLvU3ik+sBQcLWdxAMS+jxog@mail.gmail.com>

Hi

Am 30.09.26 um 20:45 schrieb Fabio Piparo:
> Hi all,
>
> On Wed, Sep 30, 2026 at 2:48 AM Thomas Zimmermann wrote:
>> Those buffers should have been allocated on the v3d side.
> Ah! Now I think I see what's happening. Some context on where I'm
> coming from, since I think I explained it badly.
>
> My program opens the panel's card and lets Mesa handle the buffers.
>
>      fd   = open("/dev/dri/card2", O_RDWR);        /* ssd130x */
>      gbm  = gbm_create_device(fd);
>      surf = gbm_surface_create(gbm, 128, 32, GBM_FORMAT_XRGB8888,
>                                GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
>      bo = gbm_surface_lock_front_buffer(surf);
>
> On a Pi 4/5 Mesa hands me dumb buffers from ssd130x with v3d drawing
> into them. On a Pi 0-3 it goes the other way, the GPU makes the
> buffers and ssd130x imports them, and that works fine.
>
> Reading this thread convinced me that what I was doing was wrong for
> my use case, and that my program should own the buffers itself. So now
> it does the producer-consumer thing:
>
>      gpu = gbm_create_device(open("/dev/dri/renderD128", O_RDWR)); /* v3d */
>      bo  = gbm_bo_create(gpu, 128, 32, GBM_FORMAT_XRGB8888,
>                          GBM_BO_USE_RENDERING | GBM_BO_USE_LINEAR);
>      drmPrimeFDToHandle(fd, gbm_bo_get_fd(bo), &handle);
>      /* AddFB2 with that handle, draw into bo through an EGLImage, page flip */
>
> That's clean on a stock kernel and stock Mesa.

Great to hear that it works now

Best regards
Thomas

>
> By the way, I found one other report that looks like the same thing,
> from March 2024: https://github.com/notro/gud/issues/22
>
> Thanks,
> Fabio/

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)



  reply	other threads:[~2026-10-02  8:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  4:27 drm/ssd130x: stale pixels when the GPU renders into the framebuffer Fabio Piparo
2026-08-14 18:34 ` Javier Martinez Canillas
2026-09-14  8:43 ` Thomas Zimmermann
2026-09-23 16:00   ` Fabio Piparo
2026-09-29  9:04     ` Thomas Zimmermann
2026-09-29 21:50       ` Maíra Canal
2026-09-30  6:48         ` Thomas Zimmermann
2026-09-30  7:48           ` Javier Martinez Canillas
2026-09-30  8:32             ` Thomas Zimmermann
2026-09-30 13:49               ` Maíra Canal
2026-09-30 15:52                 ` Javier Martinez Canillas
2026-09-30 18:45                   ` Fabio Piparo
2026-10-02  8:18                     ` Thomas Zimmermann [this message]
2026-09-30 19:57                   ` Maíra Canal
2026-10-02  8:12                     ` Thomas Zimmermann
2026-10-02 21:13                       ` Maíra Canal
2026-10-06  6:50                         ` Thomas Zimmermann

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=4041bbf5-d864-43c7-8d3f-e05efd1ce65e@suse.de \
    --to=tzimmermann@suse.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=holofermes@gmail.com \
    --cc=javierm@redhat.com \
    --cc=mcanal@igalia.com \
    --cc=mwen@igalia.com \
    /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.