All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilija Hadzic <ihadzic@research.bell-labs.com>
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Cc: Ilija Hadzic <ihadzic@research.bell-labs.com>
Subject: [PATCH 5/6] drm: do not set crtc enabled field twice
Date: Tue, 29 Oct 2013 11:09:45 -0400	[thread overview]
Message-ID: <1383059386-20917-6-git-send-email-ihadzic@research.bell-labs.com> (raw)
In-Reply-To: <1383059386-20917-1-git-send-email-ihadzic@research.bell-labs.com>

There is no need to set crtc->enabled field in
drm_crtc_helper_set_config. This is already done (and
properly restored in case of failure) in
drm_crtc_helper_set_mode that is called by
drm_crtc_helper_set_config. Doing it at only one
place makes restoration in case of failure easier.

Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
---
 drivers/gpu/drm/drm_crtc_helper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 9e536b1..a1322af 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -787,8 +787,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
 		mode_changed = true;
 
 	if (mode_changed) {
-		set->crtc->enabled = drm_helper_crtc_in_use(set->crtc);
-		if (set->crtc->enabled) {
+		if (drm_helper_crtc_in_use(set->crtc)) {
 			DRM_DEBUG_KMS("attempting to set mode from"
 					" userspace\n");
 			drm_mode_debug_printmodeline(set->mode);
-- 
1.8.2.1

  parent reply	other threads:[~2013-10-29 15:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 15:09 fix for CRTC mutex corruption Ilija Hadzic
2013-10-29 15:09 ` [PATCH 1/6] drm: remove redundant if statement Ilija Hadzic
2013-10-29 15:09 ` [PATCH 2/6] drm: eliminate old_fb from drm_crtc_helper_set_config Ilija Hadzic
2013-10-29 15:09 ` [PATCH 3/6] drm: restore crtc origin if mode_set_base fails Ilija Hadzic
2013-10-29 15:09 ` [PATCH 4/6] drm: fix error recovery path in drm_crtc_helper_set_mode Ilija Hadzic
2013-10-29 15:09 ` Ilija Hadzic [this message]
2013-10-29 15:09 ` [PATCH 6/6] drm: eliminate bit-copy restoration of crtc Ilija Hadzic
2013-10-29 18:40 ` fix for CRTC mutex corruption Daniel Vetter
2013-10-29 19:22   ` Ilija Hadzic
2013-10-29 20:11     ` Daniel Vetter
2013-10-30 13:45       ` Ilija Hadzic

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=1383059386-20917-6-git-send-email-ihadzic@research.bell-labs.com \
    --to=ihadzic@research.bell-labs.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.