diff mbox

[02/14] drm/i915: Handle DSI case for DDI PLL

Message ID 1483953340-26206-1-git-send-email-vidya.srinivas@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Srinivas, Vidya Jan. 9, 2017, 9:15 a.m. UTC
From: Uma Shankar <uma.shankar@intel.com>

In case of DSI, DDI PLL is not required.
Handle the same as part of DDI PLL handling.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
 mode change 100644 => 100755 drivers/gpu/drm/i915/intel_ddi.c

Comments

Jani Nikula Jan. 18, 2017, 9:35 a.m. UTC | #1
On Mon, 09 Jan 2017, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> From: Uma Shankar <uma.shankar@intel.com>
>
> In case of DSI, DDI PLL is not required.
> Handle the same as part of DDI PLL handling.

Show me *one* code path where the functions you change may be called for
DSI.

> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> old mode 100644
> new mode 100755

Please make sure you never change the mode.

BR,
Jani.
Srinivas, Vidya Feb. 8, 2017, 10:26 a.m. UTC | #2
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> Sent: Wednesday, January 18, 2017 3:06 PM
> To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-
> gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH 02/14] drm/i915: Handle DSI case for DDI PLL
> 
> On Mon, 09 Jan 2017, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> > From: Uma Shankar <uma.shankar@intel.com>
> >
> > In case of DSI, DDI PLL is not required.
> > Handle the same as part of DDI PLL handling.
> 
> Show me *one* code path where the functions you change may be called for
> DSI.
> 
This was needed in the earlier code around kernel 4.4 version. We re-verified in the latest
upstream code and confirmed that this is no longer needed. We can drop this change.
We will re-send the updated series without this.

Regards
Vidya
> > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > b/drivers/gpu/drm/i915/intel_ddi.c
> > old mode 100644
> > new mode 100755
> 
> Please make sure you never change the mode.
> 
> BR,
> Jani.
> 
> 
> --
> Jani Nikula, Intel Open Source Technology Center
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
old mode 100644
new mode 100755
index 66b367d..16137ef
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1102,13 +1102,13 @@  void intel_ddi_clock_get(struct intel_encoder *encoder,
 {
 	struct intel_shared_dpll *pll;
 
-	pll = intel_get_shared_dpll(intel_crtc, crtc_state,
-				    intel_encoder);
-	if (!pll)
+	pll = intel_get_shared_dpll(intel_crtc, crtc_state, intel_encoder);
+	if (pll == NULL) {
 		DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
 				 pipe_name(intel_crtc->pipe));
-
-	return pll;
+		return false;
+	}
+	return true;
 }
 
 static bool
@@ -1124,7 +1124,6 @@  void intel_ddi_clock_get(struct intel_encoder *encoder,
 				 pipe_name(intel_crtc->pipe));
 		return false;
 	}
-
 	return true;
 }
 
@@ -1133,7 +1132,15 @@  void intel_ddi_clock_get(struct intel_encoder *encoder,
 		   struct intel_crtc_state *crtc_state,
 		   struct intel_encoder *intel_encoder)
 {
-	return !!intel_get_shared_dpll(intel_crtc, crtc_state, intel_encoder);
+	struct intel_shared_dpll *pll;
+
+	pll = intel_get_shared_dpll(intel_crtc, crtc_state, intel_encoder);
+	if (pll == NULL) {
+		DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
+				 pipe_name(intel_crtc->pipe));
+		return false;
+	}
+	return true;
 }
 
 /*
@@ -1150,6 +1157,9 @@  bool intel_ddi_pll_select(struct intel_crtc *intel_crtc,
 	struct intel_encoder *intel_encoder =
 		intel_ddi_get_crtc_new_encoder(crtc_state);
 
+	if (intel_encoder->type == INTEL_OUTPUT_DSI)
+		return true;
+
 	if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv))
 		return skl_ddi_pll_select(intel_crtc, crtc_state,
 					  intel_encoder);