From: Satendra Singh Thakur <satendra.t@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Sean Paul <seanpaul@chromium.org>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: vineet.j@samsung.com, hemanshu.s@samsung.com, sst2005@gmail.com,
Satendra Singh Thakur <satendra.t@samsung.com>
Subject: [PATCH v1] drm/kms/atomic: Improved the func drm_atomic_set_crtc_for_connector
Date: Fri, 3 Aug 2018 17:18:37 +0530 [thread overview]
Message-ID: <20180803115013epcas5p2abd0af8d1ada31e66d5c6ae38ec1a9a8~HXYKay9FL3208432084epcas5p2v@epcas5p2.samsung.com> (raw)
In-Reply-To: <4fd92ffb-2518-1e9a-881e-5f4b0e4d4922@linux.intel.com>
1. Currently conn_state->crtc is getting assigned a value at two places
We can just reduce this assignment to one
Signed-off-by: Satendra Singh Thakur <satendra.t@samsung.com>
---
v1: Hi Mr Maarten, Thanks for the comments.
I have modified the patch suitably. Please review.
drivers/gpu/drm/drm_atomic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 895741e..560b01c 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1559,7 +1559,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
~(1 << drm_connector_index(conn_state->connector));
drm_connector_put(conn_state->connector);
- conn_state->crtc = NULL;
}
if (crtc) {
@@ -1571,7 +1570,6 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
1 << drm_connector_index(conn_state->connector);
drm_connector_get(conn_state->connector);
- conn_state->crtc = crtc;
DRM_DEBUG_ATOMIC("Link connector state %p to [CRTC:%d:%s]\n",
conn_state, crtc->base.id, crtc->name);
@@ -1579,6 +1577,7 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
DRM_DEBUG_ATOMIC("Link connector state %p to [NOCRTC]\n",
conn_state);
}
+ conn_state->crtc = crtc;
return 0;
}
--
2.7.4
prev parent reply other threads:[~2018-08-03 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180730061450epcas5p137fd022ec7fda83eeadea2102a62ae4f@epcas5p1.samsung.com>
2018-07-30 6:14 ` [PATCH] drm/kms/atomic: Improved the func drm_atomic_set_crtc_for_connector Satendra Singh Thakur
2018-07-30 8:00 ` Maarten Lankhorst
[not found] ` <CGME20180803115013epcas5p2abd0af8d1ada31e66d5c6ae38ec1a9a8@epcas5p2.samsung.com>
2018-08-03 11:48 ` Satendra Singh Thakur [this message]
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='20180803115013epcas5p2abd0af8d1ada31e66d5c6ae38ec1a9a8~HXYKay9FL3208432084epcas5p2v@epcas5p2.samsung.com' \
--to=satendra.t@samsung.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=hemanshu.s@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=seanpaul@chromium.org \
--cc=sst2005@gmail.com \
--cc=vineet.j@samsung.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).