All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ 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] 6+ 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
  2019-04-18  8:35 ` ✓ Fi.CI.BAT: success for " Patchwork
  2019-04-18  9:52 ` ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 6+ 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] 6+ messages in thread

* ✓ Fi.CI.BAT: success for 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  8:35 ` Patchwork
  2019-04-18  9:52 ` ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-04-18  8:35 UTC (permalink / raw)
  To: Gwan-gyeong Mun; +Cc: intel-gfx

== Series Details ==

Series: drm: Fire off KMS hotplug events if probe detect says the connector is connected
URL   : https://patchwork.freedesktop.org/series/59691/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5951 -> Patchwork_12826
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/59691/revisions/1/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_12826:

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_chamelium@common-hpd-after-suspend:
    - {fi-icl-u2}:        NOTRUN -> FAIL

  
Known issues
------------

  Here are the changes found in Patchwork_12826 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@query-info:
    - fi-bsw-kefka:       NOTRUN -> SKIP [fdo#109271] +50

  * igt@amdgpu/amd_basic@semaphore:
    - fi-bdw-5557u:       NOTRUN -> SKIP [fdo#109271] +38

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
    - fi-icl-u3:          NOTRUN -> SKIP [fdo#109315] +17

  * igt@gem_exec_basic@gtt-bsd1:
    - fi-icl-u3:          NOTRUN -> SKIP [fdo#109276] +7

  * igt@gem_exec_parse@basic-rejected:
    - fi-icl-u3:          NOTRUN -> SKIP [fdo#109289] +1

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-bsw-n3050:       PASS -> DMESG-WARN [fdo#106107] / [fdo#107732]

  * igt@i915_selftest@live_contexts:
    - fi-skl-gvtdvm:      PASS -> DMESG-FAIL [fdo#110235 ]

  * igt@i915_selftest@live_hangcheck:
    - fi-icl-y:           PASS -> INCOMPLETE [fdo#107713] / [fdo#108569]

  * igt@kms_busy@basic-flip-c:
    - fi-bsw-kefka:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_chamelium@hdmi-edid-read:
    - fi-icl-u3:          NOTRUN -> SKIP [fdo#109284] +8

  * igt@kms_force_connector_basic@prune-stale-modes:
    - fi-icl-u3:          NOTRUN -> SKIP [fdo#109285] +3

  * igt@kms_frontbuffer_tracking@basic:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103167]

  * igt@runner@aborted:
    - fi-bsw-n3050:       NOTRUN -> FAIL [fdo#110446]

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-byt-clapper:     FAIL [fdo#103191] -> PASS

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107732]: https://bugs.freedesktop.org/show_bug.cgi?id=107732
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
  [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 
  [fdo#110446]: https://bugs.freedesktop.org/show_bug.cgi?id=110446


Participating hosts (46 -> 45)
------------------------------

  Additional (4): fi-bsw-kefka fi-icl-u2 fi-icl-u3 fi-bdw-5557u 
  Missing    (5): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


Build changes
-------------

    * Linux: CI_DRM_5951 -> Patchwork_12826

  CI_DRM_5951: 08cf1213114f21fc0b1a17eac081a2db8c03311f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4956: 1d921615b0b706f25c856aa0eb096f274380c199 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12826: 1f26c50d561d47b5b570e24631603a4738b95a5f @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

1f26c50d561d drm: Fire off KMS hotplug events if probe detect says the connector is connected

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12826/
_______________________________________________
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

* ✓ Fi.CI.IGT: success for 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  8:35 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2019-04-18  9:52 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-04-18  9:52 UTC (permalink / raw)
  To: Gwan-gyeong Mun; +Cc: intel-gfx

== Series Details ==

Series: drm: Fire off KMS hotplug events if probe detect says the connector is connected
URL   : https://patchwork.freedesktop.org/series/59691/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5951_full -> Patchwork_12826_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_12826_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@rcs0-s3:
    - shard-kbl:          PASS -> DMESG-WARN [fdo#108566] +1

  * igt@gem_exec_schedule@preempt-other-chain-blt:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] +35

  * igt@gem_exec_suspend@basic-s3:
    - shard-kbl:          PASS -> INCOMPLETE [fdo#103665]

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          PASS -> DMESG-WARN [fdo#108566] +5

  * igt@i915_pm_rpm@pm-caching:
    - shard-skl:          PASS -> INCOMPLETE [fdo#107807]

  * igt@kms_atomic_transition@3x-modeset-transitions-nonblocking:
    - shard-snb:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1

  * igt@kms_atomic_transition@4x-modeset-transitions-nonblocking-fencing:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2

  * igt@kms_atomic_transition@5x-modeset-transitions:
    - shard-skl:          NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +11

  * igt@kms_busy@basic-flip-b:
    - shard-snb:          PASS -> SKIP [fdo#109271] / [fdo#109278]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
    - shard-skl:          PASS -> INCOMPLETE [fdo#104108]

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         PASS -> SKIP [fdo#109349]

  * igt@kms_flip@modeset-vs-vblank-race-interruptible:
    - shard-kbl:          PASS -> FAIL [fdo#103060]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render:
    - shard-iclb:         PASS -> FAIL [fdo#103167] +8

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-msflip-blt:
    - shard-kbl:          NOTRUN -> SKIP [fdo#109271] +13

  * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
    - shard-skl:          NOTRUN -> FAIL [fdo#108145] +3

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb:
    - shard-kbl:          NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
    - shard-skl:          PASS -> FAIL [fdo#108145] / [fdo#110403]

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-iclb:         PASS -> SKIP [fdo#109441] +2

  * igt@perf_pmu@semaphore-wait-vcs1:
    - shard-skl:          NOTRUN -> SKIP [fdo#109271] +133

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-glk:          FAIL [fdo#109661] -> PASS

  * igt@gem_workarounds@suspend-resume:
    - shard-apl:          DMESG-WARN [fdo#108566] -> PASS +4

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-skl:          INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS

  * igt@kms_cursor_crc@cursor-256x85-random:
    - shard-skl:          FAIL [fdo#103232] -> PASS

  * igt@kms_flip@plain-flip-ts-check-interruptible:
    - shard-skl:          FAIL [fdo#100368] -> PASS

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt:
    - shard-iclb:         FAIL [fdo#103167] -> PASS +4

  * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
    - shard-skl:          FAIL [fdo#108145] -> PASS

  * igt@kms_plane_scaling@pipe-b-scaler-with-rotation:
    - shard-glk:          SKIP [fdo#109271] / [fdo#109278] -> PASS

  * igt@kms_psr@no_drrs:
    - shard-iclb:         FAIL [fdo#108341] -> PASS

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         SKIP [fdo#109441] -> PASS +2

  * igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
    - shard-kbl:          DMESG-FAIL [fdo#105763] -> PASS

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-kbl:          DMESG-WARN [fdo#108566] -> PASS +1

  
  [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
  [fdo#107773]: https://bugs.freedesktop.org/show_bug.cgi?id=107773
  [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
  [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403


Participating hosts (10 -> 9)
------------------------------

  Missing    (1): shard-hsw 


Build changes
-------------

    * Linux: CI_DRM_5951 -> Patchwork_12826

  CI_DRM_5951: 08cf1213114f21fc0b1a17eac081a2db8c03311f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4956: 1d921615b0b706f25c856aa0eb096f274380c199 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_12826: 1f26c50d561d47b5b570e24631603a4738b95a5f @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12826/
_______________________________________________
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: 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; 6+ messages in thread
From: Mun, Gwan-gyeong @ 2019-04-18 13:15 UTC (permalink / raw)
  To: daniel; +Cc: daniel.vetter, intel-gfx, dri-devel

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] 6+ 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; 6+ messages in thread
From: Daniel Vetter @ 2019-04-23  7:32 UTC (permalink / raw)
  To: Mun, Gwan-gyeong; +Cc: daniel.vetter, intel-gfx, dri-devel

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] 6+ messages in thread

end of thread, other threads:[~2019-04-23  7:32 UTC | newest]

Thread overview: 6+ 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
2019-04-18  8:35 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-04-18  9:52 ` ✓ Fi.CI.IGT: " 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.