lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 15 Mar 2022 14:37:12 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Javier Martinez Canillas <javierm@...hat.com>,
        Noralf Trønnes <noralf@...nnes.org>,
        DRI Development <dri-devel@...ts.freedesktop.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] drm/format-helper: Rename drm_fb_xrgb8888_to_mono_reversed()

Hi Andy,

On Tue, Mar 15, 2022 at 2:33 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> On Tue, Mar 15, 2022 at 12:07:03PM +0100, Geert Uytterhoeven wrote:
> > There is no "reversed" handling in drm_fb_xrgb8888_to_mono_reversed():
> > the function just converts from color to grayscale, and reduces the
> > number of grayscale levels from 256 to 2 (i.e. brightness 0-127 is
> > mapped to 0, 128-255 to 1).  All "reversed" handling is done in the
> > repaper driver, where this function originated.
> >
> > Hence make this clear by renaming drm_fb_xrgb8888_to_mono_reversed() to
> > drm_fb_xrgb8888_to_mono(), and documenting the black/white pixel
> > mapping.
>
> W/ or w/o the below remark being addressed
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Thanks!

> > --- a/drivers/gpu/drm/drm_format_helper.c
> > +++ b/drivers/gpu/drm/drm_format_helper.c
> > @@ -692,12 +692,12 @@ void drm_fb_xrgb8888_to_mono_reversed(void *dst, unsigned int dst_pitch, const v
> >       for (y = 0; y < lines; y++) {
> >               src32 = memcpy(src32, vaddr, len_src32);
> >               drm_fb_xrgb8888_to_gray8_line(gray8, src32, linepixels);
> > -             drm_fb_gray8_to_mono_reversed_line(mono, gray8, dst_pitch,
> > -                                                start_offset, end_len);
>
> > +             drm_fb_gray8_to_mono_line(mono, gray8, dst_pitch, start_offset,
> > +                                       end_len);
>
> Can be one line now (definition is already quite behind 80 limit).

Yeah, but the code isn't.
Nevertheless, this will be shortened in a later patch.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ