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]
Message-ID: <CALAqxLWoXT5wQeiMYV8PQAHgvf7inp11WfKgGktz-UHL0Yt0hA@mail.gmail.com>
Date:   Wed, 24 Apr 2019 12:25:36 -0700
From:   John Stultz <john.stultz@...aro.org>
To:     Sam Ravnborg <sam@...nborg.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Xu YiPing <xuyiping@...ilicon.com>,
        David Airlie <airlied@...ux.ie>,
        Chen Feng <puck.chen@...ilicon.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Xinliang Liu <z.liuxinliang@...ilicon.com>,
        Xinwei Kong <kong.kongxinwei@...ilicon.com>,
        Rongrong Zou <zourongrong@...il.com>
Subject: Re: [PATCH 11/25] drm: kirin: Move kirin_crtc, kirin_plane,
 kirin_format to kirin_drm_drv.h

On Wed, Apr 24, 2019 at 9:50 AM Sam Ravnborg <sam@...nborg.org> wrote:
> On Tue, Apr 23, 2019 at 04:20:42PM -0700, John Stultz wrote:
>
> This struct:
> >  /* ade-format info: */
> > -struct ade_format {
> > -     u32 pixel_format;
> > -     enum ade_fb_format ade_format;
> > -};
> > -
> > -static const struct ade_format ade_formats[] = {
> > +static const struct kirin_format ade_formats[] = {
> >       /* 16bpp RGB: */
> >       { DRM_FORMAT_RGB565, ADE_RGB_565 },
> >       { DRM_FORMAT_BGR565, ADE_BGR_565 },
...
> > +
> > +/* kirin-format translate table */
> > +struct kirin_format {
> > +     u32 pixel_format;
> > +     u32 hw_format;
> > +};
> Is renamed.
> The member hw_format is renamed and no longer uses an enum.
> (The sole user of this enum type).

So the enum values are still used, but yes, the type here shifts.

> These changes are not included in the changelog - should they be part of
> this patch?
> And also the change from enum to u32 is not understood.

So the intent is to be able to share the kirin_format structure
between both the kirin620 support and kirin960, where as the
ade_fb_format enum values are tied to the kirin620, the kirin960 has
dpe_fb_formats enum which has different values. So the u32 hw_format
value is just the generic storage for enumerated format types of
either device. So its just a map from generic pixel_format definition
-> hardware specific value for that format.

I'll try to make that change more clear in the commit message, but if
you have ideas for a simpler or cleaner way to do the same, let me
know.

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ