[igt-dev] [PATCH i-g-t] tests/kms_plane_alpha_blend: Fix a check in is_6bpc function

Srinivas, Vidya vidya.srinivas at intel.com
Thu Jul 15 03:50:44 UTC 2021



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Sent: Thursday, July 15, 2021 8:36 AM
> To: Srinivas, Vidya <vidya.srinivas at intel.com>
> Cc: igt-dev at lists.freedesktop.org
> Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_alpha_blend: Fix a check
> in is_6bpc function
> 
> On Wed, Jul 14, 2021 at 03:01:36PM +0000, Srinivas, Vidya wrote:
> > Hello Ville,
> >
> > Thank you so much. I limited the bpp to 18 in compute_sink_pipe_bpp.
> > I tested on external monitor both HDMI and DP. Tests did not fail. It passed
> without CRC mismatch.
> > I checked display_info and ensure bpp shows 18 on pipe B for both HDMI
> and DP case.
> > Dithering was set to ON.
> >
> > [CRTC:152:pipe B]:
> >         uapi: enable=yes, active=yes, mode="3840x2160": 30 266640 3840
> 3848 3992 4000 2160 2214 2219 2222 0x40 0x9
> >         hw: active=yes, adjusted_mode="3840x2160": 30 266640 3840 3848
> 3992 4000 2160 2214 2219 2222 0x40 0x9
> >         pipe src size=3840x2160, dither=yes, bpp=18
> >
> > I am really sorry. Should I revert this patch? Kindly guide me further. Thank
> you so much.
> 
> Well, before we go making too many changes would be nice to see if we can
> figure out what is really causing the crc mismatches on eDP. I can't
> immediately think of anything eDP specific it could be really, apart from
> maybe some PSR/etc. related bug. Have we ruled those sort if things out?

Hello Ville, thank you so much. The JSL chromebook we are using is a non-PSR panel.
I will try to see if I can figure out anything else and update.

Regards
Vidya

> 
> >
> > Regards
> > Vidya
> >
> > -----Original Message-----
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Sent: Wednesday, July 14, 2021 7:57 PM
> > To: Srinivas, Vidya <vidya.srinivas at intel.com>
> > Cc: igt-dev at lists.freedesktop.org
> > Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_alpha_blend: Fix
> > a check in is_6bpc function
> >
> > On Wed, Jul 14, 2021 at 01:22:26PM +0000, Srinivas, Vidya wrote:
> > > Hello Ville,
> > >
> > > I am sorry, I don’t have a 6 bpc external panel.
> >
> > You don't need one. Just limit the bpp to 18 when computing the link
> params.
> >
> > > Juha-Pekka had suggested we use the set_lut table as being used in
> > > kms_flip_scaled_crc.c But when I tried that, max upto 0x7F it would pass
> (not with original 0xFF00). After that it would give back CRC mismatch.
> > >
> > > Set_lut:
> > > uint16_t v  = (i * 0xffff / (lut_size - 1)) & 0x7f; lut[i].red = v;
> > > lut[i].green = v; lut[i].blue = v;
> > >
> > > Other solutions which worked were:
> > > 1. Use alpha for primary plane
> > > https://patchwork.freedesktop.org/patch/440263/?series=90828&rev=6
> > >
> > > 2. Adding this line before setting the primary gray
> > >
> > > igt_plane_set_prop_value(igt_pipe_get_plane_type(&display->pipes[pip
> > > e] , DRM_PLANE_TYPE_PRIMARY), IGT_PLANE_ALPHA, 0);
> > >
> > > 2. Remove primary plane
> > > https://patchwork.freedesktop.org/patch/436178/?series=90828&rev=1
> > >
> > > 3. Use lower alpha values 0x7e for coverage, pre-multiplied and
> > > constant
> > > https://patchwork.freedesktop.org/patch/438831/?series=90828&rev=3
> > >
> > > 4. Use an alpha buffer for primary commit
> > > https://patchwork.freedesktop.org/patch/440157/?series=90828&rev=5
> > >
> > > 5. Use black_fb instead of gray_fb in
> > > coverage-vs-premult-vs-constant for primary
> > > https://patchwork.freedesktop.org/patch/441554/?series=90828&rev=7
> > >
> > > Apart from these, I disabled dithering in kernel and that too did not help.
> Screen shows content correctly but CRC mismatch is seen.
> > >
> > > Regards
> > > Vidya
> > >
> > >
> > > -----Original Message-----
> > > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > > Sent: Wednesday, July 14, 2021 6:34 PM
> > > To: Srinivas, Vidya <vidya.srinivas at intel.com>
> > > Cc: igt-dev at lists.freedesktop.org
> > > Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_alpha_blend:
> > > Fix a check in is_6bpc function
> > >
> > > On Wed, Jul 14, 2021 at 11:21:47AM +0000, Srinivas, Vidya wrote:
> > > > Hello Ville,
> > > >
> > > > Apologies. I tried to turn off dithering from kernel itself. But still CRC
> mismatch came up.
> > > > This is on Jasperlake chromebook which is using 6bpc panel.
> > > >
> > > > Same jasperlake with 8bpc panel is working fine.
> > > >
> > > > So, as last resort we did this ☹.
> > >
> > > Well that's a bit unfortunate because now the commit messages are lying,
> and we still don't know what is going on.
> > >
> > > Do the same failures happen with external DP @ 6bpc? I wouldn't really
> expect any crc differences since AFAIK nothing in the pipe should change
> before the dithering block, and with dithering disabled the port should just
> chop off the extra bits at the very end.
> > >
> > > >
> > > > Regards
> > > > Vidya
> > > >
> > > > -----Original Message-----
> > > > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > > > Sent: Wednesday, July 14, 2021 3:55 PM
> > > > To: Srinivas, Vidya <vidya.srinivas at intel.com>
> > > > Cc: igt-dev at lists.freedesktop.org
> > > > Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_plane_alpha_blend:
> > > > Fix a check in is_6bpc function
> > > >
> > > > On Wed, Jul 14, 2021 at 01:30:02PM +0530, Vidya Srinivas wrote:
> > > > > Fixes commit 3bf28f9dffd41b85c262d4e6664ffbdf5b7d9a93.
> > > > >
> > > > > is_6bpc is supposed to return false if connector is not eDP or DSI.
> > > > > The right check will be DRM_MODE_CONNECTOR_eDP &&
> > > > > DRM_MODE_CONNECTOR_DSI By mistake
> DRM_MODE_CONNECTOR_eDP ||
> > > > > DRM_MODE_CONNECTOR_DSI was being used.
> > > >
> > > > Instead of these incomplete hacks why aren't we just turning off
> dithering when doing crc capture?
> > > >
> > > > >
> > > > > Credits-to: Ashutosh Dixit <ashutosh.dixit at intel.com>
> > > > > Signed-off-by: Vidya Srinivas <vidya.srinivas at intel.com>
> > > > > ---
> > > > >  tests/kms_plane_alpha_blend.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/tests/kms_plane_alpha_blend.c
> > > > > b/tests/kms_plane_alpha_blend.c index a3529dc2190f..8020216c1594
> > > > > 100644
> > > > > --- a/tests/kms_plane_alpha_blend.c
> > > > > +++ b/tests/kms_plane_alpha_blend.c
> > > > > @@ -454,7 +454,7 @@ static bool is_6bpc(igt_display_t *display,
> enum pipe pipe) {
> > > > >  		return false;
> > > > >
> > > > >  	c = output->config.connector;
> > > > > -	if (c->connector_type != DRM_MODE_CONNECTOR_eDP ||
> > > > > +	if (c->connector_type != DRM_MODE_CONNECTOR_eDP &&
> > > > >  		c->connector_type != DRM_MODE_CONNECTOR_DSI)
> > > > >  		return false;
> > > > >
> > > > > --
> > > > > 2.32.0
> > > > >
> > > > > _______________________________________________
> > > > > igt-dev mailing list
> > > > > igt-dev at lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> > > >
> > > > --
> > > > Ville Syrjälä
> > > > Intel
> > >
> > > --
> > > Ville Syrjälä
> > > Intel
> >
> > --
> > Ville Syrjälä
> > Intel
> 
> --
> Ville Syrjälä
> Intel


More information about the igt-dev mailing list