diff mbox

[i-g-t,v3] lib/igt_kms: Force outputs to use full range RGB

Message ID 20170418130402.15485-1-ander.conselvan.de.oliveira@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ander Conselvan de Oliveira April 18, 2017, 1:04 p.m. UTC
In at least SKL and GLK (possibly other devices too), using a cursor
plane to scan out an fb might result in a different pipe crc than when
using a regular plane at the same position with the same fb while using
the CSC logic to limit the color range. The differences could be caused
by the cursor plane being limited to 8 bpc while the regular planes
support higher bit depths, leading to slightly different values to be
used internally. This is evidenced by the failures happening with
specific color values, 0.5 for example, but that's mostly speculation.

To avoid misterious failures caused by limited range rgb, force all
tests to use full range. It is still possible for tests to override this
if necessary.

v2: Add more details to the commit message.
v3: Force all tests to use full range.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
---
 lib/igt_kms.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Kahola, Mika May 9, 2017, 10:22 a.m. UTC | #1
On Tue, 2017-04-18 at 16:04 +0300, Ander Conselvan de Oliveira wrote:
> In at least SKL and GLK (possibly other devices too), using a cursor
> plane to scan out an fb might result in a different pipe crc than
> when
> using a regular plane at the same position with the same fb while
> using
> the CSC logic to limit the color range. The differences could be
> caused
> by the cursor plane being limited to 8 bpc while the regular planes
> support higher bit depths, leading to slightly different values to be
> used internally. This is evidenced by the failures happening with
> specific color values, 0.5 for example, but that's mostly
> speculation.
> 
> To avoid misterious failures caused by limited range rgb, force all
> tests to use full range. It is still possible for tests to override
> this
> if necessary.
By this way, we know for sure what is the color range in use.

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> v2: Add more details to the commit message.
> v3: Force all tests to use full range.
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Ander Conselvan de Oliveira
> <ander.conselvan.de.oliveira@intel.com>
> ---
>  lib/igt_kms.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 5811414..9f72913 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1455,10 +1455,15 @@ static void igt_output_refresh(igt_output_t
> *output)
>  			       -1);
>  	}
>  
> -	if (output->config.connector)
> +	if (output->config.connector) {
>  		igt_atomic_fill_connector_props(display, output,
>  			IGT_NUM_CONNECTOR_PROPS,
> igt_connector_prop_names);
>  
> +		kmstest_set_connector_broadcast_rgb(display->drm_fd,
> +						    output-
> >config.connector,
> +						    BROADCAST_RGB_FU
> LL);
> +	}
> +
>  	if (output->use_override_mode)
>  		output->config.default_mode = output->override_mode;
>
Ander Conselvan de Oliveira May 10, 2017, 6:37 a.m. UTC | #2
On Tue, 2017-05-09 at 13:22 +0300, Mika Kahola wrote:
> On Tue, 2017-04-18 at 16:04 +0300, Ander Conselvan de Oliveira wrote:

> > In at least SKL and GLK (possibly other devices too), using a cursor

> > plane to scan out an fb might result in a different pipe crc than

> > when

> > using a regular plane at the same position with the same fb while

> > using

> > the CSC logic to limit the color range. The differences could be

> > caused

> > by the cursor plane being limited to 8 bpc while the regular planes

> > support higher bit depths, leading to slightly different values to be

> > used internally. This is evidenced by the failures happening with

> > specific color values, 0.5 for example, but that's mostly

> > speculation.

> > 

> > To avoid misterious failures caused by limited range rgb, force all

> > tests to use full range. It is still possible for tests to override

> > this

> > if necessary.

> 

> By this way, we know for sure what is the color range in use.

> 

> Reviewed-by: Mika Kahola <mika.kahola@intel.com>


Thanks, patch pushed.

Ander

> 

> >  

> > v2: Add more details to the commit message.

> > v3: Force all tests to use full range.

> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>

> > Signed-off-by: Ander Conselvan de Oliveira

> > <ander.conselvan.de.oliveira@intel.com>

> > ---

> >  lib/igt_kms.c | 7 ++++++-

> >  1 file changed, 6 insertions(+), 1 deletion(-)

> > 

> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c

> > index 5811414..9f72913 100644

> > --- a/lib/igt_kms.c

> > +++ b/lib/igt_kms.c

> > @@ -1455,10 +1455,15 @@ static void igt_output_refresh(igt_output_t

> > *output)

> >  			       -1);

> >  	}

> >  

> > -	if (output->config.connector)

> > +	if (output->config.connector) {

> >  		igt_atomic_fill_connector_props(display, output,

> >  			IGT_NUM_CONNECTOR_PROPS,

> > igt_connector_prop_names);

> >  

> > +		kmstest_set_connector_broadcast_rgb(display->drm_fd,

> > +						    output-

> > > config.connector,

> > 

> > +						    BROADCAST_RGB_FU

> > LL);

> > +	}

> > +

> >  	if (output->use_override_mode)

> >  		output->config.default_mode = output->override_mode;

> >  

> 

> _______________________________________________

> Intel-gfx mailing list

> Intel-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5811414..9f72913 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1455,10 +1455,15 @@  static void igt_output_refresh(igt_output_t *output)
 			       -1);
 	}
 
-	if (output->config.connector)
+	if (output->config.connector) {
 		igt_atomic_fill_connector_props(display, output,
 			IGT_NUM_CONNECTOR_PROPS, igt_connector_prop_names);
 
+		kmstest_set_connector_broadcast_rgb(display->drm_fd,
+						    output->config.connector,
+						    BROADCAST_RGB_FULL);
+	}
+
 	if (output->use_override_mode)
 		output->config.default_mode = output->override_mode;