Re: [PATCH 1/2] drm/kms: Duct-tape for mode object lifetime checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-09-17 2:09 p.m., Daniel Vetter wrote:
> commit 4f5368b5541a902f6596558b05f5c21a9770dd32
> Author: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Date:   Fri Jun 14 08:17:23 2019 +0200
> 
>     drm/kms: Catch mode_object lifetime errors
> 
> uncovered a bit a mess in dp drivers. Most drivers (from a quick look,
> all except i915) register all the dp stuff in their init code, which
> is too early. With CONFIG_DRM_DP_AUX_CHARDEV this will blow up,
> because drm_dp_aux_register tries to add a child to a device in sysfs
> (the connector) which doesn't even exist yet.
> 
> No one seems to have cared thus far. But with the above change I also
> moved the setting of dev->registered after the ->load callback, in an
> attempt to keep old drivers from hitting any WARN_ON backtraces. But
> that moved radeon.ko from the "working, by accident" to "now also
> broken" category.
> 
> Since this is a huge mess I figured a revert would be simplest. But
> this check has already caught issues in i915:
> 
> commit 1b9bd09630d4db4827cc04d358a41a16a6bc2cb0
> Author: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Date:   Tue Aug 20 19:16:57 2019 +0300
> 
>     drm/i915: Do not create a new max_bpc prop for MST connectors
> 
> Hence I'd like to retain it. Fix the radeon regression by moving the
> setting of dev->registered back to were it was, and stop the
> backtraces with an explicit check for dev->driver->load.
> 
> Everyone else will stay as broken with CONFIG_DRM_DP_AUX_CHARDEV. The
> next patch will improve the kerneldoc and add a todo entry for this.
> 
> Fixes: 4f5368b5541a ("drm/kms: Catch mode_object lifetime errors")
> Cc: Sean Paul <sean@xxxxxxxxxx>
> Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> Reported-by: Michel Dänzer <michel@xxxxxxxxxxx>
> Cc: Michel Dänzer <michel@xxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>

Reviewed-by: Michel Dänzer <mdaenzer@xxxxxxxxxx>
Tested-by: Michel Dänzer <mdaenzer@xxxxxxxxxx>

Thanks!


-- 
Earthling Michel Dänzer               |               https://redhat.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux