intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
@ 2024-06-05 13:47 Ville Syrjala
  2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ville Syrjala @ 2024-06-05 13:47 UTC (permalink / raw)
  To: intel-gfx

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

The VBT spec does a very poor job of defining how the chromaticity
coordinates in block 46 are laid out. After double checking the
Windows implementation it turns out these more or less match the
EDID definition, where the 10bit values are split into 2bit + 8bit
chunks. Adjust our struct definition to reflect that.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 27 ++++++++++++-------
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 862c5923b83d..da8694771f69 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -1376,16 +1376,23 @@ struct chromaticity {
 	u8 chromaticity_from_edid_base_block:1;
 	u8 rsvd:6;
 
-	u8 red_green;
-	u8 blue_white;
-	u8 red_x;
-	u8 red_y;
-	u8 green_x;
-	u8 green_y;
-	u8 blue_x;
-	u8 blue_y;
-	u8 white_x;
-	u8 white_y;
+	u8 green_y_lo:2;
+	u8 green_x_lo:2;
+	u8 red_y_lo:2;
+	u8 red_x_lo:2;
+	u8 white_y_lo:2;
+	u8 white_x_lo:2;
+	u8 blue_y_lo:2;
+	u8 blue_x_lo:2;
+
+	u8 red_x_hi;
+	u8 red_y_hi;
+	u8 green_x_hi;
+	u8 green_y_hi;
+	u8 blue_x_hi;
+	u8 blue_y_hi;
+	u8 white_x_hi;
+	u8 white_y_hi;
 } __packed;
 
 struct bdb_chromaticity {
-- 
2.44.1


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

* [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46
  2024-06-05 13:47 [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Ville Syrjala
@ 2024-06-05 13:47 ` Ville Syrjala
  2024-06-06 10:56   ` Jani Nikula
  2024-06-05 15:13 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Patchwork
  2024-06-06 10:55 ` [PATCH 1/2] " Jani Nikula
  2 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjala @ 2024-06-05 13:47 UTC (permalink / raw)
  To: intel-gfx

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

Since BDB version 211 block 46 has included more luminance and
gamma related information. Define it fully. The data is semi-based
on DisplayID v2.0 apparently.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index da8694771f69..1af8407e2081 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -1395,8 +1395,20 @@ struct chromaticity {
 	u8 white_y_hi;
 } __packed;
 
+struct luminance_and_gamma {
+	u8 luminance_enable:1;						/* 211+ */
+	u8 gamma_enable:1;						/* 211+ */
+	u8 rsvd:6;
+
+	u16 min_luminance;						/* 211+ */
+	u16 max_luminance;						/* 211+ */
+	u16 one_percent_max_luminance;					/* 211+ */
+	u8 gamma;							/* 211+ */
+} __packed;
+
 struct bdb_chromaticity {
 	struct chromaticity chromaticity[16];
+	struct luminance_and_gamma luminance_and_gamma[16];		/* 211+ */
 } __packed;
 
 /*
-- 
2.44.1


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

* ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
  2024-06-05 13:47 [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Ville Syrjala
  2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
@ 2024-06-05 15:13 ` Patchwork
  2024-06-06 12:38   ` Ville Syrjälä
  2024-06-06 10:55 ` [PATCH 1/2] " Jani Nikula
  2 siblings, 1 reply; 6+ messages in thread
From: Patchwork @ 2024-06-05 15:13 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 3262 bytes --]

== Series Details ==

Series: series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
URL   : https://patchwork.freedesktop.org/series/134505/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14881 -> Patchwork_134505v1
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_134505v1 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_134505v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/index.html

Participating hosts (38 -> 34)
------------------------------

  Additional (2): fi-kbl-8809g fi-bsw-n3050 
  Missing    (6): bat-mtlp-9 bat-arls-3 fi-snb-2520m bat-dg2-11 bat-jsl-1 bat-mtlp-6 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_134505v1:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@active:
    - fi-glk-j4005:       [PASS][1] -> [DMESG-FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14881/fi-glk-j4005/igt@i915_selftest@live@active.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-glk-j4005/igt@i915_selftest@live@active.html

  
Known issues
------------

  Here are the changes found in Patchwork_134505v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][3] ([i915#2190])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-kbl-8809g/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@basic:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][4] ([i915#4613]) +3 other tests skip
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-kbl-8809g/igt@gem_lmem_swapping@basic.html

  * igt@gem_lmem_swapping@random-engines:
    - fi-bsw-n3050:       NOTRUN -> [SKIP][5] +19 other tests skip
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-bsw-n3050/igt@gem_lmem_swapping@random-engines.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-kbl-8809g:       NOTRUN -> [SKIP][6] +30 other tests skip
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-kbl-8809g/igt@kms_force_connector_basic@force-load-detect.html

  
  [i915#2190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2190
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613


Build changes
-------------

  * Linux: CI_DRM_14881 -> Patchwork_134505v1

  CI-20190529: 20190529
  CI_DRM_14881: a494545483635d3d93d19e8f483f61e7d4198383 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7878: eecd5683bd98cee3fc6bd3f26a1f053c897f6bdf @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_134505v1: a494545483635d3d93d19e8f483f61e7d4198383 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/index.html

[-- Attachment #2: Type: text/html, Size: 3993 bytes --]

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

* Re: [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
  2024-06-05 13:47 [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Ville Syrjala
  2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
  2024-06-05 15:13 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Patchwork
@ 2024-06-06 10:55 ` Jani Nikula
  2 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2024-06-06 10:55 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx

On Wed, 05 Jun 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The VBT spec does a very poor job of defining how the chromaticity
> coordinates in block 46 are laid out. After double checking the
> Windows implementation it turns out these more or less match the
> EDID definition, where the 10bit values are split into 2bit + 8bit
> chunks. Adjust our struct definition to reflect that.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 27 ++++++++++++-------
>  1 file changed, 17 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 862c5923b83d..da8694771f69 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -1376,16 +1376,23 @@ struct chromaticity {
>  	u8 chromaticity_from_edid_base_block:1;
>  	u8 rsvd:6;
>  
> -	u8 red_green;
> -	u8 blue_white;
> -	u8 red_x;
> -	u8 red_y;
> -	u8 green_x;
> -	u8 green_y;
> -	u8 blue_x;
> -	u8 blue_y;
> -	u8 white_x;
> -	u8 white_y;
> +	u8 green_y_lo:2;
> +	u8 green_x_lo:2;
> +	u8 red_y_lo:2;
> +	u8 red_x_lo:2;
> +	u8 white_y_lo:2;
> +	u8 white_x_lo:2;
> +	u8 blue_y_lo:2;
> +	u8 blue_x_lo:2;
> +
> +	u8 red_x_hi;
> +	u8 red_y_hi;
> +	u8 green_x_hi;
> +	u8 green_y_hi;
> +	u8 blue_x_hi;
> +	u8 blue_y_hi;
> +	u8 white_x_hi;
> +	u8 white_y_hi;
>  } __packed;
>  
>  struct bdb_chromaticity {

-- 
Jani Nikula, Intel

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

* Re: [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46
  2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
@ 2024-06-06 10:56   ` Jani Nikula
  0 siblings, 0 replies; 6+ messages in thread
From: Jani Nikula @ 2024-06-06 10:56 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx

On Wed, 05 Jun 2024, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Since BDB version 211 block 46 has included more luminance and
> gamma related information. Define it fully. The data is semi-based
> on DisplayID v2.0 apparently.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index da8694771f69..1af8407e2081 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -1395,8 +1395,20 @@ struct chromaticity {
>  	u8 white_y_hi;
>  } __packed;
>  
> +struct luminance_and_gamma {
> +	u8 luminance_enable:1;						/* 211+ */
> +	u8 gamma_enable:1;						/* 211+ */
> +	u8 rsvd:6;
> +
> +	u16 min_luminance;						/* 211+ */
> +	u16 max_luminance;						/* 211+ */
> +	u16 one_percent_max_luminance;					/* 211+ */
> +	u8 gamma;							/* 211+ */
> +} __packed;
> +
>  struct bdb_chromaticity {
>  	struct chromaticity chromaticity[16];
> +	struct luminance_and_gamma luminance_and_gamma[16];		/* 211+ */
>  } __packed;
>  
>  /*

-- 
Jani Nikula, Intel

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

* Re: ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
  2024-06-05 15:13 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Patchwork
@ 2024-06-06 12:38   ` Ville Syrjälä
  0 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjälä @ 2024-06-06 12:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: I915-ci-infra

On Wed, Jun 05, 2024 at 03:13:31PM -0000, Patchwork wrote:
> == Series Details ==
> 
> Series: series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly
> URL   : https://patchwork.freedesktop.org/series/134505/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_14881 -> Patchwork_134505v1
> ====================================================
> 
> Summary
> -------
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_134505v1 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_134505v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/index.html
> 
> Participating hosts (38 -> 34)
> ------------------------------
> 
>   Additional (2): fi-kbl-8809g fi-bsw-n3050 
>   Missing    (6): bat-mtlp-9 bat-arls-3 fi-snb-2520m bat-dg2-11 bat-jsl-1 bat-mtlp-6 
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in Patchwork_134505v1:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * igt@i915_selftest@live@active:
>     - fi-glk-j4005:       [PASS][1] -> [DMESG-FAIL][2]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14881/fi-glk-j4005/igt@i915_selftest@live@active.html
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134505v1/fi-glk-j4005/igt@i915_selftest@live@active.html

(i915_selftest:5675) igt_kmod-WARNING: i915: Running i915_active_live_selftests/live_active_wait
(i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait i915_active not retired after waiting!
(i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait active __live_active [i915]:__live_retire [i915]
(i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait \x09count: 0
(i915_selftest:5675) igt_kmod-WARNING: i915 0000:00:02.0: [drm] *ERROR* live_active_wait \x09preallocated barriers? no
(i915_selftest:5675) igt_kmod-WARNING: i915/i915_active_live_selftests: live_active_wait failed with error -22


Looks like:
https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11170

-- 
Ville Syrjälä
Intel

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

end of thread, other threads:[~2024-06-06 12:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-05 13:47 [PATCH 1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Ville Syrjala
2024-06-05 13:47 ` [PATCH 2/2] drm/i915/bios: Define the "luminance and gamma" sub-struct of block 46 Ville Syrjala
2024-06-06 10:56   ` Jani Nikula
2024-06-05 15:13 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915/bios: Define block 46 chromaticity coordinates properly Patchwork
2024-06-06 12:38   ` Ville Syrjälä
2024-06-06 10:55 ` [PATCH 1/2] " Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).