* [PATCH] drm/core: Set mode to NULL when connectors in a set drops to 0.
@ 2015-08-11 7:54 Maarten Lankhorst
2015-08-11 8:51 ` [Intel-gfx] " Daniel Vetter
2015-08-14 17:44 ` shuang.he
0 siblings, 2 replies; 3+ messages in thread
From: Maarten Lankhorst @ 2015-08-11 7:54 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx
Without this when a MST connector is removed drm_atomic_helper_set_config
can complain about set->mode && !set->num_connectors.
------------[ cut here ]------------
WARNING: CPU: 2 PID: 2403 at drivers/gpu/drm/drm_atomic_helper.c:1673 drm_atomic_helper_set_config+0x22e/0x420()
CPU: 2 PID: 2403 Comm: kms_flip Not tainted 4.2.0-rc5 #4233
Hardware name: NUC5i7RYB, BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015
ffffffff81ac75e8 ffff88004e4ffbf8 ffffffff81714c34 0000000080000000
0000000000000000 ffff88004e4ffc38 ffffffff8107bf81 ffff88004e4ffc48
ffff8800d8ca0690 ffff8800d8d7a080 ffff8800d8cc2290 ffff8800d07bc9f0
Call Trace:
[<ffffffff81714c34>] dump_stack+0x4f/0x7b
[<ffffffff8107bf81>] warn_slowpath_common+0x81/0xc0
[<ffffffff8107c065>] warn_slowpath_null+0x15/0x20
[<ffffffff813d9e3e>] drm_atomic_helper_set_config+0x22e/0x420
[<ffffffff813da174>] ? drm_atomic_helper_plane_set_property+0x84/0xc0
[<ffffffff813ee101>] drm_mode_set_config_internal+0x61/0x100
[<ffffffff813dc4ed>] restore_fbdev_mode+0xbd/0xe0
[<ffffffff813de1e4>] drm_fb_helper_restore_fbdev_mode_unlocked+0x24/0x70
[<ffffffffc0123d11>] intel_fbdev_restore_mode+0x21/0x80 [i915]
[<ffffffffc014bf69>] i915_driver_lastclose+0x9/0x10 [i915]
[<ffffffff813e2429>] drm_lastclose+0x29/0x130
[<ffffffff813e2844>] drm_release+0x314/0x500
[<ffffffff81194795>] __fput+0xe5/0x1f0
[<ffffffff811948d9>] ____fput+0x9/0x10
[<ffffffff810968d8>] task_work_run+0x88/0xb0
[<ffffffff8107d53f>] do_exit+0x37f/0xa90
[<ffffffff8127e258>] ? selinux_file_ioctl+0x48/0xc0
[<ffffffff81277dfe>] ? security_file_ioctl+0x3e/0x60
[<ffffffff8107ec80>] do_group_exit+0x40/0xa0
[<ffffffff8107ecef>] SyS_exit_group+0xf/0x10
[<ffffffff8171bdd7>] entry_SYSCALL_64_fastpath+0x12/0x6a
---[ end trace 0daf358c49351567 ]---
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/drm_fb_helper.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 5875059a7625..418d299f3b12 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -168,11 +168,14 @@ static void remove_from_modeset(struct drm_mode_set *set,
}
set->num_connectors--;
- /* because i915 is pissy about this..
+ /*
* TODO maybe need to makes sure we set it back to !=NULL somewhere?
*/
- if (set->num_connectors == 0)
+ if (set->num_connectors == 0) {
set->fb = NULL;
+ drm_mode_destroy(connector->dev, set->mode);
+ set->mode = NULL;
+ }
}
int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
--
2.1.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Intel-gfx] [PATCH] drm/core: Set mode to NULL when connectors in a set drops to 0.
2015-08-11 7:54 [PATCH] drm/core: Set mode to NULL when connectors in a set drops to 0 Maarten Lankhorst
@ 2015-08-11 8:51 ` Daniel Vetter
2015-08-14 17:44 ` shuang.he
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2015-08-11 8:51 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: intel-gfx, dri-devel
On Tue, Aug 11, 2015 at 09:54:59AM +0200, Maarten Lankhorst wrote:
> Without this when a MST connector is removed drm_atomic_helper_set_config
> can complain about set->mode && !set->num_connectors.
>
> ------------[ cut here ]------------
> WARNING: CPU: 2 PID: 2403 at drivers/gpu/drm/drm_atomic_helper.c:1673 drm_atomic_helper_set_config+0x22e/0x420()
> CPU: 2 PID: 2403 Comm: kms_flip Not tainted 4.2.0-rc5 #4233
> Hardware name: NUC5i7RYB, BIOS RYBDWi35.86A.0246.2015.0309.1355 03/09/2015
> ffffffff81ac75e8 ffff88004e4ffbf8 ffffffff81714c34 0000000080000000
> 0000000000000000 ffff88004e4ffc38 ffffffff8107bf81 ffff88004e4ffc48
> ffff8800d8ca0690 ffff8800d8d7a080 ffff8800d8cc2290 ffff8800d07bc9f0
> Call Trace:
> [<ffffffff81714c34>] dump_stack+0x4f/0x7b
> [<ffffffff8107bf81>] warn_slowpath_common+0x81/0xc0
> [<ffffffff8107c065>] warn_slowpath_null+0x15/0x20
> [<ffffffff813d9e3e>] drm_atomic_helper_set_config+0x22e/0x420
> [<ffffffff813da174>] ? drm_atomic_helper_plane_set_property+0x84/0xc0
> [<ffffffff813ee101>] drm_mode_set_config_internal+0x61/0x100
> [<ffffffff813dc4ed>] restore_fbdev_mode+0xbd/0xe0
> [<ffffffff813de1e4>] drm_fb_helper_restore_fbdev_mode_unlocked+0x24/0x70
> [<ffffffffc0123d11>] intel_fbdev_restore_mode+0x21/0x80 [i915]
> [<ffffffffc014bf69>] i915_driver_lastclose+0x9/0x10 [i915]
> [<ffffffff813e2429>] drm_lastclose+0x29/0x130
> [<ffffffff813e2844>] drm_release+0x314/0x500
> [<ffffffff81194795>] __fput+0xe5/0x1f0
> [<ffffffff811948d9>] ____fput+0x9/0x10
> [<ffffffff810968d8>] task_work_run+0x88/0xb0
> [<ffffffff8107d53f>] do_exit+0x37f/0xa90
> [<ffffffff8127e258>] ? selinux_file_ioctl+0x48/0xc0
> [<ffffffff81277dfe>] ? security_file_ioctl+0x3e/0x60
> [<ffffffff8107ec80>] do_group_exit+0x40/0xa0
> [<ffffffff8107ecef>] SyS_exit_group+0xf/0x10
> [<ffffffff8171bdd7>] entry_SYSCALL_64_fastpath+0x12/0x6a
> ---[ end trace 0daf358c49351567 ]---
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Applied to drm-misc, thanks.
-Daniel
> ---
> drivers/gpu/drm/drm_fb_helper.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 5875059a7625..418d299f3b12 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -168,11 +168,14 @@ static void remove_from_modeset(struct drm_mode_set *set,
> }
> set->num_connectors--;
>
> - /* because i915 is pissy about this..
> + /*
> * TODO maybe need to makes sure we set it back to !=NULL somewhere?
> */
> - if (set->num_connectors == 0)
> + if (set->num_connectors == 0) {
> set->fb = NULL;
> + drm_mode_destroy(connector->dev, set->mode);
> + set->mode = NULL;
> + }
> }
>
> int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/core: Set mode to NULL when connectors in a set drops to 0.
2015-08-11 7:54 [PATCH] drm/core: Set mode to NULL when connectors in a set drops to 0 Maarten Lankhorst
2015-08-11 8:51 ` [Intel-gfx] " Daniel Vetter
@ 2015-08-14 17:44 ` shuang.he
1 sibling, 0 replies; 3+ messages in thread
From: shuang.he @ 2015-08-14 17:44 UTC (permalink / raw)
To: shuang.he, julianx.dumez, christophe.sureau, lei.a.liu, intel-gfx,
maarten.lankhorst
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 7142
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK -2 302/302 300/302
SNB 315/315 315/315
IVB 336/336 336/336
BYT -2 283/283 281/283
HSW 378/378 378/378
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*ILK igt@kms_flip@flip-vs-dpms-interruptible PASS(1) DMESG_WARN(1)
*ILK igt@kms_flip@wf_vblank-vs-modeset-interruptible PASS(1) DMESG_WARN(1)
*BYT igt@gem_partial_pwrite_pread@reads-uncached PASS(1) FAIL(1)
*BYT igt@gem_tiled_partial_pwrite_pread@writes-after-reads PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-14 17:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 7:54 [PATCH] drm/core: Set mode to NULL when connectors in a set drops to 0 Maarten Lankhorst
2015-08-11 8:51 ` [Intel-gfx] " Daniel Vetter
2015-08-14 17:44 ` shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox