Re: UCSI:CCG: AMD Platform

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

 



Hi

Sorry for the delayed response. I was on vacation.
On 2/3/2020 7:02 PM, Heikki Krogerus wrote:
> On Mon, Feb 03, 2020 at 03:28:11PM +0200, Heikki Krogerus wrote:
>> Hi,
>>
>> On Mon, Feb 03, 2020 at 10:52:52AM +0530, Shah, Nehal-bakulchandra wrote:
>>> Currently i am working on enabling UCSI support
>>> for CCGx based controller on AMD GPU Cards.
>>>
>>> Now i am observing the issue reported here when
>>> i unplug the cable.
>>>
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1762031&data=02%7C01%7CNehal-bakulchandra.Shah%40amd.com%7Ceb1ac5e877db4fa9d75f08d7a8ad87a3%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637163335569266081&sdata=KemJKkVhpqDo%2FSbHhVaMz7jrcploEALJYg%2BRWvhJ7bM%3D&reserved=0
>>>
>>> Also would like to know is there any way we can
>>> get user level notifications for UCSI?
>>
>> If you want to see the actual UCSI notification in user space, then
>> that is not possible, but the driver does produce trace output, and I
>> would actually like to see what we got there. You need debugfs to be
>> mounted. Then try the following:
>>
>>         # Unload all UCSI modules
>>         modprobe -r ucsi_acpi
>>
>>         # At this point you should plug-in the problematic device
>>
>>         # Reload the UCSI core module
>>         modprobe typec_ucsi
>>
>>         # Enable UCSI tracing
>>         echo 1 > /sys/kernel/debug/tracing/events/ucsi/enable
>>
>>         # Now reload the ACPI glue driver
>>         modprobe ucsi_acpi
>>
>>         # Unplug the problematic device so that you see the error
>>
>>         # Finally dump the trace output
>>         cat /sys/kernel/debug/tracing/trace
>>
>> So if that works, please send the trace output to me.
> 
> Actually, first things first. Please share your dmesg output. Are you
> using ucsi_acpi or ucsi_ccg glue driver?
> 
> thanks,
> 

I am using CCG based UCSI driver without any
modification.For I2C part i have written custom
driver.

I have attached the trace out and dmesg crash log.

Please have a look


Thanks
Nehal Shah


                
[ 1024.251288] BUG: kernel NULL pointer dereference, address: 0000000000000080
[ 1024.251290] #PF: supervisor read access in kernel mode
[ 1024.251291] #PF: error_code(0x0000) - not-present page
[ 1024.251292] PGD 0 P4D 0 
[ 1024.251296] Oops: 0000 [#1] SMP NOPTI
[ 1024.251299] CPU: 6 PID: 282 Comm: kworker/6:2 Tainted: G           O      5.5.0-rc7+ #15
[ 1024.251300] Hardware name: AMD Myrtle/Myrtle-RV, BIOS WMX0108N 01/06/2020
[ 1024.251306] Workqueue: events ucsi_handle_connector_change [typec_ucsi]
[ 1024.251311] RIP: 0010:ucsi_displayport_remove_partner+0xb/0x30 [typec_ucsi]
[ 1024.251314] Code: 00 c6 43 38 00 c7 43 28 00 00 00 00 48 83 c7 10 e8 ea a6 0d f3 5b 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 48 85 ff 74 1e 55 <48> 8b 47 78 48 89 e5 48 85 c0 0f 84 50 03 00 00 48 c7 00 00 00 00
[ 1024.251316] RSP: 0018:ffffbec040617dc0 EFLAGS: 00010202
[ 1024.251318] RAX: 0000000000000008 RBX: ffffa0b5dd16a970 RCX: 000000000000767f
[ 1024.251320] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
[ 1024.251321] RBP: ffffbec040617df0 R08: 0000000000000000 R09: ffffbec040617c78
[ 1024.251322] R10: ffffa0b59777e818 R11: ffffa0b5f872cc78 R12: 0000000000000000
[ 1024.251323] R13: ffffa0b5dd16a970 R14: 0000000000000001 R15: ffffa0b5dd16a800
[ 1024.251325] FS:  0000000000000000(0000) GS:ffffa0b5f8780000(0000) knlGS:0000000000000000
[ 1024.251326] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1024.251327] CR2: 0000000000000080 CR3: 000000019e10e000 CR4: 00000000003406e0
[ 1024.251329] Call Trace:
[ 1024.251334]  ? ucsi_unregister_altmodes+0x7f/0xa0 [typec_ucsi]
[ 1024.251337]  ucsi_unregister_partner.part.0+0x17/0x30 [typec_ucsi]
[ 1024.251341]  ucsi_handle_connector_change+0x220/0x320 [typec_ucsi]
[ 1024.251345]  ? __schedule+0x2e0/0x760
[ 1024.251349]  process_one_work+0x1ec/0x3a0
[ 1024.251352]  worker_thread+0x4d/0x400
[ 1024.251354]  kthread+0x104/0x140
[ 1024.251357]  ? process_one_work+0x3a0/0x3a0
[ 1024.251360]  ? kthread_park+0x90/0x90
[ 1024.251362]  ret_from_fork+0x22/0x40
[ 1024.251364] Modules linked in: typec_displayport ucsi_ccg ucsi_pci_amd(O) typec_ucsi typec nls_iso8859_1 amdgpu edac_mce_amd kvm_amd ccp kvm snd_hda_codec_realtek irqbypass snd_seq_midi snd_hda_codec_generic snd_seq_midi_event ledtrig_audio snd_rawmidi snd_hda_codec_hdmi crct10dif_pclmul crc32_pclmul snd_hda_intel amd_iommu_v2 snd_intel_dspcfg gpu_sched snd_hda_codec snd_seq ghash_clmulni_intel ttm snd_hda_core aesni_intel crypto_simd drm_kms_helper snd_hwdep cryptd glue_helper snd_pcm snd_seq_device drm k10temp wmi_bmof snd_pci_acp3x snd_timer input_leds i2c_algo_bit snd fb_sys_fops syscopyarea sysfillrect soundcore sysimgblt mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid nvme i2c_piix4 nvme_core sdhci_pci cqhci tg3 sdhci ahci libahci wmi video gpio_amdpt gpio_generic
[ 1024.251398] CR2: 0000000000000080
[ 1024.251401] ---[ end trace b474f602fe29e6b8 ]---
[ 1024.251404] RIP: 0010:ucsi_displayport_remove_partner+0xb/0x30 [typec_ucsi]
[ 1024.251406] Code: 00 c6 43 38 00 c7 43 28 00 00 00 00 48 83 c7 10 e8 ea a6 0d f3 5b 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 48 85 ff 74 1e 55 <48> 8b 47 78 48 89 e5 48 85 c0 0f 84 50 03 00 00 48 c7 00 00 00 00
[ 1024.251407] RSP: 0018:ffffbec040617dc0 EFLAGS: 00010202
[ 1024.251409] RAX: 0000000000000008 RBX: ffffa0b5dd16a970 RCX: 000000000000767f
[ 1024.251410] RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000008
[ 1024.251411] RBP: ffffbec040617df0 R08: 0000000000000000 R09: ffffbec040617c78
[ 1024.251412] R10: ffffa0b59777e818 R11: ffffa0b5f872cc78 R12: 0000000000000000
[ 1024.251413] R13: ffffa0b5dd16a970 R14: 0000000000000001 R15: ffffa0b5dd16a800
[ 1024.251414] FS:  0000000000000000(0000) GS:ffffa0b5f8780000(0000) knlGS:0000000000000000
[ 1024.251416] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1024.251418] CR2: 0000000000000080 CR3: 000000019e10e000 CR4: 00000000003406e0
[ 1024.252359] Nehal xfer  success 
# tracer: nop
#
# entries-in-buffer/entries-written: 7/7   #P:8
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/0:4-189   [000] ....   221.043174: ucsi_register_port: port0 status: change=0000, opmode=0, connected=0, sourcing=0, partner_flags=0, partner_type=0, request_data_obj=00000000, BC status=0
     kworker/0:4-189   [000] ....   221.094474: ucsi_register_port: port1 status: change=0000, opmode=0, connected=0, sourcing=0, partner_flags=0, partner_type=0, request_data_obj=00000000, BC status=0
     kworker/6:2-282   [006] ....   808.864397: ucsi_connector_change: port0 status: change=4800, opmode=5, connected=1, sourcing=1, partner_flags=1, partner_type=2, request_data_obj=00000000, BC status=0
     kworker/6:2-282   [006] ....   808.934334: ucsi_connector_change: port0 status: change=0040, opmode=3, connected=1, sourcing=1, partner_flags=1, partner_type=2, request_data_obj=1201685a, BC status=0
     kworker/6:2-282   [006] ....   809.937685: ucsi_connector_change: port0 status: change=0100, opmode=3, connected=1, sourcing=1, partner_flags=1, partner_type=2, request_data_obj=1201685a, BC status=0
     kworker/6:2-282   [006] ....   810.005748: ucsi_register_altmode: partner alt mode: svid ff01, mode 1 vdo 1405
     kworker/6:2-282   [006] ....   810.042554: ucsi_connector_change: port0 status: change=0800, opmode=3, connected=1, sourcing=1, partner_flags=2, partner_type=2, request_data_obj=1201685a, BC status=0

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux