Message ID | 20150521120656.GX15256@phenom.ffwll.local (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Daniel, > Ah, Chris hunch against my claim that this is impossible was spot-on. Can > you please try the below hack please and grab dmesg? Hopefully the kernel > won't die any more at least. Unfortunately the patch doesn't keep my machine from crashing. image of stack trace: http://imgur.com/CV5ho1B dmesg: http://pastebin.com/T69SPT3g it seems that the problem now occurs in drm_atomic_get_connector_state. (gdb) list *drm_atomic_get_connector_state+0x40 0xff0 is in drm_atomic_get_connector_state (drivers/gpu/drm/drm_atomic.c:652). 647 * 648 * Note that we only grab the indexes once we have the right lock to 649 * prevent hotplug/unplugging of connectors. So removal is no problem, 650 * at most the array is a bit too large. 651 */ 652 if (index >= state->num_connector) { 653 DRM_DEBUG_ATOMIC("Hot-added connector would overflow state array, restarting\n"); 654 return ERR_PTR(-EAGAIN); 655 } 656 (gdb) HTH Nic
On Thu, May 21, 2015 at 04:30:34PM +0200, Nicolas Kalkhof wrote: > Hi Daniel, > > > Ah, Chris hunch against my claim that this is impossible was spot-on. Can > > you please try the below hack please and grab dmesg? Hopefully the kernel > > won't die any more at least. > > Unfortunately the patch doesn't keep my machine from crashing. > > image of stack trace: http://imgur.com/CV5ho1B > dmesg: http://pastebin.com/T69SPT3g > > it seems that the problem now occurs in drm_atomic_get_connector_state. Hm something seems to be deeply wrong here. And the oops you've captured still doesn't include the debug messages before things go boom. Can you please replace the WARN_ON in my previous patch with a BUG_ON? That should stop the machine at least and hopefully prevents it all from going boom. And please play around with dmesg -n to get these debug messages to the console. I really need them to figure out what's going wrong here. -Daniel > > (gdb) list *drm_atomic_get_connector_state+0x40 > 0xff0 is in drm_atomic_get_connector_state (drivers/gpu/drm/drm_atomic.c:652). > 647 * > 648 * Note that we only grab the indexes once we have the right lock to > 649 * prevent hotplug/unplugging of connectors. So removal is no problem, > 650 * at most the array is a bit too large. > 651 */ > 652 if (index >= state->num_connector) { > 653 DRM_DEBUG_ATOMIC("Hot-added connector would overflow state array, restarting\n"); > 654 return ERR_PTR(-EAGAIN); > 655 } > 656 > (gdb) > > HTH > Nic
> Hm something seems to be deeply wrong here. And the oops you've captured > still doesn't include the debug messages before things go boom. Can you > please replace the WARN_ON in my previous patch with a BUG_ON? That should > stop the machine at least and hopefully prevents it all from going boom. I've switched WARN_ON to BUG_ON and in deed it appears right before the oops: http://imgur.com/eKFSTYB > And please play around with dmesg -n to get these debug messages to the > console. I really need them to figure out what's going wrong here. Please see attached .bz file. This is the max debug output taken from /proc/kmsg right up to the oops. This is everything I got out of it. Maybe I've missed something to get more debug messages to the console other than setting kernel parameters to drm.debug=0xff log_buf_len=10M LOGLEVEL=8 debug and dmesg config dmesg -n 7 and dmesg -n 8. Any hints? - Nic
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index b82ef6262469..15ba72fb98dd 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -157,6 +157,7 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx) struct drm_connector *connector; struct drm_connector_state *connector_state; struct drm_crtc_state *crtc_state; + struct drm_crtc *saved_crtc; int idx, ret; connector = state->connectors[conn_idx]; @@ -195,6 +196,8 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx) return 0; } + saved_crtc = connector_state->crtc; + funcs = connector->helper_private; new_encoder = funcs->best_encoder(connector); @@ -230,7 +233,8 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx) } connector_state->best_encoder = new_encoder; - idx = drm_crtc_index(connector_state->crtc); + WARN_ON(!connector_state->crtc); + idx = drm_crtc_index(saved_crtc); crtc_state = state->crtc_states[idx]; crtc_state->mode_changed = true;