drm: clean cached display info
Subsystems (2)
PATCH 1/1 drm: clean cached display info
This patch adds a small helper function, which clears the cached information about a hot-pluggable display, from connector. On event This will run on event of a hot-unplug, keeping the connector's display info up-to-date, avoiding any errors due to invalid cached data.
Forking this patch out from the 3 patch series:
https://patchwork.freedesktop.org/patch/128961/
(still under review) and sending as individual patch.
--- drivers/gpu/drm/drm_probe_helper.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/gpu/drm/drm_probe_helper.c +22 -0
@@ -164,6 +164,18 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev) }/** +* drm_helper_clear_display_info - clean cached display information for +* hot pluggable displays, on event of hot-unplug +* @connector: connector under event +*/ +void drm_helper_clear_display_info (struct drm_connector *connector) +{ +struct drm_display_info *info = &connector->display_info; + +memset (info,0 ,sizeof (*info)); +} + +/** * drm_helper_probe_single_connector_modes - get complete set of display modes * @connector: connector to probe * @maxX: max width for modes
@@ -288,6 +300,16 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] disconnected\n" , connector->base.id, connector->name);drm_mode_connector_update_edid_property (connector,NULL ); + +/* +* Connector status change to disconnected, time to clean +* cached display information. +* Any driver which doesn't use this probe_helper function +* should implement update of EDID property and display_info +* on its own. +*/ +drm_helper_clear_display_info (connector); + verbose_prune = false; goto prune; }
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm: clean cached display info
== Series Details ==
== Series Details ==
Series: drm: clean cached display info
URL : https://patchwork.freedesktop.org/series/17265/
State : success
== Summary ==
Series 17265v1 drm: clean cached display info
https://patchwork.freedesktop.org/api/1.0/series/17265/revisions/1/mbox/
Test pm_rpm:
Subgroup basic-pci-d3-state:
incomplete -> PASS (fi-byt-n2820)fi-bdw-5557u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14 fi-bsw-n3050 total:246 pass:207 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22 fi-bxt-t5700 total:82 pass:69 dwarn:0 dfail:0 fail:0 skip:12 fi-byt-j1900 total:246 pass:219 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19 fi-hsw-4770r total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19 fi-ivb-3520m total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21 fi-ivb-3770 total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6260u total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13 fi-skl-6700hq total:246 pass:226 dwarn:0 dfail:0 fail:0 skip:20 fi-skl-6700k total:246 pass:222 dwarn:3 dfail:0 fail:0 skip:21 fi-skl-6770hq total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13 fi-snb-2520m total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31 fi-snb-2600 total:246 pass:214 dwarn:0 dfail:0 fail:0 skip:32
584adc8f6687d7f6832ce060c3f6022282119f18 drm-tip: 2016y-12m-28d-13h-55m-14s UTC integration manifest be7e903 drm: clean cached display info
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3401/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Shashank,
Quoted 9 lines · Shashank Sharma
This patch adds a small helper function, which clears the cached information about a hot-pluggable display, from connector. On event This will run on event of a hot-unplug, keeping the connector's display info up-to-date, avoiding any errors due to invalid cached data.
Forking this patch out from the 3 patch series:
https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.freedesktop.org_patch_128961_&d=DgIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=yaVFU4TjGY0gVF8El1uKcisy6TPsyCl9uN7Wsis-qhY&m=wGqvHYK00VvbUVGun4-ZhK6KZ4Ht_lHwPGfC6ajlzxE&s=7YpJD-fwUixHNz9SNn2B1ijuL5mEVeEUmolbf3NqWcs&e=
(still under review) and sending as individual patch.
Quoted 6 lines
Cc Jose Abreu <[email protected]>Cc Daniel Vetter <[email protected]>Suggested-by Jose Abreu <[email protected]>Signed-off-by Shashank Sharma <[email protected]>---
Best regards,
Jose Miguel Abreu
Quoted 33 lines
drivers/gpu/drm/drm_probe_helper.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)drivers/gpu/drm/drm_probe_helper.c +15
-0@@ -164,6 +164,18 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev) }/** +* drm_helper_clear_display_info - clean cached display information for +* hot pluggable displays, on event of hot-unplug +* @connector: connector under event +*/ +void drm_helper_clear_display_info (struct drm_connector *connector) +{ +struct drm_display_info *info = &connector->display_info; + +memset (info,0 ,sizeof (*info)); +} + +/** * drm_helper_probe_single_connector_modes - get complete set of display modes * @connector: connector to probe * @maxX: max width for modes @@ -288,6 +300,16 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] disconnected\n" , connector->base.id, connector->name);drm_mode_connector_update_edid_property (connector,NULL ); + +/* +* Connector status change to disconnected, time to clean
drivers/gpu/drm/drm_probe_helper.c int drm_helper_probe_single_connector_modes(struct drm_connector *connector, · line 315
Quoted 10 lines
drivers/gpu/drm/drm_probe_helper.c +7
-0+* cached display information. +* Any driver which doesn't use this probe_helper function +* should implement update of EDID property and display_info +* on its own. +*/ +drm_helper_clear_display_info (connector); + verbose_prune = false; goto prune; }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Sharma, Shashank
Reviewed-by Jose AbreuThanks for the review, Jose.
Regards
Shashank
-----Original Message-----
From: Jose Abreu [mailto:[email protected]]
Sent: Thursday, December 29, 2016 11:05 PM
To: Sharma, Shashank <[email protected]>; [email protected]; [email protected]
Cc: Jose Abreu <[email protected]>; Daniel Vetter <[email protected]>
Subject: Re: [PATCH] drm: clean cached display info
Hi Shashank,
Quoted 13 lines · Shashank Sharma
This patch adds a small helper function, which clears the cached information about a hot-pluggable display, from connector. On event This will run on event of a hot-unplug, keeping the connector's display info up-to-date, avoiding any errors due to invalid cached data.
Forking this patch out from the 3 patch series:
https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.freedes
ktop.org_patch_128961_&d=DgIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=yaVFU4TjGY0 gVF8El1uKcisy6TPsyCl9uN7Wsis-qhY&m=wGqvHYK00VvbUVGun4-ZhK6KZ4Ht_lHwPGf C6ajlzxE&s=7YpJD-fwUixHNz9SNn2B1ijuL5mEVeEUmolbf3NqWcs&e= (still under review) and sending as individual patch.
Quoted 6 lines
Cc Jose Abreu <[email protected]>Cc Daniel Vetter <[email protected]>Suggested-by Jose Abreu <[email protected]>Signed-off-by Shashank Sharma <[email protected]>---
Best regards,
Jose Miguel Abreu
Quoted 34 lines
drivers/gpu/drm/drm_probe_helper.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)drivers/gpu/drm/drm_probe_helper.c +15
-0@@ -164,6 +164,18 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev) }/** +* drm_helper_clear_display_info - clean cached display information +for +* hot pluggable displays, on event of hot-unplug +* @connector: connector under event +*/ +void drm_helper_clear_display_info (struct drm_connector *connector) { +struct drm_display_info *info = &connector->display_info; + +memset (info,0 ,sizeof (*info)); +} + +/** * drm_helper_probe_single_connector_modes - get complete set of display modes * @connector: connector to probe * @maxX: max width for modes @@ -288,6 +300,16 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] disconnected\n" , connector->base.id, connector->name);drm_mode_connector_update_edid_property (connector,NULL ); + +/* +* Connector status change to disconnected, time to clean
drivers/gpu/drm/drm_probe_helper.c int drm_helper_probe_single_connector_modes(struct drm_connector *connector, · line 315
Quoted 10 lines
drivers/gpu/drm/drm_probe_helper.c +7
-0+* cached display information. +* Any driver which doesn't use this probe_helper function +* should implement update of EDID property and display_info +* on its own. +*/ +drm_helper_clear_display_info (connector); + verbose_prune = false; goto prune; }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 44 lines · Shashank Sharma
This patch adds a small helper function, which clears the cached information about a hot-pluggable display, from connector. On event This will run on event of a hot-unplug, keeping the connector's display info up-to-date, avoiding any errors due to invalid cached data.
Forking this patch out from the 3 patch series:
https://patchwork.freedesktop.org/patch/128961/(still under review) and sending as individual patch.
Cc Jose Abreu <[email protected]>Cc Daniel Vetter <[email protected]>Suggested-by Jose Abreu <[email protected]>Signed-off-by Shashank Sharma <[email protected]>--- drivers/gpu/drm/drm_probe_helper.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)drivers/gpu/drm/drm_probe_helper.c +12
-0@@ -164,6 +164,18 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev) }/** +* drm_helper_clear_display_info - clean cached display information for +* hot pluggable displays, on event of hot-unplug +* @connector: connector under event +*/ +void drm_helper_clear_display_info (struct drm_connector *connector) +{ +struct drm_display_info *info = &connector->display_info; + +memset (info,0 ,sizeof (*info)); +} + +/** * drm_helper_probe_single_connector_modes - get complete set of display modes * @connector: connector to probe * @maxX: max width for modes @@ -288,6 +300,16 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,DRM_DEBUG_KMS ("[CONNECTOR:%d:%s] disconnected\n" , connector->base.id, connector->name);
drivers/gpu/drm/drm_probe_helper.c int drm_helper_probe_single_connector_modes(struct drm_connector *connector, · line 311
Quoted 10 lines
drivers/gpu/drm/drm_probe_helper.c +9
-0drm_mode_connector_update_edid_property (connector,NULL ); + +/* +* Connector status change to disconnected, time to clean +* cached display information. +* Any driver which doesn't use this probe_helper function +* should implement update of EDID property and display_info +* on its own. +*/ +drm_helper_clear_display_info (connector);
This isn't really the only place where you can switch to disconnected. I think something along the lines of some of Jani's recent RFC where we try to make this functions dtrt thing for a NULL edid would be much more robust.
-Daniel
Quoted 7 lines
drivers/gpu/drm/drm_probe_helper.c +1
-0+ verbose_prune = false; goto prune; }Signature · 1 line
1.9.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx