2012-08-02 07:21:27

by Knut Petersen

[permalink] [raw]
Subject: [PATCH] drm: ignore disconnected <-> unknown status changes

On an AOpen i915GMm-hfs the hotplug events generated
by transitions between connector_status_unknown and
connector_status_disconnected cause screen distortions.

The attached patch cures the problem by disabling the
generation of hotplug events in those cases. That should
be safe for everybody as the only relevant changes are
those from / to connector_status_connected.

cu,
Knut


Attachments:
0001-drm-ignore-disconnected-unknown-status-changes.patch (1.50 kB)

2012-08-03 13:32:48

by Alex Deucher

[permalink] [raw]
Subject: Re: [PATCH] drm: ignore disconnected <-> unknown status changes

On Thu, Aug 2, 2012 at 3:21 AM, Knut Petersen <[email protected]> wrote:
> On an AOpen i915GMm-hfs the hotplug events generated
> by transitions between connector_status_unknown and
> connector_status_disconnected cause screen distortions.
>
> The attached patch cures the problem by disabling the
> generation of hotplug events in those cases. That should
> be safe for everybody as the only relevant changes are
> those from / to connector_status_connected.

Seems reasonable to me. We should just drop unknown.

Reviewed-by: Alex Deucher <[email protected]>

>
> cu,
> Knut
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>

2012-08-05 21:05:59

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH] drm: ignore disconnected <-> unknown status changes

On Fri, Aug 03, 2012 at 09:32:44AM -0400, Alex Deucher wrote:
> On Thu, Aug 2, 2012 at 3:21 AM, Knut Petersen <[email protected]> wrote:
> > On an AOpen i915GMm-hfs the hotplug events generated
> > by transitions between connector_status_unknown and
> > connector_status_disconnected cause screen distortions.
> >
> > The attached patch cures the problem by disabling the
> > generation of hotplug events in those cases. That should
> > be safe for everybody as the only relevant changes are
> > those from / to connector_status_connected.
>
> Seems reasonable to me. We should just drop unknown.

We (ab)use that in i915 to avoid some (more costly) load-detection tricks
in the hotplug code (but only on rather ancient hw), instead returning
unknown. When userspace then inquires the connector status, we flip-flop
back to connected. The issue is that we need to avoid these, for the
current kms locking would stall the cursor for a while, which is not
acceptable to do every 10s. Until the kms locking is fixed, we hence can't
drop the unknown state.

> Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
--
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48