All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeykumar Sankaran <jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	Jeykumar Sankaran
	<jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: [PATCH v6 10/19] drm/msm/dpu: make crtc get_mixer_width helper static
Date: Fri,  7 Sep 2018 17:24:18 -0700	[thread overview]
Message-ID: <1536366267-22336-11-git-send-email-jsanka@codeaurora.org> (raw)
In-Reply-To: <1536366267-22336-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

Mark CRTC get_mixer_width helper API static as it is
not used outside the file.

changes in v4:
	- Patch introduced in the series
changes in v5:
	- Simplify the inline function (Sean)
changes in v6:
	- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 12 +++++++++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 18 ------------------
 2 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index c6db877..448994f 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -47,6 +47,12 @@
 #define LEFT_MIXER 0
 #define RIGHT_MIXER 1
 
+static inline int _dpu_crtc_get_mixer_width(struct dpu_crtc_state *cstate,
+					    struct drm_display_mode *mode)
+{
+	return mode->hdisplay / cstate->num_mixers;
+}
+
 static inline struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc)
 {
 	struct msm_drm_private *priv;
@@ -601,7 +607,7 @@ static void _dpu_crtc_setup_lm_bounds(struct drm_crtc *crtc,
 	cstate = to_dpu_crtc_state(state);
 
 	adj_mode = &state->adjusted_mode;
-	crtc_split_width = dpu_crtc_get_mixer_width(dpu_crtc, cstate, adj_mode);
+	crtc_split_width = _dpu_crtc_get_mixer_width(cstate, adj_mode);
 
 	for (i = 0; i < dpu_crtc->num_mixers; i++) {
 		struct drm_rect *r = &cstate->lm_bounds[i];
@@ -1283,7 +1289,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 
 	memset(pipe_staged, 0, sizeof(pipe_staged));
 
-	mixer_width = dpu_crtc_get_mixer_width(dpu_crtc, cstate, mode);
+	mixer_width = _dpu_crtc_get_mixer_width(cstate, mode);
 
 	_dpu_crtc_setup_lm_bounds(crtc, state);
 
@@ -1519,7 +1525,7 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
 
 	mutex_lock(&dpu_crtc->crtc_lock);
 	mode = &crtc->state->adjusted_mode;
-	out_width = dpu_crtc_get_mixer_width(dpu_crtc, cstate, mode);
+	out_width = _dpu_crtc_get_mixer_width(cstate, mode);
 
 	seq_printf(s, "crtc:%d width:%d height:%d\n", crtc->base.id,
 				mode->hdisplay, mode->vdisplay);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
index ec9c538..5e4dc5c 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
@@ -238,24 +238,6 @@ struct dpu_crtc_state {
 	container_of(x, struct dpu_crtc_state, base)
 
 /**
- * dpu_crtc_get_mixer_width - get the mixer width
- * Mixer width will be same as panel width(/2 for split)
- */
-static inline int dpu_crtc_get_mixer_width(struct dpu_crtc *dpu_crtc,
-	struct dpu_crtc_state *cstate, struct drm_display_mode *mode)
-{
-	u32 mixer_width;
-
-	if (!dpu_crtc || !cstate || !mode)
-		return 0;
-
-	mixer_width = (dpu_crtc->num_mixers == CRTC_DUAL_MIXERS ?
-			mode->hdisplay / CRTC_DUAL_MIXERS : mode->hdisplay);
-
-	return mixer_width;
-}
-
-/**
  * dpu_crtc_get_mixer_height - get the mixer height
  * Mixer height will be same as panel height
  */
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

  parent reply	other threads:[~2018-09-08  0:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-08  0:24 [PATCH v6 00/19] clean up DPU for RM refactor Jeykumar Sankaran
     [not found] ` <1536366267-22336-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-09-08  0:24   ` [PATCH v6 01/19] drm/msm/dpu: remove debugfs support for misr Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 02/19] drm/msm/dpu: squash power handle event types Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 03/19] drm/msm/dpu: remove scalar config definitions Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 04/19] drm/msm/dpu: remove resource pool manager Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 05/19] drm/msm/dpu: remove ping pong split topology variables Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 06/19] drm/msm/dpu: enable master-slave encoders explicitly Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 07/19] drm/msm/dpu: use kms stored hw mdp block Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 08/19] drm/msm/dpu: iterate for assigned hw ctl in virtual encoder Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 09/19] drm/msm/dpu: avoid querying for hw intf before assignment Jeykumar Sankaran
2018-09-08  0:24   ` Jeykumar Sankaran [this message]
2018-09-08  0:24   ` [PATCH v6 11/19] drm/msm/dpu: move hw resource tracking to crtc state Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 12/19] drm/msm/dpu: rename hw_ctl to lm_ctl Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 13/19] drm/msm/dpu: clean up destination scaler residue Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 14/19] drm/msm/dpu: remove cdm block support from resource manager Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 15/19] drm/msm/dpu: remove LOCK/CLEAR support in RM Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 16/19] drm/msm/dpu: remove display H_TILE from encoder Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 17/19] drm/msm/dpu: remove RM dependency on connector state Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 18/19] drm/msm/dpu: relax parameter validation in encoders Jeykumar Sankaran
2018-09-08  0:24   ` [PATCH v6 19/19] drm/msm/dpu: remove RM topology definition Jeykumar Sankaran
2018-09-11 18:20   ` [PATCH v6 00/19] clean up DPU for RM refactor Sean Paul

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=1536366267-22336-11-git-send-email-jsanka@codeaurora.org \
    --to=jsanka-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hoegsberg-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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.