All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height for yuv planar
@ 2018-03-21  4:57 Vidya Srinivas
  0 siblings, 0 replies; 5+ messages in thread
From: Vidya Srinivas @ 2018-03-21  4:57 UTC (permalink / raw)
  To: igt-dev; +Cc: sunil.kamath

fb src height to be more than minimum scanlines for planar
formats like NV12. Changing the fb height to 19
so that the height is more than min value after KMD adjustments

Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_plane_scaling.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 36fcfc0..db357fa 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -131,8 +131,10 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
 
 	/* create buffer in the range of  min and max source side limit.*/
 	width = height = 9;
-	if (pixel_format == DRM_FORMAT_NV12)
-		width = height = 17;
+	if (pixel_format == DRM_FORMAT_NV12) {
+		width = 19;
+		height = 19;
+	}
 	igt_create_color_fb(display->drm_fd, width, height,
 		       pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);
 	igt_plane_set_fb(plane, &d->fb[0]);
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height for yuv planar
  2018-03-21 11:38 ` Maarten Lankhorst
@ 2018-03-23  4:25   ` Srinivas, Vidya
  0 siblings, 0 replies; 5+ messages in thread
From: Srinivas, Vidya @ 2018-03-23  4:25 UTC (permalink / raw)
  To: Maarten Lankhorst, igt-dev; +Cc: Kamath, Sunil



> -----Original Message-----
> From: Maarten Lankhorst [mailto:maarten.lankhorst@linux.intel.com]
> Sent: Wednesday, March 21, 2018 5:08 PM
> To: Srinivas, Vidya <vidya.srinivas@intel.com>; igt-dev@lists.freedesktop.org
> Cc: Kamath, Sunil <sunil.kamath@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>
> Subject: Re: [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height
> for yuv planar
> 
> Op 21-03-18 om 06:06 schreef Vidya Srinivas:
> > fb src height to be more than minimum scanlines for planar formats
> > like NV12. Changing the fb height to 19 so that the height is more
> > than min value after KMD adjustments
> >
> > Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> > ---
> >  tests/kms_plane_scaling.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> > index 36fcfc0..027b42e 100644
> > --- a/tests/kms_plane_scaling.c
> > +++ b/tests/kms_plane_scaling.c
> > @@ -130,9 +130,11 @@ static void check_scaling_pipe_plane_rot(data_t
> *d, igt_plane_t *plane,
> >  	mode = igt_output_get_mode(output);
> >
> >  	/* create buffer in the range of  min and max source side limit.*/
> > -	width = height = 9;
> >  	if (pixel_format == DRM_FORMAT_NV12)
> > -		width = height = 17;
> > +		width = height = 19;
> > +	else
> > +		width = height = 9;
> > +
> >  	igt_create_color_fb(display->drm_fd, width, height,
> >  		       pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);
> >  	igt_plane_set_fb(plane, &d->fb[0]);
> 
> But in all seriousness, if we create underruns should we simply refuse to
> show NV12 with -EINVAL if it's not correctly aligned?
> 
> I can understand that we don't do it for legacy formats, but don't see why
> we can't do it for NV12. Especially since it's a corner case that
> 
> could be understandable if you know the hw format as well.
> 

True. We could. But the results are inconsistent as per observation currently.
As in: even when the final calculated width and height (just before writing to 
Plane size) is multiplier of 4 (like 28x28), we saw underrun.

But as per your suggestion, when we use 19x19 and add checks for primary plane
and adjustments which were being done for sprite, no underruns are seen.
Can we go ahead with this and KMD changes submitted on trybot? Could you please have a check?
https://patchwork.freedesktop.org/series/38919/ - please check rev 16 of the series.
Thanks much.

Regards
Vidya


> ~Maarten

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height for yuv planar
  2018-03-21  5:06 Vidya Srinivas
@ 2018-03-21 11:38 ` Maarten Lankhorst
  2018-03-23  4:25   ` Srinivas, Vidya
  0 siblings, 1 reply; 5+ messages in thread
From: Maarten Lankhorst @ 2018-03-21 11:38 UTC (permalink / raw)
  To: Vidya Srinivas, igt-dev; +Cc: sunil.kamath

Op 21-03-18 om 06:06 schreef Vidya Srinivas:
> fb src height to be more than minimum scanlines for planar
> formats like NV12. Changing the fb height to 19
> so that the height is more than min value after KMD adjustments
>
> Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
>  tests/kms_plane_scaling.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 36fcfc0..027b42e 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -130,9 +130,11 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
>  	mode = igt_output_get_mode(output);
>  
>  	/* create buffer in the range of  min and max source side limit.*/
> -	width = height = 9;
>  	if (pixel_format == DRM_FORMAT_NV12)
> -		width = height = 17;
> +		width = height = 19;
> +	else
> +		width = height = 9;
> +
>  	igt_create_color_fb(display->drm_fd, width, height,
>  		       pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);
>  	igt_plane_set_fb(plane, &d->fb[0]);

But in all seriousness, if we create underruns should we simply refuse to show NV12 with -EINVAL if it's not correctly aligned?

I can understand that we don't do it for legacy formats, but don't see why we can't do it for NV12. Especially since it's a corner case that

could be understandable if you know the hw format as well.

~Maarten

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height for yuv planar
@ 2018-03-21  5:06 Vidya Srinivas
  2018-03-21 11:38 ` Maarten Lankhorst
  0 siblings, 1 reply; 5+ messages in thread
From: Vidya Srinivas @ 2018-03-21  5:06 UTC (permalink / raw)
  To: igt-dev; +Cc: sunil.kamath

fb src height to be more than minimum scanlines for planar
formats like NV12. Changing the fb height to 19
so that the height is more than min value after KMD adjustments

Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_plane_scaling.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 36fcfc0..027b42e 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -130,9 +130,11 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
 	mode = igt_output_get_mode(output);
 
 	/* create buffer in the range of  min and max source side limit.*/
-	width = height = 9;
 	if (pixel_format == DRM_FORMAT_NV12)
-		width = height = 17;
+		width = height = 19;
+	else
+		width = height = 9;
+
 	igt_create_color_fb(display->drm_fd, width, height,
 		       pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);
 	igt_plane_set_fb(plane, &d->fb[0]);
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height for yuv planar
@ 2018-03-21  5:04 Vidya Srinivas
  0 siblings, 0 replies; 5+ messages in thread
From: Vidya Srinivas @ 2018-03-21  5:04 UTC (permalink / raw)
  To: igt-dev; +Cc: sunil.kamath

fb src height to be more than minimum scanlines for planar
formats like NV12. Changing the fb height to 19
so that the height is more than min value after KMD adjustments

Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 tests/kms_plane_scaling.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 36fcfc0..8dc6038 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -131,8 +131,9 @@ static void check_scaling_pipe_plane_rot(data_t *d, igt_plane_t *plane,
 
 	/* create buffer in the range of  min and max source side limit.*/
 	width = height = 9;
-	if (pixel_format == DRM_FORMAT_NV12)
-		width = height = 17;
+	if (pixel_format == DRM_FORMAT_NV12) {
+		width = height = 19;
+	}
 	igt_create_color_fb(display->drm_fd, width, height,
 		       pixel_format, tiling, 0.0, 1.0, 0.0, &d->fb[0]);
 	igt_plane_set_fb(plane, &d->fb[0]);
-- 
2.7.4

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-23  4:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21  4:57 [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: modify fb height for yuv planar Vidya Srinivas
2018-03-21  5:04 Vidya Srinivas
2018-03-21  5:06 Vidya Srinivas
2018-03-21 11:38 ` Maarten Lankhorst
2018-03-23  4:25   ` Srinivas, Vidya

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.