drm/i915: Parse VBT data for lspcon
Subsystems (2)
PATCH 1/1 drm/i915: Parse VBT data for lspcon
From: Shashank Sharma <[email protected]>
Many GEN9 boards come with on-board lspcon cards.
Fot these boards, VBT configuration should properly point out if a particular port contains lspcon device, so that driver can initialize it properly.
This patch adds a utility function, which checks the VBT flag for lspcon bit, and tells us if a port is configured to have a lspcon device or not.
While we do not enable any lspcon handling yet, debug log about ports with lspcon.
V2: Fixed review comments from Ville
- Do not forget PORT_D while checking lspcon for GEN9
V3: Addressed review comments from Rodrigo
- Create a HAS_LSPCON() macro for better use case handling.
- Do not dump warnings for non-gen-9 platforms, it will be noise.
V4: Rebase
V5: Rebase
v6 by Jani: rebase, debug log
---
Shashank, your series [1] didn't apply on nightly, so you'll need to rebase and post again anyway. However, please let's merge this patch from your series first, and we can even backport this so that we have debug logging about LSPCON devices.
BR,
Jani.
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/intel_bios.c | 49 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ddi.c | 4 ++++ 3 files changed, 57 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +4 -0
@@ -2814,6 +2814,8 @@ struct drm_i915_cmd_table {#define HAS_DP_MST (dev) (INTEL_INFO(dev)->has_dp_mst) +#define HAS_LSPCON (dev_priv) (IS_GEN9(dev_priv)) +#define HAS_DDI (dev_priv) ((dev_priv)->info.has_ddi)#define HAS_FPGA_DBG_UNCLAIMED (dev) (INTEL_INFO(dev)->has_fpga_dbg)#define HAS_PSR (dev) (INTEL_INFO(dev)->has_psr)
@@ -3631,6 +3633,8 @@ bool intel_bios_is_port_dp_dual_mode(struct drm_i915_private *dev_priv, enum porbool intel_bios_is_dsi_present (struct drm_i915_private *dev_priv,enum port *port);bool intel_bios_is_port_hpd_inverted (struct drm_i915_private *dev_priv,enum port port); +bool intel_bios_is_lspcon_present (struct drm_i915_private *dev_priv, +enum port port);/* intel_opregion.c */ #ifdef CONFIG_ACPI
drivers/gpu/drm/i915/intel_bios.c +49 -0
52 lines not on this page · raw message
drivers/gpu/drm/i915/intel_ddi.c +4 -0
@@ -2470,6 +2470,10 @@ void intel_ddi_init(struct drm_device *dev, enum port port) init_hdmi = (dev_priv->vbt.ddi_port_info[port].supports_dvi || dev_priv->vbt.ddi_port_info[port].supports_hdmi); init_dp = dev_priv->vbt.ddi_port_info[port].supports_dp; + +if (intel_bios_is_lspcon_present (dev_priv, port)) +DRM_DEBUG_KMS ("VBT says port %c has LSPCON\n" ,port_name (port)); +if (!init_dp && !init_hdmi) {DRM_DEBUG_KMS ("VBT says port %c is not DVI/HDMI/DP compatible, respect it\n" ,port_name (port));
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 30 lines · Jani Nikula
From: Shashank Sharma <[email protected]>
Many GEN9 boards come with on-board lspcon cards.
Fot these boards, VBT configuration should properly point out if a particular port contains lspcon device, so that driver can initialize it properly.This patch adds a utility function, which checks the VBT flag for lspcon bit, and tells us if a port is configured to have a lspcon device or not.
While we do not enable any lspcon handling yet, debug log about ports with lspcon.
V2: Fixed review comments from Ville
- Do not forgetPORT_Dwhile checking lspcon for GEN9V3: Addressed review comments from Rodrigo
- Create aHAS_LSPCON()macro for better use case handling.
- Do not dump warnings for non-gen-9 platforms, it will be noise.V4: Rebase
V5: Rebasev6 by Jani: rebase, debug log
Signed-off-by Shashank Sharma <[email protected]>Reviewed-by Rodrigo Vivi <[email protected]>Signed-off-by Jani Nikula <[email protected]>
Quoted 6 lines
---
Shashank, your series [1] didn't apply on nightly, so you'll need to rebase and post again anyway. However, please let's merge this patch from your series first, and we can even backport this so that we have debug logging about LSPCON devices.
[1] https://patchwork.freedesktop.org/series/8024/
Quoted 103 lines
BR,
Jani.--- drivers/gpu/drm/i915/i915_drv.h | 4 ++++ drivers/gpu/drm/i915/intel_bios.c | 49 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_ddi.c | 4 ++++ 3 files changed, 57 insertions(+)drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -2814,6 +2814,8 @@ struct drm_i915_cmd_table {#define HAS_DP_MST (dev) (INTEL_INFO(dev)->has_dp_mst) +#define HAS_LSPCON (dev_priv) (IS_GEN9(dev_priv)) +#define HAS_DDI (dev_priv) ((dev_priv)->info.has_ddi)#define HAS_FPGA_DBG_UNCLAIMED (dev) (INTEL_INFO(dev)->has_fpga_dbg)#define HAS_PSR (dev) (INTEL_INFO(dev)->has_psr)@@ -3631,6 +3633,8 @@ bool intel_bios_is_port_dp_dual_mode(struct drm_i915_private *dev_priv, enum porbool intel_bios_is_dsi_present (struct drm_i915_private *dev_priv,enum port *port);bool intel_bios_is_port_hpd_inverted (struct drm_i915_private *dev_priv,enum port port); +bool intel_bios_is_lspcon_present (struct drm_i915_private *dev_priv, +enum port port);/* intel_opregion.c */ #ifdef CONFIG_ACPI drivers/gpu/drm/i915/intel_bios.c +49
-0@@ -1763,3 +1763,52 @@ intel_bios_is_port_hpd_inverted(struct drm_i915_private *dev_priv,return false; } + +/** +* intel_bios_is_lspcon_present - if LSPCON is attached on %port +* @dev_priv: i915 device instance +* @port: port to check +* +* Return true if LSPCON is present on this port +*/ +bool +intel_bios_is_lspcon_present (struct drm_i915_private *dev_priv, +enum port port) +{ +int i; + +if (!HAS_LSPCON (dev_priv)) +return false; + +for (i =0 ; i < dev_priv->vbt.child_dev_num; i++) { +if (!dev_priv->vbt.child_dev[i].common.lspcon) +continue ; + +switch (dev_priv->vbt.child_dev[i].common.dvo_port) { +case DVO_PORT_DPA : +case DVO_PORT_HDMIA : +if (port ==PORT_A ) +return true; +break ; +case DVO_PORT_DPB : +case DVO_PORT_HDMIB : +if (port ==PORT_B ) +return true; +break ; +case DVO_PORT_DPC : +case DVO_PORT_HDMIC : +if (port ==PORT_C ) +return true; +break ; +case DVO_PORT_DPD : +case DVO_PORT_HDMID : +if (port ==PORT_D ) +return true; +break ; +default : +break ; + } + } + +return false; +}drivers/gpu/drm/i915/intel_ddi.c +4
-0@@ -2470,6 +2470,10 @@ void intel_ddi_init(struct drm_device *dev, enum port port) init_hdmi = (dev_priv->vbt.ddi_port_info[port].supports_dvi || dev_priv->vbt.ddi_port_info[port].supports_hdmi); init_dp = dev_priv->vbt.ddi_port_info[port].supports_dp; + +if (intel_bios_is_lspcon_present (dev_priv, port)) +DRM_DEBUG_KMS ("VBT says port %c has LSPCON\n" ,port_name (port)); +if (!init_dp && !init_hdmi) {DRM_DEBUG_KMS ("VBT says port %c is not DVI/HDMI/DP compatible, respect it\n" ,port_name (port));
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915: Parse VBT data for lspcon
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: drm/i915: Parse VBT data for lspcon
URL : https://patchwork.freedesktop.org/series/13786/
State : warning
== Summary ==
Series 13786v1 drm/i915: Parse VBT data for lspcon
https://patchwork.freedesktop.org/api/1.0/series/13786/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-b-frame-sequence:
dmesg-warn -> PASS (fi-skl-6770hq)
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-byt-j1900)
Test vgem_basic:
Subgroup unload:
skip -> PASS (fi-kbl-7200u)
skip -> PASS (fi-skl-6700k)fi-bdw-5557u total:246 pass:231 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:246 pass:204 dwarn:0 dfail:0 fail:0 skip:42 fi-bxt-t5700 total:246 pass:216 dwarn:0 dfail:0 fail:0 skip:30 fi-byt-j1900 total:246 pass:213 dwarn:1 dfail:0 fail:1 skip:31 fi-byt-n2820 total:246 pass:210 dwarn:0 dfail:0 fail:1 skip:35 fi-hsw-4770 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-hsw-4770r total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-ilk-650 total:246 pass:184 dwarn:0 dfail:0 fail:2 skip:60 fi-ivb-3520m total:246 pass:221 dwarn:0 dfail:0 fail:0 skip:25 fi-ivb-3770 total:246 pass:221 dwarn:0 dfail:0 fail:0 skip:25 fi-kbl-7200u total:246 pass:222 dwarn:0 dfail:0 fail:0 skip:24 fi-skl-6260u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:246 pass:223 dwarn:0 dfail:0 fail:0 skip:23 fi-skl-6700k total:246 pass:221 dwarn:1 dfail:0 fail:0 skip:24 fi-skl-6770hq total:246 pass:230 dwarn:1 dfail:0 fail:1 skip:14 fi-snb-2520m total:246 pass:210 dwarn:0 dfail:0 fail:0 skip:36 fi-snb-2600 total:246 pass:209 dwarn:0 dfail:0 fail:0 skip:37
Results at /archive/results/CI_IGT_test/Patchwork_2721/
e086610ff079f1bf1fe91d4ab175443590cacb8d drm-intel-nightly: 2016y-10m-14d-11h-43m-09s UTC integration manifest 1edb07a drm/i915: Parse VBT data for lspcon
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: warning for drm/i915: Parse VBT data for lspcon
Quoted 8 lines
== Series Details ==
Series: drm/i915: Parse VBT data for lspcon
URL : https://patchwork.freedesktop.org/series/13786/
State : warning== Summary ==
Quoted 8 lines
Series 13786v1 drm/i915: Parse VBT data for lspcon
https://patchwork.freedesktop.org/api/1.0/series/13786/revisions/1/mbox/Test
kms_pipe_crc_basic:Subgroup read-crc-pipe-b-frame-sequence: dmesg-warn -> PASS (fi-skl-6770hq) Subgroup suspend-read-crc-pipe-a: pass -> DMESG-WARN (fi-byt-j1900)
Still same: https://bugs.freedesktop.org/show_bug.cgi?id=98040
Quoted 23 lines
Test
vgem_basic:Subgroup unload: skip -> PASS (fi-kbl-7200u) skip -> PASS (fi-skl-6700k)fi-bdw-5557u total:246 pass:231 dwarn:0 dfail:0 fail:0 skip:15 fi-bsw-n3050 total:246 pass:204 dwarn:0 dfail:0 fail:0 skip:42 fi-bxt-t5700 total:246 pass:216 dwarn:0 dfail:0 fail:0 skip:30 fi-byt-j1900 total:246 pass:213 dwarn:1 dfail:0 fail:1 skip:31 fi-byt-n2820 total:246 pass:210 dwarn:0 dfail:0 fail:1 skip:35 fi-hsw-4770 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-hsw-4770r total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-ilk-650 total:246 pass:184 dwarn:0 dfail:0 fail:2 skip:60 fi-ivb-3520m total:246 pass:221 dwarn:0 dfail:0 fail:0 skip:25 fi-ivb-3770 total:246 pass:221 dwarn:0 dfail:0 fail:0 skip:25 fi-kbl-7200u total:246 pass:222 dwarn:0 dfail:0 fail:0 skip:24 fi-skl-6260u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-skl-6700hq total:246 pass:223 dwarn:0 dfail:0 fail:0 skip:23 fi-skl-6700k total:246 pass:221 dwarn:1 dfail:0 fail:0 skip:24 fi-skl-6770hq total:246 pass:230 dwarn:1 dfail:0 fail:1 skip:14 fi-snb-2520m total:246 pass:210 dwarn:0 dfail:0 fail:0 skip:36 fi-snb-2600 total:246 pass:209 dwarn:0 dfail:0 fail:0 skip:37
Quoted 6 lines
Results at /archive/results/CI_IGT_test/Patchwork_2721/
e086610ff079f1bf1fe91d4ab175443590cacb8ddrm-intel-nightly: 2016y-10m- 14d-11h-43m-09s UTC integration manifest 1edb07a drm/i915: Parse VBT data for lspcon
Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx