From: Dmitry Osipenko <digetx@gmail.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>, linux-tegra@vger.kernel.org
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
"Terje Bergström" <tbergstrom@nvidia.com>,
"David Airlie" <airlied@linux.ie>,
"Stephen Warren" <swarren@wwwdotorg.org>,
"Alexandre Courbot" <gnurou@gmail.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/tegra: Reset the SOR during initialization
Date: Thu, 26 Mar 2015 12:24:25 +0300 [thread overview]
Message-ID: <5513D049.4080700@gmail.com> (raw)
In-Reply-To: <1427273979-394-1-git-send-email-tomeu.vizoso@collabora.com>
25.03.2015 11:59, Tomeu Vizoso пишет:
> 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 <tomeu.vizoso@collabora.com>
>
> ---
>
> v7: * Move the reset to the host1x_client_ops.init callback as
> suggested by Thierry
> * Reduced the time during which the reset line is asserted from
> 20ms to 2ms
> ---
> drivers/gpu/drm/tegra/sor.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> index 2afe478..027a25d22 100644
> --- a/drivers/gpu/drm/tegra/sor.c
> +++ b/drivers/gpu/drm/tegra/sor.c
> @@ -1354,12 +1354,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;
> }
>
> + msleep(2);
> +
> + 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;
>
According to kernel doc, you should use usleep_range() instead of msleep().
https://www.kernel.org/doc/Documentation/timers/timers-howto.txt
--
Dmitry
next prev parent reply other threads:[~2015-03-26 9:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 9:52 [PATCH v6 00/12] Improvements to Tegra-based Chromebook support Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 01/12] ARM: tegra: Change model of sound card in Nyan Big Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 02/12] ARM: tegra: Move out nyan-generic parts out from the nyan-big DT Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 03/12] drm/panel: add support for Samsung LTN140AT29 panel Tomeu Vizoso
2015-03-24 10:27 ` Thierry Reding
2015-03-18 9:52 ` [PATCH v6 04/12] ARM: tegra: Add DTS for the nyan-blaze board Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 05/12] ARM: tegra: Add node for trackpad in Nyan boards Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 06/12] ARM: tegra: Use pwrseq-simple for the wifi in Nyan Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 07/12] ARM: tegra: Use the generated pinmux data Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 08/12] ARM: tegra: Set spi-max-frequency property to flash node Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 09/12] drm/tegra: Reset the SOR on probe Tomeu Vizoso
2015-03-24 10:24 ` Thierry Reding
2015-03-25 8:59 ` [PATCH] drm/tegra: Reset the SOR during initialization Tomeu Vizoso
2015-03-26 9:24 ` Dmitry Osipenko [this message]
2015-03-18 9:52 ` [PATCH v6 10/12] soc/tegra: pmc: move to using a restart handler Tomeu Vizoso
2015-03-24 10:26 ` Thierry Reding
2015-03-18 9:52 ` [PATCH v6 11/12] ARM: tegra: Add gpio-restart node Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 12/12] ARM: tegra: The WiFi card is kept powered during suspend Tomeu Vizoso
2015-03-18 9:52 ` [PATCH v6 13/13] HACK: Hide RPMB partitions Tomeu Vizoso
2015-03-18 9:55 ` Tomeu Vizoso
2015-03-24 10:28 ` [PATCH v6 00/12] Improvements to Tegra-based Chromebook support Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5513D049.4080700@gmail.com \
--to=digetx@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=gnurou@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=tbergstrom@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=tomeu.vizoso@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).