linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Schake <stschake@gmail.com>
To: thierry.reding@gmail.com
Cc: airlied@linux.ie, jonathanh@nvidia.com,
	dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, Stefan Schake <stschake@gmail.com>
Subject: [PATCH] drm/tegra: hub: Use state directly
Date: Wed, 18 Apr 2018 03:40:19 -0700	[thread overview]
Message-ID: <20180418104019.31344-1-stschake@gmail.com> (raw)

Using drm_atomic_get_private_obj_state after state has been swapped
will return old state.

Fixes: 0281c4149021 ("drm/tegra: hub: Use private object for global state")
Signed-off-by: Stefan Schake <stschake@gmail.com>
---
 drivers/gpu/drm/tegra/hub.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c
index 9a3f23d4780f..bdd2cdd0745c 100644
--- a/drivers/gpu/drm/tegra/hub.c
+++ b/drivers/gpu/drm/tegra/hub.c
@@ -683,12 +683,11 @@ void tegra_display_hub_atomic_commit(struct drm_device *drm,
 {
 	struct tegra_drm *tegra = drm->dev_private;
 	struct tegra_display_hub *hub = tegra->hub;
-	struct tegra_display_hub_state *hub_state;
+	struct tegra_display_hub_state *hub_state =
+		to_tegra_display_hub_state(hub->base.state);
 	struct device *dev = hub->client.dev;
 	int err;
 
-	hub_state = tegra_display_hub_get_state(hub, state);
-
 	if (hub_state->clk) {
 		err = clk_set_rate(hub_state->clk, hub_state->rate);
 		if (err < 0)
-- 
2.14.1

             reply	other threads:[~2018-04-18 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18 10:40 Stefan Schake [this message]
2018-04-30 11:56 ` [PATCH] drm/tegra: hub: Use state directly Stefan Schake
2018-05-04  9:38 ` 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=20180418104019.31344-1-stschake@gmail.com \
    --to=stschake@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.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).