Hi AceLan > -----Original Message----- > From: linux-i2c-owner@xxxxxxxxxxxxxxx <linux-i2c-owner@xxxxxxxxxxxxxxx> On > Behalf Of AceLan Kao > Sent: Sunday, February 2, 2020 6:25 PM > To: Ajay Gupta <ajayg@xxxxxxxxxx> > Cc: linux-i2c@xxxxxxxxxxxxxxx > Subject: Re: In power saving mode i2c_nvidia_gpu modules affect power > consumption a lot > > > > Hi Ajay, > > I tested it with v5.5-rc1 kernel at that time. Kernel v5.5-rc1 does have all run time pm patches. I tested with it on my GPU card and it works fine (lspci shows status as D3). Please provide following details to debug the issue you are seeing. 1. Please share exact steps to repro the issue. 2. Do you connect any USB Type-C device GPU to reproduce the issue? 3. Please run below command after using correct device ID in place of "01:00.3" based on lspci command. $ lspci 01:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device 1ad9 (rev a1) $ sudo lspci -vv -s 01:00.03 This should show Status as D3 under "Capabilities: [b4] Power Management version 3" 4. Please share complete "dmesg" log. 5. Please share output of below command $ lsmod | grep typec $ lsmod | grep nvidia $ cat /sys/class/typec/port0/port0.?/svid $ ls /sys/bus/typec/devices/ Thanks > nvpublic > After i2c_nvidia_gpu is loaded, it stuck PC state at PC3 during short idle. > > Please let me know what kind of logs you need or anything you want me to > try. > Thanks. > > Best regards, > AceLan Kao. > > Ajay Gupta <ajayg@xxxxxxxxxx> 於 2020年1月25日 週六 上午3:51寫道: > > > > Hi AceLan, > > > > > -----Original Message----- > > > From: AceLan Kao <acelan.kao@xxxxxxxxxxxxx> > > > Sent: Thursday, December 19, 2019 4:53 PM > > > To: Ajay Gupta <ajayg@xxxxxxxxxx>; linux-i2c@xxxxxxxxxxxxxxx > > > Subject: In power saving mode i2c_nvidia_gpu modules affect power > > > consumption a lot > > > > > > > > > > > > Hi all, > > > > > > We encountered an issue that while switching to power saving > > > mode(use iGPU), the power consumption goes up to 40 Watt, and after > > > removed i2c_nvidia_gpu, it becomes 5 Watt. > > > > > > I've tried to check the driver to see if it can tell it's under > > > power saving mode and found that the first time you call > > > gpu_i2c_check_status(), > > gpu_i2c_check_status() is not right place to check if driver is under > > power saving mode. You can check lspci output and looks for "Status" > > field in Power Management Capabilities. > > gpu_i2c_check_status() reads I2C_MST_CNTL register to know the status > > of i2c transaction (START, READ, WRITE, STOP)on the bus. This register > > doesn't have status of power saving mode. > > > > > it got 0 from > > > readl(), and the second and the following readl(), it returns > > > 0xe0000000. It looks like an error code combined with > > > I2C_MST_CNTL_STATUS_NO_ACK and I2C_MST_CNTL_STATUS_TIMEOUT. > > A value of 0 means last I2C transaction on the bus was > > successful.Value > > 0xe0000000 means I2C bus is still busy doing the transaction (refer > > I2C_MST_CNTL_STATUS_BUS_BUSY). > > > > > > > > Moreover, i2c_nvidia_gpu module seems depends on intel_lpss driver > > > since it provides i2c interface. So if we can to use the above > > > behavior to check its status, the system have to load intel_lpss > > > first. But currently, it seems not possible to load modules in our order. > > > > > > So, I'm wondering if we have other method to check and not load > > > i2c_nvidia_gpu module or if it's possible to check why loading > > > i2c_nvidia_gpu affects power consumption a lot. > > > > Which kernel version do you see the issue with? > > Power management related changes were merged in mainline kernel v5.3. > > If you are using older kernel then need to pull runtime PM related > > patches from latest kernel. > > https://marc.info/?l=linux-usb&m=155994544705901&w=2 > > > > thanks > > > nvpublic > > > Thanks. > > > > > > Best regards, > > > AceLan Kao.