Skip to contentSkip to conversation

drm/i915: Set best_encoder field of connector_state also when disabling

PATCH In review Ander Conselvan de Oliveira 4 participants 5 messages Mar 31, 2015 – Apr 1, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Set best_encoder field of connector_state also when disabling

The best_encoder field of connector_state wasn't properly set when a connector was being disabled, leading to an incosistent atomic state.

---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/intel_display.c +1 -0
index a693129..307c43b 100644
@@ -12009,6 +12009,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
 				connector->encoder = connector->new_encoder;
 		} else {
 			connector_state->crtc = NULL;
+			connector_state->best_encoder = NULL;
 		}
 	}
 	for_each_intel_crtc(dev, crtc) {
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 4 lines · Ander Conselvan de Oliveira

The best_encoder field of connector_state wasn't properly set when a connector was being disabled, leading to an incosistent atomic state.

How does this typically blow up, i.e. commit message is a bit too terse imo. Still, applied to dinf for now.

Thanks, Daniel

Quoted 23 lines
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/intel_display.c +1 -0
index a693129..307c43b 100644
@@ -12009,6 +12009,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
 				connector->encoder = connector->new_encoder;
 		} else {
 			connector_state->crtc = NULL;
+			connector_state->best_encoder = NULL;
 		}
 	}
 	for_each_intel_crtc(dev, crtc) {
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Ander Conselvan de Oliveira

The best_encoder field of connector_state wasn't properly set when a connector was being disabled, leading to an incosistent atomic state.

How does this typically blow up, i.e. commit message is a bit too terse imo. Still, applied to dinf for now.

Yeah, I should have been more verbose on this one.

For now, this doesn't cause anything to blow up, because everywhere we're using connector_state->best_encoder there is a check for connector_state->crtc which is properly initialized. I reached the issue while testing some patches I haven't sent out yet, that remove the usage of intel_connector->new_encoder from check_digital_port_conflicts(). In that case, it would be possible to trigger the converted version of the WARN in that function.

Ander

Quoted 21 lines

Thanks, Daniel

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/intel_display.c +1 -0
index a693129..307c43b 100644
@@ -12009,6 +12009,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
 				connector->encoder = connector->new_encoder;
 		} else {
 			connector_state->crtc = NULL;
+			connector_state->best_encoder = NULL;
 		}
 	}
 	for_each_intel_crtc(dev, crtc) {
Signature · 1 line
2.1.0
Quoted 5 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 12 lines · Ander Conselvan De Oliveira
Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Ander Conselvan de Oliveira

The best_encoder field of connector_state wasn't properly set when a connector was being disabled, leading to an incosistent atomic state.

How does this typically blow up, i.e. commit message is a bit too terse imo. Still, applied to dinf for now.

Yeah, I should have been more verbose on this one.

Quoted 7 lines

For now, this doesn't cause anything to blow up, because everywhere we're using connector_state->best_encoder there is a check for connector_state->crtc which is properly initialized. I reached the issue while testing some patches I haven't sent out yet, that remove the usage of intel_connector->new_encoder from check_digital_port_conflicts(). In that case, it would be possible to trigger the converted version of the WARN in that function.

Thanks, added and moved the patch from dinf to dinq. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 1/1
#4 lore raw
In reply to Ander Conselvan de Oliveira

Task id: 6101 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

PNV                                  276/276              276/276
ILK                                  303/303              303/303
SNB                 -1              304/304              303/304
IVB                                  338/338              338/338
BYT                                  287/287              287/287
HSW                                  361/361              361/361
BDW                                  309/309              309/309

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*SNB igt@gem_pwrite_pread@display-copy-performance PASS(2) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:i915_hangcheck_elapsed[i915]]*ERROR*Hangcheck_timer_elapsed...blitter_ring_idle@Hangcheck timer elapsed... blitter ring idle
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx