public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux/m68k <linux-m68k@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Javier Martinez Canillas <javierm@redhat.com>
Subject: Re: [PATCH v3 01/10] drm/fourcc: Add drm_format_info_bpp() helper
Date: Thu, 11 Aug 2022 21:30:16 +0200	[thread overview]
Message-ID: <YvVYyKZNDGfhGjb5@ravnborg.org> (raw)
In-Reply-To: <CAMuHMdVD37MCXau4w87=x_jk9j-NMJCmu0d9qPuMqmHA_vPQRQ@mail.gmail.com>

Hi Geert.

> > >
> > > Yeah I don't think we should describe these with bpp or cpp or anything
> > > like that. bpp < 8 makes sense since that's how this has been done since
> > > decades, but trying to extend these to funny new formats is a bad idea.
> > > This is also why cpp and depth refuse to compute these (or at least
> > > should).
> >
> > Daniel and I discussed this on irc. Let me try to recap here.
> > Using the bits per pixel info from drm_format_info is something we shall
> > try to avoid as this is often a sign of the wrong abstraction/design (my
> > words based on the irc talk).
> > So we shall limit the use of drm_format_info_bpp() to what we need now,
> > thus blocky formats should not be supported - to try to avoid seeing
> > this used more than necessary.
> >
> > Daniel suggested a rename to drm_format_info_legacy_bpp() to make it
> > obvious that this is often/always the wrong solution. I did not jump on
> > doing the rename as I do not know stuff good enough to tell people what
> > to use when this is not the right solution. The rename is simple, it is
> > the follow-up that keep me away.
> >
> > On top of this there is a few formats in drm_drourcc that has a depth
> > field set which should be dropped. .depth is only for the few legacy
> > formats where it is used today.
> >
> > We would also like to convert the fbdev helpers to drm_format_info,
> > and doing so will likely teach us a bit more what we need and what we
> > can drop.
> >
> > Geert - can you give drm_format_info_bpp() a spin so it is limited to
> > the formats used now (not the blocky ones).
> 
> You mean return 0 if char_per_block[] > 1?
if char_per_block[] > 1 AND block_w[] > 0 AND block_h[] > 0 should be
enough.

> I'm not sure it's actually safe to do so (and make this change this late
> in the development cycle), as this is used in drm_client_buffer_create(),
> drm_client_buffer_addfb(), and drm_mode_getfb().

drm_client_buffer_create() and drm_client_buffer_addfb() both get their
format from  drm_mode_legacy_fb_format() which do not produce any blocky
formats - so they are good.

drm_mode_getfb() looks up a framebuffer originally created using one of
the above (I think), so here it should also be fine.
I do not see the need to push this to fixes, so it has a full cycle to
mature if it causes issues.

	Sam

  reply	other threads:[~2022-08-11 19:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 18:20 [PATCH v3 00/10] drm: Add support for low-color frame buffer formats Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH v3 01/10] drm/fourcc: Add drm_format_info_bpp() helper Geert Uytterhoeven
2022-08-10 15:59   ` Daniel Vetter
2022-08-11  7:59     ` Geert Uytterhoeven
2022-08-11 16:11       ` Daniel Vetter
2022-08-11 18:29         ` Sam Ravnborg
2022-08-11 18:49           ` Geert Uytterhoeven
2022-08-11 19:30             ` Sam Ravnborg [this message]
2022-07-08 18:20 ` [PATCH v3 02/10] drm/fourcc: Add drm_format_info.is_color_indexed flag Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH v3 03/10] drm/client: Use actual bpp when allocating frame buffers Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH v3 04/10] drm/framebuffer: Use actual bpp for DRM_IOCTL_MODE_GETFB Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH v3 05/10] drm/fourcc: Add DRM_FORMAT_C[124] Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH v3 06/10] drm/fb-helper: Add support for DRM_FORMAT_C[124] Geert Uytterhoeven
2022-07-11  8:42   ` Thomas Zimmermann
2022-07-08 18:20 ` [PATCH v3 07/10] drm/gem-fb-helper: Use actual bpp for size calculations Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH v3 08/10] drm/fourcc: Clarify the meaning of single-channel "red" Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH/RFC v3 09/10] drm/fourcc: Add DRM_FORMAT_R[124] Geert Uytterhoeven
2022-07-08 18:20 ` [PATCH/RFC v3 10/10] drm/fourcc: Add DRM_FORMAT_D[1248] Geert Uytterhoeven
2022-07-09 13:38 ` [PATCH v3 00/10] drm: Add support for low-color frame buffer formats Sam Ravnborg
2022-07-11  8:50   ` Thomas Zimmermann
2022-07-11  9:12     ` Sam Ravnborg
2022-08-10 16:02       ` Daniel Vetter

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=YvVYyKZNDGfhGjb5@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox