drm/i915: Parse DSI backlight/cabc ports.
Subsystems (2)
PATCH 1/2 drm/i915: Parse DSI backlight/cabc ports.
This patch parse DSI backlight/cabc ports info from VBT and save them inside local structure. This saved info can be directly used while initializing DSI for different platforms instead of parsing for each platform.
V2: Changes:
- Typo fix in commit message.
- Move up newly added port variables (Jani N)
- Remove redundant initialization (Jani N)
- Don't parse CABC ports if not supported (Jani N)
V3: Patch restructure (Suggested by Jani N)
Credits-to: Jani Nikula <[email protected]>
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_bios.c | 57 ++++++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1748,6 +1748,8 @@ struct intel_vbt_data {u16 panel_id;struct mipi_config *config;struct mipi_pps_data *pps; +u16 bl_ports; +u16 cabc_ports;u8 seq_version;u32 size;u8 *data;
drivers/gpu/drm/i915/intel_bios.c +47 -10
77 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Use existing DSI backlight ports info
This patch re-use already parsed DSI backlight/cabc ports info for saving it inside struct intel_dsi rather than parsing it at the time of DSI initialization.
V2: Remove backlight and cabc variable initialization (Jani N).
--- drivers/gpu/drm/i915/intel_bios.c | 2 -- drivers/gpu/drm/i915/intel_dsi.c | 37 ++++--------------------------------- 2 files changed, 4 insertions(+), 35 deletions(-)
drivers/gpu/drm/i915/intel_bios.c +0 -2
@@ -738,8 +738,6 @@ static void parse_dsi_backlight_ports(struct drm_i915_private *dev_priv,if (dev_priv->vbt.dsi.config->cabc_supported) dev_priv->vbt.dsi.cabc_ports =BIT (port); - dev_priv->vbt.dsi.config->dl_dcs_cabc_ports =0 ; - dev_priv->vbt.dsi.config->dl_dcs_backlight_ports =0 ;return ; }
drivers/gpu/drm/i915/intel_dsi.c +4 -33
@@ -1746,42 +1746,13 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)else intel_encoder->crtc_mask =BIT (PIPE_B ); -if (dev_priv->vbt.dsi.config->dual_link) { +if (dev_priv->vbt.dsi.config->dual_link) intel_dsi->ports =BIT (PORT_A ) |BIT (PORT_C ); - -switch (dev_priv->vbt.dsi.config->dl_dcs_backlight_ports) { -case DL_DCS_PORT_A : - intel_dsi->dcs_backlight_ports =BIT (PORT_A ); -break ; -case DL_DCS_PORT_C : - intel_dsi->dcs_backlight_ports =BIT (PORT_C ); -break ; -default : -case DL_DCS_PORT_A_AND_C : - intel_dsi->dcs_backlight_ports =BIT (PORT_A ) |BIT (PORT_C ); -break ; - } - -switch (dev_priv->vbt.dsi.config->dl_dcs_cabc_ports) { -case DL_DCS_PORT_A : - intel_dsi->dcs_cabc_ports =BIT (PORT_A ); -break ; -case DL_DCS_PORT_C : - intel_dsi->dcs_cabc_ports =BIT (PORT_C ); -break ; -default : -case DL_DCS_PORT_A_AND_C : - intel_dsi->dcs_cabc_ports =BIT (PORT_A ) |BIT (PORT_C ); -break ; - } - }else { +else intel_dsi->ports =BIT (port); - intel_dsi->dcs_backlight_ports =BIT (port); - intel_dsi->dcs_cabc_ports =BIT (port); - } -if (!dev_priv->vbt.dsi.config->cabc_supported) - intel_dsi->dcs_cabc_ports =0 ; + intel_dsi->dcs_backlight_ports = dev_priv->vbt.dsi.bl_ports; + intel_dsi->dcs_cabc_ports = dev_priv->vbt.dsi.cabc_ports;/* Create a DSI host (and a device) for each port. */ for_each_dsi_port (port, intel_dsi->ports) {
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Use existing DSI backlight ports info
Quoted 8 lines · Madhav Chauhan
This patch re-use already parsed DSI backlight/cabc ports info for saving it inside struct
intel_dsirather than parsing it at the time of DSI initialization.V2: Remove backlight and cabc variable initialization (Jani N).
Reviewed-by Jani Nikula <[email protected]>Signed-off-by Madhav Chauhan <[email protected]>
Quoted 69 lines
--- drivers/gpu/drm/i915/intel_bios.c | 2 -- drivers/gpu/drm/i915/intel_dsi.c | 37 ++++--------------------------------- 2 files changed, 4 insertions(+), 35 deletions(-)drivers/gpu/drm/i915/intel_bios.c +0
-2@@ -738,8 +738,6 @@ static void parse_dsi_backlight_ports(struct drm_i915_private *dev_priv,if (dev_priv->vbt.dsi.config->cabc_supported) dev_priv->vbt.dsi.cabc_ports =BIT (port); - dev_priv->vbt.dsi.config->dl_dcs_cabc_ports =0 ; - dev_priv->vbt.dsi.config->dl_dcs_backlight_ports =0 ;return ; }drivers/gpu/drm/i915/intel_dsi.c +4
-33@@ -1746,42 +1746,13 @@ void intel_dsi_init(struct drm_i915_private *dev_priv)else intel_encoder->crtc_mask =BIT (PIPE_B ); -if (dev_priv->vbt.dsi.config->dual_link) { +if (dev_priv->vbt.dsi.config->dual_link) intel_dsi->ports =BIT (PORT_A ) |BIT (PORT_C ); - -switch (dev_priv->vbt.dsi.config->dl_dcs_backlight_ports) { -case DL_DCS_PORT_A : - intel_dsi->dcs_backlight_ports =BIT (PORT_A ); -break ; -case DL_DCS_PORT_C : - intel_dsi->dcs_backlight_ports =BIT (PORT_C ); -break ; -default : -case DL_DCS_PORT_A_AND_C : - intel_dsi->dcs_backlight_ports =BIT (PORT_A ) |BIT (PORT_C ); -break ; - } - -switch (dev_priv->vbt.dsi.config->dl_dcs_cabc_ports) { -case DL_DCS_PORT_A : - intel_dsi->dcs_cabc_ports =BIT (PORT_A ); -break ; -case DL_DCS_PORT_C : - intel_dsi->dcs_cabc_ports =BIT (PORT_C ); -break ; -default : -case DL_DCS_PORT_A_AND_C : - intel_dsi->dcs_cabc_ports =BIT (PORT_A ) |BIT (PORT_C ); -break ; - } - }else { +else intel_dsi->ports =BIT (port); - intel_dsi->dcs_backlight_ports =BIT (port); - intel_dsi->dcs_cabc_ports =BIT (port); - } -if (!dev_priv->vbt.dsi.config->cabc_supported) - intel_dsi->dcs_cabc_ports =0 ; + intel_dsi->dcs_backlight_ports = dev_priv->vbt.dsi.bl_ports; + intel_dsi->dcs_cabc_ports = dev_priv->vbt.dsi.cabc_ports;/* Create a DSI host (and a device) for each port. */ for_each_dsi_port (port, intel_dsi->ports) {
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: success for series starting with [1/2] drm/i915: Parse DSI backlight/cabc ports.
In reply to Madhav Chauhan== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Parse DSI backlight/cabc ports.
URL : https://patchwork.freedesktop.org/series/31914/
State : success
== Summary ==
Series 31914v1 series starting with [1/2] drm/i915: Parse DSI backlight/cabc ports.
https://patchwork.freedesktop.org/api/1.0/series/31914/revisions/1/mbox/
Test drv_module_reload:
Subgroup basic-no-display:
dmesg-warn -> INCOMPLETE (fi-cfl-s) fdo#103206fdo#103206 https://bugs.freedesktop.org/show_bug.cgi?id=103206
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:461s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:468s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:387s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:569s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:285s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:524s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:518s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:532s fi-cfl-s total:287 pass:253 dwarn:2 dfail:0 fail:0 skip:31 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:438s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:273s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:600s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:438s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:455s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:508s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:480s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:504s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:491s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:592s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:656s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:464s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:662s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:535s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:515s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:467s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:579s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:427s
a1cb9d9d395d1124d270261e81b70a737225fd2e drm-tip: 2017y-10m-13d-13h-03m-45s UTC integration manifest c6dfe89a90e4 drm/i915: Use existing DSI backlight ports info04c0d4c5325d drm/i915: Parse DSI backlight/cabc ports.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6022/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Madhav Chauhan
This patch parse DSI backlight/cabc ports info from VBT and save them inside local structure. This saved info can be directly used while initializing DSI for different platforms instead of parsing for each platform.
V2: Changes:
- Typo fix in commit message.
- Move up newly added port variables (Jani N)
- Remove redundant initialization (Jani N)
- Don't parse CABC ports if not supported (Jani N)
V3: Patch restructure (Suggested by Jani N)
Quoted 2 lines
Credits-to: Jani Nikula <[email protected]>
Signed-off-by Madhav Chauhan <[email protected]>
Quoted 102 lines
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/intel_bios.c | 57 ++++++++++++++++++++++++++++++++------- 2 files changed, 49 insertions(+), 10 deletions(-)drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -1748,6 +1748,8 @@ struct intel_vbt_data {u16 panel_id;struct mipi_config *config;struct mipi_pps_data *pps; +u16 bl_ports; +u16 cabc_ports;u8 seq_version;u32 size;u8 *data;drivers/gpu/drm/i915/intel_bios.c +47
-10@@ -730,6 +730,50 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) dev_priv->vbt.psr.tp2_tp3_wakeup_time = psr_table->tp2_tp3_wakeup_time; } +static void parse_dsi_backlight_ports (struct drm_i915_private *dev_priv, +u16 version,enum port port) +{ +if (!dev_priv->vbt.dsi.config->dual_link || version <197 ) { + dev_priv->vbt.dsi.bl_ports =BIT (port); +if (dev_priv->vbt.dsi.config->cabc_supported) + dev_priv->vbt.dsi.cabc_ports =BIT (port); + + dev_priv->vbt.dsi.config->dl_dcs_cabc_ports =0 ; + dev_priv->vbt.dsi.config->dl_dcs_backlight_ports =0 ; +return ; + } + +switch (dev_priv->vbt.dsi.config->dl_dcs_backlight_ports) { +case DL_DCS_PORT_A : + dev_priv->vbt.dsi.bl_ports =BIT (PORT_A ); +break ; +case DL_DCS_PORT_C : + dev_priv->vbt.dsi.bl_ports =BIT (PORT_C ); +break ; +default : +case DL_DCS_PORT_A_AND_C : + dev_priv->vbt.dsi.bl_ports =BIT (PORT_A ) |BIT (PORT_C ); +break ; + } + +if (!dev_priv->vbt.dsi.config->cabc_supported) +return ; + +switch (dev_priv->vbt.dsi.config->dl_dcs_cabc_ports) { +case DL_DCS_PORT_A : + dev_priv->vbt.dsi.cabc_ports =BIT (PORT_A ); +break ; +case DL_DCS_PORT_C : + dev_priv->vbt.dsi.cabc_ports =BIT (PORT_C ); +break ; +default : +case DL_DCS_PORT_A_AND_C : + dev_priv->vbt.dsi.cabc_ports = +BIT (PORT_A ) |BIT (PORT_C ); +break ; + } +} +static void parse_mipi_config (struct drm_i915_private *dev_priv,const struct bdb_header *bdb)@@ -738,9 +782,10 @@ parse_mipi_config(struct drm_i915_private *dev_priv,const struct mipi_config *config;const struct mipi_pps_data *pps;int panel_type = dev_priv->vbt.panel_type; +enum port port;/* parse MIPI blocks only if LFP type is MIPI */ -if (!intel_bios_is_dsi_present (dev_priv,NULL )) +if (!intel_bios_is_dsi_present (dev_priv, &port))return ;/* Initialize this to undefined indicating no generic MIPI support */ @@ -781,15 +826,7 @@ parse_mipi_config(struct drm_i915_private *dev_priv,return ; } -/* -* These fields are introduced from the VBT version 197 onwards, -* so making sure that these bits are set zero in the previous -* versions. -*/ -if (dev_priv->vbt.dsi.config->dual_link && bdb->version <197 ) { - dev_priv->vbt.dsi.config->dl_dcs_cabc_ports =0 ; - dev_priv->vbt.dsi.config->dl_dcs_backlight_ports =0 ; - } +parse_dsi_backlight_ports (dev_priv, bdb->version, port);/* We have mandatory mipi config blocks. Initialize as generic panel */ dev_priv->vbt.dsi.panel_id =MIPI_DSI_GENERIC_PANEL_ID ;
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.IGT: success for series starting with [1/2] drm/i915: Parse DSI backlight/cabc ports.
In reply to Madhav Chauhan== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Parse DSI backlight/cabc ports.
URL : https://patchwork.freedesktop.org/series/31914/
State : success
== Summary ==
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test kms_flip:
Subgroup wf_vblank-vs-modeset-interruptible:
dmesg-warn -> PASS (shard-hsw)
Test kms_fence_pin_leak:
skip -> PASS (shard-hsw)
Test perf:
Subgroup blocking:
fail -> PASS (shard-hsw) fdo#102252fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
shard-hsw total:2553 pass:1441 dwarn:1 dfail:0 fail:8 skip:1103 time:9624s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6022/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx