Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1699594

Re: [PATCH 1/6] drm/tinydrm: Add parameter for MIPI DCS pixel format

From Andy Shevchenko <andy.shevchenko@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/6] drm/tinydrm: Add parameter for MIPI DCS pixel format
Date 2017-07-30 20:20 +0200
Message-ID <u90YO-3NX-5@gated-at.bofh.it> (permalink)
References <u8Frj-6FJ-3@gated-at.bofh.it> <u8Frj-6FJ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jul 29, 2017 at 10:17 PM, David Lechner <david@lechnology.com> wrote:
> This adds a parameter for MIPI DCS pixel format to mipi_dbi_init().
> This is in preparation for supporting displays that don't use a 16bpp
> memory layout.

>  /* MIPI DCS pixel formats */
> -#define MIPI_DCS_PIXEL_FMT_24BIT       7
> -#define MIPI_DCS_PIXEL_FMT_18BIT       6
> -#define MIPI_DCS_PIXEL_FMT_16BIT       5
> -#define MIPI_DCS_PIXEL_FMT_12BIT       3
> -#define MIPI_DCS_PIXEL_FMT_8BIT                2
> -#define MIPI_DCS_PIXEL_FMT_3BIT                1
> +enum mipi_dcs_pixel_format {
> +       MIPI_DCS_PIXEL_FMT_24BIT        = 7,
> +       MIPI_DCS_PIXEL_FMT_18BIT        = 6,
> +       MIPI_DCS_PIXEL_FMT_16BIT        = 5,
> +       MIPI_DCS_PIXEL_FMT_12BIT        = 3,
> +       MIPI_DCS_PIXEL_FMT_8BIT         = 2,
> +       MIPI_DCS_PIXEL_FMT_3BIT         = 1,
> +};

May I ask what prevents us to arrange enums in natural
 ordering (you may keep = X parts, of course)?

-- 
With Best Regards,
Andy Shevchenko

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/6] drm/tinydrm: Add parameter for MIPI DCS pixel format David Lechner <david@lechnology.com> - 2017-07-29 21:20 +0200
  Re: [PATCH 1/6] drm/tinydrm: Add parameter for MIPI DCS pixel format Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-30 20:20 +0200

csiph-web