* [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected
@ 2019-04-18 8:09 Gwan-gyeong Mun
2019-04-18 8:28 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Gwan-gyeong Mun @ 2019-04-18 8:09 UTC (permalink / raw)
To: intel-gfx; +Cc: daniel.vetter, dri-devel
The hotplug detection routine of drm_helper_hpd_irq_event() can detect
changing of status of connector, but it can not detect changing of
properties of the connector.
e.g. changing of edid while suspend/resume, changing of dp lanes in dp aux.
Following scenario explains one of them; A detection of changing of edid.
1) plug display device to a connector
2) system suspend
3) unplug 1)'s display device and plug the other display device to a
connector
4) system resume
To solve explained cases, It fires off KMS hotplug events if
drm_helper_probe_detect() says the connector is connected.
Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate
Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend
Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate
Testcase: igt/kms_chamelium/dp-edid-change-during-suspend
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://lists.freedesktop.org/archives/dri-devel/2019-April/214572.html
---
drivers/gpu/drm/drm_probe_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 6fd08e04b323..081a849104f2 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -780,7 +780,8 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev)
connector->name,
drm_get_connector_status_name(old_status),
drm_get_connector_status_name(connector->status));
- if (old_status != connector->status)
+ if (old_status != connector->status ||
+ connector->status == connector_status_connected)
changed = true;
}
drm_connector_list_iter_end(&conn_iter);
--
2.21.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected
2019-04-18 8:09 [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected Gwan-gyeong Mun
@ 2019-04-18 8:28 ` Daniel Vetter
2019-04-18 13:15 ` Mun, Gwan-gyeong
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2019-04-18 8:28 UTC (permalink / raw)
To: Gwan-gyeong Mun; +Cc: daniel.vetter, intel-gfx, dri-devel
On Thu, Apr 18, 2019 at 11:09:29AM +0300, Gwan-gyeong Mun wrote:
> The hotplug detection routine of drm_helper_hpd_irq_event() can detect
> changing of status of connector, but it can not detect changing of
> properties of the connector.
> e.g. changing of edid while suspend/resume, changing of dp lanes in dp aux.
>
> Following scenario explains one of them; A detection of changing of edid.
>
> 1) plug display device to a connector
> 2) system suspend
> 3) unplug 1)'s display device and plug the other display device to a
> connector
> 4) system resume
>
> To solve explained cases, It fires off KMS hotplug events if
> drm_helper_probe_detect() says the connector is connected.
>
> Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate
> Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend
> Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate
> Testcase: igt/kms_chamelium/dp-edid-change-during-suspend
>
> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This isn't at all what I suggested.
-Daniel
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> Link: https://lists.freedesktop.org/archives/dri-devel/2019-April/214572.html
> ---
> drivers/gpu/drm/drm_probe_helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 6fd08e04b323..081a849104f2 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -780,7 +780,8 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev)
> connector->name,
> drm_get_connector_status_name(old_status),
> drm_get_connector_status_name(connector->status));
> - if (old_status != connector->status)
> + if (old_status != connector->status ||
> + connector->status == connector_status_connected)
> changed = true;
> }
> drm_connector_list_iter_end(&conn_iter);
> --
> 2.21.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected
2019-04-18 8:28 ` Daniel Vetter
@ 2019-04-18 13:15 ` Mun, Gwan-gyeong
2019-04-23 7:32 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Mun, Gwan-gyeong @ 2019-04-18 13:15 UTC (permalink / raw)
To: daniel@ffwll.ch
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
On Thu, 2019-04-18 at 10:28 +0200, Daniel Vetter wrote:
> On Thu, Apr 18, 2019 at 11:09:29AM +0300, Gwan-gyeong Mun wrote:
> > The hotplug detection routine of drm_helper_hpd_irq_event() can
> > detect
> > changing of status of connector, but it can not detect changing of
> > properties of the connector.
> > e.g. changing of edid while suspend/resume, changing of dp lanes in
> > dp aux.
> >
> > Following scenario explains one of them; A detection of changing of
> > edid.
> >
> > 1) plug display device to a connector
> > 2) system suspend
> > 3) unplug 1)'s display device and plug the other display device to
> > a
> > connector
> > 4) system resume
> >
> > To solve explained cases, It fires off KMS hotplug events if
> > drm_helper_probe_detect() says the connector is connected.
> >
> > Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate
> > Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend
> > Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate
> > Testcase: igt/kms_chamelium/dp-edid-change-during-suspend
> >
> > Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> This isn't at all what I suggested.
> -Daniel
Because the code modification was followed by your comments, so I added
suggested-by line. I will remove this line and will resend it.
Br,
G.G.
>
> > Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > Link:
> > https://lists.freedesktop.org/archives/dri-devel/2019-April/214572.html
> > ---
> > drivers/gpu/drm/drm_probe_helper.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/drm_probe_helper.c
> > b/drivers/gpu/drm/drm_probe_helper.c
> > index 6fd08e04b323..081a849104f2 100644
> > --- a/drivers/gpu/drm/drm_probe_helper.c
> > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > @@ -780,7 +780,8 @@ bool drm_helper_hpd_irq_event(struct drm_device
> > *dev)
> > connector->name,
> > drm_get_connector_status_name(old_status)
> > ,
> > drm_get_connector_status_name(connector-
> > >status));
> > - if (old_status != connector->status)
> > + if (old_status != connector->status ||
> > + connector->status == connector_status_connected)
> > changed = true;
> > }
> > drm_connector_list_iter_end(&conn_iter);
> > --
> > 2.21.0
> >
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected
2019-04-18 13:15 ` Mun, Gwan-gyeong
@ 2019-04-23 7:32 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2019-04-23 7:32 UTC (permalink / raw)
To: Mun, Gwan-gyeong
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
On Thu, Apr 18, 2019 at 01:15:17PM +0000, Mun, Gwan-gyeong wrote:
> On Thu, 2019-04-18 at 10:28 +0200, Daniel Vetter wrote:
> > On Thu, Apr 18, 2019 at 11:09:29AM +0300, Gwan-gyeong Mun wrote:
> > > The hotplug detection routine of drm_helper_hpd_irq_event() can
> > > detect
> > > changing of status of connector, but it can not detect changing of
> > > properties of the connector.
> > > e.g. changing of edid while suspend/resume, changing of dp lanes in
> > > dp aux.
> > >
> > > Following scenario explains one of them; A detection of changing of
> > > edid.
> > >
> > > 1) plug display device to a connector
> > > 2) system suspend
> > > 3) unplug 1)'s display device and plug the other display device to
> > > a
> > > connector
> > > 4) system resume
> > >
> > > To solve explained cases, It fires off KMS hotplug events if
> > > drm_helper_probe_detect() says the connector is connected.
> > >
> > > Testcase: igt/kms_chamelium/hdmi-edid-change-during-hibernate
> > > Testcase: igt/kms_chamelium/hdmi-edid-change-during-suspend
> > > Testcase: igt/kms_chamelium/dp-edid-change-during-hibernate
> > > Testcase: igt/kms_chamelium/dp-edid-change-during-suspend
> > >
> > > Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > This isn't at all what I suggested.
> > -Daniel
> Because the code modification was followed by your comments, so I added
> suggested-by line. I will remove this line and will resend it.
Apologies for not being clear: I don't think this here is what we want
really, and it's not what I suggested. I'm not exactly sure why you think
this will work, essentially it just always generates a hotplug uevent for
irq, but totally ignores polling. I guess it works, but that's a hack, not
something we should merge.
-Daniel
> Br,
> G.G.
> >
> > > Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> > > Link:
> > > https://lists.freedesktop.org/archives/dri-devel/2019-April/214572.html
> > > ---
> > > drivers/gpu/drm/drm_probe_helper.c | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_probe_helper.c
> > > b/drivers/gpu/drm/drm_probe_helper.c
> > > index 6fd08e04b323..081a849104f2 100644
> > > --- a/drivers/gpu/drm/drm_probe_helper.c
> > > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > > @@ -780,7 +780,8 @@ bool drm_helper_hpd_irq_event(struct drm_device
> > > *dev)
> > > connector->name,
> > > drm_get_connector_status_name(old_status)
> > > ,
> > > drm_get_connector_status_name(connector-
> > > >status));
> > > - if (old_status != connector->status)
> > > + if (old_status != connector->status ||
> > > + connector->status == connector_status_connected)
> > > changed = true;
> > > }
> > > drm_connector_list_iter_end(&conn_iter);
> > > --
> > > 2.21.0
> > >
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-23 7:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18 8:09 [PATCH] drm: Fire off KMS hotplug events if probe detect says the connector is connected Gwan-gyeong Mun
2019-04-18 8:28 ` Daniel Vetter
2019-04-18 13:15 ` Mun, Gwan-gyeong
2019-04-23 7:32 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox