drm/i915: Add intel_bios_cleanup() function
Subsystems (2)
PATCH v5 1/3 drm/i915: Add intel_bios_cleanup() function
Add an intel_bios_cleanup() function to act as counterpart of intel_bios_init() and move the cleanup of vbt related resources there, putting it in the same file as the allocation.
Changed in v2:
-While touching the code anyways, remove the unnecessary:
if (dev_priv->vbt.child_dev) done before kfree(dev_priv->vbt.child_dev)
--- drivers/gpu/drm/i915/i915_drv.c | 14 +------------- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -13
@@ -1448,19 +1448,7 @@ void i915_driver_unload(struct drm_device *dev)intel_modeset_cleanup (dev); -/* -* free the memory space allocated for the child device -* config parsed from VBT -*/ -if (dev_priv->vbt.child_dev && dev_priv->vbt.child_dev_num) { -kfree (dev_priv->vbt.child_dev); - dev_priv->vbt.child_dev =NULL ; - dev_priv->vbt.child_dev_num =0 ; - } -kfree (dev_priv->vbt.sdvo_lvds_vbt_mode); - dev_priv->vbt.sdvo_lvds_vbt_mode =NULL ; -kfree (dev_priv->vbt.lfp_lvds_vbt_mode); - dev_priv->vbt.lfp_lvds_vbt_mode =NULL ; +intel_bios_cleanup (dev_priv);vga_switcheroo_unregister_client (pdev);vga_client_register (pdev,NULL ,NULL ,NULL );
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -3680,6 +3680,7 @@ extern void intel_i2c_reset(struct drm_i915_private *dev_priv);/* intel_bios.c */ void intel_bios_init (struct drm_i915_private *dev_priv); +void intel_bios_cleanup (struct drm_i915_private *dev_priv);bool intel_bios_is_valid_vbt (const void *buf,size_t size);bool intel_bios_is_tv_present (struct drm_i915_private *dev_priv);bool intel_bios_is_lvds_present (struct drm_i915_private *dev_priv,u8 *i2c_pin);
drivers/gpu/drm/i915/intel_bios.c +15 -0
@@ -1610,6 +1610,21 @@ void intel_bios_init(struct drm_i915_private *dev_priv)pci_unmap_rom (pdev, bios); } +/** +* intel_bios_cleanup - Free any resources allocated by intel_bios_init() +* @dev_priv: i915 device instance +*/ +void intel_bios_cleanup (struct drm_i915_private *dev_priv) +{ +kfree (dev_priv->vbt.child_dev); + dev_priv->vbt.child_dev =NULL ; + dev_priv->vbt.child_dev_num =0 ; +kfree (dev_priv->vbt.sdvo_lvds_vbt_mode); + dev_priv->vbt.sdvo_lvds_vbt_mode =NULL ; +kfree (dev_priv->vbt.lfp_lvds_vbt_mode); + dev_priv->vbt.lfp_lvds_vbt_mode =NULL ; +} +/** * intel_bios_is_tv_present - is integrated TV present in VBT * @dev_priv: i915 device instance
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/3 drm/i915: Free memdup-ed DSI VBT data structures on driver_unload
Make intel_bios_cleanup function free the DSI VBT data structures which are memdup-ed by parse_mipi_config() and parse_mipi_sequence().
--- drivers/gpu/drm/i915/intel_bios.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_bios.c +6 -0
@@ -1623,6 +1623,12 @@ void intel_bios_cleanup(struct drm_i915_private *dev_priv) dev_priv->vbt.sdvo_lvds_vbt_mode =NULL ;kfree (dev_priv->vbt.lfp_lvds_vbt_mode); dev_priv->vbt.lfp_lvds_vbt_mode =NULL ; +kfree (dev_priv->vbt.dsi.data); + dev_priv->vbt.dsi.data =NULL ; +kfree (dev_priv->vbt.dsi.pps); + dev_priv->vbt.dsi.pps =NULL ; +kfree (dev_priv->vbt.dsi.config); + dev_priv->vbt.dsi.config =NULL ; }/**
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 3/3 drm/i915: Fix DSI panels with v1 MIPI sequences without a DEASSERT sequence v3
In reply to Hans de GoedeSo far models of the Dell Venue 8 Pro, with a panel with MIPI panel index = 3, one of which has been kindly provided to me by Jan Brummer, where not working with the i915 driver, giving a black screen on the first modeset.
The problem with at least these Dells is that their VBT defines a MIPI ASSERT sequence, but not a DEASSERT sequence. Instead they DEASSERT the reset in their INIT_OTP sequence, but the deassert must be done before calling intel_dsi_device_ready(), so that is too late.
Simply doing the INIT_OTP sequence earlier is not enough to fix this, because the INIT_OTP sequence also sends various MIPI packets to the panel, which can only happen after calling intel_dsi_device_ready().
This commit fixes this by splitting the INIT_OTP sequence into everything before the first DSI packet and everything else, including the first DSI packet. The first part (everything before the first DSI packet) is then used as deassert sequence.
Changed in v2:
-Split the init OTP sequence into a deassert reset and the actual init
OTP sequence, instead of calling it earlier and then having the first mipi_exec_send_packet() call call intel_dsi_device_ready().
Changes in v3:
-Move the whole shebang to intel_bios.c
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82880
References: https://bugs.freedesktop.org/show_bug.cgi?id=101205
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 84 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -1359,6 +1359,7 @@ struct intel_vbt_data {u32 size;u8 *data;const u8 *sequence[MIPI_SEQ_MAX ]; +u8 *deassert_seq;/* Used by fixup_mipi_sequences() */ } dsi;int crt_ddc_pin;
drivers/gpu/drm/i915/intel_bios.c +84 -0
102 lines not on this page · raw message
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v5,1/3] drm/i915: Add intel_bios_cleanup() function
In reply to Hans de Goede== Series Details ==
== Series Details ==
Series: series starting with [v5,1/3] drm/i915: Add intel_bios_cleanup() function
URL : https://patchwork.freedesktop.org/series/38223/
State : success
== Summary ==
Series 38223v1 series starting with [v5,1/3] drm/i915: Add intel_bios_cleanup() function
https://patchwork.freedesktop.org/api/1.0/series/38223/revisions/1/mbox/
Test kms_chamelium:
Subgroup dp-crc-fast:
pass -> DMESG-FAIL (fi-kbl-7500u) fdo#103841
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS (fi-cnl-y3) fdo#105058
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
pass -> DMESG-WARN (fi-cnl-y3) fdo#104951fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#105058 https://bugs.freedesktop.org/show_bug.cgi?id=105058
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fi-bdw-5557u total:288 pass:265 dwarn:0 dfail:0 fail:2 skip:21 time:438s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:427s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:373s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:485s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:286s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:479s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:484s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:469s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:455s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:571s fi-cnl-y3 total:288 pass:261 dwarn:1 dfail:0 fail:0 skip:26 time:581s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:417s fi-gdg-551 total:288 pass:180 dwarn:0 dfail:0 fail:0 skip:108 time:284s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:511s fi-hsw-4770 total:288 pass:259 dwarn:0 dfail:0 fail:2 skip:27 time:411s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:411s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:458s fi-kbl-7500u total:288 pass:262 dwarn:1 dfail:1 fail:0 skip:24 time:459s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:498s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:503s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:598s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:426s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:509s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:529s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:494s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:491s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:415s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:428s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:518s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:394s Blacklisted hosts: fi-glk-dsi total:118 pass:105 dwarn:0 dfail:0 fail:0 skip:12 fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:454s
e404d341ffdd255f9a7d8e4461170694edcb3e25 drm-tip: 2018y-02m-14d-01h-12m-17s UTC integration manifest 6aad5a21f45e drm/i915: Fix DSI panels with v1 MIPI sequences without a DEASSERT sequence v3 66ea3ae21228 drm/i915: Free memdup-ed DSI VBT data structures on driver_unload fc169ea289bd drm/i915: Add intel_bios_cleanup() function
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8008/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [v5,1/3] drm/i915: Add intel_bios_cleanup() function
In reply to Hans de Goede== Series Details ==
== Series Details ==
Series: series starting with [v5,1/3] drm/i915: Add intel_bios_cleanup() function
URL : https://patchwork.freedesktop.org/series/38223/
State : success
== Summary ==
Test kms_vblank:
Subgroup pipe-c-ts-continuation-dpms-rpm:
fail -> PASS (shard-hsw) fdo#105069 +3
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-pri-shrfb-draw-blt:
dmesg-fail -> PASS (shard-apl) fdo#101623
Subgroup fbc-1p-shrfb-fliptrack:
fail -> PASS (shard-apl) fdo#103167
Test gem_eio:
Subgroup in-flight-contexts:
pass -> DMESG-WARN (shard-snb) fdo#104058
Test perf:
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
Subgroup enable-disable:
pass -> FAIL (shard-apl) fdo#103715
Test kms_sysfs_edid_timing:
pass -> WARN (shard-apl) fdo#100047fdo#105069 https://bugs.freedesktop.org/show_bug.cgi?id=105069
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
shard-apl total:3344 pass:1728 dwarn:1 dfail:0 fail:22 skip:1591 time:13913s shard-hsw total:3427 pass:1717 dwarn:1 dfail:0 fail:54 skip:1654 time:14785s shard-snb total:3427 pass:1347 dwarn:2 dfail:0 fail:10 skip:2068 time:7594s
Blacklisted hosts:
shard-kbl total:3370 pass:1807 dwarn:64 dfail:4 fail:21 skip:1473 time:10953s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8008/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx