]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: set max power according to card type
authorOded Gabbay <oded.gabbay@gmail.com>
Sat, 8 Aug 2020 20:34:47 +0000 (23:34 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Sat, 22 Aug 2020 09:47:57 +0000 (12:47 +0300)
commit95a2c431cd450db6b07d129475238ac91f989832
treed94843a54bd11a91d0927d4deba43d32ee63c790
parent7c71fcc2514ec3888043f68afba11a4cbab24748
habanalabs: set max power according to card type

In Gaudi, the default max power setting is different between PCI and PMC
cards. Therefore, the driver need to set the default after knowing what is
the card type.

The current code has a bug where it limits the maximum power of the PMC
card to 200W after a reset occurs.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/sysfs.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/gaudi/gaudiP.h