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

Daniel Vetter daniel at ffwll.ch
Tue Feb 4 17:13:01 CET 2014


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?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list