[PATCH 1/2] drm/i915/gvt: Rename struct 'pixel_format' to 'gvt_pixel_format'

Hou Wenlong posted 2 patches 3 weeks, 1 day ago
[PATCH 1/2] drm/i915/gvt: Rename struct 'pixel_format' to 'gvt_pixel_format'
Posted by Hou Wenlong 3 weeks, 1 day ago
Rename the local struct 'pixel_format' to 'gvt_pixel_format' to avoid
potential name conflicts with the 'pixel_format' struct defined in
include/video/pixel_format.h.

Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
---
 drivers/gpu/drm/i915/gvt/fb_decoder.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/fb_decoder.c b/drivers/gpu/drm/i915/gvt/fb_decoder.c
index d7abf38df532..25fffc77f138 100644
--- a/drivers/gpu/drm/i915/gvt/fb_decoder.c
+++ b/drivers/gpu/drm/i915/gvt/fb_decoder.c
@@ -48,13 +48,13 @@
 #include "i915_reg.h"
 
 #define PRIMARY_FORMAT_NUM	16
-struct pixel_format {
+struct gvt_pixel_format {
 	int drm_format;	/* Pixel format in DRM definition */
 	int bpp; /* Bits per pixel, 0 indicates invalid */
 	const char *desc; /* The description */
 };
 
-static const struct pixel_format bdw_pixel_formats[] = {
+static const struct gvt_pixel_format bdw_pixel_formats[] = {
 	{DRM_FORMAT_C8, 8, "8-bit Indexed"},
 	{DRM_FORMAT_RGB565, 16, "16-bit BGRX (5:6:5 MSB-R:G:B)"},
 	{DRM_FORMAT_XRGB8888, 32, "32-bit BGRX (8:8:8:8 MSB-X:R:G:B)"},
@@ -67,7 +67,7 @@ static const struct pixel_format bdw_pixel_formats[] = {
 	{}
 };
 
-static const struct pixel_format skl_pixel_formats[] = {
+static const struct gvt_pixel_format skl_pixel_formats[] = {
 	{DRM_FORMAT_YUYV, 16, "16-bit packed YUYV (8:8:8:8 MSB-V:Y2:U:Y1)"},
 	{DRM_FORMAT_UYVY, 16, "16-bit packed UYVY (8:8:8:8 MSB-Y2:V:Y1:U)"},
 	{DRM_FORMAT_YVYU, 16, "16-bit packed YVYU (8:8:8:8 MSB-U:Y2:V:Y1)"},
-- 
2.31.1
Re: [PATCH 1/2] drm/i915/gvt: Rename struct 'pixel_format' to 'gvt_pixel_format'
Posted by Jani Nikula 3 weeks ago
On Mon, 16 Mar 2026, Hou Wenlong <houwenlong.hwl@antgroup.com> wrote:
> Rename the local struct 'pixel_format' to 'gvt_pixel_format' to avoid
> potential name conflicts with the 'pixel_format' struct defined in
> include/video/pixel_format.h.
>
> Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

and ack for merging via whichever branch you prefer.

> ---
>  drivers/gpu/drm/i915/gvt/fb_decoder.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/fb_decoder.c b/drivers/gpu/drm/i915/gvt/fb_decoder.c
> index d7abf38df532..25fffc77f138 100644
> --- a/drivers/gpu/drm/i915/gvt/fb_decoder.c
> +++ b/drivers/gpu/drm/i915/gvt/fb_decoder.c
> @@ -48,13 +48,13 @@
>  #include "i915_reg.h"
>  
>  #define PRIMARY_FORMAT_NUM	16
> -struct pixel_format {
> +struct gvt_pixel_format {
>  	int drm_format;	/* Pixel format in DRM definition */
>  	int bpp; /* Bits per pixel, 0 indicates invalid */
>  	const char *desc; /* The description */
>  };
>  
> -static const struct pixel_format bdw_pixel_formats[] = {
> +static const struct gvt_pixel_format bdw_pixel_formats[] = {
>  	{DRM_FORMAT_C8, 8, "8-bit Indexed"},
>  	{DRM_FORMAT_RGB565, 16, "16-bit BGRX (5:6:5 MSB-R:G:B)"},
>  	{DRM_FORMAT_XRGB8888, 32, "32-bit BGRX (8:8:8:8 MSB-X:R:G:B)"},
> @@ -67,7 +67,7 @@ static const struct pixel_format bdw_pixel_formats[] = {
>  	{}
>  };
>  
> -static const struct pixel_format skl_pixel_formats[] = {
> +static const struct gvt_pixel_format skl_pixel_formats[] = {
>  	{DRM_FORMAT_YUYV, 16, "16-bit packed YUYV (8:8:8:8 MSB-V:Y2:U:Y1)"},
>  	{DRM_FORMAT_UYVY, 16, "16-bit packed UYVY (8:8:8:8 MSB-Y2:V:Y1:U)"},
>  	{DRM_FORMAT_YVYU, 16, "16-bit packed YVYU (8:8:8:8 MSB-U:Y2:V:Y1)"},

-- 
Jani Nikula, Intel