[Intel-gfx] [PATCH] drm/i915/mst: Check uapi enable not intel one during mst atomic check

Lyude Paul lyude at redhat.com
Fri Nov 15 20:06:59 UTC 2019


Reviewed-by: Lyude Paul <lyude at redhat.com>

On Fri, 2019-11-15 at 12:04 -0800, José Roberto de Souza wrote:
> When the connector has VCPI allocated and is being moved to another
> pipe it causes drm_dp_atomic_release_vcpi_slots() and
> drm_dp_atomic_find_vcpi_slots() to be called in the same atomic check
> causing the error bellow.
> This happens because at this point Intel's hw.enable(and all other
> flags in the same struct) is not set but checking to on the uapi one
> it have the expected value.
> 
> [  580.804430] ------------[ cut here ]------------
> [  580.804436] WARNING: CPU: 0 PID: 1221 at
> drivers/gpu/drm/drm_dp_mst_topology.c:4094
> drm_dp_atomic_find_vcpi_slots+0x157/0x180
> [  580.804439] Modules linked in: cdc_ether r8152 i915 prime_numbers
> snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep
> asix snd_hda_core x86_pkg_temp_thermal usbnet mei_hdcp coretemp mii mei_me
> crct10dif_pclmul snd_pcm crc32_pclmul mei ghash_clmulni_intel i2c_i801 [last
> unloaded: prime_numbers]
> [  580.804462] CPU: 0 PID: 1221 Comm: kworker/0:0 Tainted:
> G        W         5.4.0-rc7-zeh+ #1226
> [  580.804465] Hardware name: Intel Corporation Tiger Lake Client
> Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.D00.2321.A09.1909250226
> 09/25/2019
> [  580.804470] Workqueue: events output_poll_execute
> [  580.804476] RIP: 0010:drm_dp_atomic_find_vcpi_slots+0x157/0x180
> [  580.804481] Code: 6a ff ff ff 49 89 6d 08 4c 89 6b 10 4c 89 63 18 49 89
> 6e 08 e9 55 ff ff ff 41 89 c7 5b 5d 44 89 f8 41 5c 41 5d 41 5e 41 5f c3 <0f>
> 0b 48 c7 c7 08 73 11 82 48 89 ee 41 bf ea ff ff ff e8 b2 e3 02
> [  580.804484] RSP: 0018:ffffc900009b7ab8 EFLAGS: 00010246
> [  580.804488] RAX: ffff88848c04ef50 RBX: ffff88848c04ef40 RCX:
> 0000000000000214
> [  580.804492] RDX: ffff88848c04f5e0 RSI: ffff888486eb2c68 RDI:
> ffff88848e518800
> [  580.804495] RBP: ffff88849d339000 R08: 00000000bc4e1092 R09:
> 0000000000000000
> [  580.804498] R10: 0000000000000000 R11: 0000000000000000 R12:
> ffff88848c04e728
> [  580.804501] R13: 0000000000000214 R14: ffff88848c04e720 R15:
> ffff888486eb2c68
> [  580.804504] FS:  0000000000000000(0000) GS:ffff8884a0000000(0000)
> knlGS:0000000000000000
> [  580.804507] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  580.804510] CR2: 00007ff6bf1ba680 CR3: 0000000005210003 CR4:
> 0000000000760ef0
> [  580.804512] PKRU: 55555554
> [  580.804515] Call Trace:
> [  580.804574]  intel_dp_mst_compute_config+0x193/0x2b0 [i915]
> [  580.804636]  intel_atomic_check+0x10cc/0x20b0 [i915]
> [  580.804644]  ? drm_atomic_print_old_state+0xf1/0x130
> [  580.804655]  drm_atomic_check_only+0x56a/0x810
> [  580.804663]  drm_atomic_commit+0xe/0x50
> [  580.804668]  drm_client_modeset_commit_atomic+0x18b/0x220
> [  580.804680]  drm_client_modeset_commit_force+0x4d/0x180
> [  580.804685]  drm_fb_helper_restore_fbdev_mode_unlocked+0x46/0xa0
> [  580.804689]  drm_fb_helper_set_par+0x27/0x50
> [  580.804692]  drm_fb_helper_hotplug_event.part.0+0xa7/0xc0
> [  580.804696]  drm_kms_helper_hotplug_event+0x21/0x30
> [  580.804699]  output_poll_execute+0x1a4/0x1c0
> [  580.804706]  process_one_work+0x25b/0x5b0
> [  580.804713]  worker_thread+0x4b/0x3b0
> [  580.804720]  kthread+0x100/0x140
> [  580.804723]  ? process_one_work+0x5b0/0x5b0
> [  580.804725]  ? kthread_park+0x80/0x80
> [  580.804730]  ret_from_fork+0x24/0x50
> [  580.804740] irq event stamp: 40988
> [  580.804743] hardirqs last  enabled at (40987): [<ffffffff81128567>]
> console_unlock+0x437/0x590
> [  580.804746] hardirqs last disabled at (40988): [<ffffffff81001cfa>]
> trace_hardirqs_off_thunk+0x1a/0x20
> [  580.804749] softirqs last  enabled at (40972): [<ffffffff81c00389>]
> __do_softirq+0x389/0x47f
> [  580.804752] softirqs last disabled at (40959): [<ffffffff810b6f19>]
> irq_exit+0xa9/0xc0
> [  580.804754] ---[ end trace 80052e0c60463c67 ]---
> [  580.804758] [drm:drm_dp_atomic_find_vcpi_slots] *ERROR* cannot allocate
> and release VCPI on [MST PORT:000000007880692e] in the same state
> [  580.811370] [drm:intel_dp_hpd_pulse [i915]] got esi2 02 00 00
> [  580.817239] [drm:intel_dp_hpd_pulse [i915]] got esi 02 00 00
> [  580.817313] ------------[ cut here ]------------
> [  580.817318] WARNING: CPU: 0 PID: 1221 at
> drivers/gpu/drm/drm_dp_mst_topology.c:4094
> drm_dp_atomic_find_vcpi_slots+0x157/0x180
> [  580.817321] Modules linked in: cdc_ether r8152 i915 prime_numbers
> snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep
> asix snd_hda_core x86_pkg_temp_thermal
> [  580.817412] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on
> [ENCODER:306:DDI E] - short
> [  580.817413]  usbnet mei_hdcp coretemp mii mei_me crct10dif_pclmul snd_pcm
> crc32_pclmul
> [  580.817490] [drm:intel_dp_hpd_pulse [i915]]  is_mst
> [  580.817491]  mei ghash_clmulni_intel i2c_i801 [last unloaded:
> prime_numbers]
> [  580.817498] CPU: 0 PID: 1221 Comm: kworker/0:0 Tainted:
> G        W         5.4.0-rc7-zeh+ #1226
> [  580.817503] Hardware name: Intel Corporation Tiger Lake Client
> Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.D00.2321.A09.1909250226
> 09/25/2019
> [  580.817506] Workqueue: events output_poll_execute
> [  580.817511] RIP: 0010:drm_dp_atomic_find_vcpi_slots+0x157/0x180
> [  580.817514] Code: 6a ff ff ff 49 89 6d 08 4c 89 6b 10 4c 89 63 18 49 89
> 6e 08 e9 55 ff ff ff 41 89 c7 5b 5d 44 89 f8 41 5c 41 5d 41 5e 41 5f c3 <0f>
> 0b 48 c7 c7 08 73 11 82 48 89 ee 41 bf ea ff ff ff e8 b2 e3 02
> [  580.817516] RSP: 0018:ffffc900009b7ab8 EFLAGS: 00010246
> [  580.817519] RAX: ffff88848c04ef50 RBX: ffff88848c04ef40 RCX:
> 000000000000018f
> [  580.817521] RDX: ffff88848c04f5e0 RSI: ffff888486eb2c68 RDI:
> ffff88848e518800
> [  580.817523] RBP: ffff88849d339000 R08: 00000000bc4e1092 R09:
> 0000000000000000
> [  580.817525] R10: 0000000000000000 R11: 0000000000000000 R12:
> ffff88848c04e728
> [  580.817528] R13: 000000000000018f R14: ffff88848c04e720 R15:
> ffff888486eb2c68
> [  580.817532] FS:  0000000000000000(0000) GS:ffff8884a0000000(0000)
> knlGS:0000000000000000
> [  580.817534] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [  580.817535] CR2: 00007ff6bf1ba680 CR3: 0000000005210003 CR4:
> 0000000000760ef0
> [  580.817537] PKRU: 55555554
> [  580.817538] Call Trace:
> [  580.817620]  intel_dp_mst_compute_config+0x193/0x2b0 [i915]
> [  580.817690]  intel_atomic_check+0x10cc/0x20b0 [i915]
> [  580.817697]  ? drm_atomic_print_old_state+0xf1/0x130
> [  580.817711]  drm_atomic_check_only+0x56a/0x810
> [  580.817721]  drm_atomic_commit+0xe/0x50
> [  580.817726]  drm_client_modeset_commit_atomic+0x18b/0x220
> [  580.817744]  drm_client_modeset_commit_force+0x4d/0x180
> [  580.817751]  drm_fb_helper_restore_fbdev_mode_unlocked+0x46/0xa0
> [  580.817756]  drm_fb_helper_set_par+0x27/0x50
> [  580.817762]  drm_fb_helper_hotplug_event.part.0+0xa7/0xc0
> [  580.817767]  drm_kms_helper_hotplug_event+0x21/0x30
> [  580.817771]  output_poll_execute+0x1a4/0x1c0
> [  580.817780]  process_one_work+0x25b/0x5b0
> [  580.817791]  worker_thread+0x4b/0x3b0
> [  580.817800]  kthread+0x100/0x140
> [  580.817804]  ? process_one_work+0x5b0/0x5b0
> [  580.817807]  ? kthread_park+0x80/0x80
> [  580.817813]  ret_from_fork+0x24/0x50
> [  580.817832] irq event stamp: 41028
> [  580.817838] hardirqs last  enabled at (41027): [<ffffffff81128567>]
> console_unlock+0x437/0x590
> [  580.817841] hardirqs last disabled at (41028): [<ffffffff81001cfa>]
> trace_hardirqs_off_thunk+0x1a/0x20
> [  580.817846] softirqs last  enabled at (41022): [<ffffffff81c00389>]
> __do_softirq+0x389/0x47f
> [  580.817851] softirqs last disabled at (41013): [<ffffffff810b6f19>]
> irq_exit+0xa9/0xc0
> [  580.817854] ---[ end trace 80052e0c60463c68 ]---
> [  580.817858] [drm:drm_dp_atomic_find_vcpi_slots] *ERROR* cannot allocate
> and release VCPI on [MST PORT:000000007880692e] in the same state
> [  580.830767] [drm:intel_dp_mst_compute_config [i915]] failed finding vcpi
> slots:-22
> [  580.830821] [drm:intel_atomic_check [i915]] Encoder config failure: -22
> 
> Cc: Lyude Paul <lyude at redhat.com>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 9fc606c6dbee..f8a350359346 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -191,7 +191,7 @@ intel_dp_mst_atomic_check(struct drm_connector
> *connector,
>  
>  		if (!crtc_state ||
>  		    !drm_atomic_crtc_needs_modeset(&crtc_state->uapi) ||
> -		    crtc_state->hw.enable)
> +		    crtc_state->uapi.enable)
>  			return 0;
>  	}
>  
-- 
Cheers,
	Lyude Paul



More information about the Intel-gfx mailing list