public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Clean up the mess around hdmi_12bpc_possible()
@ 2017-10-26 15:14 Ville Syrjala
  2017-10-26 15:14 ` [PATCH 2/2] drm/i915: Parse max HDMI TMDS clock from VBT Ville Syrjala
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Ville Syrjala @ 2017-10-26 15:14 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Move the crtc state related 12bpc checks into hdmi_12bpc_possible()
since that one already examines other parts of the crtc state.

Note that we can drop the !force_dvi check since
crtc_state->has_hdmi_sink already accounts for that.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 5132dc814788..aa486b8925cf 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1336,6 +1336,12 @@ static bool hdmi_12bpc_possible(const struct intel_crtc_state *crtc_state)
 	if (HAS_GMCH_DISPLAY(dev_priv))
 		return false;
 
+	if (crtc_state->pipe_bpp <= 8*3)
+		return false;
+
+	if (!crtc_state->has_hdmi_sink)
+		return false;
+
 	/*
 	 * HDMI 12bpc affects the clocks, so it's only possible
 	 * when not cloning with other encoder types.
@@ -1461,9 +1467,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 	 * outputs. We also need to check that the higher clock still fits
 	 * within limits.
 	 */
-	if (pipe_config->pipe_bpp > 8*3 && pipe_config->has_hdmi_sink && !force_dvi &&
-	    hdmi_port_clock_valid(intel_hdmi, clock_12bpc, true, force_dvi) == MODE_OK &&
-	    hdmi_12bpc_possible(pipe_config)) {
+	if (hdmi_12bpc_possible(pipe_config) &&
+	    hdmi_port_clock_valid(intel_hdmi, clock_12bpc, true, force_dvi) == MODE_OK) {
 		DRM_DEBUG_KMS("picking bpc to 12 for HDMI output\n");
 		desired_bpp = 12*3;
 
-- 
2.13.6

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-10-30 18:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-26 15:14 [PATCH 1/2] drm/i915: Clean up the mess around hdmi_12bpc_possible() Ville Syrjala
2017-10-26 15:14 ` [PATCH 2/2] drm/i915: Parse max HDMI TMDS clock from VBT Ville Syrjala
2017-10-26 15:44   ` Chris Wilson
2017-10-26 15:51     ` Ville Syrjälä
2017-10-26 15:59       ` Chris Wilson
2017-10-27  8:36   ` Jani Nikula
2017-10-27  8:58     ` Jani Nikula
2017-10-30 14:57   ` [PATCH v2 " Ville Syrjala
2017-10-30 15:05     ` Jani Nikula
2017-10-30 18:24       ` Ville Syrjälä
2017-10-26 15:40 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Clean up the mess around hdmi_12bpc_possible() Patchwork
2017-10-26 15:47 ` [PATCH 1/2] " Chris Wilson
2017-10-26 16:41 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
2017-10-27 20:10 ` ✗ Fi.CI.BAT: warning " Patchwork
2017-10-30 15:40 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Clean up the mess around hdmi_12bpc_possible() (rev2) Patchwork
2017-10-30 16:43 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox