mirror of
https://github.com/gnif/vendor-reset.git
synced 2026-08-11 04:26:44 +02:00
vega10: check if BACO state is alredy the one we are setting
This patch adds a sanity check in vega10_baco_set_state as seen in upstream kernel driver: https://github.com/torvalds/linux/blob/e7ae89a0c97ce2b68b0983cd01eda67cf373517d/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_baco.c#L84
This commit is contained in:
@@ -96,6 +96,11 @@ static const struct soc15_baco_cmd_entry clean_baco_tbl[] = {
|
|||||||
|
|
||||||
int vega10_baco_set_state(struct amd_fake_dev *adev, enum BACO_STATE state)
|
int vega10_baco_set_state(struct amd_fake_dev *adev, enum BACO_STATE state)
|
||||||
{
|
{
|
||||||
|
enum BACO_STATE cur_state;
|
||||||
|
|
||||||
|
smu9_baco_get_state(adev, &cur_state);
|
||||||
|
if (cur_state == state)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (state == BACO_STATE_IN)
|
if (state == BACO_STATE_IN)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user