* [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar @ 2018-03-16 13:20 Vidya Srinivas 2018-03-16 14:11 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2018-03-16 14:30 ` [igt-dev] [PATCH i-g-t] [i-g-t] " Ville Syrjälä 0 siblings, 2 replies; 8+ messages in thread From: Vidya Srinivas @ 2018-03-16 13:20 UTC (permalink / raw) To: igt-dev; +Cc: sunil.kamath, ville.syrjala For Gen9, GLK, CNL, GLV: Display WA 1106: Display corruption/color shift observed when using NV12 with 270 rotation or 90 rotation + horizontal flip. WA: NV12 with 270 rotation or 90 rotation + horizontal flip requires the programmed plane height to be a multiple of 4. Patch changes the NV12 buffer to 20x20 to maintain both fb > min fb and also multiplier of 4 Signed-off-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> --- tests/kms_plane_scaling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c index 36fcfc0..b94d785 100644 --- a/tests/kms_plane_scaling.c +++ b/tests/kms_plane_scaling.c @@ -132,7 +132,7 @@ 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; + width = height = 20; 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] 8+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-16 13:20 [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar Vidya Srinivas @ 2018-03-16 14:11 ` Patchwork 2018-03-16 14:30 ` [igt-dev] [PATCH i-g-t] [i-g-t] " Ville Syrjälä 1 sibling, 0 replies; 8+ messages in thread From: Patchwork @ 2018-03-16 14:11 UTC (permalink / raw) To: Srinivas, Vidya; +Cc: igt-dev == Series Details == Series: tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar URL : https://patchwork.freedesktop.org/series/40096/ State : success == Summary == IGT patchset tested on top of latest successful build 2e92134b4e4f754239f9721b8781ce2fc0aab07c tests/kms_frontbuffer_tracking: Reduce fbc status spam, v2. with latest DRM-Tip kernel build CI_DRM_3939 b8d045232d3b drm-tip: 2018y-03m-16d-12h-56m-11s UTC integration manifest No testlist changes. ---- Known issues: Test gem_exec_suspend: Subgroup basic-s3: incomplete -> PASS (fi-cnl-y3) fdo#105086 Test kms_pipe_crc_basic: Subgroup suspend-read-crc-pipe-b: incomplete -> PASS (fi-snb-2520m) fdo#103713 fdo#105086 https://bugs.freedesktop.org/show_bug.cgi?id=105086 fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713 fi-bdw-5557u total:285 pass:264 dwarn:0 dfail:0 fail:0 skip:21 time:433s fi-bdw-gvtdvm total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:439s fi-blb-e6850 total:285 pass:220 dwarn:1 dfail:0 fail:0 skip:64 time:381s fi-bsw-n3050 total:285 pass:239 dwarn:0 dfail:0 fail:0 skip:46 time:542s fi-bwr-2160 total:285 pass:180 dwarn:0 dfail:0 fail:0 skip:105 time:299s fi-bxt-dsi total:285 pass:255 dwarn:0 dfail:0 fail:0 skip:30 time:515s fi-bxt-j4205 total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:512s fi-byt-j1900 total:285 pass:250 dwarn:0 dfail:0 fail:0 skip:35 time:518s fi-byt-n2820 total:285 pass:246 dwarn:0 dfail:0 fail:0 skip:39 time:504s fi-cfl-8700k total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:410s fi-cfl-s2 total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:586s fi-cfl-u total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:513s fi-cnl-drrs total:285 pass:254 dwarn:3 dfail:0 fail:0 skip:28 time:538s fi-cnl-y3 total:285 pass:258 dwarn:0 dfail:0 fail:1 skip:26 time:594s fi-elk-e7500 total:285 pass:225 dwarn:1 dfail:0 fail:0 skip:59 time:425s fi-gdg-551 total:285 pass:176 dwarn:0 dfail:0 fail:1 skip:108 time:320s fi-glk-1 total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:546s fi-hsw-4770 total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:403s fi-ilk-650 total:285 pass:225 dwarn:0 dfail:0 fail:0 skip:60 time:421s fi-ivb-3520m total:285 pass:256 dwarn:0 dfail:0 fail:0 skip:29 time:475s fi-ivb-3770 total:285 pass:252 dwarn:0 dfail:0 fail:0 skip:33 time:429s fi-kbl-7500u total:285 pass:260 dwarn:1 dfail:0 fail:0 skip:24 time:474s fi-kbl-7567u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:467s fi-kbl-r total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:513s fi-pnv-d510 total:285 pass:219 dwarn:1 dfail:0 fail:0 skip:65 time:653s fi-skl-6260u total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:446s fi-skl-6600u total:285 pass:258 dwarn:0 dfail:0 fail:0 skip:27 time:530s fi-skl-6700hq total:285 pass:259 dwarn:0 dfail:0 fail:0 skip:26 time:546s fi-skl-6700k2 total:285 pass:261 dwarn:0 dfail:0 fail:0 skip:24 time:506s fi-skl-6770hq total:285 pass:265 dwarn:0 dfail:0 fail:0 skip:20 time:502s fi-skl-guc total:285 pass:257 dwarn:0 dfail:0 fail:0 skip:28 time:430s fi-skl-gvtdvm total:285 pass:262 dwarn:0 dfail:0 fail:0 skip:23 time:448s fi-snb-2520m total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:577s fi-snb-2600 total:285 pass:245 dwarn:0 dfail:0 fail:0 skip:40 time:398s == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1149/issues.html _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-16 13:20 [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar Vidya Srinivas 2018-03-16 14:11 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork @ 2018-03-16 14:30 ` Ville Syrjälä 2018-03-17 9:15 ` Srinivas, Vidya 1 sibling, 1 reply; 8+ messages in thread From: Ville Syrjälä @ 2018-03-16 14:30 UTC (permalink / raw) To: Vidya Srinivas; +Cc: igt-dev, sunil.kamath, ville.syrjala On Fri, Mar 16, 2018 at 06:50:27PM +0530, Vidya Srinivas wrote: > For Gen9, GLK, CNL, GLV: Display WA 1106: > Display corruption/color shift observed when using NV12 with > 270 rotation or 90 rotation + horizontal flip. > WA: NV12 with 270 rotation or 90 rotation + horizontal flip requires > the programmed plane height to be a multiple of 4. > Patch changes the NV12 buffer to 20x20 to maintain both > fb > min fb and also multiplier of 4 > > Signed-off-by: Uma Shankar <uma.shankar@intel.com> > Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> > --- > tests/kms_plane_scaling.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c > index 36fcfc0..b94d785 100644 > --- a/tests/kms_plane_scaling.c > +++ b/tests/kms_plane_scaling.c > @@ -132,7 +132,7 @@ 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; > + width = height = 20; Why 20 and not 16? I thought 16 was the limit? > 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 -- Ville Syrjälä Intel OTC _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-16 14:30 ` [igt-dev] [PATCH i-g-t] [i-g-t] " Ville Syrjälä @ 2018-03-17 9:15 ` Srinivas, Vidya 2018-03-19 14:04 ` Ville Syrjälä 0 siblings, 1 reply; 8+ messages in thread From: Srinivas, Vidya @ 2018-03-17 9:15 UTC (permalink / raw) To: Ville Syrjälä Cc: igt-dev@lists.freedesktop.org, Kamath, Sunil, Syrjala, Ville > -----Original Message----- > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] > Sent: Friday, March 16, 2018 8:01 PM > To: Srinivas, Vidya <vidya.srinivas@intel.com> > Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil <sunil.kamath@intel.com>; > Syrjala, Ville <ville.syrjala@intel.com> > Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height > to be multiplier of 4 for YUV 420 planar > > On Fri, Mar 16, 2018 at 06:50:27PM +0530, Vidya Srinivas wrote: > > For Gen9, GLK, CNL, GLV: Display WA 1106: > > Display corruption/color shift observed when using NV12 with > > 270 rotation or 90 rotation + horizontal flip. > > WA: NV12 with 270 rotation or 90 rotation + horizontal flip requires > > the programmed plane height to be a multiple of 4. > > Patch changes the NV12 buffer to 20x20 to maintain both fb > min fb > > and also multiplier of 4 > > > > Signed-off-by: Uma Shankar <uma.shankar@intel.com> > > Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> > > --- > > tests/kms_plane_scaling.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c > > index 36fcfc0..b94d785 100644 > > --- a/tests/kms_plane_scaling.c > > +++ b/tests/kms_plane_scaling.c > > @@ -132,7 +132,7 @@ 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; > > + width = height = 20; > > Why 20 and not 16? I thought 16 was the limit? Yes, but when the NV12 17x17 buffer is flipped on the sprite, it gets adjusted to 16x16 in Intel_check_sprite_plane and further PLANE_SIZE gets written with 15x15. So, I thought 20x20 would be better. However when I run the kms_plane_scaling with rotation About 100 times, I still see rare fifo underruns. This may be due to the WA1106 Which says the plane height for NV12 in case of rotation needs to be multiplier of 4. Even with 20x20 buffer, after the adjustment it changes to 18x19 and this further reduces to 17x18 in skl_update_plane This causes 18 to be programmed as plane height which is not a multiplier of 4. So this patch too is not good :( Sorry about pushing this. Regards Vidya > > > 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 > > -- > Ville Syrjälä > Intel OTC _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-17 9:15 ` Srinivas, Vidya @ 2018-03-19 14:04 ` Ville Syrjälä 2018-03-20 10:02 ` Srinivas, Vidya 0 siblings, 1 reply; 8+ messages in thread From: Ville Syrjälä @ 2018-03-19 14:04 UTC (permalink / raw) To: Srinivas, Vidya Cc: igt-dev@lists.freedesktop.org, Kamath, Sunil, Syrjala, Ville On Sat, Mar 17, 2018 at 09:15:48AM +0000, Srinivas, Vidya wrote: > > > > -----Original Message----- > > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] > > Sent: Friday, March 16, 2018 8:01 PM > > To: Srinivas, Vidya <vidya.srinivas@intel.com> > > Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil <sunil.kamath@intel.com>; > > Syrjala, Ville <ville.syrjala@intel.com> > > Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height > > to be multiplier of 4 for YUV 420 planar > > > > On Fri, Mar 16, 2018 at 06:50:27PM +0530, Vidya Srinivas wrote: > > > For Gen9, GLK, CNL, GLV: Display WA 1106: > > > Display corruption/color shift observed when using NV12 with > > > 270 rotation or 90 rotation + horizontal flip. > > > WA: NV12 with 270 rotation or 90 rotation + horizontal flip requires > > > the programmed plane height to be a multiple of 4. > > > Patch changes the NV12 buffer to 20x20 to maintain both fb > min fb > > > and also multiplier of 4 > > > > > > Signed-off-by: Uma Shankar <uma.shankar@intel.com> > > > Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> > > > --- > > > tests/kms_plane_scaling.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c > > > index 36fcfc0..b94d785 100644 > > > --- a/tests/kms_plane_scaling.c > > > +++ b/tests/kms_plane_scaling.c > > > @@ -132,7 +132,7 @@ 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; > > > + width = height = 20; > > > > Why 20 and not 16? I thought 16 was the limit? > > Yes, but when the NV12 17x17 buffer is flipped on the sprite, it gets adjusted to 16x16 in > Intel_check_sprite_plane and further PLANE_SIZE gets written with 15x15. I don't see what the -1 bias of the register values has to do with this. > > So, I thought 20x20 would be better. However when I run the kms_plane_scaling with rotation > About 100 times, I still see rare fifo underruns. This may be due to the WA1106 > Which says the plane height for NV12 in case of rotation needs to be multiplier of 4. > Even with 20x20 buffer, after the adjustment it changes to 18x19 and this further reduces to 17x18 in skl_update_plane > This causes 18 to be programmed as plane height which is not a multiplier of 4. The bias has nothing to do with this. But the reduction is source size to make it an exact multiple of the hscale/vscale can certainly be a problem. That thing needs some rethinking for sure. Sadly the spec doesn't document the scaling algorithm so it's hard to say what is the best apporach. But this does appear to highlight a problem in the nv12 patches. They should be checking the final source coordinates against the hardware minimum size, and reject the operation if we're trying to do something bad. Perhaps we already have that same problem with non-nv12? > > So this patch too is not good :( Sorry about pushing this. > > Regards > Vidya > > > > > > 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 > > > > -- > > Ville Syrjälä > > Intel OTC -- Ville Syrjälä Intel OTC _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-19 14:04 ` Ville Syrjälä @ 2018-03-20 10:02 ` Srinivas, Vidya 2018-03-21 15:04 ` Maarten Lankhorst 0 siblings, 1 reply; 8+ messages in thread From: Srinivas, Vidya @ 2018-03-20 10:02 UTC (permalink / raw) To: Ville Syrjälä Cc: igt-dev@lists.freedesktop.org, Kamath, Sunil, Syrjala, Ville > -----Original Message----- > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] > Sent: Monday, March 19, 2018 7:35 PM > To: Srinivas, Vidya <vidya.srinivas@intel.com> > Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil <sunil.kamath@intel.com>; > Syrjala, Ville <ville.syrjala@intel.com> > Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height > to be multiplier of 4 for YUV 420 planar > > On Sat, Mar 17, 2018 at 09:15:48AM +0000, Srinivas, Vidya wrote: > > > > > > > -----Original Message----- > > > From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] > > > Sent: Friday, March 16, 2018 8:01 PM > > > To: Srinivas, Vidya <vidya.srinivas@intel.com> > > > Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil > > > <sunil.kamath@intel.com>; Syrjala, Ville <ville.syrjala@intel.com> > > > Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] > > > tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 > > > planar > > > > > > On Fri, Mar 16, 2018 at 06:50:27PM +0530, Vidya Srinivas wrote: > > > > For Gen9, GLK, CNL, GLV: Display WA 1106: > > > > Display corruption/color shift observed when using NV12 with > > > > 270 rotation or 90 rotation + horizontal flip. > > > > WA: NV12 with 270 rotation or 90 rotation + horizontal flip > > > > requires the programmed plane height to be a multiple of 4. > > > > Patch changes the NV12 buffer to 20x20 to maintain both fb > min > > > > fb and also multiplier of 4 > > > > > > > > Signed-off-by: Uma Shankar <uma.shankar@intel.com> > > > > Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> > > > > --- > > > > tests/kms_plane_scaling.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c > > > > index 36fcfc0..b94d785 100644 > > > > --- a/tests/kms_plane_scaling.c > > > > +++ b/tests/kms_plane_scaling.c > > > > @@ -132,7 +132,7 @@ 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; > > > > + width = height = 20; > > > > > > Why 20 and not 16? I thought 16 was the limit? > > > > Yes, but when the NV12 17x17 buffer is flipped on the sprite, it gets > > adjusted to 16x16 in Intel_check_sprite_plane and further PLANE_SIZE gets > written with 15x15. > > I don't see what the -1 bias of the register values has to do with this. > > > > > So, I thought 20x20 would be better. However when I run the > > kms_plane_scaling with rotation About 100 times, I still see rare fifo > > underruns. This may be due to the WA1106 Which says the plane height for > NV12 in case of rotation needs to be multiplier of 4. > > Even with 20x20 buffer, after the adjustment it changes to 18x19 and > > this further reduces to 17x18 in skl_update_plane This causes 18 to be > programmed as plane height which is not a multiplier of 4. > > The bias has nothing to do with this. But the reduction is source size to make > it an exact multiple of the hscale/vscale can certainly be a problem. That thing > needs some rethinking for sure. Sadly the spec doesn't document the scaling > algorithm so it's hard to say what is the best apporach. > > But this does appear to highlight a problem in the nv12 patches. They should > be checking the final source coordinates against the hardware minimum size, > and reject the operation if we're trying to do something bad. Perhaps we > already have that same problem with non-nv12? Thank you. Will try implementing this in KMD. The problem is, the results are now showing consistent. As in, not always the NV12 src height multiplier of 4 for height results in non-underruns. When I used a 29x29 buffer, even though the final source width height was 28x28 It still showed fifo underrun. Regards Vidya > > > > > So this patch too is not good :( Sorry about pushing this. > > > > Regards > > Vidya > > > > > > > > > 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 > > > > > > -- > > > Ville Syrjälä > > > Intel OTC > > -- > Ville Syrjälä > Intel OTC _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-20 10:02 ` Srinivas, Vidya @ 2018-03-21 15:04 ` Maarten Lankhorst 2018-03-23 4:21 ` Srinivas, Vidya 0 siblings, 1 reply; 8+ messages in thread From: Maarten Lankhorst @ 2018-03-21 15:04 UTC (permalink / raw) To: Srinivas, Vidya, Ville Syrjälä Cc: igt-dev@lists.freedesktop.org, Kamath, Sunil, Syrjala, Ville Op 20-03-18 om 11:02 schreef Srinivas, Vidya: > >> -----Original Message----- >> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] >> Sent: Monday, March 19, 2018 7:35 PM >> To: Srinivas, Vidya <vidya.srinivas@intel.com> >> Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil <sunil.kamath@intel.com>; >> Syrjala, Ville <ville.syrjala@intel.com> >> Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height >> to be multiplier of 4 for YUV 420 planar >> >> On Sat, Mar 17, 2018 at 09:15:48AM +0000, Srinivas, Vidya wrote: >>> >>>> -----Original Message----- >>>> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] >>>> Sent: Friday, March 16, 2018 8:01 PM >>>> To: Srinivas, Vidya <vidya.srinivas@intel.com> >>>> Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil >>>> <sunil.kamath@intel.com>; Syrjala, Ville <ville.syrjala@intel.com> >>>> Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] >>>> tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 >>>> planar >>>> >>>> On Fri, Mar 16, 2018 at 06:50:27PM +0530, Vidya Srinivas wrote: >>>>> For Gen9, GLK, CNL, GLV: Display WA 1106: >>>>> Display corruption/color shift observed when using NV12 with >>>>> 270 rotation or 90 rotation + horizontal flip. >>>>> WA: NV12 with 270 rotation or 90 rotation + horizontal flip >>>>> requires the programmed plane height to be a multiple of 4. >>>>> Patch changes the NV12 buffer to 20x20 to maintain both fb > min >>>>> fb and also multiplier of 4 >>>>> >>>>> Signed-off-by: Uma Shankar <uma.shankar@intel.com> >>>>> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> >>>>> --- >>>>> tests/kms_plane_scaling.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c >>>>> index 36fcfc0..b94d785 100644 >>>>> --- a/tests/kms_plane_scaling.c >>>>> +++ b/tests/kms_plane_scaling.c >>>>> @@ -132,7 +132,7 @@ 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; >>>>> + width = height = 20; >>>> Why 20 and not 16? I thought 16 was the limit? >>> Yes, but when the NV12 17x17 buffer is flipped on the sprite, it gets >>> adjusted to 16x16 in Intel_check_sprite_plane and further PLANE_SIZE gets >> written with 15x15. >> >> I don't see what the -1 bias of the register values has to do with this. >> >>> So, I thought 20x20 would be better. However when I run the >>> kms_plane_scaling with rotation About 100 times, I still see rare fifo >>> underruns. This may be due to the WA1106 Which says the plane height for >> NV12 in case of rotation needs to be multiplier of 4. >>> Even with 20x20 buffer, after the adjustment it changes to 18x19 and >>> this further reduces to 17x18 in skl_update_plane This causes 18 to be >> programmed as plane height which is not a multiplier of 4. >> >> The bias has nothing to do with this. But the reduction is source size to make >> it an exact multiple of the hscale/vscale can certainly be a problem. That thing >> needs some rethinking for sure. Sadly the spec doesn't document the scaling >> algorithm so it's hard to say what is the best apporach. >> >> But this does appear to highlight a problem in the nv12 patches. They should >> be checking the final source coordinates against the hardware minimum size, >> and reject the operation if we're trying to do something bad. Perhaps we >> already have that same problem with non-nv12? > Thank you. Will try implementing this in KMD. > > The problem is, the results are now showing consistent. > As in, not always the NV12 src height multiplier of 4 for height results in non-underruns. > When I used a 29x29 buffer, even though the final source width height was 28x28 > It still showed fifo underrun. We should probably look at more data, what about checking minimums? Does width need to be a multiple of 4, or 8? What about height? _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar 2018-03-21 15:04 ` Maarten Lankhorst @ 2018-03-23 4:21 ` Srinivas, Vidya 0 siblings, 0 replies; 8+ messages in thread From: Srinivas, Vidya @ 2018-03-23 4:21 UTC (permalink / raw) To: Maarten Lankhorst, Ville Syrjälä Cc: igt-dev@lists.freedesktop.org, Kamath, Sunil, Syrjala, Ville > -----Original Message----- > From: Maarten Lankhorst [mailto:maarten.lankhorst@linux.intel.com] > Sent: Wednesday, March 21, 2018 8:34 PM > To: Srinivas, Vidya <vidya.srinivas@intel.com>; Ville Syrjälä > <ville.syrjala@linux.intel.com> > Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil <sunil.kamath@intel.com>; > Syrjala, Ville <ville.syrjala@intel.com> > Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb > height to be multiplier of 4 for YUV 420 planar > > Op 20-03-18 om 11:02 schreef Srinivas, Vidya: > > > >> -----Original Message----- > >> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] > >> Sent: Monday, March 19, 2018 7:35 PM > >> To: Srinivas, Vidya <vidya.srinivas@intel.com> > >> Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil > >> <sunil.kamath@intel.com>; Syrjala, Ville <ville.syrjala@intel.com> > >> Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: > >> fb height to be multiplier of 4 for YUV 420 planar > >> > >> On Sat, Mar 17, 2018 at 09:15:48AM +0000, Srinivas, Vidya wrote: > >>> > >>>> -----Original Message----- > >>>> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com] > >>>> Sent: Friday, March 16, 2018 8:01 PM > >>>> To: Srinivas, Vidya <vidya.srinivas@intel.com> > >>>> Cc: igt-dev@lists.freedesktop.org; Kamath, Sunil > >>>> <sunil.kamath@intel.com>; Syrjala, Ville <ville.syrjala@intel.com> > >>>> Subject: Re: [igt-dev] [PATCH i-g-t] [i-g-t] > >>>> tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV > >>>> 420 planar > >>>> > >>>> On Fri, Mar 16, 2018 at 06:50:27PM +0530, Vidya Srinivas wrote: > >>>>> For Gen9, GLK, CNL, GLV: Display WA 1106: > >>>>> Display corruption/color shift observed when using NV12 with > >>>>> 270 rotation or 90 rotation + horizontal flip. > >>>>> WA: NV12 with 270 rotation or 90 rotation + horizontal flip > >>>>> requires the programmed plane height to be a multiple of 4. > >>>>> Patch changes the NV12 buffer to 20x20 to maintain both fb > min > >>>>> fb and also multiplier of 4 > >>>>> > >>>>> Signed-off-by: Uma Shankar <uma.shankar@intel.com> > >>>>> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> > >>>>> --- > >>>>> tests/kms_plane_scaling.c | 2 +- > >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>>> > >>>>> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c > >>>>> index 36fcfc0..b94d785 100644 > >>>>> --- a/tests/kms_plane_scaling.c > >>>>> +++ b/tests/kms_plane_scaling.c > >>>>> @@ -132,7 +132,7 @@ 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; > >>>>> + width = height = 20; > >>>> Why 20 and not 16? I thought 16 was the limit? > >>> Yes, but when the NV12 17x17 buffer is flipped on the sprite, it > >>> gets adjusted to 16x16 in Intel_check_sprite_plane and further > >>> PLANE_SIZE gets > >> written with 15x15. > >> > >> I don't see what the -1 bias of the register values has to do with this. > >> > >>> So, I thought 20x20 would be better. However when I run the > >>> kms_plane_scaling with rotation About 100 times, I still see rare > >>> fifo underruns. This may be due to the WA1106 Which says the plane > >>> height for > >> NV12 in case of rotation needs to be multiplier of 4. > >>> Even with 20x20 buffer, after the adjustment it changes to 18x19 and > >>> this further reduces to 17x18 in skl_update_plane This causes 18 to > >>> be > >> programmed as plane height which is not a multiplier of 4. > >> > >> The bias has nothing to do with this. But the reduction is source > >> size to make it an exact multiple of the hscale/vscale can certainly > >> be a problem. That thing needs some rethinking for sure. Sadly the > >> spec doesn't document the scaling algorithm so it's hard to say what is > the best apporach. > >> > >> But this does appear to highlight a problem in the nv12 patches. They > >> should be checking the final source coordinates against the hardware > >> minimum size, and reject the operation if we're trying to do > >> something bad. Perhaps we already have that same problem with non- > nv12? > > Thank you. Will try implementing this in KMD. > > > > The problem is, the results are now showing consistent. > > As in, not always the NV12 src height multiplier of 4 for height results in > non-underruns. > > When I used a 29x29 buffer, even though the final source width height > > was 28x28 It still showed fifo underrun. > We should probably look at more data, what about checking minimums? > > Does width need to be a multiple of 4, or 8? What about height? As per Bspec work around section only height needs to be multiple of 4 that too For 90/270 rotation case. But that’s only a WA. Main restriction is only about the height being more than 16 scanlines. WA 1106: Display corruption/color shift observed when using NV12 with 270 rotation or 90 rotation + horizontal flip. WA: NV12 with 270 rotation or 90 rotation + horizontal flip requires the programmed plane height to be a multiple of 4. That way, there is one more WA 1173 which mentions: Make sure that the plane size programming for frame n+1 meets the following constraint 0 Rotation: PLANE_OFFSET-> X position is a multiple of 32 180 Rotation: PLANE_OFFSET->X position + PLANE_SIZE->Width+1 is a multiple of Alignment Factor defined below. Use Alignment Factor of 16 for RGB32, 32 for YUY2 and 64 for NV12. Regards Vidya _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-03-23 4:21 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-03-16 13:20 [igt-dev] [PATCH i-g-t] [i-g-t] tests/kms_plane_scaling: fb height to be multiplier of 4 for YUV 420 planar Vidya Srinivas 2018-03-16 14:11 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork 2018-03-16 14:30 ` [igt-dev] [PATCH i-g-t] [i-g-t] " Ville Syrjälä 2018-03-17 9:15 ` Srinivas, Vidya 2018-03-19 14:04 ` Ville Syrjälä 2018-03-20 10:02 ` Srinivas, Vidya 2018-03-21 15:04 ` Maarten Lankhorst 2018-03-23 4:21 ` Srinivas, Vidya
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox