[RFC 2/2] drm/i915: Allow force_bpc property to limit pipe_bpp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the newly added force_bpc connector property to limit pipe bpp.

Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>
Cc: Manasi Navare <manasi.d.navare@xxxxxxxxx>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_display.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e691c07afd9a..ed8e3f06e605 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10587,6 +10587,29 @@ connected_sink_compute_bpp(struct intel_connector *connector,
 	}
 }
 
+static void
+connected_sink_force_bpp(struct intel_digital_connector_state *intel_conn_state,
+			     struct intel_crtc_state *pipe_config)
+{
+	enum connector_force_bpc force_bpc = intel_conn_state->force_bpc;
+
+	switch (force_bpc) {
+	case INTEL_FORCE_BPC_AUTO:
+		break;
+	case INTEL_FORCE_BPC_8:
+		pipe_config->pipe_bpp = 8*3;
+		break;
+	case INTEL_FORCE_BPC_10:
+		pipe_config->pipe_bpp = 10*3;
+		break;
+	case INTEL_FORCE_BPC_12:
+		pipe_config->pipe_bpp = 12*3;
+		break;
+	default:
+		break;
+	}
+}
+
 static int
 compute_baseline_pipe_bpp(struct intel_crtc *crtc,
 			  struct intel_crtc_state *pipe_config)
@@ -10615,6 +10638,8 @@ compute_baseline_pipe_bpp(struct intel_crtc *crtc,
 		if (connector_state->crtc != &crtc->base)
 			continue;
 
+		connected_sink_force_bpp(to_intel_digital_connector_state(connector_state),
+					     pipe_config);
 		connected_sink_compute_bpp(to_intel_connector(connector),
 					   pipe_config);
 	}
-- 
2.9.3

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux