All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/vbt: Handle generic DTD block
@ 2019-10-10  1:03 Matt Roper
  2019-10-10  2:32 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-10  1:03 UTC (permalink / raw)
  To: intel-gfx

VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
old LFP panel mode data in block 42.  Let's start parsing this block to
fill in the panel fixed mode on devices with a >=229 VBT.

Bspec: 54751
Bspec: 20148
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
I don't think we've encountered any devices that actually have a >=229
VBT yet, so this is just written to the spec and untested at the moment.

 drivers/gpu/drm/i915/display/intel_bios.c     | 84 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 32 +++++++
 2 files changed, 113 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 9628b485b179..113911f050ee 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -202,6 +202,69 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
 	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
 }
 
+static struct drm_display_mode *
+parse_generic_dtd(struct drm_i915_private *dev_priv,
+		  const struct bdb_generic_dtd *generic_dtd)
+{
+	const struct bdb_generic_dtd_entry *dtd;
+	struct drm_display_mode *panel_fixed_mode;
+	int num_dtd;
+
+	if (generic_dtd->gdtd_size < sizeof(struct bdb_generic_dtd_entry)) {
+		DRM_ERROR("GDTD size %u is too small.\n",
+			  generic_dtd->gdtd_size);
+		return NULL;
+	} else if (generic_dtd->gdtd_size !=
+		   sizeof(struct bdb_generic_dtd_entry)) {
+		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
+		/* DTD has unknown fields, but keep going */
+	}
+
+	num_dtd = (get_blocksize(generic_dtd) - sizeof(struct bdb_generic_dtd)) /
+		generic_dtd->gdtd_size;
+	if (dev_priv->vbt.panel_type > num_dtd) {
+		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
+			  dev_priv->vbt.panel_type, num_dtd);
+		return NULL;
+	} else {
+		dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
+	}
+
+	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
+	if (!panel_fixed_mode)
+		return NULL;
+
+	panel_fixed_mode->hdisplay = dtd->hactive;
+	panel_fixed_mode->hsync_start =
+		panel_fixed_mode->hdisplay + dtd->hfront_porch;
+	panel_fixed_mode->hsync_end =
+		panel_fixed_mode->hsync_start + dtd->hsync;
+	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
+
+	panel_fixed_mode->vdisplay = dtd->vactive;
+	panel_fixed_mode->vsync_start =
+		panel_fixed_mode->vdisplay + dtd->vfront_porch;
+	panel_fixed_mode->vsync_end =
+		panel_fixed_mode->vsync_start + dtd->vsync;
+	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
+
+	panel_fixed_mode->clock = dtd->pixel_clock;
+	panel_fixed_mode->width_mm = dtd->width_mm;
+	panel_fixed_mode->height_mm = dtd->height_mm;
+
+	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
+	drm_mode_set_name(panel_fixed_mode);
+
+	/*
+	 * FIXME: We probably need to set FLAG_[P/N][H/V]SYNC according to the
+	 * value in dtd->[h/v]sync_polarity, but the bspec doesn't tell us how
+	 * to actually interpret those bits yet.
+	 */
+
+	return panel_fixed_mode;
+}
+
+
 /* Try to find integrated panel data */
 static void
 parse_lfp_panel_data(struct drm_i915_private *dev_priv,
@@ -210,6 +273,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 	const struct bdb_lvds_options *lvds_options;
 	const struct bdb_lvds_lfp_data *lvds_lfp_data;
 	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
+	const struct bdb_generic_dtd *generic_dtd;
 	const struct lvds_dvo_timing *panel_dvo_timing;
 	const struct lvds_fp_timing *fp_timing;
 	struct drm_display_mode *panel_fixed_mode;
@@ -262,6 +326,18 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 		break;
 	}
 
+	if (bdb->version >= 229) {
+		generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
+		if (!generic_dtd)
+			return;
+
+		panel_fixed_mode = parse_generic_dtd(dev_priv, generic_dtd);
+		if (!ret)
+			return;
+
+		goto skip_legacy_lfp;
+	}
+
 	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
 	if (!lvds_lfp_data)
 		return;
@@ -282,9 +358,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 
 	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
 
-	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
-	drm_mode_debug_printmodeline(panel_fixed_mode);
-
 	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
 				       lvds_lfp_data_ptrs,
 				       panel_type);
@@ -297,6 +370,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 				      dev_priv->vbt.bios_lvds_val);
 		}
 	}
+
+skip_legacy_lfp:
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
+	drm_mode_debug_printmodeline(panel_fixed_mode);
+
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index dfcd156b5094..a508817f9df8 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -114,6 +114,7 @@ enum bdb_block_id {
 	BDB_LVDS_POWER			= 44,
 	BDB_MIPI_CONFIG			= 52,
 	BDB_MIPI_SEQUENCE		= 53,
+	BDB_GENERIC_DTD			= 58,
 	BDB_SKIP			= 254, /* VBIOS private block, ignore */
 };
 
@@ -808,4 +809,35 @@ struct bdb_mipi_sequence {
 	u8 data[0]; /* up to 6 variable length blocks */
 } __packed;
 
+/*
+ * Block 58 - Generic DTD Block
+ */
+
+struct bdb_generic_dtd_entry {
+	u32 pixel_clock;
+	u16 hactive;
+	u16 hblank;
+	u16 hfront_porch;
+	u16 hsync;
+	u16 vactive;
+	u16 vblank;
+	u16 vfront_porch;
+	u16 vsync;
+	u16 width_mm;
+	u16 height_mm;
+
+	/* Flags */
+	u8 rsvd_flags:4;
+	u8 vsync_polarity:2;
+	u8 hysnc_polarity:2;
+
+	u32 rsvd:24;
+} __packed;
+
+struct bdb_generic_dtd {
+	u32 gdtd_size:24;
+	struct bdb_generic_dtd_entry dtd[0];	/* up to 24 DTD's */
+} __packed;
+
+
 #endif /* _INTEL_VBT_DEFS_H_ */
-- 
2.21.0

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915/vbt: Handle generic DTD block
  2019-10-10  1:03 [PATCH] drm/i915/vbt: Handle generic DTD block Matt Roper
@ 2019-10-10  2:32 ` Patchwork
  2019-10-10  3:01 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-10  2:32 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/vbt: Handle generic DTD block
URL   : https://patchwork.freedesktop.org/series/67811/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
4081e8320e9c drm/i915/vbt: Handle generic DTD block
-:46: WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#46: FILE: drivers/gpu/drm/i915/display/intel_bios.c:229:
+		return NULL;
+	} else {

-:84: CHECK:LINE_SPACING: Please don't use multiple blank lines
#84: FILE: drivers/gpu/drm/i915/display/intel_bios.c:267:
+
+

-:183: CHECK:LINE_SPACING: Please don't use multiple blank lines
#183: FILE: drivers/gpu/drm/i915/display/intel_vbt_defs.h:842:
+
+

total: 0 errors, 1 warnings, 2 checks, 156 lines checked

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

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

* ✓ Fi.CI.BAT: success for drm/i915/vbt: Handle generic DTD block
  2019-10-10  1:03 [PATCH] drm/i915/vbt: Handle generic DTD block Matt Roper
  2019-10-10  2:32 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2019-10-10  3:01 ` Patchwork
  2019-10-10 13:47 ` ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-10  3:01 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/vbt: Handle generic DTD block
URL   : https://patchwork.freedesktop.org/series/67811/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7046 -> Patchwork_14741
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_mmap@basic-small-bo:
    - fi-icl-u3:          [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-icl-u3/igt@gem_mmap@basic-small-bo.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-icl-u3/igt@gem_mmap@basic-small-bo.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-icl-u2:          [PASS][3] -> [FAIL][4] ([fdo#109483])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-icl-u2/igt@kms_chamelium@hdmi-hpd-fast.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic:
    - {fi-tgl-u2}:        [INCOMPLETE][5] ([fdo#111850]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-tgl-u2/igt@gem_exec_suspend@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-tgl-u2/igt@gem_exec_suspend@basic.html

  * igt@gem_mmap_gtt@basic-read-write:
    - fi-icl-u3:          [DMESG-WARN][7] ([fdo#107724]) -> [PASS][8] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-icl-u3/igt@gem_mmap_gtt@basic-read-write.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-icl-u3/igt@gem_mmap_gtt@basic-read-write.html

  * igt@i915_pm_rpm@module-reload:
    - {fi-icl-guc}:       [INCOMPLETE][9] ([fdo#107713] / [fdo#108840]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-icl-guc/igt@i915_pm_rpm@module-reload.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-icl-guc/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_hugepages:
    - fi-elk-e7500:       [INCOMPLETE][11] ([fdo#103989]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-elk-e7500/igt@i915_selftest@live_hugepages.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-elk-e7500/igt@i915_selftest@live_hugepages.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-kbl-r:           [INCOMPLETE][13] -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-kbl-r/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-kbl-r/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
#### Warnings ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][15] ([fdo#111045] / [fdo#111096]) -> [FAIL][16] ([fdo#111407])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

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

  [fdo#103989]: https://bugs.freedesktop.org/show_bug.cgi?id=103989
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
  [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850


Participating hosts (53 -> 46)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-icl-y fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7046 -> Patchwork_14741

  CI-20190529: 20190529
  CI_DRM_7046: 136f98967ad06da28fd795aa83be314c7b641c49 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5220: 1e38e32d721210a780198c8293a6b8c8e881df68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14741: 4081e8320e9caea4af807b3c0c904b8e175a1f4d @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

4081e8320e9c drm/i915/vbt: Handle generic DTD block

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915/vbt: Handle generic DTD block
  2019-10-10  1:03 [PATCH] drm/i915/vbt: Handle generic DTD block Matt Roper
  2019-10-10  2:32 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2019-10-10  3:01 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2019-10-10 13:47 ` Patchwork
  2019-10-28 19:41   ` [Intel-gfx] " Matt Roper
  2019-10-29  0:14   ` [Intel-gfx] " Patchwork
  4 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-10 13:47 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/vbt: Handle generic DTD block
URL   : https://patchwork.freedesktop.org/series/67811/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7046_full -> Patchwork_14741_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@independent-bsd2:
    - shard-iclb:         [PASS][1] -> [SKIP][2] ([fdo#109276]) +20 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb4/igt@gem_exec_schedule@independent-bsd2.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb6/igt@gem_exec_schedule@independent-bsd2.html

  * igt@gem_exec_schedule@reorder-wide-bsd:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#111325]) +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb7/igt@gem_exec_schedule@reorder-wide-bsd.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb4/igt@gem_exec_schedule@reorder-wide-bsd.html

  * igt@gem_softpin@noreloc-s3:
    - shard-skl:          [PASS][5] -> [INCOMPLETE][6] ([fdo#104108])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-skl4/igt@gem_softpin@noreloc-s3.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-skl1/igt@gem_softpin@noreloc-s3.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-apl:          [PASS][7] -> [DMESG-FAIL][8] ([fdo#108686])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-apl3/igt@gem_tiled_swapping@non-threaded.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-apl4/igt@gem_tiled_swapping@non-threaded.html
    - shard-hsw:          [PASS][9] -> [INCOMPLETE][10] ([fdo#103540] / [fdo#108686])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-hsw2/igt@gem_tiled_swapping@non-threaded.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-hsw5/igt@gem_tiled_swapping@non-threaded.html

  * igt@gem_userptr_blits@map-fixed-invalidate-busy-gup:
    - shard-hsw:          [PASS][11] -> [DMESG-WARN][12] ([fdo#111870])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-hsw1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-hsw1/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [PASS][13] -> [DMESG-WARN][14] ([fdo#108566]) +2 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-apl4/igt@gem_workarounds@suspend-resume-context.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-apl1/igt@gem_workarounds@suspend-resume-context.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite:
    - shard-iclb:         [PASS][15] -> [FAIL][16] ([fdo#103167]) +1 similar issue
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-pwrite.html

  * igt@kms_psr@psr2_dpms:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#109441]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb2/igt@kms_psr@psr2_dpms.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb7/igt@kms_psr@psr2_dpms.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-glk:          [PASS][19] -> [TIMEOUT][20] ([fdo#111800])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-glk5/igt@perf_pmu@cpu-hotplug.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-glk5/igt@perf_pmu@cpu-hotplug.html

  
#### Possible fixes ####

  * igt@gem_exec_schedule@preempt-queue-bsd1:
    - shard-iclb:         [SKIP][21] ([fdo#109276]) -> [PASS][22] +16 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb7/igt@gem_exec_schedule@preempt-queue-bsd1.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb1/igt@gem_exec_schedule@preempt-queue-bsd1.html

  * igt@gem_exec_schedule@wide-bsd:
    - shard-iclb:         [SKIP][23] ([fdo#111325]) -> [PASS][24] +4 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb4/igt@gem_exec_schedule@wide-bsd.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb6/igt@gem_exec_schedule@wide-bsd.html

  * igt@gem_userptr_blits@sync-unmap-after-close:
    - shard-hsw:          [DMESG-WARN][25] ([fdo#111870]) -> [PASS][26] +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-hsw2/igt@gem_userptr_blits@sync-unmap-after-close.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-hsw5/igt@gem_userptr_blits@sync-unmap-after-close.html

  * {igt@i915_pm_dc@dc6-dpms}:
    - shard-iclb:         [FAIL][27] ([fdo#110548]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb2/igt@i915_pm_dc@dc6-dpms.html

  * igt@kms_fbcon_fbt@psr-suspend:
    - shard-iclb:         [DMESG-WARN][29] -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb6/igt@kms_fbcon_fbt@psr-suspend.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb5/igt@kms_fbcon_fbt@psr-suspend.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          [FAIL][31] ([fdo#105363]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-kbl:          [INCOMPLETE][33] ([fdo#103665]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-kbl1/igt@kms_flip@flip-vs-suspend-interruptible.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible.html
    - shard-hsw:          [INCOMPLETE][35] ([fdo#103540]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-hsw6/igt@kms_flip@flip-vs-suspend-interruptible.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-hsw8/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@basic:
    - shard-iclb:         [FAIL][37] ([fdo#103167]) -> [PASS][38] +3 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb7/igt@kms_frontbuffer_tracking@basic.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb4/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
    - shard-skl:          [DMESG-WARN][39] ([fdo#106107]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-skl3/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-skl6/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu:
    - shard-iclb:         [INCOMPLETE][41] ([fdo#106978] / [fdo#107713]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         [FAIL][43] ([fdo#103166]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-y.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb8/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_psr2_su@page_flip:
    - shard-iclb:         [SKIP][45] ([fdo#109642] / [fdo#111068]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb4/igt@kms_psr2_su@page_flip.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb2/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][47] ([fdo#109441]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb8/igt@kms_psr@psr2_no_drrs.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  * igt@kms_setmode@basic:
    - shard-kbl:          [FAIL][49] ([fdo#99912]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-kbl3/igt@kms_setmode@basic.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-kbl1/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-a-ts-continuation-suspend:
    - shard-apl:          [DMESG-WARN][51] ([fdo#108566]) -> [PASS][52] +5 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-apl3/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-apl2/igt@kms_vblank@pipe-a-ts-continuation-suspend.html

  * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
    - {shard-tglb}:       [INCOMPLETE][53] ([fdo#111832] / [fdo#111850]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-tglb1/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-tglb1/igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-apl:          [TIMEOUT][55] ([fdo#111546] / [fdo#111800]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-apl6/igt@perf_pmu@cpu-hotplug.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-apl6/igt@perf_pmu@cpu-hotplug.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-reset-bsd2:
    - shard-iclb:         [FAIL][57] ([fdo#111330]) -> [SKIP][58] ([fdo#109276]) +2 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-iclb4/igt@gem_mocs_settings@mocs-reset-bsd2.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-iclb6/igt@gem_mocs_settings@mocs-reset-bsd2.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff:
    - shard-glk:          [SKIP][59] ([fdo#109271]) -> [INCOMPLETE][60] ([fdo#103359] / [k.org#198133])
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-glk5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-glk5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff.html
    - shard-apl:          [INCOMPLETE][61] ([fdo#103927]) -> [SKIP][62] ([fdo#109271])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7046/shard-apl6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14741/shard-apl6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff.html

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

  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111546]: https://bugs.freedesktop.org/show_bug.cgi?id=111546
  [fdo#111800]: https://bugs.freedesktop.org/show_bug.cgi?id=111800
  [fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832
  [fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850
  [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


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

  No changes in participating hosts


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

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7046 -> Patchwork_14741

  CI-20190529: 20190529
  CI_DRM_7046: 136f98967ad06da28fd795aa83be314c7b641c49 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5220: 1e38e32d721210a780198c8293a6b8c8e881df68 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14741: 4081e8320e9caea4af807b3c0c904b8e175a1f4d @ 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_14741/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2] drm/i915/vbt: Handle generic DTD block
@ 2019-10-28 19:41   ` Matt Roper
  0 siblings, 0 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-28 19:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
old LFP panel mode data in block 42.  Let's start parsing this block to
fill in the panel fixed mode on devices with a >=229 VBT.

v2:
 * Update according to the recent updates:
    - DTD size is now 16 bits instead of 24
    - polarity is now just a single bit for hsync and vsync and is
      properly documented
 * Minor checkpatch fix

Bspec: 54751
Bspec: 20148
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c     | 87 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 +++++++
 2 files changed, 115 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 63c1bd4c2954..0d1504e23a49 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -202,6 +202,72 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
 	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
 }
 
+static struct drm_display_mode *
+parse_generic_dtd(struct drm_i915_private *dev_priv,
+		  const struct bdb_generic_dtd *generic_dtd)
+{
+	const struct bdb_generic_dtd_entry *dtd;
+	struct drm_display_mode *panel_fixed_mode;
+	int num_dtd;
+
+	if (generic_dtd->gdtd_size < sizeof(struct bdb_generic_dtd_entry)) {
+		DRM_ERROR("GDTD size %u is too small.\n",
+			  generic_dtd->gdtd_size);
+		return NULL;
+	} else if (generic_dtd->gdtd_size !=
+		   sizeof(struct bdb_generic_dtd_entry)) {
+		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
+		/* DTD has unknown fields, but keep going */
+	}
+
+	num_dtd = (get_blocksize(generic_dtd) -
+		   sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
+	if (dev_priv->vbt.panel_type > num_dtd) {
+		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
+			  dev_priv->vbt.panel_type, num_dtd);
+		return NULL;
+	}
+
+	dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
+
+	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
+	if (!panel_fixed_mode)
+		return NULL;
+
+	panel_fixed_mode->hdisplay = dtd->hactive;
+	panel_fixed_mode->hsync_start =
+		panel_fixed_mode->hdisplay + dtd->hfront_porch;
+	panel_fixed_mode->hsync_end =
+		panel_fixed_mode->hsync_start + dtd->hsync;
+	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
+
+	panel_fixed_mode->vdisplay = dtd->vactive;
+	panel_fixed_mode->vsync_start =
+		panel_fixed_mode->vdisplay + dtd->vfront_porch;
+	panel_fixed_mode->vsync_end =
+		panel_fixed_mode->vsync_start + dtd->vsync;
+	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
+
+	panel_fixed_mode->clock = dtd->pixel_clock;
+	panel_fixed_mode->width_mm = dtd->width_mm;
+	panel_fixed_mode->height_mm = dtd->height_mm;
+
+	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
+	drm_mode_set_name(panel_fixed_mode);
+
+	if (dtd->hsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
+
+	if (dtd->vsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
+
+	return panel_fixed_mode;
+}
+
 /* Try to find integrated panel data */
 static void
 parse_lfp_panel_data(struct drm_i915_private *dev_priv,
@@ -210,6 +276,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 	const struct bdb_lvds_options *lvds_options;
 	const struct bdb_lvds_lfp_data *lvds_lfp_data;
 	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
+	const struct bdb_generic_dtd *generic_dtd;
 	const struct lvds_dvo_timing *panel_dvo_timing;
 	const struct lvds_fp_timing *fp_timing;
 	struct drm_display_mode *panel_fixed_mode;
@@ -262,6 +329,18 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 		break;
 	}
 
+	if (bdb->version >= 229) {
+		generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
+		if (!generic_dtd)
+			return;
+
+		panel_fixed_mode = parse_generic_dtd(dev_priv, generic_dtd);
+		if (!panel_fixed_mode)
+			return;
+
+		goto skip_legacy_lfp;
+	}
+
 	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
 	if (!lvds_lfp_data)
 		return;
@@ -282,9 +361,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 
 	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
 
-	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
-	drm_mode_debug_printmodeline(panel_fixed_mode);
-
 	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
 				       lvds_lfp_data_ptrs,
 				       panel_type);
@@ -297,6 +373,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 				      dev_priv->vbt.bios_lvds_val);
 		}
 	}
+
+skip_legacy_lfp:
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
+	drm_mode_debug_printmodeline(panel_fixed_mode);
+
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 69a7cb1fa121..82fcab0b3752 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -115,6 +115,7 @@ enum bdb_block_id {
 	BDB_MIPI_CONFIG			= 52,
 	BDB_MIPI_SEQUENCE		= 53,
 	BDB_COMPRESSION_PARAMETERS	= 56,
+	BDB_GENERIC_DTD			= 58,
 	BDB_SKIP			= 254, /* VBIOS private block, ignore */
 };
 
@@ -863,4 +864,34 @@ struct bdb_compression_parameters {
 	struct dsc_compression_parameters_entry data[16];
 } __packed;
 
+/*
+ * Block 58 - Generic DTD Block
+ */
+
+struct bdb_generic_dtd_entry {
+	u32 pixel_clock;
+	u16 hactive;
+	u16 hblank;
+	u16 hfront_porch;
+	u16 hsync;
+	u16 vactive;
+	u16 vblank;
+	u16 vfront_porch;
+	u16 vsync;
+	u16 width_mm;
+	u16 height_mm;
+
+	/* Flags */
+	u8 rsvd_flags:6;
+	u8 vsync_polarity:1;
+	u8 hsync_polarity:1;
+
+	u32 rsvd:24;
+} __packed;
+
+struct bdb_generic_dtd {
+	u16 gdtd_size;
+	struct bdb_generic_dtd_entry dtd[0];	/* up to 24 DTD's */
+} __packed;
+
 #endif /* _INTEL_VBT_DEFS_H_ */
-- 
2.21.0

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

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

* [Intel-gfx] [PATCH v2] drm/i915/vbt: Handle generic DTD block
@ 2019-10-28 19:41   ` Matt Roper
  0 siblings, 0 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-28 19:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
old LFP panel mode data in block 42.  Let's start parsing this block to
fill in the panel fixed mode on devices with a >=229 VBT.

v2:
 * Update according to the recent updates:
    - DTD size is now 16 bits instead of 24
    - polarity is now just a single bit for hsync and vsync and is
      properly documented
 * Minor checkpatch fix

Bspec: 54751
Bspec: 20148
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c     | 87 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 +++++++
 2 files changed, 115 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 63c1bd4c2954..0d1504e23a49 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -202,6 +202,72 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
 	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
 }
 
+static struct drm_display_mode *
+parse_generic_dtd(struct drm_i915_private *dev_priv,
+		  const struct bdb_generic_dtd *generic_dtd)
+{
+	const struct bdb_generic_dtd_entry *dtd;
+	struct drm_display_mode *panel_fixed_mode;
+	int num_dtd;
+
+	if (generic_dtd->gdtd_size < sizeof(struct bdb_generic_dtd_entry)) {
+		DRM_ERROR("GDTD size %u is too small.\n",
+			  generic_dtd->gdtd_size);
+		return NULL;
+	} else if (generic_dtd->gdtd_size !=
+		   sizeof(struct bdb_generic_dtd_entry)) {
+		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
+		/* DTD has unknown fields, but keep going */
+	}
+
+	num_dtd = (get_blocksize(generic_dtd) -
+		   sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
+	if (dev_priv->vbt.panel_type > num_dtd) {
+		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
+			  dev_priv->vbt.panel_type, num_dtd);
+		return NULL;
+	}
+
+	dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
+
+	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
+	if (!panel_fixed_mode)
+		return NULL;
+
+	panel_fixed_mode->hdisplay = dtd->hactive;
+	panel_fixed_mode->hsync_start =
+		panel_fixed_mode->hdisplay + dtd->hfront_porch;
+	panel_fixed_mode->hsync_end =
+		panel_fixed_mode->hsync_start + dtd->hsync;
+	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
+
+	panel_fixed_mode->vdisplay = dtd->vactive;
+	panel_fixed_mode->vsync_start =
+		panel_fixed_mode->vdisplay + dtd->vfront_porch;
+	panel_fixed_mode->vsync_end =
+		panel_fixed_mode->vsync_start + dtd->vsync;
+	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
+
+	panel_fixed_mode->clock = dtd->pixel_clock;
+	panel_fixed_mode->width_mm = dtd->width_mm;
+	panel_fixed_mode->height_mm = dtd->height_mm;
+
+	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
+	drm_mode_set_name(panel_fixed_mode);
+
+	if (dtd->hsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
+
+	if (dtd->vsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
+
+	return panel_fixed_mode;
+}
+
 /* Try to find integrated panel data */
 static void
 parse_lfp_panel_data(struct drm_i915_private *dev_priv,
@@ -210,6 +276,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 	const struct bdb_lvds_options *lvds_options;
 	const struct bdb_lvds_lfp_data *lvds_lfp_data;
 	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
+	const struct bdb_generic_dtd *generic_dtd;
 	const struct lvds_dvo_timing *panel_dvo_timing;
 	const struct lvds_fp_timing *fp_timing;
 	struct drm_display_mode *panel_fixed_mode;
@@ -262,6 +329,18 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 		break;
 	}
 
+	if (bdb->version >= 229) {
+		generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
+		if (!generic_dtd)
+			return;
+
+		panel_fixed_mode = parse_generic_dtd(dev_priv, generic_dtd);
+		if (!panel_fixed_mode)
+			return;
+
+		goto skip_legacy_lfp;
+	}
+
 	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
 	if (!lvds_lfp_data)
 		return;
@@ -282,9 +361,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 
 	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
 
-	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
-	drm_mode_debug_printmodeline(panel_fixed_mode);
-
 	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
 				       lvds_lfp_data_ptrs,
 				       panel_type);
@@ -297,6 +373,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 				      dev_priv->vbt.bios_lvds_val);
 		}
 	}
+
+skip_legacy_lfp:
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
+	drm_mode_debug_printmodeline(panel_fixed_mode);
+
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 69a7cb1fa121..82fcab0b3752 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -115,6 +115,7 @@ enum bdb_block_id {
 	BDB_MIPI_CONFIG			= 52,
 	BDB_MIPI_SEQUENCE		= 53,
 	BDB_COMPRESSION_PARAMETERS	= 56,
+	BDB_GENERIC_DTD			= 58,
 	BDB_SKIP			= 254, /* VBIOS private block, ignore */
 };
 
@@ -863,4 +864,34 @@ struct bdb_compression_parameters {
 	struct dsc_compression_parameters_entry data[16];
 } __packed;
 
+/*
+ * Block 58 - Generic DTD Block
+ */
+
+struct bdb_generic_dtd_entry {
+	u32 pixel_clock;
+	u16 hactive;
+	u16 hblank;
+	u16 hfront_porch;
+	u16 hsync;
+	u16 vactive;
+	u16 vblank;
+	u16 vfront_porch;
+	u16 vsync;
+	u16 width_mm;
+	u16 height_mm;
+
+	/* Flags */
+	u8 rsvd_flags:6;
+	u8 vsync_polarity:1;
+	u8 hsync_polarity:1;
+
+	u32 rsvd:24;
+} __packed;
+
+struct bdb_generic_dtd {
+	u16 gdtd_size;
+	struct bdb_generic_dtd_entry dtd[0];	/* up to 24 DTD's */
+} __packed;
+
 #endif /* _INTEL_VBT_DEFS_H_ */
-- 
2.21.0

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

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

* ✗ Fi.CI.BAT: failure for drm/i915/vbt: Handle generic DTD block (rev2)
@ 2019-10-29  0:14   ` Patchwork
  0 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-29  0:14 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/vbt: Handle generic DTD block (rev2)
URL   : https://patchwork.freedesktop.org/series/67811/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7206 -> Patchwork_15033
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15033 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15033, please notify your bug team 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_15033/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live_blt:
    - fi-skl-6770hq:      [PASS][1] -> [TIMEOUT][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-skl-6770hq/igt@i915_selftest@live_blt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-skl-6770hq/igt@i915_selftest@live_blt.html
    - fi-cfl-8109u:       [PASS][3] -> [TIMEOUT][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-cfl-8109u/igt@i915_selftest@live_blt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-cfl-8109u/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_client:
    - fi-skl-iommu:       [PASS][5] -> [INCOMPLETE][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-skl-iommu/igt@i915_selftest@live_client.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-skl-iommu/igt@i915_selftest@live_client.html

  * igt@runner@aborted:
    - fi-cfl-8109u:       NOTRUN -> [FAIL][7]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-cfl-8109u/igt@runner@aborted.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_mmap_gtt@basic-short:
    - fi-icl-u3:          [PASS][8] -> [DMESG-WARN][9] ([fdo#107724]) +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u3/igt@gem_mmap_gtt@basic-short.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u3/igt@gem_mmap_gtt@basic-short.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-bsw-n3050:       [PASS][10] -> [INCOMPLETE][11] ([fdo# 111542])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-bsw-n3050/igt@i915_selftest@live_gem_contexts.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-bsw-n3050/igt@i915_selftest@live_gem_contexts.html

  * igt@kms_busy@basic-flip-a:
    - fi-icl-u2:          [PASS][12] -> [INCOMPLETE][13] ([fdo#107713])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u2/igt@kms_busy@basic-flip-a.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u2/igt@kms_busy@basic-flip-a.html

  
#### Possible fixes ####

  * igt@gem_ctx_create@basic-files:
    - {fi-icl-dsi}:       [INCOMPLETE][14] ([fdo#107713] / [fdo#109100]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-dsi/igt@gem_ctx_create@basic-files.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-dsi/igt@gem_ctx_create@basic-files.html

  * igt@gem_ctx_switch@legacy-render:
    - fi-bxt-dsi:         [INCOMPLETE][16] ([fdo#103927] / [fdo#111381]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html

  * igt@gem_mmap_gtt@basic-read-write-distinct:
    - fi-icl-u3:          [DMESG-WARN][18] ([fdo#107724]) -> [PASS][19] +2 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u3/igt@gem_mmap_gtt@basic-read-write-distinct.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u3/igt@gem_mmap_gtt@basic-read-write-distinct.html

  * igt@i915_selftest@live_blt:
    - fi-kbl-guc:         [TIMEOUT][20] -> [PASS][21]
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-kbl-guc/igt@i915_selftest@live_blt.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-kbl-guc/igt@i915_selftest@live_blt.html
    - fi-apl-guc:         [TIMEOUT][22] -> [PASS][23]
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-apl-guc/igt@i915_selftest@live_blt.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-apl-guc/igt@i915_selftest@live_blt.html
    - fi-kbl-r:           [TIMEOUT][24] -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-kbl-r/igt@i915_selftest@live_blt.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-kbl-r/igt@i915_selftest@live_blt.html
    - {fi-icl-u4}:        [TIMEOUT][26] -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u4/igt@i915_selftest@live_blt.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u4/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_client:
    - fi-cfl-8700k:       [INCOMPLETE][28] -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-cfl-8700k/igt@i915_selftest@live_client.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-cfl-8700k/igt@i915_selftest@live_client.html

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

  [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381


Participating hosts (50 -> 43)
------------------------------

  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7206 -> Patchwork_15033

  CI-20190529: 20190529
  CI_DRM_7206: 197ff4c24c6762ac5bbd8c5364d6f840fb9929c5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5248: 81e55f1f97d73e48f00caa7e4fb98295023c5afa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15033: da71bf456670368ee6fb4e3dce9d32afd3536360 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

da71bf456670 drm/i915/vbt: Handle generic DTD block

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/vbt: Handle generic DTD block (rev2)
@ 2019-10-29  0:14   ` Patchwork
  0 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2019-10-29  0:14 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/vbt: Handle generic DTD block (rev2)
URL   : https://patchwork.freedesktop.org/series/67811/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7206 -> Patchwork_15033
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15033 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15033, please notify your bug team 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_15033/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live_blt:
    - fi-skl-6770hq:      [PASS][1] -> [TIMEOUT][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-skl-6770hq/igt@i915_selftest@live_blt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-skl-6770hq/igt@i915_selftest@live_blt.html
    - fi-cfl-8109u:       [PASS][3] -> [TIMEOUT][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-cfl-8109u/igt@i915_selftest@live_blt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-cfl-8109u/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_client:
    - fi-skl-iommu:       [PASS][5] -> [INCOMPLETE][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-skl-iommu/igt@i915_selftest@live_client.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-skl-iommu/igt@i915_selftest@live_client.html

  * igt@runner@aborted:
    - fi-cfl-8109u:       NOTRUN -> [FAIL][7]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-cfl-8109u/igt@runner@aborted.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_mmap_gtt@basic-short:
    - fi-icl-u3:          [PASS][8] -> [DMESG-WARN][9] ([fdo#107724]) +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u3/igt@gem_mmap_gtt@basic-short.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u3/igt@gem_mmap_gtt@basic-short.html

  * igt@i915_selftest@live_gem_contexts:
    - fi-bsw-n3050:       [PASS][10] -> [INCOMPLETE][11] ([fdo# 111542])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-bsw-n3050/igt@i915_selftest@live_gem_contexts.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-bsw-n3050/igt@i915_selftest@live_gem_contexts.html

  * igt@kms_busy@basic-flip-a:
    - fi-icl-u2:          [PASS][12] -> [INCOMPLETE][13] ([fdo#107713])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u2/igt@kms_busy@basic-flip-a.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u2/igt@kms_busy@basic-flip-a.html

  
#### Possible fixes ####

  * igt@gem_ctx_create@basic-files:
    - {fi-icl-dsi}:       [INCOMPLETE][14] ([fdo#107713] / [fdo#109100]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-dsi/igt@gem_ctx_create@basic-files.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-dsi/igt@gem_ctx_create@basic-files.html

  * igt@gem_ctx_switch@legacy-render:
    - fi-bxt-dsi:         [INCOMPLETE][16] ([fdo#103927] / [fdo#111381]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-bxt-dsi/igt@gem_ctx_switch@legacy-render.html

  * igt@gem_mmap_gtt@basic-read-write-distinct:
    - fi-icl-u3:          [DMESG-WARN][18] ([fdo#107724]) -> [PASS][19] +2 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u3/igt@gem_mmap_gtt@basic-read-write-distinct.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u3/igt@gem_mmap_gtt@basic-read-write-distinct.html

  * igt@i915_selftest@live_blt:
    - fi-kbl-guc:         [TIMEOUT][20] -> [PASS][21]
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-kbl-guc/igt@i915_selftest@live_blt.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-kbl-guc/igt@i915_selftest@live_blt.html
    - fi-apl-guc:         [TIMEOUT][22] -> [PASS][23]
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-apl-guc/igt@i915_selftest@live_blt.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-apl-guc/igt@i915_selftest@live_blt.html
    - fi-kbl-r:           [TIMEOUT][24] -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-kbl-r/igt@i915_selftest@live_blt.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-kbl-r/igt@i915_selftest@live_blt.html
    - {fi-icl-u4}:        [TIMEOUT][26] -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-icl-u4/igt@i915_selftest@live_blt.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-icl-u4/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_client:
    - fi-cfl-8700k:       [INCOMPLETE][28] -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7206/fi-cfl-8700k/igt@i915_selftest@live_client.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/fi-cfl-8700k/igt@i915_selftest@live_client.html

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

  [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381


Participating hosts (50 -> 43)
------------------------------

  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7206 -> Patchwork_15033

  CI-20190529: 20190529
  CI_DRM_7206: 197ff4c24c6762ac5bbd8c5364d6f840fb9929c5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5248: 81e55f1f97d73e48f00caa7e4fb98295023c5afa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15033: da71bf456670368ee6fb4e3dce9d32afd3536360 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

da71bf456670 drm/i915/vbt: Handle generic DTD block

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15033/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2] drm/i915/vbt: Handle generic DTD block
@ 2019-10-29  7:10     ` Jani Nikula
  0 siblings, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2019-10-29  7:10 UTC (permalink / raw)
  To: Matt Roper, intel-gfx

On Mon, 28 Oct 2019, Matt Roper <matthew.d.roper@intel.com> wrote:
> VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
> old LFP panel mode data in block 42.  Let's start parsing this block to
> fill in the panel fixed mode on devices with a >=229 VBT.
>
> v2:
>  * Update according to the recent updates:
>     - DTD size is now 16 bits instead of 24
>     - polarity is now just a single bit for hsync and vsync and is
>       properly documented
>  * Minor checkpatch fix
>
> Bspec: 54751
> Bspec: 20148
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c     | 87 ++++++++++++++++++-
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 +++++++
>  2 files changed, 115 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 63c1bd4c2954..0d1504e23a49 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -202,6 +202,72 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
>  	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
>  }
>  
> +static struct drm_display_mode *
> +parse_generic_dtd(struct drm_i915_private *dev_priv,
> +		  const struct bdb_generic_dtd *generic_dtd)
> +{
> +	const struct bdb_generic_dtd_entry *dtd;
> +	struct drm_display_mode *panel_fixed_mode;
> +	int num_dtd;
> +
> +	if (generic_dtd->gdtd_size < sizeof(struct bdb_generic_dtd_entry)) {
> +		DRM_ERROR("GDTD size %u is too small.\n",
> +			  generic_dtd->gdtd_size);
> +		return NULL;

I think in the future we may want to copy this to an allocated dtd entry
with zero padding so we don't have to care in the parser. But this can
be like this for now.

> +	} else if (generic_dtd->gdtd_size !=
> +		   sizeof(struct bdb_generic_dtd_entry)) {
> +		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
> +		/* DTD has unknown fields, but keep going */
> +	}
> +
> +	num_dtd = (get_blocksize(generic_dtd) -
> +		   sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
> +	if (dev_priv->vbt.panel_type > num_dtd) {
> +		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
> +			  dev_priv->vbt.panel_type, num_dtd);
> +		return NULL;
> +	}
> +
> +	dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
> +
> +	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
> +	if (!panel_fixed_mode)
> +		return NULL;
> +
> +	panel_fixed_mode->hdisplay = dtd->hactive;
> +	panel_fixed_mode->hsync_start =
> +		panel_fixed_mode->hdisplay + dtd->hfront_porch;
> +	panel_fixed_mode->hsync_end =
> +		panel_fixed_mode->hsync_start + dtd->hsync;
> +	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
> +
> +	panel_fixed_mode->vdisplay = dtd->vactive;
> +	panel_fixed_mode->vsync_start =
> +		panel_fixed_mode->vdisplay + dtd->vfront_porch;
> +	panel_fixed_mode->vsync_end =
> +		panel_fixed_mode->vsync_start + dtd->vsync;
> +	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
> +
> +	panel_fixed_mode->clock = dtd->pixel_clock;
> +	panel_fixed_mode->width_mm = dtd->width_mm;
> +	panel_fixed_mode->height_mm = dtd->height_mm;
> +
> +	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
> +	drm_mode_set_name(panel_fixed_mode);
> +
> +	if (dtd->hsync_polarity)
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
> +	else
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
> +
> +	if (dtd->vsync_polarity)
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
> +	else
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
> +
> +	return panel_fixed_mode;
> +}
> +
>  /* Try to find integrated panel data */
>  static void
>  parse_lfp_panel_data(struct drm_i915_private *dev_priv,
> @@ -210,6 +276,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  	const struct bdb_lvds_options *lvds_options;
>  	const struct bdb_lvds_lfp_data *lvds_lfp_data;
>  	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
> +	const struct bdb_generic_dtd *generic_dtd;
>  	const struct lvds_dvo_timing *panel_dvo_timing;
>  	const struct lvds_fp_timing *fp_timing;
>  	struct drm_display_mode *panel_fixed_mode;
> @@ -262,6 +329,18 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  		break;
>  	}
>  
> +	if (bdb->version >= 229) {
> +		generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
> +		if (!generic_dtd)
> +			return;
> +
> +		panel_fixed_mode = parse_generic_dtd(dev_priv, generic_dtd);
> +		if (!panel_fixed_mode)
> +			return;

Knowing how it is with VBTs... maybe we should fall back to the old ways
in both error paths?

I'm also wondering about splitting this at a higher level for clarity
instead of shoving this here. Call the parser for each bdb block at the
top level? Handle the case for legacy conditional to the fixed mode
already being there?

> +
> +		goto skip_legacy_lfp;
> +	}
> +
>  	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
>  	if (!lvds_lfp_data)
>  		return;
> @@ -282,9 +361,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  
>  	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;

I think you'll want to set this for the generic dtd too. ;)

>  
> -	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
> -	drm_mode_debug_printmodeline(panel_fixed_mode);
> -
>  	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
>  				       lvds_lfp_data_ptrs,
>  				       panel_type);
> @@ -297,6 +373,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  				      dev_priv->vbt.bios_lvds_val);
>  		}
>  	}
> +
> +skip_legacy_lfp:
> +	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
> +	drm_mode_debug_printmodeline(panel_fixed_mode);
> +
>  }
>  
>  static void
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 69a7cb1fa121..82fcab0b3752 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -115,6 +115,7 @@ enum bdb_block_id {
>  	BDB_MIPI_CONFIG			= 52,
>  	BDB_MIPI_SEQUENCE		= 53,
>  	BDB_COMPRESSION_PARAMETERS	= 56,
> +	BDB_GENERIC_DTD			= 58,
>  	BDB_SKIP			= 254, /* VBIOS private block, ignore */
>  };
>  
> @@ -863,4 +864,34 @@ struct bdb_compression_parameters {
>  	struct dsc_compression_parameters_entry data[16];
>  } __packed;
>  
> +/*
> + * Block 58 - Generic DTD Block
> + */
> +
> +struct bdb_generic_dtd_entry {

I think I wanted to restrict the bdb_ prefix to actual top level bdb
blocks.

> +	u32 pixel_clock;
> +	u16 hactive;
> +	u16 hblank;
> +	u16 hfront_porch;
> +	u16 hsync;
> +	u16 vactive;
> +	u16 vblank;
> +	u16 vfront_porch;
> +	u16 vsync;
> +	u16 width_mm;
> +	u16 height_mm;
> +
> +	/* Flags */
> +	u8 rsvd_flags:6;
> +	u8 vsync_polarity:1;
> +	u8 hsync_polarity:1;
> +
> +	u32 rsvd:24;
> +} __packed;
> +
> +struct bdb_generic_dtd {
> +	u16 gdtd_size;
> +	struct bdb_generic_dtd_entry dtd[0];	/* up to 24 DTD's */

I think [] without the 0 is the standard way nowadays.

> +} __packed;
> +
>  #endif /* _INTEL_VBT_DEFS_H_ */

-- 
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] 14+ messages in thread

* Re: [Intel-gfx] [PATCH v2] drm/i915/vbt: Handle generic DTD block
@ 2019-10-29  7:10     ` Jani Nikula
  0 siblings, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2019-10-29  7:10 UTC (permalink / raw)
  To: Matt Roper, intel-gfx

On Mon, 28 Oct 2019, Matt Roper <matthew.d.roper@intel.com> wrote:
> VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
> old LFP panel mode data in block 42.  Let's start parsing this block to
> fill in the panel fixed mode on devices with a >=229 VBT.
>
> v2:
>  * Update according to the recent updates:
>     - DTD size is now 16 bits instead of 24
>     - polarity is now just a single bit for hsync and vsync and is
>       properly documented
>  * Minor checkpatch fix
>
> Bspec: 54751
> Bspec: 20148
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_bios.c     | 87 ++++++++++++++++++-
>  drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 +++++++
>  2 files changed, 115 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 63c1bd4c2954..0d1504e23a49 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -202,6 +202,72 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
>  	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
>  }
>  
> +static struct drm_display_mode *
> +parse_generic_dtd(struct drm_i915_private *dev_priv,
> +		  const struct bdb_generic_dtd *generic_dtd)
> +{
> +	const struct bdb_generic_dtd_entry *dtd;
> +	struct drm_display_mode *panel_fixed_mode;
> +	int num_dtd;
> +
> +	if (generic_dtd->gdtd_size < sizeof(struct bdb_generic_dtd_entry)) {
> +		DRM_ERROR("GDTD size %u is too small.\n",
> +			  generic_dtd->gdtd_size);
> +		return NULL;

I think in the future we may want to copy this to an allocated dtd entry
with zero padding so we don't have to care in the parser. But this can
be like this for now.

> +	} else if (generic_dtd->gdtd_size !=
> +		   sizeof(struct bdb_generic_dtd_entry)) {
> +		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
> +		/* DTD has unknown fields, but keep going */
> +	}
> +
> +	num_dtd = (get_blocksize(generic_dtd) -
> +		   sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
> +	if (dev_priv->vbt.panel_type > num_dtd) {
> +		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
> +			  dev_priv->vbt.panel_type, num_dtd);
> +		return NULL;
> +	}
> +
> +	dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
> +
> +	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
> +	if (!panel_fixed_mode)
> +		return NULL;
> +
> +	panel_fixed_mode->hdisplay = dtd->hactive;
> +	panel_fixed_mode->hsync_start =
> +		panel_fixed_mode->hdisplay + dtd->hfront_porch;
> +	panel_fixed_mode->hsync_end =
> +		panel_fixed_mode->hsync_start + dtd->hsync;
> +	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
> +
> +	panel_fixed_mode->vdisplay = dtd->vactive;
> +	panel_fixed_mode->vsync_start =
> +		panel_fixed_mode->vdisplay + dtd->vfront_porch;
> +	panel_fixed_mode->vsync_end =
> +		panel_fixed_mode->vsync_start + dtd->vsync;
> +	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
> +
> +	panel_fixed_mode->clock = dtd->pixel_clock;
> +	panel_fixed_mode->width_mm = dtd->width_mm;
> +	panel_fixed_mode->height_mm = dtd->height_mm;
> +
> +	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
> +	drm_mode_set_name(panel_fixed_mode);
> +
> +	if (dtd->hsync_polarity)
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
> +	else
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
> +
> +	if (dtd->vsync_polarity)
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
> +	else
> +		panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
> +
> +	return panel_fixed_mode;
> +}
> +
>  /* Try to find integrated panel data */
>  static void
>  parse_lfp_panel_data(struct drm_i915_private *dev_priv,
> @@ -210,6 +276,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  	const struct bdb_lvds_options *lvds_options;
>  	const struct bdb_lvds_lfp_data *lvds_lfp_data;
>  	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
> +	const struct bdb_generic_dtd *generic_dtd;
>  	const struct lvds_dvo_timing *panel_dvo_timing;
>  	const struct lvds_fp_timing *fp_timing;
>  	struct drm_display_mode *panel_fixed_mode;
> @@ -262,6 +329,18 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  		break;
>  	}
>  
> +	if (bdb->version >= 229) {
> +		generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
> +		if (!generic_dtd)
> +			return;
> +
> +		panel_fixed_mode = parse_generic_dtd(dev_priv, generic_dtd);
> +		if (!panel_fixed_mode)
> +			return;

Knowing how it is with VBTs... maybe we should fall back to the old ways
in both error paths?

I'm also wondering about splitting this at a higher level for clarity
instead of shoving this here. Call the parser for each bdb block at the
top level? Handle the case for legacy conditional to the fixed mode
already being there?

> +
> +		goto skip_legacy_lfp;
> +	}
> +
>  	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
>  	if (!lvds_lfp_data)
>  		return;
> @@ -282,9 +361,6 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  
>  	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;

I think you'll want to set this for the generic dtd too. ;)

>  
> -	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
> -	drm_mode_debug_printmodeline(panel_fixed_mode);
> -
>  	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
>  				       lvds_lfp_data_ptrs,
>  				       panel_type);
> @@ -297,6 +373,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
>  				      dev_priv->vbt.bios_lvds_val);
>  		}
>  	}
> +
> +skip_legacy_lfp:
> +	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
> +	drm_mode_debug_printmodeline(panel_fixed_mode);
> +
>  }
>  
>  static void
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 69a7cb1fa121..82fcab0b3752 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -115,6 +115,7 @@ enum bdb_block_id {
>  	BDB_MIPI_CONFIG			= 52,
>  	BDB_MIPI_SEQUENCE		= 53,
>  	BDB_COMPRESSION_PARAMETERS	= 56,
> +	BDB_GENERIC_DTD			= 58,
>  	BDB_SKIP			= 254, /* VBIOS private block, ignore */
>  };
>  
> @@ -863,4 +864,34 @@ struct bdb_compression_parameters {
>  	struct dsc_compression_parameters_entry data[16];
>  } __packed;
>  
> +/*
> + * Block 58 - Generic DTD Block
> + */
> +
> +struct bdb_generic_dtd_entry {

I think I wanted to restrict the bdb_ prefix to actual top level bdb
blocks.

> +	u32 pixel_clock;
> +	u16 hactive;
> +	u16 hblank;
> +	u16 hfront_porch;
> +	u16 hsync;
> +	u16 vactive;
> +	u16 vblank;
> +	u16 vfront_porch;
> +	u16 vsync;
> +	u16 width_mm;
> +	u16 height_mm;
> +
> +	/* Flags */
> +	u8 rsvd_flags:6;
> +	u8 vsync_polarity:1;
> +	u8 hsync_polarity:1;
> +
> +	u32 rsvd:24;
> +} __packed;
> +
> +struct bdb_generic_dtd {
> +	u16 gdtd_size;
> +	struct bdb_generic_dtd_entry dtd[0];	/* up to 24 DTD's */

I think [] without the 0 is the standard way nowadays.

> +} __packed;
> +
>  #endif /* _INTEL_VBT_DEFS_H_ */

-- 
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] 14+ messages in thread

* [PATCH v3 1/2] drm/i915/vbt: Parse panel options separately from timing data
@ 2019-10-29 16:43       ` Matt Roper
  0 siblings, 0 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-29 16:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

Newer VBT versions will add an alternate way to read panel DTD
information, so let's split parsing of the general panel information
from the timing data in preparation.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 27 +++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 56ce973a92ab..2d2c9d82e805 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -202,17 +202,12 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
 	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
 }
 
-/* Try to find integrated panel data */
+/* Parse general panel options */
 static void
-parse_lfp_panel_data(struct drm_i915_private *dev_priv,
-		     const struct bdb_header *bdb)
+parse_panel_options(struct drm_i915_private *dev_priv,
+		    const struct bdb_header *bdb)
 {
 	const struct bdb_lvds_options *lvds_options;
-	const struct bdb_lvds_lfp_data *lvds_lfp_data;
-	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
-	const struct lvds_dvo_timing *panel_dvo_timing;
-	const struct lvds_fp_timing *fp_timing;
-	struct drm_display_mode *panel_fixed_mode;
 	int panel_type;
 	int drrs_mode;
 	int ret;
@@ -261,6 +256,19 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 		DRM_DEBUG_KMS("DRRS not supported (VBT input)\n");
 		break;
 	}
+}
+
+/* Try to find integrated panel timing data */
+static void
+parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
+		    const struct bdb_header *bdb)
+{
+	const struct bdb_lvds_lfp_data *lvds_lfp_data;
+	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
+	const struct lvds_dvo_timing *panel_dvo_timing;
+	const struct lvds_fp_timing *fp_timing;
+	struct drm_display_mode *panel_fixed_mode;
+	int panel_type = dev_priv->vbt.panel_type;
 
 	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
 	if (!lvds_lfp_data)
@@ -1874,7 +1882,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
 	/* Grab useful general definitions */
 	parse_general_features(dev_priv, bdb);
 	parse_general_definitions(dev_priv, bdb);
-	parse_lfp_panel_data(dev_priv, bdb);
+	parse_panel_options(dev_priv, bdb);
+	parse_lfp_panel_dtd(dev_priv, bdb);
 	parse_lfp_backlight(dev_priv, bdb);
 	parse_sdvo_panel_data(dev_priv, bdb);
 	parse_driver_features(dev_priv, bdb);
-- 
2.21.0

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

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

* [Intel-gfx] [PATCH v3 1/2] drm/i915/vbt: Parse panel options separately from timing data
@ 2019-10-29 16:43       ` Matt Roper
  0 siblings, 0 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-29 16:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

Newer VBT versions will add an alternate way to read panel DTD
information, so let's split parsing of the general panel information
from the timing data in preparation.

Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c | 27 +++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 56ce973a92ab..2d2c9d82e805 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -202,17 +202,12 @@ get_lvds_fp_timing(const struct bdb_header *bdb,
 	return (const struct lvds_fp_timing *)((const u8 *)bdb + ofs);
 }
 
-/* Try to find integrated panel data */
+/* Parse general panel options */
 static void
-parse_lfp_panel_data(struct drm_i915_private *dev_priv,
-		     const struct bdb_header *bdb)
+parse_panel_options(struct drm_i915_private *dev_priv,
+		    const struct bdb_header *bdb)
 {
 	const struct bdb_lvds_options *lvds_options;
-	const struct bdb_lvds_lfp_data *lvds_lfp_data;
-	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
-	const struct lvds_dvo_timing *panel_dvo_timing;
-	const struct lvds_fp_timing *fp_timing;
-	struct drm_display_mode *panel_fixed_mode;
 	int panel_type;
 	int drrs_mode;
 	int ret;
@@ -261,6 +256,19 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
 		DRM_DEBUG_KMS("DRRS not supported (VBT input)\n");
 		break;
 	}
+}
+
+/* Try to find integrated panel timing data */
+static void
+parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
+		    const struct bdb_header *bdb)
+{
+	const struct bdb_lvds_lfp_data *lvds_lfp_data;
+	const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
+	const struct lvds_dvo_timing *panel_dvo_timing;
+	const struct lvds_fp_timing *fp_timing;
+	struct drm_display_mode *panel_fixed_mode;
+	int panel_type = dev_priv->vbt.panel_type;
 
 	lvds_lfp_data = find_section(bdb, BDB_LVDS_LFP_DATA);
 	if (!lvds_lfp_data)
@@ -1874,7 +1882,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
 	/* Grab useful general definitions */
 	parse_general_features(dev_priv, bdb);
 	parse_general_definitions(dev_priv, bdb);
-	parse_lfp_panel_data(dev_priv, bdb);
+	parse_panel_options(dev_priv, bdb);
+	parse_lfp_panel_dtd(dev_priv, bdb);
 	parse_lfp_backlight(dev_priv, bdb);
 	parse_sdvo_panel_data(dev_priv, bdb);
 	parse_driver_features(dev_priv, bdb);
-- 
2.21.0

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

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

* [PATCH v3 2/2] drm/i915/vbt: Handle generic DTD block
@ 2019-10-29 16:43         ` Matt Roper
  0 siblings, 0 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-29 16:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
old LFP panel mode data in block 42.  Let's start parsing this block to
fill in the panel fixed mode on devices with a >=229 VBT.

v2:
 * Update according to the recent updates:
    - DTD size is now 16 bits instead of 24
    - polarity is now just a single bit for hsync and vsync and is
      properly documented
 * Minor checkpatch fix

v3:
 * Now that panel options are parsed separately from the previous patch,
   move generic DTD parsing into a function parallel to
   parse_lfp_panel_dtd.  We'll still fall back to looking at the legacy
   LVDS timing block if the generic DTD fails.  (Jani)
 * Don't forget to actually set lfp_lvds_vbt_mode!  (Jani)
 * Drop "bdb_" prefix from dtd entry structure.  (Jani)
 * Follow C99 standard for structure's flexible array member.  (Jani)

Bspec: 54751
Bspec: 20148
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c     | 86 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 +++++++
 2 files changed, 115 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 2d2c9d82e805..56ce994cdf8c 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -290,7 +290,7 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
 
 	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
 
-	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT legacy lfp table:\n");
 	drm_mode_debug_printmodeline(panel_fixed_mode);
 
 	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
@@ -307,6 +307,81 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
 	}
 }
 
+static void
+parse_generic_dtd(struct drm_i915_private *dev_priv,
+		  const struct bdb_header *bdb)
+{
+	const struct bdb_generic_dtd *generic_dtd;
+	const struct generic_dtd_entry *dtd;
+	struct drm_display_mode *panel_fixed_mode;
+	int num_dtd;
+
+	generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
+	if (!generic_dtd)
+		return;
+
+	if (generic_dtd->gdtd_size < sizeof(struct generic_dtd_entry)) {
+		DRM_ERROR("GDTD size %u is too small.\n",
+			  generic_dtd->gdtd_size);
+		return;
+	} else if (generic_dtd->gdtd_size !=
+		   sizeof(struct generic_dtd_entry)) {
+		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
+		/* DTD has unknown fields, but keep going */
+	}
+
+	num_dtd = (get_blocksize(generic_dtd) -
+		   sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
+	if (dev_priv->vbt.panel_type > num_dtd) {
+		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
+			  dev_priv->vbt.panel_type, num_dtd);
+		return;
+	}
+
+	dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
+
+	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
+	if (!panel_fixed_mode)
+		return;
+
+	panel_fixed_mode->hdisplay = dtd->hactive;
+	panel_fixed_mode->hsync_start =
+		panel_fixed_mode->hdisplay + dtd->hfront_porch;
+	panel_fixed_mode->hsync_end =
+		panel_fixed_mode->hsync_start + dtd->hsync;
+	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
+
+	panel_fixed_mode->vdisplay = dtd->vactive;
+	panel_fixed_mode->vsync_start =
+		panel_fixed_mode->vdisplay + dtd->vfront_porch;
+	panel_fixed_mode->vsync_end =
+		panel_fixed_mode->vsync_start + dtd->vsync;
+	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
+
+	panel_fixed_mode->clock = dtd->pixel_clock;
+	panel_fixed_mode->width_mm = dtd->width_mm;
+	panel_fixed_mode->height_mm = dtd->height_mm;
+
+	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
+	drm_mode_set_name(panel_fixed_mode);
+
+	if (dtd->hsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
+
+	if (dtd->vsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
+
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT generic dtd table:\n");
+	drm_mode_debug_printmodeline(panel_fixed_mode);
+
+	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
+}
+
+
 static void
 parse_lfp_backlight(struct drm_i915_private *dev_priv,
 		    const struct bdb_header *bdb)
@@ -1883,7 +1958,14 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
 	parse_general_features(dev_priv, bdb);
 	parse_general_definitions(dev_priv, bdb);
 	parse_panel_options(dev_priv, bdb);
-	parse_lfp_panel_dtd(dev_priv, bdb);
+	if (bdb->version >= 229)
+		/*
+		 * If this fails, we'll fall back to trying to parse the
+		 * legacy LVDS block below.
+		 */
+		parse_generic_dtd(dev_priv, bdb);
+	if (!dev_priv->vbt.lfp_lvds_vbt_mode)
+		parse_lfp_panel_dtd(dev_priv, bdb);
 	parse_lfp_backlight(dev_priv, bdb);
 	parse_sdvo_panel_data(dev_priv, bdb);
 	parse_driver_features(dev_priv, bdb);
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 531ca788b410..07ee9c7ac5fb 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -115,6 +115,7 @@ enum bdb_block_id {
 	BDB_MIPI_CONFIG			= 52,
 	BDB_MIPI_SEQUENCE		= 53,
 	BDB_COMPRESSION_PARAMETERS	= 56,
+	BDB_GENERIC_DTD			= 58,
 	BDB_SKIP			= 254, /* VBIOS private block, ignore */
 };
 
@@ -865,4 +866,34 @@ struct bdb_compression_parameters {
 	struct dsc_compression_parameters_entry data[16];
 } __packed;
 
+/*
+ * Block 58 - Generic DTD Block
+ */
+
+struct generic_dtd_entry {
+	u32 pixel_clock;
+	u16 hactive;
+	u16 hblank;
+	u16 hfront_porch;
+	u16 hsync;
+	u16 vactive;
+	u16 vblank;
+	u16 vfront_porch;
+	u16 vsync;
+	u16 width_mm;
+	u16 height_mm;
+
+	/* Flags */
+	u8 rsvd_flags:6;
+	u8 vsync_polarity:1;
+	u8 hsync_polarity:1;
+
+	u32 rsvd:24;
+} __packed;
+
+struct bdb_generic_dtd {
+	u16 gdtd_size;
+	struct generic_dtd_entry dtd[];	/* up to 24 DTD's */
+} __packed;
+
 #endif /* _INTEL_VBT_DEFS_H_ */
-- 
2.21.0

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

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

* [Intel-gfx] [PATCH v3 2/2] drm/i915/vbt: Handle generic DTD block
@ 2019-10-29 16:43         ` Matt Roper
  0 siblings, 0 replies; 14+ messages in thread
From: Matt Roper @ 2019-10-29 16:43 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

VBT revision 229 adds a new "Generic DTD" block 58 and deprecates the
old LFP panel mode data in block 42.  Let's start parsing this block to
fill in the panel fixed mode on devices with a >=229 VBT.

v2:
 * Update according to the recent updates:
    - DTD size is now 16 bits instead of 24
    - polarity is now just a single bit for hsync and vsync and is
      properly documented
 * Minor checkpatch fix

v3:
 * Now that panel options are parsed separately from the previous patch,
   move generic DTD parsing into a function parallel to
   parse_lfp_panel_dtd.  We'll still fall back to looking at the legacy
   LVDS timing block if the generic DTD fails.  (Jani)
 * Don't forget to actually set lfp_lvds_vbt_mode!  (Jani)
 * Drop "bdb_" prefix from dtd entry structure.  (Jani)
 * Follow C99 standard for structure's flexible array member.  (Jani)

Bspec: 54751
Bspec: 20148
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_bios.c     | 86 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 31 +++++++
 2 files changed, 115 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 2d2c9d82e805..56ce994cdf8c 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -290,7 +290,7 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
 
 	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
 
-	DRM_DEBUG_KMS("Found panel mode in BIOS VBT tables:\n");
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT legacy lfp table:\n");
 	drm_mode_debug_printmodeline(panel_fixed_mode);
 
 	fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
@@ -307,6 +307,81 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
 	}
 }
 
+static void
+parse_generic_dtd(struct drm_i915_private *dev_priv,
+		  const struct bdb_header *bdb)
+{
+	const struct bdb_generic_dtd *generic_dtd;
+	const struct generic_dtd_entry *dtd;
+	struct drm_display_mode *panel_fixed_mode;
+	int num_dtd;
+
+	generic_dtd = find_section(bdb, BDB_GENERIC_DTD);
+	if (!generic_dtd)
+		return;
+
+	if (generic_dtd->gdtd_size < sizeof(struct generic_dtd_entry)) {
+		DRM_ERROR("GDTD size %u is too small.\n",
+			  generic_dtd->gdtd_size);
+		return;
+	} else if (generic_dtd->gdtd_size !=
+		   sizeof(struct generic_dtd_entry)) {
+		DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size);
+		/* DTD has unknown fields, but keep going */
+	}
+
+	num_dtd = (get_blocksize(generic_dtd) -
+		   sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
+	if (dev_priv->vbt.panel_type > num_dtd) {
+		DRM_ERROR("Panel type %d not found in table of %d DTD's\n",
+			  dev_priv->vbt.panel_type, num_dtd);
+		return;
+	}
+
+	dtd = &generic_dtd->dtd[dev_priv->vbt.panel_type];
+
+	panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL);
+	if (!panel_fixed_mode)
+		return;
+
+	panel_fixed_mode->hdisplay = dtd->hactive;
+	panel_fixed_mode->hsync_start =
+		panel_fixed_mode->hdisplay + dtd->hfront_porch;
+	panel_fixed_mode->hsync_end =
+		panel_fixed_mode->hsync_start + dtd->hsync;
+	panel_fixed_mode->htotal = panel_fixed_mode->hsync_end;
+
+	panel_fixed_mode->vdisplay = dtd->vactive;
+	panel_fixed_mode->vsync_start =
+		panel_fixed_mode->vdisplay + dtd->vfront_porch;
+	panel_fixed_mode->vsync_end =
+		panel_fixed_mode->vsync_start + dtd->vsync;
+	panel_fixed_mode->vtotal = panel_fixed_mode->vsync_end;
+
+	panel_fixed_mode->clock = dtd->pixel_clock;
+	panel_fixed_mode->width_mm = dtd->width_mm;
+	panel_fixed_mode->height_mm = dtd->height_mm;
+
+	panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
+	drm_mode_set_name(panel_fixed_mode);
+
+	if (dtd->hsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
+
+	if (dtd->vsync_polarity)
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
+	else
+		panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
+
+	DRM_DEBUG_KMS("Found panel mode in BIOS VBT generic dtd table:\n");
+	drm_mode_debug_printmodeline(panel_fixed_mode);
+
+	dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
+}
+
+
 static void
 parse_lfp_backlight(struct drm_i915_private *dev_priv,
 		    const struct bdb_header *bdb)
@@ -1883,7 +1958,14 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
 	parse_general_features(dev_priv, bdb);
 	parse_general_definitions(dev_priv, bdb);
 	parse_panel_options(dev_priv, bdb);
-	parse_lfp_panel_dtd(dev_priv, bdb);
+	if (bdb->version >= 229)
+		/*
+		 * If this fails, we'll fall back to trying to parse the
+		 * legacy LVDS block below.
+		 */
+		parse_generic_dtd(dev_priv, bdb);
+	if (!dev_priv->vbt.lfp_lvds_vbt_mode)
+		parse_lfp_panel_dtd(dev_priv, bdb);
 	parse_lfp_backlight(dev_priv, bdb);
 	parse_sdvo_panel_data(dev_priv, bdb);
 	parse_driver_features(dev_priv, bdb);
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 531ca788b410..07ee9c7ac5fb 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -115,6 +115,7 @@ enum bdb_block_id {
 	BDB_MIPI_CONFIG			= 52,
 	BDB_MIPI_SEQUENCE		= 53,
 	BDB_COMPRESSION_PARAMETERS	= 56,
+	BDB_GENERIC_DTD			= 58,
 	BDB_SKIP			= 254, /* VBIOS private block, ignore */
 };
 
@@ -865,4 +866,34 @@ struct bdb_compression_parameters {
 	struct dsc_compression_parameters_entry data[16];
 } __packed;
 
+/*
+ * Block 58 - Generic DTD Block
+ */
+
+struct generic_dtd_entry {
+	u32 pixel_clock;
+	u16 hactive;
+	u16 hblank;
+	u16 hfront_porch;
+	u16 hsync;
+	u16 vactive;
+	u16 vblank;
+	u16 vfront_porch;
+	u16 vsync;
+	u16 width_mm;
+	u16 height_mm;
+
+	/* Flags */
+	u8 rsvd_flags:6;
+	u8 vsync_polarity:1;
+	u8 hsync_polarity:1;
+
+	u32 rsvd:24;
+} __packed;
+
+struct bdb_generic_dtd {
+	u16 gdtd_size;
+	struct generic_dtd_entry dtd[];	/* up to 24 DTD's */
+} __packed;
+
 #endif /* _INTEL_VBT_DEFS_H_ */
-- 
2.21.0

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

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

end of thread, other threads:[~2019-10-29 16:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10  1:03 [PATCH] drm/i915/vbt: Handle generic DTD block Matt Roper
2019-10-10  2:32 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-10-10  3:01 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-10 13:47 ` ✓ Fi.CI.IGT: " Patchwork
2019-10-28 19:41 ` [PATCH v2] " Matt Roper
2019-10-28 19:41   ` [Intel-gfx] " Matt Roper
2019-10-29  7:10   ` Jani Nikula
2019-10-29  7:10     ` [Intel-gfx] " Jani Nikula
2019-10-29 16:43     ` [PATCH v3 1/2] drm/i915/vbt: Parse panel options separately from timing data Matt Roper
2019-10-29 16:43       ` [Intel-gfx] " Matt Roper
2019-10-29 16:43       ` [PATCH v3 2/2] drm/i915/vbt: Handle generic DTD block Matt Roper
2019-10-29 16:43         ` [Intel-gfx] " Matt Roper
2019-10-29  0:14 ` ✗ Fi.CI.BAT: failure for drm/i915/vbt: Handle generic DTD block (rev2) Patchwork
2019-10-29  0:14   ` [Intel-gfx] " Patchwork

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.