DRM module unload and empty modesetting

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

 



Hi Daniel, all,

So, I was playing around with arcpgu and I found a bug at module
unloading. I corrected it and tested (using a 4.12 kernel) and I
got a nice WARNING from DRM core at unloading (instead of the old
NULL pointer I got :D). I debugged it and found out that an empty
modesetting (i.e. a mode with no clock) was being set by the core
and validated with crtc->atomic_check() callback. At arcpgu we
are expecting the clock value to be valid and > 0 so we were
rejecting the empty modesetting which caused the core to not set
the final mode before unloading.

I guess then it's expectable that atomic_check()/mode_valid()
callbacks can be called with an empty mode, right? Is this
documented anywhere?

Also, do we really need to call atomic check in this case? I
mean, its an empty modesetting and the mode is not valid so it
should be rejected, no?

Also notice that this error doesn't happen with 4.13 because we
switched to crtc->mode_valid() callback which instead is only
called if a full crtc/encoder/connector pipeline is set, which in
the case of unloading is not.

Best regards,
Jose Miguel Abreu
_______________________________________________
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