* [PATCH] drm/dp: Do not prune the last mode on the connector
@ 2017-09-28 0:00 Manasi Navare
2017-09-28 0:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Manasi Navare @ 2017-09-28 0:00 UTC (permalink / raw)
To: intel-gfx; +Cc: Keith Packard, Daniel Vetter, Manasi Navare, dri-devel
Currently the drm_mode_prune_invalid() function will
prune all the modes if it finds that the mode-status
is not MODE_OK. But if it ends up pruning all modes
then there are no modes left for that connector which will
eventually result into a black screen as userspace sees no
modes from the kernel. This can happen pretty quickly in case of
eDP panel that has only mode that might get pruned.
This patch fixes this problem by checking if the mode being pruned
is the last mode on that connector and if so doesnt prune it.
Cc: dri-devel@lists.freedesktop.org
Cc: Keith Packard <keithp@keithp.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
drivers/gpu/drm/drm_modes.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 4a3f68a..a9369eb 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1185,7 +1185,8 @@ void drm_mode_prune_invalid(struct drm_device *dev,
struct drm_display_mode *mode, *t;
list_for_each_entry_safe(mode, t, mode_list, head) {
- if (mode->status != MODE_OK) {
+ if (mode->status != MODE_OK &&
+ !(list_is_last(&mode->head, mode_list))) {
list_del(&mode->head);
if (verbose) {
drm_mode_debug_printmodeline(mode);
--
2.1.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/dp: Do not prune the last mode on the connector
2017-09-28 0:00 [PATCH] drm/dp: Do not prune the last mode on the connector Manasi Navare
@ 2017-09-28 0:21 ` Patchwork
2017-09-28 0:31 ` [PATCH] " Keith Packard
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-09-28 0:21 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx
== Series Details ==
Series: drm/dp: Do not prune the last mode on the connector
URL : https://patchwork.freedesktop.org/series/31018/
State : failure
== Summary ==
Series 31018v1 drm/dp: Do not prune the last mode on the connector
https://patchwork.freedesktop.org/api/1.0/series/31018/revisions/1/mbox/
Test kms_force_connector_basic:
Subgroup force-connector-state:
pass -> FAIL (fi-bwr-2160)
pass -> FAIL (fi-elk-e7500)
pass -> FAIL (fi-snb-2520m)
pass -> FAIL (fi-snb-2600)
pass -> FAIL (fi-ivb-3520m)
pass -> FAIL (fi-ivb-3770)
pass -> FAIL (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-b:
dmesg-warn -> INCOMPLETE (fi-cfl-s) fdo#102294
Test prime_vgem:
Subgroup basic-fence-flip:
skip -> PASS (fi-ivb-3520m)
Test drv_module_reload:
Subgroup basic-reload:
dmesg-warn -> PASS (fi-glk-1) fdo#102777
fdo#102294 https://bugs.freedesktop.org/show_bug.cgi?id=102294
fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:445s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:472s
fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:422s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:533s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:1 skip:105 time:280s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:511s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:1 skip:34 time:501s
fi-cfl-s total:231 pass:188 dwarn:17 dfail:0 fail:0 skip:25
fi-cnl-y total:289 pass:259 dwarn:0 dfail:0 fail:3 skip:27 time:657s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:1 skip:59 time:417s
fi-glk-1 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:569s
fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:429s
fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:405s
fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:440s
fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:1 skip:27 time:498s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:1 skip:28 time:465s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:473s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:578s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s
fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:541s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:456s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:756s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:491s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:476s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:1 skip:38 time:571s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:417s
7f93222785e4887c083c85b76fcbb391bb1991d9 drm-tip: 2017y-09m-27d-20h-05m-25s UTC integration manifest
57fb30346021 drm/dp: Do not prune the last mode on the connector
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5837/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/dp: Do not prune the last mode on the connector
2017-09-28 0:00 [PATCH] drm/dp: Do not prune the last mode on the connector Manasi Navare
2017-09-28 0:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2017-09-28 0:31 ` Keith Packard
2017-09-28 0:48 ` Manasi Navare
2017-09-28 1:04 ` [PATCH v2] " Manasi Navare
2017-09-28 1:22 ` ✗ Fi.CI.BAT: failure for drm/dp: Do not prune the last mode on the connector (rev2) Patchwork
3 siblings, 1 reply; 6+ messages in thread
From: Keith Packard @ 2017-09-28 0:31 UTC (permalink / raw)
To: intel-gfx; +Cc: Manasi Navare, dri-devel, Daniel Vetter
[-- Attachment #1.1: Type: text/plain, Size: 474 bytes --]
Manasi Navare <manasi.d.navare@intel.com> writes:
> This patch fixes this problem by checking if the mode being pruned
> is the last mode on that connector and if so doesnt prune it.
I think you want to stop pruning when you've gotten to a single mode on
the list, not at the last mode in the list (which may well need to be
pruned).
This is entirely untested, but perhaps
+ !(list_is_singular(mode_list))) {
is what you want?
--
-keith
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/dp: Do not prune the last mode on the connector
2017-09-28 0:31 ` [PATCH] " Keith Packard
@ 2017-09-28 0:48 ` Manasi Navare
0 siblings, 0 replies; 6+ messages in thread
From: Manasi Navare @ 2017-09-28 0:48 UTC (permalink / raw)
To: Keith Packard; +Cc: intel-gfx, dri-devel, Daniel Vetter
On Wed, Sep 27, 2017 at 05:31:56PM -0700, Keith Packard wrote:
> Manasi Navare <manasi.d.navare@intel.com> writes:
>
> > This patch fixes this problem by checking if the mode being pruned
> > is the last mode on that connector and if so doesnt prune it.
>
> I think you want to stop pruning when you've gotten to a single mode on
> the list, not at the last mode in the list (which may well need to be
> pruned).
>
> This is entirely untested, but perhaps
>
> + !(list_is_singular(mode_list))) {
>
> is what you want?
>
Thanks Keith. Yes thats correct, I got confused by the macro name.
But its correct I should use the list_is_singular instead.
Manasi
> --
> -keith
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] drm/dp: Do not prune the last mode on the connector
2017-09-28 0:00 [PATCH] drm/dp: Do not prune the last mode on the connector Manasi Navare
2017-09-28 0:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-09-28 0:31 ` [PATCH] " Keith Packard
@ 2017-09-28 1:04 ` Manasi Navare
2017-09-28 1:22 ` ✗ Fi.CI.BAT: failure for drm/dp: Do not prune the last mode on the connector (rev2) Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Manasi Navare @ 2017-09-28 1:04 UTC (permalink / raw)
To: intel-gfx; +Cc: Keith Packard, Daniel Vetter, dri-devel
Currently the drm_mode_prune_invalid() function will
prune all the modes if it finds that the mode-status
is not MODE_OK. But if it ends up pruning all modes
then there are no modes left for that connector which will
eventually result into a black screen as userspace sees no
modes from the kernel. This can happen pretty quickly in case of
eDP panel that has only mode that might get pruned.
This patch fixes this problem by checking if the mode being pruned
is the last mode(only mode) on that connector and if so doesnt prune it.
v2:
* Use correct macro from list.h (Keith Packard)
Cc: dri-devel@lists.freedesktop.org
Cc: Keith Packard <keithp@keithp.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
drivers/gpu/drm/drm_modes.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 4a3f68a..9dc38a4 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1185,7 +1185,8 @@ void drm_mode_prune_invalid(struct drm_device *dev,
struct drm_display_mode *mode, *t;
list_for_each_entry_safe(mode, t, mode_list, head) {
- if (mode->status != MODE_OK) {
+ if (mode->status != MODE_OK &&
+ !list_is_singular(mode_list)) {
list_del(&mode->head);
if (verbose) {
drm_mode_debug_printmodeline(mode);
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/dp: Do not prune the last mode on the connector (rev2)
2017-09-28 0:00 [PATCH] drm/dp: Do not prune the last mode on the connector Manasi Navare
` (2 preceding siblings ...)
2017-09-28 1:04 ` [PATCH v2] " Manasi Navare
@ 2017-09-28 1:22 ` Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-09-28 1:22 UTC (permalink / raw)
To: Manasi Navare; +Cc: intel-gfx
== Series Details ==
Series: drm/dp: Do not prune the last mode on the connector (rev2)
URL : https://patchwork.freedesktop.org/series/31018/
State : failure
== Summary ==
Series 31018v2 drm/dp: Do not prune the last mode on the connector
https://patchwork.freedesktop.org/api/1.0/series/31018/revisions/2/mbox/
Test kms_force_connector_basic:
Subgroup force-connector-state:
pass -> FAIL (fi-bwr-2160)
pass -> FAIL (fi-elk-e7500)
pass -> FAIL (fi-snb-2520m)
pass -> FAIL (fi-snb-2600)
pass -> FAIL (fi-ivb-3520m)
pass -> FAIL (fi-ivb-3770)
pass -> FAIL (fi-byt-j1900)
Test prime_vgem:
Subgroup basic-fence-flip:
skip -> PASS (fi-ivb-3520m)
Test drv_module_reload:
Subgroup basic-reload:
dmesg-warn -> PASS (fi-glk-1) fdo#102777 +1
fdo#102777 https://bugs.freedesktop.org/show_bug.cgi?id=102777
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:439s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:477s
fi-blb-e6850 total:289 pass:224 dwarn:1 dfail:0 fail:0 skip:64 time:417s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:517s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:1 skip:105 time:277s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:516s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:1 skip:34 time:493s
fi-cfl-s total:289 pass:223 dwarn:34 dfail:0 fail:0 skip:32 time:544s
fi-cnl-y total:289 pass:258 dwarn:0 dfail:0 fail:4 skip:27 time:654s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:1 skip:59 time:417s
fi-glk-1 total:289 pass:259 dwarn:1 dfail:0 fail:0 skip:29 time:564s
fi-hsw-4770 total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:423s
fi-hsw-4770r total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:405s
fi-ilk-650 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:431s
fi-ivb-3520m total:289 pass:261 dwarn:0 dfail:0 fail:1 skip:27 time:492s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:1 skip:28 time:464s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:478s
fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:577s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:589s
fi-pnv-d510 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:545s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:455s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:754s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:485s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:476s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:1 skip:38 time:566s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:1 skip:39 time:415s
7f93222785e4887c083c85b76fcbb391bb1991d9 drm-tip: 2017y-09m-27d-20h-05m-25s UTC integration manifest
120bf9f3f5c0 drm/dp: Do not prune the last mode on the connector
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5839/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-09-28 1:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28 0:00 [PATCH] drm/dp: Do not prune the last mode on the connector Manasi Navare
2017-09-28 0:21 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-09-28 0:31 ` [PATCH] " Keith Packard
2017-09-28 0:48 ` Manasi Navare
2017-09-28 1:04 ` [PATCH v2] " Manasi Navare
2017-09-28 1:22 ` ✗ Fi.CI.BAT: failure for drm/dp: Do not prune the last mode on the connector (rev2) 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.