Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tegra: dc: Perform a complete reset sequence

In order for the reset to be applied properly, the module clock must be
enabled during the assertion.

Signed-off-by: Thierry Reding <treding@nvidia.com>

+16 -2
+16 -2
drivers/gpu/drm/tegra/dc.c
··· 1997 1997 return PTR_ERR(dc->rst); 1998 1998 } 1999 1999 2000 - if (!dc->soc->broken_reset) 2001 - reset_control_assert(dc->rst); 2000 + /* assert reset and disable clock */ 2001 + if (!dc->soc->broken_reset) { 2002 + err = clk_prepare_enable(dc->clk); 2003 + if (err < 0) 2004 + return err; 2005 + 2006 + usleep_range(2000, 4000); 2007 + 2008 + err = reset_control_assert(dc->rst); 2009 + if (err < 0) 2010 + return err; 2011 + 2012 + usleep_range(2000, 4000); 2013 + 2014 + clk_disable_unprepare(dc->clk); 2015 + } 2002 2016 2003 2017 if (dc->soc->has_powergate) { 2004 2018 if (dc->pipe == 0)