Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-21 Thread Maarten Lankhorst
Op 20-03-2019 om 19:22 schreef Sean Paul:
> On Tue, Mar 19, 2019 at 01:17:02PM +0100, Maarten Lankhorst wrote:
>> There has unfortunately been a conflict with the following 3 commits:
>>
>> commit e9961ab95af81b8d29054361cd5f0c575102cf87
>> Author: Ayan Kumar Halder 
>> Date:   Fri Nov 9 17:21:12 2018 +
>> drm: Added a new format DRM_FORMAT_XVYU2101010
>>
>> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
>> Author: Brian Starkey 
>> Date:   Fri Oct 5 10:27:00 2018 +0100
>>
>> drm/fourcc: Add AFBC yuv fourccs for Mali
>>
>> and
>>
>> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
>> Author: Swati Sharma 
>> Date:   Mon Mar 4 17:26:33 2019 +0530
>>
>> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
>>
>> Unfortunately gcc didn't warn about the redefinitions, because the
>>
>> Fix this by using new XYVU for i915, without alpha, and making the
>> Y41x definitions match msdn, with alpha.
>>
>> Fortunately we caught it early, and the conflict hasn't even landed in
>> drm-next yet.
>>
>> Signed-off-by: Maarten Lankhorst 
> Please fixup the commit message oops that ajax pointed out. With that,
>
> Acked-by: Sean Paul 

Thanks, pushed to drm-misc-next. :)

~Maarten

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-20 Thread Maarten Lankhorst
Op 20-03-2019 om 16:48 schreef Adam Jackson:
> On Tue, 2019-03-19 at 13:17 +0100, Maarten Lankhorst wrote:
>> There has unfortunately been a conflict with the following 3 commits:
>>
>> commit e9961ab95af81b8d29054361cd5f0c575102cf87
>> Author: Ayan Kumar Halder 
>> Date:   Fri Nov 9 17:21:12 2018 +
>> drm: Added a new format DRM_FORMAT_XVYU2101010
>>
>> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
>> Author: Brian Starkey 
>> Date:   Fri Oct 5 10:27:00 2018 +0100
>>
>> drm/fourcc: Add AFBC yuv fourccs for Mali
>>
>> and
>>
>> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
>> Author: Swati Sharma 
>> Date:   Mon Mar 4 17:26:33 2019 +0530
>>
>> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
>>
>> Unfortunately gcc didn't warn about the redefinitions, because the
>>
> ... sentence got cut off here.
>
> - ajax
>
... double defines were the set to same value, and gcc apparently no longer 
warns about that.

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-20 Thread Adam Jackson
On Tue, 2019-03-19 at 13:17 +0100, Maarten Lankhorst wrote:
> There has unfortunately been a conflict with the following 3 commits:
> 
> commit e9961ab95af81b8d29054361cd5f0c575102cf87
> Author: Ayan Kumar Halder 
> Date:   Fri Nov 9 17:21:12 2018 +
> drm: Added a new format DRM_FORMAT_XVYU2101010
> 
> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
> Author: Brian Starkey 
> Date:   Fri Oct 5 10:27:00 2018 +0100
> 
> drm/fourcc: Add AFBC yuv fourccs for Mali
> 
> and
> 
> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
> Author: Swati Sharma 
> Date:   Mon Mar 4 17:26:33 2019 +0530
> 
> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
> 
> Unfortunately gcc didn't warn about the redefinitions, because the
>

... sentence got cut off here.

- ajax

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-20 Thread Maarten Lankhorst
Op 19-03-2019 om 17:18 schreef Ville Syrjälä:
> On Tue, Mar 19, 2019 at 05:06:36PM +0100, Maarten Lankhorst wrote:
>> Op 19-03-2019 om 14:02 schreef Ville Syrjälä:
>>> On Tue, Mar 19, 2019 at 01:17:02PM +0100, Maarten Lankhorst wrote:
 There has unfortunately been a conflict with the following 3 commits:

 commit e9961ab95af81b8d29054361cd5f0c575102cf87
 Author: Ayan Kumar Halder 
 Date:   Fri Nov 9 17:21:12 2018 +
 drm: Added a new format DRM_FORMAT_XVYU2101010

 commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
 Author: Brian Starkey 
 Date:   Fri Oct 5 10:27:00 2018 +0100

 drm/fourcc: Add AFBC yuv fourccs for Mali

 and

 commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
 Author: Swati Sharma 
 Date:   Mon Mar 4 17:26:33 2019 +0530

 drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc

 Unfortunately gcc didn't warn about the redefinitions, because the

 Fix this by using new XYVU for i915, without alpha, and making the
 Y41x definitions match msdn, with alpha.
>>> The naming of all these is rather unfortunate because now the alpha vs.
>>> non-alpha formats have totally different looking names :( Fourccs are
>>> stupid!
>>>
 Fortunately we caught it early, and the conflict hasn't even landed in
 drm-next yet.

 Signed-off-by: Maarten Lankhorst 
 Cc: Brian Starkey 
 Cc: Swati Sharma 
 Cc: Ayan Kumar Halder 
 Cc: mal...@foss.arm.com
 Cc: Daniel Vetter 
 Cc: Maxime Ripard 
 Cc: Sean Paul 
 Cc: Dave Airlie 
 Cc: Liviu Dudau 
 ---
  drivers/gpu/drm/drm_fourcc.c | 12 +--
  drivers/gpu/drm/i915/intel_display.c | 18 -
  drivers/gpu/drm/i915/intel_sprite.c  | 30 ++--
  include/uapi/drm/drm_fourcc.h| 21 +--
  4 files changed, 41 insertions(+), 40 deletions(-)

 diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
 index b914b16db9b2..6ea55fb4526d 100644
 --- a/drivers/gpu/drm/drm_fourcc.c
 +++ b/drivers/gpu/drm/drm_fourcc.c
 @@ -229,17 +229,17 @@ const struct drm_format_info *__drm_format_info(u32 
 format)
{ .format = DRM_FORMAT_UYVY,.depth = 0,  
 .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
 },
{ .format = DRM_FORMAT_VYUY,.depth = 0,  
 .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
 },
{ .format = DRM_FORMAT_XYUV,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
 },
 -  { .format = DRM_FORMAT_Y210,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
 },
{ .format = DRM_FORMAT_VUY888,  .depth = 0,  
 .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
 },
 -  { .format = DRM_FORMAT_Y410,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
 true, .is_yuv = true },
{ .format = DRM_FORMAT_AYUV,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
 true, .is_yuv = true },
 -  { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
 },
{ .format = DRM_FORMAT_Y210,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
 },
{ .format = DRM_FORMAT_Y212,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
 },
{ .format = DRM_FORMAT_Y216,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
 },
 -  { .format = DRM_FORMAT_Y410,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
 },
 -  { .format = DRM_FORMAT_Y412,.depth = 0,  
 .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
 },
 -  { .format = DRM_FORMAT_Y416,.depth = 0,  
 .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
 },
 +  { .format = DRM_FORMAT_Y410,.depth = 0,  
 .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
 true, .is_yuv = true },
 +  { .format = DRM_FORMAT_Y412,.depth = 0,  
 .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
 true, .is_yuv = true },
 +  { .format = DRM_FORMAT_Y416,.depth = 0,  
 .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub 

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-19 Thread Ville Syrjälä
On Tue, Mar 19, 2019 at 05:06:36PM +0100, Maarten Lankhorst wrote:
> Op 19-03-2019 om 14:02 schreef Ville Syrjälä:
> > On Tue, Mar 19, 2019 at 01:17:02PM +0100, Maarten Lankhorst wrote:
> >> There has unfortunately been a conflict with the following 3 commits:
> >>
> >> commit e9961ab95af81b8d29054361cd5f0c575102cf87
> >> Author: Ayan Kumar Halder 
> >> Date:   Fri Nov 9 17:21:12 2018 +
> >> drm: Added a new format DRM_FORMAT_XVYU2101010
> >>
> >> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
> >> Author: Brian Starkey 
> >> Date:   Fri Oct 5 10:27:00 2018 +0100
> >>
> >> drm/fourcc: Add AFBC yuv fourccs for Mali
> >>
> >> and
> >>
> >> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
> >> Author: Swati Sharma 
> >> Date:   Mon Mar 4 17:26:33 2019 +0530
> >>
> >> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
> >>
> >> Unfortunately gcc didn't warn about the redefinitions, because the
> >>
> >> Fix this by using new XYVU for i915, without alpha, and making the
> >> Y41x definitions match msdn, with alpha.
> > The naming of all these is rather unfortunate because now the alpha vs.
> > non-alpha formats have totally different looking names :( Fourccs are
> > stupid!
> >
> >> Fortunately we caught it early, and the conflict hasn't even landed in
> >> drm-next yet.
> >>
> >> Signed-off-by: Maarten Lankhorst 
> >> Cc: Brian Starkey 
> >> Cc: Swati Sharma 
> >> Cc: Ayan Kumar Halder 
> >> Cc: mal...@foss.arm.com
> >> Cc: Daniel Vetter 
> >> Cc: Maxime Ripard 
> >> Cc: Sean Paul 
> >> Cc: Dave Airlie 
> >> Cc: Liviu Dudau 
> >> ---
> >>  drivers/gpu/drm/drm_fourcc.c | 12 +--
> >>  drivers/gpu/drm/i915/intel_display.c | 18 -
> >>  drivers/gpu/drm/i915/intel_sprite.c  | 30 ++--
> >>  include/uapi/drm/drm_fourcc.h| 21 +--
> >>  4 files changed, 41 insertions(+), 40 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
> >> index b914b16db9b2..6ea55fb4526d 100644
> >> --- a/drivers/gpu/drm/drm_fourcc.c
> >> +++ b/drivers/gpu/drm/drm_fourcc.c
> >> @@ -229,17 +229,17 @@ const struct drm_format_info *__drm_format_info(u32 
> >> format)
> >>{ .format = DRM_FORMAT_UYVY,.depth = 0,  
> >> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
> >> },
> >>{ .format = DRM_FORMAT_VYUY,.depth = 0,  
> >> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
> >> },
> >>{ .format = DRM_FORMAT_XYUV,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
> >> },
> >> -  { .format = DRM_FORMAT_Y210,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
> >> },
> >>{ .format = DRM_FORMAT_VUY888,  .depth = 0,  
> >> .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
> >> },
> >> -  { .format = DRM_FORMAT_Y410,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
> >> true, .is_yuv = true },
> >>{ .format = DRM_FORMAT_AYUV,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
> >> true, .is_yuv = true },
> >> -  { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
> >> },
> >>{ .format = DRM_FORMAT_Y210,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
> >> },
> >>{ .format = DRM_FORMAT_Y212,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
> >> },
> >>{ .format = DRM_FORMAT_Y216,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true 
> >> },
> >> -  { .format = DRM_FORMAT_Y410,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
> >> },
> >> -  { .format = DRM_FORMAT_Y412,.depth = 0,  
> >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
> >> },
> >> -  { .format = DRM_FORMAT_Y416,.depth = 0,  
> >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 
> >> },
> >> +  { .format = DRM_FORMAT_Y410,.depth = 0,  
> >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
> >> true, .is_yuv = true },
> >> +  { .format = DRM_FORMAT_Y412,.depth = 0,  
> >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
> >> true, .is_yuv = true },
> >> +  { .format = DRM_FORMAT_Y416,.depth = 0,  
> >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
> >> true, .is_yuv = true },

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-19 Thread Maarten Lankhorst
Op 19-03-2019 om 14:02 schreef Ville Syrjälä:
> On Tue, Mar 19, 2019 at 01:17:02PM +0100, Maarten Lankhorst wrote:
>> There has unfortunately been a conflict with the following 3 commits:
>>
>> commit e9961ab95af81b8d29054361cd5f0c575102cf87
>> Author: Ayan Kumar Halder 
>> Date:   Fri Nov 9 17:21:12 2018 +
>> drm: Added a new format DRM_FORMAT_XVYU2101010
>>
>> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
>> Author: Brian Starkey 
>> Date:   Fri Oct 5 10:27:00 2018 +0100
>>
>> drm/fourcc: Add AFBC yuv fourccs for Mali
>>
>> and
>>
>> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
>> Author: Swati Sharma 
>> Date:   Mon Mar 4 17:26:33 2019 +0530
>>
>> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
>>
>> Unfortunately gcc didn't warn about the redefinitions, because the
>>
>> Fix this by using new XYVU for i915, without alpha, and making the
>> Y41x definitions match msdn, with alpha.
> The naming of all these is rather unfortunate because now the alpha vs.
> non-alpha formats have totally different looking names :( Fourccs are
> stupid!
>
>> Fortunately we caught it early, and the conflict hasn't even landed in
>> drm-next yet.
>>
>> Signed-off-by: Maarten Lankhorst 
>> Cc: Brian Starkey 
>> Cc: Swati Sharma 
>> Cc: Ayan Kumar Halder 
>> Cc: mal...@foss.arm.com
>> Cc: Daniel Vetter 
>> Cc: Maxime Ripard 
>> Cc: Sean Paul 
>> Cc: Dave Airlie 
>> Cc: Liviu Dudau 
>> ---
>>  drivers/gpu/drm/drm_fourcc.c | 12 +--
>>  drivers/gpu/drm/i915/intel_display.c | 18 -
>>  drivers/gpu/drm/i915/intel_sprite.c  | 30 ++--
>>  include/uapi/drm/drm_fourcc.h| 21 +--
>>  4 files changed, 41 insertions(+), 40 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
>> index b914b16db9b2..6ea55fb4526d 100644
>> --- a/drivers/gpu/drm/drm_fourcc.c
>> +++ b/drivers/gpu/drm/drm_fourcc.c
>> @@ -229,17 +229,17 @@ const struct drm_format_info *__drm_format_info(u32 
>> format)
>>  { .format = DRM_FORMAT_UYVY,.depth = 0,  
>> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>>  { .format = DRM_FORMAT_VYUY,.depth = 0,  
>> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>>  { .format = DRM_FORMAT_XYUV,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>> -{ .format = DRM_FORMAT_Y210,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>>  { .format = DRM_FORMAT_VUY888,  .depth = 0,  
>> .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>> -{ .format = DRM_FORMAT_Y410,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
>> true, .is_yuv = true },
>>  { .format = DRM_FORMAT_AYUV,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
>> true, .is_yuv = true },
>> -{ .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>>  { .format = DRM_FORMAT_Y210,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>>  { .format = DRM_FORMAT_Y212,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>>  { .format = DRM_FORMAT_Y216,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>> -{ .format = DRM_FORMAT_Y410,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>> -{ .format = DRM_FORMAT_Y412,.depth = 0,  
>> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>> -{ .format = DRM_FORMAT_Y416,.depth = 0,  
>> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>> +{ .format = DRM_FORMAT_Y410,.depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
>> true, .is_yuv = true },
>> +{ .format = DRM_FORMAT_Y412,.depth = 0,  
>> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
>> true, .is_yuv = true },
>> +{ .format = DRM_FORMAT_Y416,.depth = 0,  
>> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = 
>> true, .is_yuv = true },
>> +{ .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
>> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>> +{ .format = DRM_FORMAT_XVYU12_16161616, .depth = 0,  
>> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true 

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-19 Thread Ayan Halder
On Tue, Mar 19, 2019 at 01:17:02PM +0100, Maarten Lankhorst wrote:
> There has unfortunately been a conflict with the following 3 commits:
> 
> commit e9961ab95af81b8d29054361cd5f0c575102cf87
> Author: Ayan Kumar Halder 
> Date:   Fri Nov 9 17:21:12 2018 +
> drm: Added a new format DRM_FORMAT_XVYU2101010
> 
> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
> Author: Brian Starkey 
> Date:   Fri Oct 5 10:27:00 2018 +0100
> 
> drm/fourcc: Add AFBC yuv fourccs for Mali
> 
> and
> 
> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
> Author: Swati Sharma 
> Date:   Mon Mar 4 17:26:33 2019 +0530
> 
> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
> 
> Unfortunately gcc didn't warn about the redefinitions, because the
> 
> Fix this by using new XYVU for i915, without alpha, and making the
> Y41x definitions match msdn, with alpha.
> 
> Fortunately we caught it early, and the conflict hasn't even landed in
> drm-next yet.
> 
> Signed-off-by: Maarten Lankhorst 
> Cc: Brian Starkey 
> Cc: Swati Sharma 
> Cc: Ayan Kumar Halder 
> Cc: mal...@foss.arm.com
> Cc: Daniel Vetter 
> Cc: Maxime Ripard 
> Cc: Sean Paul 
> Cc: Dave Airlie 
> Cc: Liviu Dudau 
> ---
>  drivers/gpu/drm/drm_fourcc.c | 12 +--
>  drivers/gpu/drm/i915/intel_display.c | 18 -
>  drivers/gpu/drm/i915/intel_sprite.c  | 30 ++--
>  include/uapi/drm/drm_fourcc.h| 21 +--
>  4 files changed, 41 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
> index b914b16db9b2..6ea55fb4526d 100644
> --- a/drivers/gpu/drm/drm_fourcc.c
> +++ b/drivers/gpu/drm/drm_fourcc.c
> @@ -229,17 +229,17 @@ const struct drm_format_info *__drm_format_info(u32 
> format)
>   { .format = DRM_FORMAT_UYVY,.depth = 0,  
> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_VYUY,.depth = 0,  
> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_XYUV,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y210,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_VUY888,  .depth = 0,  
> .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y410,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
>   { .format = DRM_FORMAT_AYUV,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> - { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y210,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y212,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y216,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y410,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y412,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y416,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> + { .format = DRM_FORMAT_Y410,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> + { .format = DRM_FORMAT_Y412,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> + { .format = DRM_FORMAT_Y416,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> + { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> + { .format = DRM_FORMAT_XVYU12_16161616, .depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> + { .format = DRM_FORMAT_XVYU16161616,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y0L0,.depth = 0,  
> .num_planes = 1,
> 

Re: [Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-19 Thread Ville Syrjälä
On Tue, Mar 19, 2019 at 01:17:02PM +0100, Maarten Lankhorst wrote:
> There has unfortunately been a conflict with the following 3 commits:
> 
> commit e9961ab95af81b8d29054361cd5f0c575102cf87
> Author: Ayan Kumar Halder 
> Date:   Fri Nov 9 17:21:12 2018 +
> drm: Added a new format DRM_FORMAT_XVYU2101010
> 
> commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
> Author: Brian Starkey 
> Date:   Fri Oct 5 10:27:00 2018 +0100
> 
> drm/fourcc: Add AFBC yuv fourccs for Mali
> 
> and
> 
> commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
> Author: Swati Sharma 
> Date:   Mon Mar 4 17:26:33 2019 +0530
> 
> drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
> 
> Unfortunately gcc didn't warn about the redefinitions, because the
> 
> Fix this by using new XYVU for i915, without alpha, and making the
> Y41x definitions match msdn, with alpha.

The naming of all these is rather unfortunate because now the alpha vs.
non-alpha formats have totally different looking names :( Fourccs are
stupid!

> 
> Fortunately we caught it early, and the conflict hasn't even landed in
> drm-next yet.
> 
> Signed-off-by: Maarten Lankhorst 
> Cc: Brian Starkey 
> Cc: Swati Sharma 
> Cc: Ayan Kumar Halder 
> Cc: mal...@foss.arm.com
> Cc: Daniel Vetter 
> Cc: Maxime Ripard 
> Cc: Sean Paul 
> Cc: Dave Airlie 
> Cc: Liviu Dudau 
> ---
>  drivers/gpu/drm/drm_fourcc.c | 12 +--
>  drivers/gpu/drm/i915/intel_display.c | 18 -
>  drivers/gpu/drm/i915/intel_sprite.c  | 30 ++--
>  include/uapi/drm/drm_fourcc.h| 21 +--
>  4 files changed, 41 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
> index b914b16db9b2..6ea55fb4526d 100644
> --- a/drivers/gpu/drm/drm_fourcc.c
> +++ b/drivers/gpu/drm/drm_fourcc.c
> @@ -229,17 +229,17 @@ const struct drm_format_info *__drm_format_info(u32 
> format)
>   { .format = DRM_FORMAT_UYVY,.depth = 0,  
> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_VYUY,.depth = 0,  
> .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_XYUV,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y210,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_VUY888,  .depth = 0,  
> .num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y410,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
>   { .format = DRM_FORMAT_AYUV,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> - { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y210,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y212,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
>   { .format = DRM_FORMAT_Y216,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y410,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y412,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> - { .format = DRM_FORMAT_Y416,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> + { .format = DRM_FORMAT_Y410,.depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> + { .format = DRM_FORMAT_Y412,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> + { .format = DRM_FORMAT_Y416,.depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
> .is_yuv = true },
> + { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
> + { .format = DRM_FORMAT_XVYU12_16161616, .depth = 0,  
> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },

Damn these 10/12 in 16 formats are annoying. 

Maybe it would look nicer to put the 12 at the end?

> +  

[Intel-gfx] [PATCH] drm/fourcc: Fix conflicting Y41x definitions

2019-03-19 Thread Maarten Lankhorst
There has unfortunately been a conflict with the following 3 commits:

commit e9961ab95af81b8d29054361cd5f0c575102cf87
Author: Ayan Kumar Halder 
Date:   Fri Nov 9 17:21:12 2018 +
drm: Added a new format DRM_FORMAT_XVYU2101010

commit 7ba0fee247ee7a36b3bfbed68f6988d980aa3aa3
Author: Brian Starkey 
Date:   Fri Oct 5 10:27:00 2018 +0100

drm/fourcc: Add AFBC yuv fourccs for Mali

and

commit 50bf5d7d595fd0705ef3785f80e679b6da501e5b
Author: Swati Sharma 
Date:   Mon Mar 4 17:26:33 2019 +0530

drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc

Unfortunately gcc didn't warn about the redefinitions, because the

Fix this by using new XYVU for i915, without alpha, and making the
Y41x definitions match msdn, with alpha.

Fortunately we caught it early, and the conflict hasn't even landed in
drm-next yet.

Signed-off-by: Maarten Lankhorst 
Cc: Brian Starkey 
Cc: Swati Sharma 
Cc: Ayan Kumar Halder 
Cc: mal...@foss.arm.com
Cc: Daniel Vetter 
Cc: Maxime Ripard 
Cc: Sean Paul 
Cc: Dave Airlie 
Cc: Liviu Dudau 
---
 drivers/gpu/drm/drm_fourcc.c | 12 +--
 drivers/gpu/drm/i915/intel_display.c | 18 -
 drivers/gpu/drm/i915/intel_sprite.c  | 30 ++--
 include/uapi/drm/drm_fourcc.h| 21 +--
 4 files changed, 41 insertions(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index b914b16db9b2..6ea55fb4526d 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -229,17 +229,17 @@ const struct drm_format_info *__drm_format_info(u32 
format)
{ .format = DRM_FORMAT_UYVY,.depth = 0,  
.num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_VYUY,.depth = 0,  
.num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_XYUV,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
-   { .format = DRM_FORMAT_Y210,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_VUY888,  .depth = 0,  
.num_planes = 1, .cpp = { 3, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
-   { .format = DRM_FORMAT_Y410,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
.is_yuv = true },
{ .format = DRM_FORMAT_AYUV,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
.is_yuv = true },
-   { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_Y210,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_Y212,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_Y216,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true },
-   { .format = DRM_FORMAT_Y410,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
-   { .format = DRM_FORMAT_Y412,.depth = 0,  
.num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
-   { .format = DRM_FORMAT_Y416,.depth = 0,  
.num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+   { .format = DRM_FORMAT_Y410,.depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
.is_yuv = true },
+   { .format = DRM_FORMAT_Y412,.depth = 0,  
.num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
.is_yuv = true },
+   { .format = DRM_FORMAT_Y416,.depth = 0,  
.num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, 
.is_yuv = true },
+   { .format = DRM_FORMAT_XVYU2101010, .depth = 0,  
.num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+   { .format = DRM_FORMAT_XVYU12_16161616, .depth = 0,  
.num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
+   { .format = DRM_FORMAT_XVYU16161616,.depth = 0,  
.num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true },
{ .format = DRM_FORMAT_Y0L0,.depth = 0,  
.num_planes = 1,
  .char_per_block = { 8, 0, 0 }, .block_w = { 2, 0, 0 }, 
.block_h = { 2, 0, 0 },
  .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true },
diff --git a/drivers/gpu/drm/i915/intel_display.c