From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Javier Martinez Canillas <javierm@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1
Date: Thu, 13 Jul 2023 15:17:08 +0200 [thread overview]
Message-ID: <cover.1689252746.git.geert@linux-m68k.org> (raw)
Hi all,
The native display format of ssd1306 OLED displays is monochrome
light-on-dark (R1). This patch series adds support for the R1 buffer
format to both the ssd130x DRM driver and the FB helpers, so monochrome
applications (including fbdev emulation and the text console) can avoid
the overhead of back-and-forth conversions between R1 and XR24.
This series is based on drm-misc/for-linux-next with [1] applied, and
consists of 4 parts:
- Patches 1-3 contain miscellaneous fixes,
- Patch 4 adds R1 support to the ssd130x DRM driver,
- Patches 5-6 update the DRM client and FB helper code to avoid
calling drm_mode_legacy_fb_format() where the exact buffer format is
already known, to prepare for R1 support,
- Patch 7 adds support for R1 to fbdev emulation and the text console,
- Patch 8 switches ssd130x to R1 for fbdev emulation and the text
console.
This has been tested on an Adafruit FeatherWing 128x32 OLED, connected
to an OrangeCrab ECP5 FPGA board running a 64 MHz VexRiscv RISC-V
softcore, using the fbdev text console.
Thanks for your comments!
P.S. Note that the biggest hurdle was the copious use of the
drm_mode_legacy_fb_format() helper in various places. This helper
cannot decide between C1 and R1 without knowledge of the
capabilities of the full display pipeline. Instead of
special-casing its return value in three callers, I did so in only
one place, and got rid of two of these calls in the call chain.
I think Thomas' grand plan is to replace preferred_{bpp,depth} by a
preferred fourcc format? That would simplify things a lot...
[1] "[PATCH] drm/ssd130x: Change pixel format used to compute the buffer
size"
https://lore.kernel.org/all/20230713085859.907127-1-javierm@redhat.com
Geert Uytterhoeven (8):
drm/ssd130x: Fix pitch calculation in ssd130x_fb_blit_rect()
drm/dumb-buffers: Fix drm_mode_create_dumb() for bpp < 8
[RFC] drm/ssd130x: Bail out early if data_array is not yet available
drm/ssd130x: Add support for DRM_FORMAT_R1
drm/client: Convert drm_mode_create_dumb() to drm_mode_addfb2()
drm/fb-helper: Pass buffer format via drm_fb_helper_surface_size
drm/fb-helper: Add support for DRM_FORMAT_R1
drm/ssd130x: Switch preferred_bpp/depth to 1
drivers/gpu/drm/drm_client.c | 13 +++---
drivers/gpu/drm/drm_dumb_buffers.c | 3 +-
drivers/gpu/drm/drm_fb_helper.c | 42 ++++++++++++++-----
drivers/gpu/drm/drm_fbdev_generic.c | 9 ++---
drivers/gpu/drm/solomon/ssd130x.c | 62 ++++++++++++++++++++---------
include/drm/drm_fb_helper.h | 2 +
6 files changed, 87 insertions(+), 44 deletions(-)
--
2.34.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Javier Martinez Canillas <javierm@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1
Date: Thu, 13 Jul 2023 15:17:08 +0200 [thread overview]
Message-ID: <cover.1689252746.git.geert@linux-m68k.org> (raw)
Hi all,
The native display format of ssd1306 OLED displays is monochrome
light-on-dark (R1). This patch series adds support for the R1 buffer
format to both the ssd130x DRM driver and the FB helpers, so monochrome
applications (including fbdev emulation and the text console) can avoid
the overhead of back-and-forth conversions between R1 and XR24.
This series is based on drm-misc/for-linux-next with [1] applied, and
consists of 4 parts:
- Patches 1-3 contain miscellaneous fixes,
- Patch 4 adds R1 support to the ssd130x DRM driver,
- Patches 5-6 update the DRM client and FB helper code to avoid
calling drm_mode_legacy_fb_format() where the exact buffer format is
already known, to prepare for R1 support,
- Patch 7 adds support for R1 to fbdev emulation and the text console,
- Patch 8 switches ssd130x to R1 for fbdev emulation and the text
console.
This has been tested on an Adafruit FeatherWing 128x32 OLED, connected
to an OrangeCrab ECP5 FPGA board running a 64 MHz VexRiscv RISC-V
softcore, using the fbdev text console.
Thanks for your comments!
P.S. Note that the biggest hurdle was the copious use of the
drm_mode_legacy_fb_format() helper in various places. This helper
cannot decide between C1 and R1 without knowledge of the
capabilities of the full display pipeline. Instead of
special-casing its return value in three callers, I did so in only
one place, and got rid of two of these calls in the call chain.
I think Thomas' grand plan is to replace preferred_{bpp,depth} by a
preferred fourcc format? That would simplify things a lot...
[1] "[PATCH] drm/ssd130x: Change pixel format used to compute the buffer
size"
https://lore.kernel.org/all/20230713085859.907127-1-javierm@redhat.com
Geert Uytterhoeven (8):
drm/ssd130x: Fix pitch calculation in ssd130x_fb_blit_rect()
drm/dumb-buffers: Fix drm_mode_create_dumb() for bpp < 8
[RFC] drm/ssd130x: Bail out early if data_array is not yet available
drm/ssd130x: Add support for DRM_FORMAT_R1
drm/client: Convert drm_mode_create_dumb() to drm_mode_addfb2()
drm/fb-helper: Pass buffer format via drm_fb_helper_surface_size
drm/fb-helper: Add support for DRM_FORMAT_R1
drm/ssd130x: Switch preferred_bpp/depth to 1
drivers/gpu/drm/drm_client.c | 13 +++---
drivers/gpu/drm/drm_dumb_buffers.c | 3 +-
drivers/gpu/drm/drm_fb_helper.c | 42 ++++++++++++++-----
drivers/gpu/drm/drm_fbdev_generic.c | 9 ++---
drivers/gpu/drm/solomon/ssd130x.c | 62 ++++++++++++++++++++---------
include/drm/drm_fb_helper.h | 2 +
6 files changed, 87 insertions(+), 44 deletions(-)
--
2.34.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next reply other threads:[~2023-07-13 13:17 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 13:17 Geert Uytterhoeven [this message]
2023-07-13 13:17 ` [PATCH 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1 Geert Uytterhoeven
2023-07-13 13:17 ` [PATCH 1/8] drm/ssd130x: Fix pitch calculation in ssd130x_fb_blit_rect() Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 9:34 ` Javier Martinez Canillas
2023-07-14 9:41 ` Geert Uytterhoeven
2023-07-14 9:41 ` Geert Uytterhoeven
2023-07-14 9:48 ` Javier Martinez Canillas
2023-07-14 9:48 ` Javier Martinez Canillas
2023-07-21 22:39 ` Javier Martinez Canillas
2023-07-21 22:39 ` Javier Martinez Canillas
2023-07-13 13:17 ` [PATCH 2/8] drm/dumb-buffers: Fix drm_mode_create_dumb() for bpp < 8 Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 9:50 ` Javier Martinez Canillas
2023-07-14 9:50 ` Javier Martinez Canillas
2023-07-13 13:17 ` [PATCH/RFC 3/8] drm/ssd130x: Bail out early if data_array is not yet available Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 9:53 ` Javier Martinez Canillas
2023-07-14 9:53 ` Javier Martinez Canillas
2023-07-13 13:17 ` [PATCH 4/8] drm/ssd130x: Add support for DRM_FORMAT_R1 Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 10:14 ` Javier Martinez Canillas
2023-07-14 10:14 ` Javier Martinez Canillas
2023-07-14 11:26 ` Geert Uytterhoeven
2023-07-14 11:26 ` Geert Uytterhoeven
2023-07-14 12:35 ` Javier Martinez Canillas
2023-07-14 12:35 ` Javier Martinez Canillas
2023-07-14 12:43 ` Geert Uytterhoeven
2023-07-14 12:43 ` Geert Uytterhoeven
2023-07-14 13:08 ` Javier Martinez Canillas
2023-07-14 13:08 ` Javier Martinez Canillas
2023-07-13 13:17 ` [PATCH 5/8] drm/client: Convert drm_mode_create_dumb() to drm_mode_addfb2() Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 10:16 ` Javier Martinez Canillas
2023-07-14 10:16 ` Javier Martinez Canillas
2023-07-14 11:01 ` Simon Ser
2023-07-14 11:01 ` Simon Ser
2023-07-14 11:29 ` Geert Uytterhoeven
2023-07-14 11:29 ` Geert Uytterhoeven
2023-07-13 13:17 ` [PATCH 6/8] drm/fb-helper: Pass buffer format via drm_fb_helper_surface_size Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 10:25 ` Javier Martinez Canillas
2023-07-14 10:25 ` Javier Martinez Canillas
2023-07-14 11:32 ` Geert Uytterhoeven
2023-07-14 11:32 ` Geert Uytterhoeven
2023-07-13 13:17 ` [PATCH 7/8] drm/fb-helper: Add support for DRM_FORMAT_R1 Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 10:31 ` Javier Martinez Canillas
2023-07-14 10:31 ` Javier Martinez Canillas
2023-07-13 13:17 ` [PATCH 8/8] drm/ssd130x: Switch preferred_bpp/depth to 1 Geert Uytterhoeven
2023-07-13 13:17 ` Geert Uytterhoeven
2023-07-14 10:32 ` Javier Martinez Canillas
2023-07-14 10:32 ` Javier Martinez Canillas
2023-07-16 13:30 ` [PATCH 0/8] drm: fb-helper/ssd130x: Add support for DRM_FORMAT_R1 Javier Martinez Canillas
2023-07-16 13:30 ` Javier Martinez Canillas
2023-07-17 8:07 ` Geert Uytterhoeven
2023-07-17 8:07 ` Geert Uytterhoeven
2023-07-17 9:13 ` Javier Martinez Canillas
2023-07-17 9:13 ` Javier Martinez Canillas
2023-07-17 9:19 ` Geert Uytterhoeven
2023-07-17 9:19 ` Geert Uytterhoeven
2023-07-17 9:33 ` Javier Martinez Canillas
2023-07-17 9:33 ` Javier Martinez Canillas
2023-07-17 10:03 ` Geert Uytterhoeven
2023-07-17 10:03 ` Geert Uytterhoeven
2023-07-17 10:11 ` Javier Martinez Canillas
2023-07-17 10:11 ` Javier Martinez Canillas
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=cover.1689252746.git.geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
/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.