All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
@ 2020-09-29 22:34 José Roberto de Souza
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map José Roberto de Souza
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: José Roberto de Souza @ 2020-09-29 22:34 UTC (permalink / raw)
  To: intel-gfx

Child min_brightness is obsolete from VBT 234+, instead the new
min_brightness field in the main structure should be used.

This new field is 16 bits wide, so backlight_precision_bits is needed
to check if value needs to be scaled down but it is only available in
VBT 236+ so working around it by using the also new backlight_level
in the main struct.

v2:
- missed that backlight_data->level is also obsolete

BSpec: 20149
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c     | 30 +++++++++++++++++--
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++--
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 4716484af62d..58e5657a77bb 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -425,6 +425,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
 	const struct bdb_lfp_backlight_data *backlight_data;
 	const struct lfp_backlight_data_entry *entry;
 	int panel_type = dev_priv->vbt.panel_type;
+	u16 level;
 
 	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
 	if (!backlight_data)
@@ -459,14 +460,39 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
 
 	dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
 	dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
-	dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
+
+	if (bdb->version >= 234) {
+		bool scale = false;
+		u16 min_level;
+
+		level = backlight_data->backlight_level[panel_type].level;
+		min_level = backlight_data->backlight_min_level[panel_type].level;
+
+		if (bdb->version >= 236)
+			scale = backlight_data->backlight_precision_bits[panel_type] == 16;
+		else
+			scale = level > 255;
+
+		if (scale)
+			min_level = min_level / 255;
+
+		if (min_level > 255) {
+			drm_warn(&dev_priv->drm, "Backlight min level > 255\n");
+			level = 255;
+		}
+		dev_priv->vbt.backlight.min_brightness = min_level;
+	} else {
+		level = backlight_data->level[panel_type];
+		dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
+	}
+
 	drm_dbg_kms(&dev_priv->drm,
 		    "VBT backlight PWM modulation frequency %u Hz, "
 		    "active %s, min brightness %u, level %u, controller %u\n",
 		    dev_priv->vbt.backlight.pwm_freq_hz,
 		    dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
 		    dev_priv->vbt.backlight.min_brightness,
-		    backlight_data->level[panel_type],
+		    level,
 		    dev_priv->vbt.backlight.controller);
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 54bcc6a6947c..b4742c4fde97 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -782,7 +782,7 @@ struct lfp_backlight_data_entry {
 	u8 active_low_pwm:1;
 	u8 obsolete1:5;
 	u16 pwm_freq_hz;
-	u8 min_brightness;
+	u8 min_brightness; /* Obsolete from 234+ */
 	u8 obsolete2;
 	u8 obsolete3;
 } __packed;
@@ -792,11 +792,19 @@ struct lfp_backlight_control_method {
 	u8 controller:4;
 } __packed;
 
+struct lfp_backlight_level {
+	u32 level : 16;
+	u32 reserved : 16;
+} __packed;
+
 struct bdb_lfp_backlight_data {
 	u8 entry_size;
 	struct lfp_backlight_data_entry data[16];
-	u8 level[16];
+	u8 level[16]; /* Obsolete from 234+ */
 	struct lfp_backlight_control_method backlight_control[16];
+	struct lfp_backlight_level backlight_level[16];		/* 234+ */
+	struct lfp_backlight_level backlight_min_level[16];	/* 234+ */
+	u8 backlight_precision_bits[16];					/* 236+ */
 } __packed;
 
 /*
-- 
2.28.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map
  2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
@ 2020-09-29 22:34 ` José Roberto de Souza
  2020-10-07 22:49   ` Matt Roper
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/vbt: Add VRR VBT toggle José Roberto de Souza
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: José Roberto de Souza @ 2020-09-29 22:34 UTC (permalink / raw)
  To: intel-gfx

This will remove the "Expected child device config size for VBT
version 235 not known" debug message seen in TGL, although this is not
fixing anything it good to keep our VBT parser updated.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 58e5657a77bb..6ce0b848e342 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -1915,7 +1915,7 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
 		expected_size = 37;
 	} else if (bdb->version <= 215) {
 		expected_size = 38;
-	} else if (bdb->version <= 229) {
+	} else if (bdb->version <= 237) {
 		expected_size = 39;
 	} else {
 		expected_size = sizeof(*child);
-- 
2.28.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] [PATCH v2 3/3] drm/i915/vbt: Add VRR VBT toggle
  2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map José Roberto de Souza
@ 2020-09-29 22:34 ` José Roberto de Souza
  2020-10-07 22:53   ` Matt Roper
  2020-09-29 23:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: José Roberto de Souza @ 2020-09-29 22:34 UTC (permalink / raw)
  To: intel-gfx

This will be used in future but already adding to VBT so we are
updated with VBT changes.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index b4742c4fde97..46f3f4804c9e 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -835,6 +835,7 @@ struct bdb_lfp_power {
 	u16 lace_enabled_status;
 	struct agressiveness_profile_entry aggressivenes[16];
 	u16 hobl; /* 232+ */
+	u16 vrr_feature_enabled; /* 233+ */
 } __packed;
 
 /*
-- 
2.28.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map José Roberto de Souza
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/vbt: Add VRR VBT toggle José Roberto de Souza
@ 2020-09-29 23:09 ` Patchwork
  2020-09-30 13:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2020-09-29 23:09 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 4304 bytes --]

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
URL   : https://patchwork.freedesktop.org/series/82229/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9075 -> Patchwork_18593
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-icl-u2:          [PASS][1] -> [DMESG-WARN][2] ([i915#1982])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  
#### Possible fixes ####

  * igt@kms_busy@basic@flip:
    - fi-kbl-x1275:       [DMESG-WARN][3] ([i915#62] / [i915#92] / [i915#95]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/fi-kbl-x1275/igt@kms_busy@basic@flip.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/fi-kbl-x1275/igt@kms_busy@basic@flip.html

  * igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
    - fi-icl-u2:          [DMESG-WARN][5] ([i915#1982]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/fi-icl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/fi-icl-u2/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html

  
#### Warnings ####

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-dp1:
    - fi-kbl-x1275:       [DMESG-WARN][7] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][8] ([i915#62] / [i915#92]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-wf_vblank@a-dp1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/fi-kbl-x1275/igt@kms_flip@basic-flip-vs-wf_vblank@a-dp1.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - fi-kbl-x1275:       [DMESG-WARN][9] ([i915#62] / [i915#92]) -> [DMESG-WARN][10] ([i915#62] / [i915#92] / [i915#95]) +4 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/fi-kbl-x1275/igt@kms_force_connector_basic@prune-stale-modes.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/fi-kbl-x1275/igt@kms_force_connector_basic@prune-stale-modes.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-kbl-x1275:       [DMESG-WARN][11] ([i915#1982] / [i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][12] ([i915#62] / [i915#92] / [i915#95])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/fi-kbl-x1275/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/fi-kbl-x1275/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (46 -> 37)
------------------------------

  Missing    (9): fi-cml-u2 fi-ilk-m540 fi-tgl-dsi fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


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

  * Linux: CI_DRM_9075 -> Patchwork_18593

  CI-20190529: 20190529
  CI_DRM_9075: fd24361b2b76956b5c056bc430a4c77edecb7744 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5792: cbaf441899f3b4f36cca5996aa6a69e7399b2dbd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_18593: b88dce76e2adb69efa0ef313cf18515a15821d21 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

b88dce76e2ad drm/i915/vbt: Add VRR VBT toggle
67fc6dee0c3a drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map
c041999f76f1 drm/i915/vbt: Fix backlight parsing for VBT 234+

== Logs ==

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

[-- Attachment #1.2: Type: text/html, Size: 6209 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
                   ` (2 preceding siblings ...)
  2020-09-29 23:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ Patchwork
@ 2020-09-30 13:03 ` Patchwork
  2020-10-06  9:04 ` [Intel-gfx] [PATCH v2 1/3] " Jani Nikula
  2020-10-07 22:45 ` Matt Roper
  5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2020-09-30 13:03 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 13577 bytes --]

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
URL   : https://patchwork.freedesktop.org/series/82229/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9075_full -> Patchwork_18593_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_reloc@basic-many-active@rcs0:
    - shard-glk:          [PASS][1] -> [FAIL][2] ([i915#2389])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-glk4/igt@gem_exec_reloc@basic-many-active@rcs0.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-glk8/igt@gem_exec_reloc@basic-many-active@rcs0.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [PASS][3] -> [SKIP][4] ([i915#2190])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-tglb8/igt@gem_huc_copy@huc-copy.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-tglb6/igt@gem_huc_copy@huc-copy.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-sliding:
    - shard-snb:          [PASS][5] -> [SKIP][6] ([fdo#109271])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-snb6/igt@kms_cursor_crc@pipe-a-cursor-128x128-sliding.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-snb7/igt@kms_cursor_crc@pipe-a-cursor-128x128-sliding.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
    - shard-skl:          [PASS][7] -> [FAIL][8] ([i915#2122])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl5/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl7/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [PASS][9] -> [DMESG-WARN][10] ([i915#180]) +9 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-kbl4/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-kbl7/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_flip_tiling@flip-y-tiled:
    - shard-apl:          [PASS][11] -> [DMESG-WARN][12] ([i915#1635] / [i915#1982])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-apl3/igt@kms_flip_tiling@flip-y-tiled.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-apl8/igt@kms_flip_tiling@flip-y-tiled.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-kbl:          [PASS][13] -> [DMESG-WARN][14] ([i915#1982])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-kbl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move:
    - shard-tglb:         [PASS][15] -> [DMESG-WARN][16] ([i915#1982]) +3 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render:
    - shard-skl:          [PASS][17] -> [DMESG-WARN][18] ([i915#1982]) +12 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl5/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl7/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
    - shard-skl:          [PASS][19] -> [INCOMPLETE][20] ([i915#198]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl8/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl9/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html

  * igt@kms_plane@plane-position-covered-pipe-b-planes:
    - shard-kbl:          [PASS][21] -> [DMESG-WARN][22] ([i915#165] / [i915#78])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-kbl6/igt@kms_plane@plane-position-covered-pipe-b-planes.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-kbl2/igt@kms_plane@plane-position-covered-pipe-b-planes.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [PASS][23] -> [SKIP][24] ([fdo#109642] / [fdo#111068])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-iclb2/igt@kms_psr2_su@page_flip.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-iclb6/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_primary_render:
    - shard-iclb:         [PASS][25] -> [SKIP][26] ([fdo#109441])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-iclb2/igt@kms_psr@psr2_primary_render.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-iclb5/igt@kms_psr@psr2_primary_render.html

  * igt@perf@polling:
    - shard-skl:          [PASS][27] -> [FAIL][28] ([i915#1542])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl7/igt@perf@polling.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl4/igt@perf@polling.html

  
#### Possible fixes ####

  * {igt@gem_ctx_persistence@heartbeat-close}:
    - shard-tglb:         [FAIL][29] ([i915#2519]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-tglb2/igt@gem_ctx_persistence@heartbeat-close.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-tglb2/igt@gem_ctx_persistence@heartbeat-close.html

  * {igt@gem_ctx_persistence@heartbeat-stop}:
    - shard-kbl:          [FAIL][31] ([i915#2520]) -> [PASS][32] +1 similar issue
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-kbl7/igt@gem_ctx_persistence@heartbeat-stop.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-kbl1/igt@gem_ctx_persistence@heartbeat-stop.html

  * igt@gem_exec_whisper@basic-forked-all:
    - shard-skl:          [DMESG-WARN][33] ([i915#1982]) -> [PASS][34] +10 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl8/igt@gem_exec_whisper@basic-forked-all.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl4/igt@gem_exec_whisper@basic-forked-all.html

  * igt@i915_selftest@live@gt_heartbeat:
    - shard-skl:          [DMESG-FAIL][35] ([i915#541]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl8/igt@i915_selftest@live@gt_heartbeat.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl4/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_suspend@debugfs-reader:
    - shard-skl:          [INCOMPLETE][37] ([i915#198]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl6/igt@i915_suspend@debugfs-reader.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl7/igt@i915_suspend@debugfs-reader.html

  * {igt@kms_async_flips@async-flip-with-page-flip-events}:
    - shard-glk:          [FAIL][39] ([i915#2521]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-glk7/igt@kms_async_flips@async-flip-with-page-flip-events.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-glk1/igt@kms_async_flips@async-flip-with-page-flip-events.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-skl:          [FAIL][41] ([i915#2346]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1:
    - shard-apl:          [FAIL][43] ([i915#1635] / [i915#79]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-apl6/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-apl2/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-dp1.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-kbl:          [DMESG-WARN][45] ([i915#180]) -> [PASS][46] +7 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-kbl7/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-kbl3/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-blt:
    - shard-tglb:         [DMESG-WARN][47] ([i915#1982]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-tglb3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-blt.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
    - shard-skl:          [FAIL][49] ([fdo#108145] / [i915#265]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl5/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [SKIP][51] ([fdo#109642] / [fdo#111068]) -> [PASS][52]
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-iclb4/igt@kms_psr2_su@frontbuffer.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-iclb2/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][53] ([fdo#109441]) -> [PASS][54] +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-iclb3/igt@kms_psr@psr2_no_drrs.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  
#### Warnings ####

  * igt@kms_setmode@basic:
    - shard-skl:          [DMESG-FAIL][55] ([i915#1982] / [i915#31]) -> [FAIL][56] ([i915#31])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9075/shard-skl7/igt@kms_setmode@basic.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18593/shard-skl2/igt@kms_setmode@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
  [i915#2469]: https://gitlab.freedesktop.org/drm/intel/issues/2469
  [i915#2476]: https://gitlab.freedesktop.org/drm/intel/issues/2476
  [i915#2519]: https://gitlab.freedesktop.org/drm/intel/issues/2519
  [i915#2520]: https://gitlab.freedesktop.org/drm/intel/issues/2520
  [i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
  [i915#78]: https://gitlab.freedesktop.org/drm/intel/issues/78
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79


Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts


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

  * Linux: CI_DRM_9075 -> Patchwork_18593

  CI-20190529: 20190529
  CI_DRM_9075: fd24361b2b76956b5c056bc430a4c77edecb7744 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5792: cbaf441899f3b4f36cca5996aa6a69e7399b2dbd @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_18593: b88dce76e2adb69efa0ef313cf18515a15821d21 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

[-- Attachment #1.2: Type: text/html, Size: 15590 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
                   ` (3 preceding siblings ...)
  2020-09-30 13:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
@ 2020-10-06  9:04 ` Jani Nikula
  2020-10-06 17:10   ` Souza, Jose
  2020-10-07 22:45 ` Matt Roper
  5 siblings, 1 reply; 12+ messages in thread
From: Jani Nikula @ 2020-10-06  9:04 UTC (permalink / raw)
  To: José Roberto de Souza, intel-gfx

On Tue, 29 Sep 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
> Child min_brightness is obsolete from VBT 234+, instead the new
> min_brightness field in the main structure should be used.
>
> This new field is 16 bits wide, so backlight_precision_bits is needed
> to check if value needs to be scaled down but it is only available in
> VBT 236+ so working around it by using the also new backlight_level
> in the main struct.
>
> v2:
> - missed that backlight_data->level is also obsolete
>
> BSpec: 20149
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c     | 30 +++++++++++++++++--
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++--
>  2 files changed, 38 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 4716484af62d..58e5657a77bb 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -425,6 +425,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
>  	const struct bdb_lfp_backlight_data *backlight_data;
>  	const struct lfp_backlight_data_entry *entry;
>  	int panel_type = dev_priv->vbt.panel_type;
> +	u16 level;
>  
>  	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
>  	if (!backlight_data)
> @@ -459,14 +460,39 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
>  
>  	dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
>  	dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
> -	dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> +
> +	if (bdb->version >= 234) {
> +		bool scale = false;
> +		u16 min_level;
> +
> +		level = backlight_data->backlight_level[panel_type].level;
> +		min_level = backlight_data->backlight_min_level[panel_type].level;
> +
> +		if (bdb->version >= 236)
> +			scale = backlight_data->backlight_precision_bits[panel_type] == 16;
> +		else
> +			scale = level > 255;
> +
> +		if (scale)
> +			min_level = min_level / 255;
> +
> +		if (min_level > 255) {
> +			drm_warn(&dev_priv->drm, "Backlight min level > 255\n");
> +			level = 255;
> +		}
> +		dev_priv->vbt.backlight.min_brightness = min_level;
> +	} else {
> +		level = backlight_data->level[panel_type];
> +		dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> +	}
> +
>  	drm_dbg_kms(&dev_priv->drm,
>  		    "VBT backlight PWM modulation frequency %u Hz, "
>  		    "active %s, min brightness %u, level %u, controller %u\n",
>  		    dev_priv->vbt.backlight.pwm_freq_hz,
>  		    dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
>  		    dev_priv->vbt.backlight.min_brightness,
> -		    backlight_data->level[panel_type],
> +		    level,
>  		    dev_priv->vbt.backlight.controller);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 54bcc6a6947c..b4742c4fde97 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -782,7 +782,7 @@ struct lfp_backlight_data_entry {
>  	u8 active_low_pwm:1;
>  	u8 obsolete1:5;
>  	u16 pwm_freq_hz;
> -	u8 min_brightness;
> +	u8 min_brightness; /* Obsolete from 234+ */
>  	u8 obsolete2;
>  	u8 obsolete3;
>  } __packed;
> @@ -792,11 +792,19 @@ struct lfp_backlight_control_method {
>  	u8 controller:4;
>  } __packed;
>  
> +struct lfp_backlight_level {
> +	u32 level : 16;
> +	u32 reserved : 16;

That looks like two u16's to me. ;)

BR,
Jani.


> +} __packed;
> +
>  struct bdb_lfp_backlight_data {
>  	u8 entry_size;
>  	struct lfp_backlight_data_entry data[16];
> -	u8 level[16];
> +	u8 level[16]; /* Obsolete from 234+ */
>  	struct lfp_backlight_control_method backlight_control[16];
> +	struct lfp_backlight_level backlight_level[16];		/* 234+ */
> +	struct lfp_backlight_level backlight_min_level[16];	/* 234+ */
> +	u8 backlight_precision_bits[16];					/* 236+ */
>  } __packed;
>  
>  /*

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-10-06  9:04 ` [Intel-gfx] [PATCH v2 1/3] " Jani Nikula
@ 2020-10-06 17:10   ` Souza, Jose
  0 siblings, 0 replies; 12+ messages in thread
From: Souza, Jose @ 2020-10-06 17:10 UTC (permalink / raw)
  To: intel-gfx, jani.nikula

On Tue, 2020-10-06 at 12:04 +0300, Jani Nikula wrote:
> On Tue, 29 Sep 2020, José Roberto de Souza <jose.souza@intel.com> wrote:
> > Child min_brightness is obsolete from VBT 234+, instead the new
> > min_brightness field in the main structure should be used.
> > 
> > This new field is 16 bits wide, so backlight_precision_bits is needed
> > to check if value needs to be scaled down but it is only available in
> > VBT 236+ so working around it by using the also new backlight_level
> > in the main struct.
> > 
> > v2:
> > - missed that backlight_data->level is also obsolete
> > 
> > BSpec: 20149
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_bios.c     | 30 +++++++++++++++++--
> >  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++--
> >  2 files changed, 38 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> > index 4716484af62d..58e5657a77bb 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > @@ -425,6 +425,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> >  	const struct bdb_lfp_backlight_data *backlight_data;
> >  	const struct lfp_backlight_data_entry *entry;
> >  	int panel_type = dev_priv->vbt.panel_type;
> > +	u16 level;
> >  
> > 
> > 
> > 
> >  	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
> >  	if (!backlight_data)
> > @@ -459,14 +460,39 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> >  
> > 
> > 
> > 
> >  	dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
> >  	dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
> > -	dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> > +
> > +	if (bdb->version >= 234) {
> > +		bool scale = false;
> > +		u16 min_level;
> > +
> > +		level = backlight_data->backlight_level[panel_type].level;
> > +		min_level = backlight_data->backlight_min_level[panel_type].level;
> > +
> > +		if (bdb->version >= 236)
> > +			scale = backlight_data->backlight_precision_bits[panel_type] == 16;
> > +		else
> > +			scale = level > 255;
> > +
> > +		if (scale)
> > +			min_level = min_level / 255;
> > +
> > +		if (min_level > 255) {
> > +			drm_warn(&dev_priv->drm, "Backlight min level > 255\n");
> > +			level = 255;
> > +		}
> > +		dev_priv->vbt.backlight.min_brightness = min_level;
> > +	} else {
> > +		level = backlight_data->level[panel_type];
> > +		dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> > +	}
> > +
> >  	drm_dbg_kms(&dev_priv->drm,
> >  		    "VBT backlight PWM modulation frequency %u Hz, "
> >  		    "active %s, min brightness %u, level %u, controller %u\n",
> >  		    dev_priv->vbt.backlight.pwm_freq_hz,
> >  		    dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
> >  		    dev_priv->vbt.backlight.min_brightness,
> > -		    backlight_data->level[panel_type],
> > +		    level,
> >  		    dev_priv->vbt.backlight.controller);
> >  }
> >  
> > 
> > 
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > index 54bcc6a6947c..b4742c4fde97 100644
> > --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > @@ -782,7 +782,7 @@ struct lfp_backlight_data_entry {
> >  	u8 active_low_pwm:1;
> >  	u8 obsolete1:5;
> >  	u16 pwm_freq_hz;
> > -	u8 min_brightness;
> > +	u8 min_brightness; /* Obsolete from 234+ */
> >  	u8 obsolete2;
> >  	u8 obsolete3;
> >  } __packed;
> > @@ -792,11 +792,19 @@ struct lfp_backlight_control_method {
> >  	u8 controller:4;
> >  } __packed;
> >  
> > 
> > 
> > 
> > +struct lfp_backlight_level {
> > +	u32 level : 16;
> > +	u32 reserved : 16;
> 
> That looks like two u16's to me. ;)

Okay, anything else to be changed in the next version?

> 
> BR,
> Jani.
> 
> 
> > +} __packed;
> > +
> >  struct bdb_lfp_backlight_data {
> >  	u8 entry_size;
> >  	struct lfp_backlight_data_entry data[16];
> > -	u8 level[16];
> > +	u8 level[16]; /* Obsolete from 234+ */
> >  	struct lfp_backlight_control_method backlight_control[16];
> > +	struct lfp_backlight_level backlight_level[16];		/* 234+ */
> > +	struct lfp_backlight_level backlight_min_level[16];	/* 234+ */
> > +	u8 backlight_precision_bits[16];					/* 236+ */
> >  } __packed;
> >  
> > 
> > 
> > 
> >  /*
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
                   ` (4 preceding siblings ...)
  2020-10-06  9:04 ` [Intel-gfx] [PATCH v2 1/3] " Jani Nikula
@ 2020-10-07 22:45 ` Matt Roper
  2020-10-08  0:33   ` Souza, Jose
  5 siblings, 1 reply; 12+ messages in thread
From: Matt Roper @ 2020-10-07 22:45 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx

On Tue, Sep 29, 2020 at 03:34:17PM -0700, José Roberto de Souza wrote:
> Child min_brightness is obsolete from VBT 234+, instead the new
> min_brightness field in the main structure should be used.
> 
> This new field is 16 bits wide, so backlight_precision_bits is needed
> to check if value needs to be scaled down but it is only available in
> VBT 236+ so working around it by using the also new backlight_level
> in the main struct.
> 
> v2:
> - missed that backlight_data->level is also obsolete
> 
> BSpec: 20149
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c     | 30 +++++++++++++++++--
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++--
>  2 files changed, 38 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 4716484af62d..58e5657a77bb 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -425,6 +425,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
>  	const struct bdb_lfp_backlight_data *backlight_data;
>  	const struct lfp_backlight_data_entry *entry;
>  	int panel_type = dev_priv->vbt.panel_type;
> +	u16 level;
>  
>  	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
>  	if (!backlight_data)
> @@ -459,14 +460,39 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
>  
>  	dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
>  	dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
> -	dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> +
> +	if (bdb->version >= 234) {
> +		bool scale = false;
> +		u16 min_level;
> +
> +		level = backlight_data->backlight_level[panel_type].level;
> +		min_level = backlight_data->backlight_min_level[panel_type].level;
> +
> +		if (bdb->version >= 236)
> +			scale = backlight_data->backlight_precision_bits[panel_type] == 16;
> +		else
> +			scale = level > 255;

I'm not sure I follow the 'else' arm here.  On version 234/235 we'd have
16-bit level values.  In the absence of any other precision information
wouldn't we assume that all the bits are used and that we have a full
16-bit precision?  If the level is < 256 (or for that matter if we have
any value where level & 0xFF is non-zero) wouldn't that definitely mean
that there are 16-bits of precision since otherwise those low bits would
have to be 0's?

> +
> +		if (scale)
> +			min_level = min_level / 255;
> +
> +		if (min_level > 255) {
> +			drm_warn(&dev_priv->drm, "Backlight min level > 255\n");
> +			level = 255;
> +		}
> +		dev_priv->vbt.backlight.min_brightness = min_level;
> +	} else {
> +		level = backlight_data->level[panel_type];
> +		dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> +	}
> +
>  	drm_dbg_kms(&dev_priv->drm,
>  		    "VBT backlight PWM modulation frequency %u Hz, "
>  		    "active %s, min brightness %u, level %u, controller %u\n",
>  		    dev_priv->vbt.backlight.pwm_freq_hz,
>  		    dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
>  		    dev_priv->vbt.backlight.min_brightness,
> -		    backlight_data->level[panel_type],
> +		    level,
>  		    dev_priv->vbt.backlight.controller);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 54bcc6a6947c..b4742c4fde97 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -782,7 +782,7 @@ struct lfp_backlight_data_entry {
>  	u8 active_low_pwm:1;
>  	u8 obsolete1:5;
>  	u16 pwm_freq_hz;
> -	u8 min_brightness;
> +	u8 min_brightness; /* Obsolete from 234+ */
>  	u8 obsolete2;
>  	u8 obsolete3;
>  } __packed;
> @@ -792,11 +792,19 @@ struct lfp_backlight_control_method {
>  	u8 controller:4;
>  } __packed;
>  
> +struct lfp_backlight_level {
> +	u32 level : 16;
> +	u32 reserved : 16;
> +} __packed;
> +
>  struct bdb_lfp_backlight_data {
>  	u8 entry_size;
>  	struct lfp_backlight_data_entry data[16];
> -	u8 level[16];
> +	u8 level[16]; /* Obsolete from 234+ */
>  	struct lfp_backlight_control_method backlight_control[16];
> +	struct lfp_backlight_level backlight_level[16];		/* 234+ */
> +	struct lfp_backlight_level backlight_min_level[16];	/* 234+ */

Technically these two are described as "brightness level" rather than
"backlight level" in the spec.  Matching the spec's terminology might
make this slightly easier to follow when people look at it in the
future, but up to you.


Matt

> +	u8 backlight_precision_bits[16];					/* 236+ */
>  } __packed;
>  
>  /*
> -- 
> 2.28.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map José Roberto de Souza
@ 2020-10-07 22:49   ` Matt Roper
  0 siblings, 0 replies; 12+ messages in thread
From: Matt Roper @ 2020-10-07 22:49 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx

On Tue, Sep 29, 2020 at 03:34:18PM -0700, José Roberto de Souza wrote:
> This will remove the "Expected child device config size for VBT
> version 235 not known" debug message seen in TGL, although this is not
> fixing anything it good to keep our VBT parser updated.
> 
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 58e5657a77bb..6ce0b848e342 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -1915,7 +1915,7 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
>  		expected_size = 37;
>  	} else if (bdb->version <= 215) {
>  		expected_size = 38;
> -	} else if (bdb->version <= 229) {
> +	} else if (bdb->version <= 237) {
>  		expected_size = 39;
>  	} else {
>  		expected_size = sizeof(*child);
> -- 
> 2.28.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 3/3] drm/i915/vbt: Add VRR VBT toggle
  2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/vbt: Add VRR VBT toggle José Roberto de Souza
@ 2020-10-07 22:53   ` Matt Roper
  0 siblings, 0 replies; 12+ messages in thread
From: Matt Roper @ 2020-10-07 22:53 UTC (permalink / raw)
  To: José Roberto de Souza; +Cc: intel-gfx

On Tue, Sep 29, 2020 at 03:34:19PM -0700, José Roberto de Souza wrote:
> This will be used in future but already adding to VBT so we are
> updated with VBT changes.
> 
> Signed-off-by: José Roberto de Souza <jose.souza@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index b4742c4fde97..46f3f4804c9e 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -835,6 +835,7 @@ struct bdb_lfp_power {
>  	u16 lace_enabled_status;
>  	struct agressiveness_profile_entry aggressivenes[16];
>  	u16 hobl; /* 232+ */
> +	u16 vrr_feature_enabled; /* 233+ */
>  } __packed;
>  
>  /*
> -- 
> 2.28.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-10-07 22:45 ` Matt Roper
@ 2020-10-08  0:33   ` Souza, Jose
  2020-10-08  3:28     ` Matt Roper
  0 siblings, 1 reply; 12+ messages in thread
From: Souza, Jose @ 2020-10-08  0:33 UTC (permalink / raw)
  To: Roper, Matthew D; +Cc: intel-gfx

On Wed, 2020-10-07 at 15:45 -0700, Matt Roper wrote:
> On Tue, Sep 29, 2020 at 03:34:17PM -0700, José Roberto de Souza wrote:
> > Child min_brightness is obsolete from VBT 234+, instead the new
> > min_brightness field in the main structure should be used.
> > 
> > This new field is 16 bits wide, so backlight_precision_bits is needed
> > to check if value needs to be scaled down but it is only available in
> > VBT 236+ so working around it by using the also new backlight_level
> > in the main struct.
> > 
> > v2:
> > - missed that backlight_data->level is also obsolete
> > 
> > BSpec: 20149
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_bios.c     | 30 +++++++++++++++++--
> >  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++--
> >  2 files changed, 38 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> > index 4716484af62d..58e5657a77bb 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > @@ -425,6 +425,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> >  	const struct bdb_lfp_backlight_data *backlight_data;
> >  	const struct lfp_backlight_data_entry *entry;
> >  	int panel_type = dev_priv->vbt.panel_type;
> > +	u16 level;
> >  
> > 
> > 
> > 
> >  	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
> >  	if (!backlight_data)
> > @@ -459,14 +460,39 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> >  
> > 
> > 
> > 
> >  	dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
> >  	dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
> > -	dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> > +
> > +	if (bdb->version >= 234) {
> > +		bool scale = false;
> > +		u16 min_level;
> > +
> > +		level = backlight_data->backlight_level[panel_type].level;
> > +		min_level = backlight_data->backlight_min_level[panel_type].level;
> > +
> > +		if (bdb->version >= 236)
> > +			scale = backlight_data->backlight_precision_bits[panel_type] == 16;
> > +		else
> > +			scale = level > 255;
> 
> I'm not sure I follow the 'else' arm here.  On version 234/235 we'd have
> 16-bit level values.  In the absence of any other precision information
> wouldn't we assume that all the bits are used and that we have a full
> 16-bit precision?  If the level is < 256 (or for that matter if we have
> any value where level & 0xFF is non-zero) wouldn't that definitely mean
> that there are 16-bits of precision since otherwise those low bits would
> have to be 0's?

My understand is that in version 234 or 235 all brightness levels could be set as 16bits or 8bits wide by vendors and it did not had a clear way for
driver to know what it is, then version 236 came fixing it.

So working around it by using the regular brightness level(supposed the one that vendor wants the panel to have by default) and we can suppose that it
will be higher than the minimum so for 16bits of precision it will be higher than 255.
Anyways I doubt that any production product will have VBT version 234 or 235.

> 
> > +
> > +		if (scale)
> > +			min_level = min_level / 255;
> > +
> > +		if (min_level > 255) {
> > +			drm_warn(&dev_priv->drm, "Backlight min level > 255\n");
> > +			level = 255;
> > +		}
> > +		dev_priv->vbt.backlight.min_brightness = min_level;
> > +	} else {
> > +		level = backlight_data->level[panel_type];
> > +		dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> > +	}
> > +
> >  	drm_dbg_kms(&dev_priv->drm,
> >  		    "VBT backlight PWM modulation frequency %u Hz, "
> >  		    "active %s, min brightness %u, level %u, controller %u\n",
> >  		    dev_priv->vbt.backlight.pwm_freq_hz,
> >  		    dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
> >  		    dev_priv->vbt.backlight.min_brightness,
> > -		    backlight_data->level[panel_type],
> > +		    level,
> >  		    dev_priv->vbt.backlight.controller);
> >  }
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > index 54bcc6a6947c..b4742c4fde97 100644
> > --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > @@ -782,7 +782,7 @@ struct lfp_backlight_data_entry {
> >  	u8 active_low_pwm:1;
> >  	u8 obsolete1:5;
> >  	u16 pwm_freq_hz;
> > -	u8 min_brightness;
> > +	u8 min_brightness; /* Obsolete from 234+ */
> >  	u8 obsolete2;
> >  	u8 obsolete3;
> >  } __packed;
> > @@ -792,11 +792,19 @@ struct lfp_backlight_control_method {
> >  	u8 controller:4;
> >  } __packed;
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > +struct lfp_backlight_level {
> > +	u32 level : 16;
> > +	u32 reserved : 16;
> > +} __packed;
> > +
> >  struct bdb_lfp_backlight_data {
> >  	u8 entry_size;
> >  	struct lfp_backlight_data_entry data[16];
> > -	u8 level[16];
> > +	u8 level[16]; /* Obsolete from 234+ */
> >  	struct lfp_backlight_control_method backlight_control[16];
> > +	struct lfp_backlight_level backlight_level[16];		/* 234+ */
> > +	struct lfp_backlight_level backlight_min_level[16];	/* 234+ */
> 
> Technically these two are described as "brightness level" rather than
> "backlight level" in the spec.  Matching the spec's terminology might
> make this slightly easier to follow when people look at it in the
> future, but up to you.

Okay will rename those, take a look in the comment above so we have an agreement for the the next version.

thanks

> 
> 
> Matt
> 
> > +	u8 backlight_precision_bits[16];					/* 236+ */
> >  } __packed;
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  /*
> > -- 
> > 2.28.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+
  2020-10-08  0:33   ` Souza, Jose
@ 2020-10-08  3:28     ` Matt Roper
  0 siblings, 0 replies; 12+ messages in thread
From: Matt Roper @ 2020-10-08  3:28 UTC (permalink / raw)
  To: Souza, Jose; +Cc: intel-gfx

On Wed, Oct 07, 2020 at 05:33:48PM -0700, Souza, Jose wrote:
> On Wed, 2020-10-07 at 15:45 -0700, Matt Roper wrote:
> > On Tue, Sep 29, 2020 at 03:34:17PM -0700, José Roberto de Souza wrote:
> > > Child min_brightness is obsolete from VBT 234+, instead the new
> > > min_brightness field in the main structure should be used.
> > > 
> > > This new field is 16 bits wide, so backlight_precision_bits is needed
> > > to check if value needs to be scaled down but it is only available in
> > > VBT 236+ so working around it by using the also new backlight_level
> > > in the main struct.
> > > 
> > > v2:
> > > - missed that backlight_data->level is also obsolete
> > > 
> > > BSpec: 20149
> > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_bios.c     | 30 +++++++++++++++++--
> > >  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 12 ++++++--
> > >  2 files changed, 38 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> > > index 4716484af62d..58e5657a77bb 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > > @@ -425,6 +425,7 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> > >  	const struct bdb_lfp_backlight_data *backlight_data;
> > >  	const struct lfp_backlight_data_entry *entry;
> > >  	int panel_type = dev_priv->vbt.panel_type;
> > > +	u16 level;
> > >  
> > > 
> > > 
> > > 
> > >  	backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT);
> > >  	if (!backlight_data)
> > > @@ -459,14 +460,39 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
> > >  
> > > 
> > > 
> > > 
> > >  	dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
> > >  	dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
> > > -	dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> > > +
> > > +	if (bdb->version >= 234) {
> > > +		bool scale = false;
> > > +		u16 min_level;
> > > +
> > > +		level = backlight_data->backlight_level[panel_type].level;
> > > +		min_level = backlight_data->backlight_min_level[panel_type].level;
> > > +
> > > +		if (bdb->version >= 236)
> > > +			scale = backlight_data->backlight_precision_bits[panel_type] == 16;
> > > +		else
> > > +			scale = level > 255;
> > 
> > I'm not sure I follow the 'else' arm here.  On version 234/235 we'd have
> > 16-bit level values.  In the absence of any other precision information
> > wouldn't we assume that all the bits are used and that we have a full
> > 16-bit precision?  If the level is < 256 (or for that matter if we have
> > any value where level & 0xFF is non-zero) wouldn't that definitely mean
> > that there are 16-bits of precision since otherwise those low bits would
> > have to be 0's?
> 
> My understand is that in version 234 or 235 all brightness levels could be set as 16bits or 8bits wide by vendors and it did not had a clear way for
> driver to know what it is, then version 236 came fixing it.
> 
> So working around it by using the regular brightness level(supposed the one that vendor wants the panel to have by default) and we can suppose that it
> will be higher than the minimum so for 16bits of precision it will be higher than 255.
> Anyways I doubt that any production product will have VBT version 234 or 235.

Okay.  I guess since it was described with the term "precision" in the
spec that made me think of it as "only the highest 8 bits in use" rather
than an actual 8-bit range (i.e., just lower bits), but I guess there
wouldn't really be a need to specify it if that were the case.  So I
think your logic here is probably correct.

With the s/backlight/brightness/ rename and the u32 -> u16
simplification suggested by Jani,

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> 
> > 
> > > +
> > > +		if (scale)
> > > +			min_level = min_level / 255;
> > > +
> > > +		if (min_level > 255) {
> > > +			drm_warn(&dev_priv->drm, "Backlight min level > 255\n");
> > > +			level = 255;
> > > +		}
> > > +		dev_priv->vbt.backlight.min_brightness = min_level;
> > > +	} else {
> > > +		level = backlight_data->level[panel_type];
> > > +		dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
> > > +	}
> > > +
> > >  	drm_dbg_kms(&dev_priv->drm,
> > >  		    "VBT backlight PWM modulation frequency %u Hz, "
> > >  		    "active %s, min brightness %u, level %u, controller %u\n",
> > >  		    dev_priv->vbt.backlight.pwm_freq_hz,
> > >  		    dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
> > >  		    dev_priv->vbt.backlight.min_brightness,
> > > -		    backlight_data->level[panel_type],
> > > +		    level,
> > >  		    dev_priv->vbt.backlight.controller);
> > >  }
> > >  
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > > index 54bcc6a6947c..b4742c4fde97 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > > +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > > @@ -782,7 +782,7 @@ struct lfp_backlight_data_entry {
> > >  	u8 active_low_pwm:1;
> > >  	u8 obsolete1:5;
> > >  	u16 pwm_freq_hz;
> > > -	u8 min_brightness;
> > > +	u8 min_brightness; /* Obsolete from 234+ */
> > >  	u8 obsolete2;
> > >  	u8 obsolete3;
> > >  } __packed;
> > > @@ -792,11 +792,19 @@ struct lfp_backlight_control_method {
> > >  	u8 controller:4;
> > >  } __packed;
> > >  
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > +struct lfp_backlight_level {
> > > +	u32 level : 16;
> > > +	u32 reserved : 16;
> > > +} __packed;
> > > +
> > >  struct bdb_lfp_backlight_data {
> > >  	u8 entry_size;
> > >  	struct lfp_backlight_data_entry data[16];
> > > -	u8 level[16];
> > > +	u8 level[16]; /* Obsolete from 234+ */
> > >  	struct lfp_backlight_control_method backlight_control[16];
> > > +	struct lfp_backlight_level backlight_level[16];		/* 234+ */
> > > +	struct lfp_backlight_level backlight_min_level[16];	/* 234+ */
> > 
> > Technically these two are described as "brightness level" rather than
> > "backlight level" in the spec.  Matching the spec's terminology might
> > make this slightly easier to follow when people look at it in the
> > future, but up to you.
> 
> Okay will rename those, take a look in the comment above so we have an agreement for the the next version.
> 
> thanks
> 
> > 
> > 
> > Matt
> > 
> > > +	u8 backlight_precision_bits[16];					/* 236+ */
> > >  } __packed;
> > >  
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  /*
> > > -- 
> > > 2.28.0
> > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > 
> 

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2020-10-08  3:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 22:34 [Intel-gfx] [PATCH v2 1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ José Roberto de Souza
2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 2/3] drm/i915/vbt: Update the version and expected size of BDB_GENERAL_DEFINITIONS map José Roberto de Souza
2020-10-07 22:49   ` Matt Roper
2020-09-29 22:34 ` [Intel-gfx] [PATCH v2 3/3] drm/i915/vbt: Add VRR VBT toggle José Roberto de Souza
2020-10-07 22:53   ` Matt Roper
2020-09-29 23:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/vbt: Fix backlight parsing for VBT 234+ Patchwork
2020-09-30 13:03 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-10-06  9:04 ` [Intel-gfx] [PATCH v2 1/3] " Jani Nikula
2020-10-06 17:10   ` Souza, Jose
2020-10-07 22:45 ` Matt Roper
2020-10-08  0:33   ` Souza, Jose
2020-10-08  3:28     ` Matt Roper

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.