[Intel-gfx] [PATCH] drm/i915: fix dp/sdvo i2c cleanup

Imre Deak imre.deak at intel.com
Tue Feb 4 17:57:51 CET 2014


On Tue, 2014-02-04 at 17:13 +0100, Daniel Vetter wrote:
> On Fri, Jan 24, 2014 at 10:15 AM, Imre Deak <imre.deak at intel.com> wrote:
> > Atm we try to remove the connector's i2c sysfs entry too late in the
> > encoder's destroy callback. By that time the kobject used as the parent
> > for all connector sysfs entries is already removed when we do an early
> > removal of all connector sysfs entries in intel_modeset_cleanup(). Fix
> > this by adding an early_destory encoder callback, where we remove the
> > encoder's i2c adapter.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70523
> >
> > Signed-off-by: Imre Deak <imre.deak at intel.com>
> 
> Ok, I guess with Greg's clarification this seems to be the correct
> fix. But I'm not too happy about the ->early_destroy since that
> inversion of control is usually a bad sign for wrong layering. Imo
> it'd be better to push all the encoder clean down into each encoders
> ->destroy callback and then move the dp aux cleanup at the right
> place. So essentially we'd need to push the
> intel_panel_destroy_backlight and drm_sysfs_connector_remove calls
> down. That also allows us to only cleanup the backlight on edp/lvds.
> 
> Comments or too insane an idea?

Agreed about ->early_destroy being hacky, it was the fast and usual
solution for reordering something in drm :)

I'll check this later / discuss with Jani about reworking this based on
your suggestion.

--Imre

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140204/5a261dc5/attachment.sig>


More information about the Intel-gfx mailing list