Message ID | 20220913144306.17279-1-brian.starkey@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/fourcc: Fix vsub/hsub for Q410 and Q401 | expand |
On Tue, Sep 13, 2022 at 03:43:06PM +0100, Brian Starkey wrote: > These formats are not subsampled, but that means hsub and vsub should be > 1, not 0. > > Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") > Reported-by: George Kennedy <george.kennedy@oracle.com> > Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com> > Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> Should this be backported into stable releases? How far back to we go? Best regards, Liviu > --- > drivers/gpu/drm/drm_fourcc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > Sorry, I lost track of this - I thought it got fixed after the previous > thread[1]. > > -Brian > > [1] https://lore.kernel.org/all/26fdb955-10c8-a5d6-07b6-85a4374e7754@oracle.com/ > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > index 07741b678798..6768b7d18b6f 100644 > --- a/drivers/gpu/drm/drm_fourcc.c > +++ b/drivers/gpu/drm/drm_fourcc.c > @@ -263,12 +263,12 @@ const struct drm_format_info *__drm_format_info(u32 format) > .vsub = 2, .is_yuv = true }, > { .format = DRM_FORMAT_Q410, .depth = 0, > .num_planes = 3, .char_per_block = { 2, 2, 2 }, > - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, > - .vsub = 0, .is_yuv = true }, > + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, > + .vsub = 1, .is_yuv = true }, > { .format = DRM_FORMAT_Q401, .depth = 0, > .num_planes = 3, .char_per_block = { 2, 2, 2 }, > - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, > - .vsub = 0, .is_yuv = true }, > + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, > + .vsub = 1, .is_yuv = true }, > { .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2, > .char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, > .hsub = 2, .vsub = 2, .is_yuv = true}, > -- > 2.25.1 >
On Tue, Sep 13, 2022 at 04:36:57PM +0100, Liviu Dudau wrote: > On Tue, Sep 13, 2022 at 03:43:06PM +0100, Brian Starkey wrote: > > These formats are not subsampled, but that means hsub and vsub should be > > 1, not 0. > > > > Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") > > Reported-by: George Kennedy <george.kennedy@oracle.com> > > Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com> > > Signed-off-by: Brian Starkey <brian.starkey@arm.com> > > Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> > > Should this be backported into stable releases? How far back to we go? Probably, git says 94b292b27734 is in since 5.10. Could someone merge this so it doesn't get lost again? Thanks, -Brian > > Best regards, > Liviu > > > > --- > > drivers/gpu/drm/drm_fourcc.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > Sorry, I lost track of this - I thought it got fixed after the previous > > thread[1]. > > > > -Brian > > > > [1] https://lore.kernel.org/all/26fdb955-10c8-a5d6-07b6-85a4374e7754@oracle.com/ > > > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > > index 07741b678798..6768b7d18b6f 100644 > > --- a/drivers/gpu/drm/drm_fourcc.c > > +++ b/drivers/gpu/drm/drm_fourcc.c > > @@ -263,12 +263,12 @@ const struct drm_format_info *__drm_format_info(u32 format) > > .vsub = 2, .is_yuv = true }, > > { .format = DRM_FORMAT_Q410, .depth = 0, > > .num_planes = 3, .char_per_block = { 2, 2, 2 }, > > - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, > > - .vsub = 0, .is_yuv = true }, > > + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, > > + .vsub = 1, .is_yuv = true }, > > { .format = DRM_FORMAT_Q401, .depth = 0, > > .num_planes = 3, .char_per_block = { 2, 2, 2 }, > > - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, > > - .vsub = 0, .is_yuv = true }, > > + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, > > + .vsub = 1, .is_yuv = true }, > > { .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2, > > .char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, > > .hsub = 2, .vsub = 2, .is_yuv = true}, > > -- > > 2.25.1 > > > > -- > ==================== > | I would like to | > | fix the world, | > | but they're not | > | giving me the | > \ source code! / > --------------- > ¯\_(ツ)_/¯
On Mon, Sep 26, 2022 at 04:21:19PM +0100, Brian Starkey wrote: > On Tue, Sep 13, 2022 at 04:36:57PM +0100, Liviu Dudau wrote: > > On Tue, Sep 13, 2022 at 03:43:06PM +0100, Brian Starkey wrote: > > > These formats are not subsampled, but that means hsub and vsub should be > > > 1, not 0. > > > > > > Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") > > > Reported-by: George Kennedy <george.kennedy@oracle.com> > > > Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com> > > > Signed-off-by: Brian Starkey <brian.starkey@arm.com> > > > > Reviewed-by: Liviu Dudau <liviu.dudau@arm.com> > > > > Should this be backported into stable releases? How far back to we go? > > Probably, git says 94b292b27734 is in since 5.10. > > Could someone merge this so it doesn't get lost again? I'll merge this into drm-misc-next-fixes this week and notify stable about it. Best regards, Liviu > > Thanks, > -Brian > > > > > Best regards, > > Liviu > > > > > > > --- > > > drivers/gpu/drm/drm_fourcc.c | 8 ++++---- > > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > > > Sorry, I lost track of this - I thought it got fixed after the previous > > > thread[1]. > > > > > > -Brian > > > > > > [1] https://lore.kernel.org/all/26fdb955-10c8-a5d6-07b6-85a4374e7754@oracle.com/ > > > > > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > > > index 07741b678798..6768b7d18b6f 100644 > > > --- a/drivers/gpu/drm/drm_fourcc.c > > > +++ b/drivers/gpu/drm/drm_fourcc.c > > > @@ -263,12 +263,12 @@ const struct drm_format_info *__drm_format_info(u32 format) > > > .vsub = 2, .is_yuv = true }, > > > { .format = DRM_FORMAT_Q410, .depth = 0, > > > .num_planes = 3, .char_per_block = { 2, 2, 2 }, > > > - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, > > > - .vsub = 0, .is_yuv = true }, > > > + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, > > > + .vsub = 1, .is_yuv = true }, > > > { .format = DRM_FORMAT_Q401, .depth = 0, > > > .num_planes = 3, .char_per_block = { 2, 2, 2 }, > > > - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, > > > - .vsub = 0, .is_yuv = true }, > > > + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, > > > + .vsub = 1, .is_yuv = true }, > > > { .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2, > > > .char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, > > > .hsub = 2, .vsub = 2, .is_yuv = true}, > > > -- > > > 2.25.1 > > > > > > > -- > > ==================== > > | I would like to | > > | fix the world, | > > | but they're not | > > | giving me the | > > \ source code! / > > --------------- > > ¯\_(ツ)_/¯
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 07741b678798..6768b7d18b6f 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -263,12 +263,12 @@ const struct drm_format_info *__drm_format_info(u32 format) .vsub = 2, .is_yuv = true }, { .format = DRM_FORMAT_Q410, .depth = 0, .num_planes = 3, .char_per_block = { 2, 2, 2 }, - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, - .vsub = 0, .is_yuv = true }, + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, + .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_Q401, .depth = 0, .num_planes = 3, .char_per_block = { 2, 2, 2 }, - .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0, - .vsub = 0, .is_yuv = true }, + .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 1, + .vsub = 1, .is_yuv = true }, { .format = DRM_FORMAT_P030, .depth = 0, .num_planes = 2, .char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true},
These formats are not subsampled, but that means hsub and vsub should be 1, not 0. Fixes: 94b292b27734 ("drm: drm_fourcc: add NV15, Q410, Q401 YUV formats") Reported-by: George Kennedy <george.kennedy@oracle.com> Reported-by: butt3rflyh4ck <butterflyhuangxx@gmail.com> Signed-off-by: Brian Starkey <brian.starkey@arm.com> --- drivers/gpu/drm/drm_fourcc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Sorry, I lost track of this - I thought it got fixed after the previous thread[1]. -Brian [1] https://lore.kernel.org/all/26fdb955-10c8-a5d6-07b6-85a4374e7754@oracle.com/