Skip to content

Commit

Permalink
drm/tegra: sor: Reset during initialization
Browse files Browse the repository at this point in the history
As there isn't a way for the firmware on the Nyan Chromebooks to hand
over the display to the kernel, and the kernel isn't redoing the whole
configuration at present.

With this patch, the SOR is brought to a known state and we get correct
display on every boot.

Signed-off-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
tomeuv authored and thierryreding committed Apr 2, 2015
1 parent bdf7650 commit 535a65d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/gpu/drm/tegra/sor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,12 +1512,30 @@ static int tegra_sor_init(struct host1x_client *client)
}
}

/*
* XXX: Remove this reset once proper hand-over from firmware to
* kernel is possible.
*/
err = reset_control_assert(sor->rst);
if (err < 0) {
dev_err(sor->dev, "failed to assert SOR reset: %d\n", err);
return err;
}

err = clk_prepare_enable(sor->clk);
if (err < 0) {
dev_err(sor->dev, "failed to enable clock: %d\n", err);
return err;
}

usleep_range(1000, 3000);

err = reset_control_deassert(sor->rst);
if (err < 0) {
dev_err(sor->dev, "failed to deassert SOR reset: %d\n", err);
return err;
}

err = clk_prepare_enable(sor->clk_safe);
if (err < 0)
return err;
Expand Down

0 comments on commit 535a65d

Please sign in to comment.