public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Use named initializers for the crc source name array
Date: Thu, 14 Feb 2019 12:33:31 -0800	[thread overview]
Message-ID: <20190214203331.GK31265@intel.com> (raw)
In-Reply-To: <20190214192219.3858-2-ville.syrjala@linux.intel.com>

On Thu, Feb 14, 2019 at 09:22:17PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> We assume that the index of the string in the crc source names
> array matches the enum value for the crc source. Let's use named
> initializers to make sure that is indeed the case even if someone
> rearranges either the enum or the array.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pipe_crc.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
> index a3a3ad760158..fe0ff89b980b 100644
> --- a/drivers/gpu/drm/i915/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
> @@ -31,15 +31,15 @@
>  #include "intel_drv.h"
>  
>  static const char * const pipe_crc_sources[] = {
> -	"none",
> -	"plane1",
> -	"plane2",
> -	"pipe",
> -	"TV",
> -	"DP-B",
> -	"DP-C",
> -	"DP-D",
> -	"auto",
> +	[INTEL_PIPE_CRC_SOURCE_NONE] = "none",
> +	[INTEL_PIPE_CRC_SOURCE_PLANE1] = "plane1",
> +	[INTEL_PIPE_CRC_SOURCE_PLANE2] = "plane2",
> +	[INTEL_PIPE_CRC_SOURCE_PIPE] = "pipe",
> +	[INTEL_PIPE_CRC_SOURCE_TV] = "TV",
> +	[INTEL_PIPE_CRC_SOURCE_DP_B] = "DP-B",
> +	[INTEL_PIPE_CRC_SOURCE_DP_C] = "DP-C",
> +	[INTEL_PIPE_CRC_SOURCE_DP_D] = "DP-D",
> +	[INTEL_PIPE_CRC_SOURCE_AUTO] = "auto",
>  };
>  
>  static int i8xx_pipe_crc_ctl_reg(enum intel_pipe_crc_source *source,
> -- 
> 2.19.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-02-14 20:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 19:22 [PATCH 1/4] drm/i915: Remove the "pf" crc source Ville Syrjala
2019-02-14 19:22 ` [PATCH 2/4] drm/i915: Use named initializers for the crc source name array Ville Syrjala
2019-02-14 20:33   ` Rodrigo Vivi [this message]
2019-02-14 19:22 ` [PATCH 3/4] drm/i915: Remove the broken DP CRC support for g4x Ville Syrjala
2019-02-14 20:38   ` Rodrigo Vivi
2019-02-14 20:43     ` Ville Syrjälä
2019-02-15  2:26   ` Dhinakaran Pandiyan
2019-02-15 12:47     ` Ville Syrjälä
2019-02-15 21:06       ` Dhinakaran Pandiyan
2019-02-15 21:34         ` Ville Syrjälä
2019-02-15 21:43           ` Pandiyan, Dhinakaran
2019-02-18 17:57             ` Ville Syrjälä
2019-02-20 19:32               ` Dhinakaran Pandiyan
2019-02-14 19:22 ` [PATCH 4/4] drm/i915: Extend skl+ crc sources with more planes Ville Syrjala
2019-02-14 20:47   ` Rodrigo Vivi
2019-02-14 21:29     ` Ville Syrjälä
2019-02-14 22:05       ` Rodrigo Vivi
2019-02-15  2:07   ` Dhinakaran Pandiyan
2019-02-20 20:59     ` Ville Syrjälä
2019-02-14 19:35 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: Remove the "pf" crc source Patchwork
2019-02-14 19:37 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-02-14 20:16 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-14 20:33 ` [PATCH 1/4] " Rodrigo Vivi
2019-02-15  1:32 ` Dhinakaran Pandiyan
2019-02-15  1:45   ` Dhinakaran Pandiyan
2019-02-15 12:50     ` Ville Syrjälä
2019-02-15  4:16 ` ✗ Fi.CI.IGT: failure for series starting with [1/4] " Patchwork
2019-02-18 21:07   ` Ville Syrjälä

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=20190214203331.GK31265@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /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