From: Pekka Paalanen <ppaalanen@gmail.com>
To: Igor Torrente <igormtorrente@gmail.com>
Cc: hamohammed.sa@gmail.com, Thomas Zimmermann <tzimmermann@suse.de>,
rodrigosiqueiramelo@gmail.com, airlied@linux.ie,
dri-devel@lists.freedesktop.org, melissa.srw@gmail.com,
~lkcamp/patches@lists.sr.ht
Subject: Re: [PATCH v4 9/9] drm: vkms: Add support to the RGB565 format
Date: Fri, 25 Feb 2022 11:43:45 +0200 [thread overview]
Message-ID: <20220225114345.0cbe4432@eldfell> (raw)
In-Reply-To: <CAOA8r4G5aMSv9o508B9icdNuaKF4-9zU9KsTW1nG1wCZ6nKfbA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2864 bytes --]
On Thu, 24 Feb 2022 22:03:42 -0300
Igor Torrente <igormtorrente@gmail.com> wrote:
> Hi Pekka,
>
> On Thu, Feb 10, 2022 at 6:50 AM Pekka Paalanen <ppaalanen@gmail.com> wrote:
>
> > On Fri, 21 Jan 2022 18:38:31 -0300
> > Igor Torrente <igormtorrente@gmail.com> wrote:
> >
> > > Adds this common format to vkms.
> > >
> > > This commit also adds new helper macros to deal with fixed-point
> > > arithmetic.
> > >
> > > It was done to improve the precision of the conversion to ARGB16161616
> > > since the "conversion ratio" is not an integer.
> > >
> > > Signed-off-by: Igor Torrente <igormtorrente@gmail.com>
> > > ---
> > > V3: Adapt the handlers to the new format introduced in patch 7 V3.
> > > ---
> > > drivers/gpu/drm/vkms/vkms_formats.c | 74 +++++++++++++++++++++++++++
> > > drivers/gpu/drm/vkms/vkms_formats.h | 6 +++
> > > drivers/gpu/drm/vkms/vkms_plane.c | 6 ++-
> > > drivers/gpu/drm/vkms/vkms_writeback.c | 3 +-
> > > 4 files changed, 86 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/vkms/vkms_formats.c
> > b/drivers/gpu/drm/vkms/vkms_formats.c
> > > index 661da39d1276..dc612882dd8c 100644
> > > --- a/drivers/gpu/drm/vkms/vkms_formats.c
> > > +++ b/drivers/gpu/drm/vkms/vkms_formats.c
> > > @@ -11,6 +11,8 @@ format_transform_func get_fmt_transform_function(u32
> > format)
> > > return &get_ARGB16161616;
> > > else if (format == DRM_FORMAT_XRGB16161616)
> > > return &XRGB16161616_to_ARGB16161616;
> > > + else if (format == DRM_FORMAT_RGB565)
> > > + return &RGB565_to_ARGB16161616;
> > > else
> > > return &XRGB8888_to_ARGB16161616;
> > > }
> > > @@ -23,6 +25,8 @@ format_transform_func
> > get_wb_fmt_transform_function(u32 format)
> > > return &convert_to_ARGB16161616;
> > > else if (format == DRM_FORMAT_XRGB16161616)
> > > return &convert_to_XRGB16161616;
> > > + else if (format == DRM_FORMAT_RGB565)
> > > + return &convert_to_RGB565;
> > > else
> > > return &convert_to_XRGB8888;
> > > }
> > > @@ -33,6 +37,26 @@ static int pixel_offset(struct vkms_frame_info
> > *frame_info, int x, int y)
> > > + (x * frame_info->cpp);
> > > }
> > >
> > > +/*
> > > + * FP stands for _Fixed Point_ and **not** _Float Point_
> >
> > Is it common in the kernel that FP always means fixed-point?
> >
>
> I cannot say for sure, but I don't think so. I put it for people like me
> that goes automatically to Floating-Point because never worked with
> fixed-point before.
Indeed, so do not use "FP" at all as an abbreviation, please. Use a
name or abbreviation that does not need a comment to prevent easy
misunderstandings.
Thanks,
pq
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-02-25 9:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-21 21:38 [PATCH v4 0/9] Add new formats support to vkms Igor Torrente
2022-01-21 21:38 ` [PATCH v4 1/9] drm: vkms: Replace the deprecated drm_mode_config_init Igor Torrente
2022-02-08 10:02 ` Melissa Wen
2022-01-21 21:38 ` [PATCH v4 2/9] drm: vkms: Alloc the compose frame using vzalloc Igor Torrente
2022-02-08 10:14 ` Melissa Wen
2022-01-21 21:38 ` [PATCH v4 3/9] drm: vkms: Replace hardcoded value of `vkms_composer.map` to DRM_FORMAT_MAX_PLANES Igor Torrente
2022-02-08 10:16 ` Melissa Wen
2022-01-21 21:38 ` [PATCH v4 4/9] drm: vkms: Rename `vkms_composer` to `vkms_frame_info` Igor Torrente
2022-02-08 10:20 ` Melissa Wen
2022-01-21 21:38 ` [PATCH v4 5/9] drm: vkms: Add fb information to `vkms_writeback_job` Igor Torrente
2022-02-08 10:22 ` Melissa Wen
2022-01-21 21:38 ` [PATCH v4 6/9] drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation Igor Torrente
2022-01-21 21:38 ` [PATCH v4 7/9] drm: vkms: Refactor the plane composer to accept new formats Igor Torrente
2022-02-08 10:40 ` Melissa Wen
2022-02-09 0:58 ` Igor Torrente
2022-02-09 21:45 ` Melissa Wen
2022-02-21 1:02 ` Igor Torrente
2022-02-21 9:18 ` Pekka Paalanen
2022-02-22 1:13 ` Igor Torrente
2022-02-22 9:26 ` Pekka Paalanen
2022-02-10 9:37 ` Pekka Paalanen
2022-02-25 0:43 ` Igor Torrente
2022-02-25 9:38 ` Pekka Paalanen
2022-02-27 14:19 ` Igor Torrente
2022-01-21 21:38 ` [PATCH v4 8/9] drm: vkms: Adds XRGB_16161616 and ARGB_1616161616 formats Igor Torrente
2022-01-21 21:38 ` [PATCH v4 9/9] drm: vkms: Add support to the RGB565 format Igor Torrente
2022-02-08 10:50 ` Melissa Wen
2022-02-10 9:50 ` Pekka Paalanen
2022-02-25 1:03 ` Igor Torrente
2022-02-25 9:43 ` Pekka Paalanen [this message]
2022-02-08 11:03 ` [PATCH v4 0/9] Add new formats support to vkms Melissa Wen
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=20220225114345.0cbe4432@eldfell \
--to=ppaalanen@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=igormtorrente@gmail.com \
--cc=melissa.srw@gmail.com \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=tzimmermann@suse.de \
--cc=~lkcamp/patches@lists.sr.ht \
/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.