All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Werner Sembach <wse@tuxedocomputers.com>
Subject: [Intel-gfx] [PATCH 3/6] drm/i915: Move platform checks into intel_hdmi_bpc_possible()
Date: Tue, 11 May 2021 19:05:29 +0300	[thread overview]
Message-ID: <20210511160532.21446-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20210511160532.21446-1-ville.syrjala@linux.intel.com>

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

Let's put the platform checks into intel_hdmi_bpc_possible() so that
it'll confirm both the source and sink capabilities.

Cc: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index e696766f2b4b..56ac53eab90c 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -1865,11 +1865,15 @@ static int intel_hdmi_port_clock(int clock, int bpc)
 static bool intel_hdmi_bpc_possible(struct drm_connector *connector,
 				    int bpc, bool has_hdmi_sink, bool ycbcr420_output)
 {
+	struct drm_i915_private *i915 = to_i915(connector->dev);
 	const struct drm_display_info *info = &connector->display_info;
 	const struct drm_hdmi_info *hdmi = &info->hdmi;
 
 	switch (bpc) {
 	case 12:
+		if (HAS_GMCH(i915))
+			return false;
+
 		if (!has_hdmi_sink)
 			return false;
 
@@ -1878,6 +1882,9 @@ static bool intel_hdmi_bpc_possible(struct drm_connector *connector,
 		else
 			return info->edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_36;
 	case 10:
+		if (DISPLAY_VER(i915) < 11)
+			return false;
+
 		if (!has_hdmi_sink)
 			return false;
 
@@ -1997,12 +2004,6 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
 	const struct drm_display_mode *adjusted_mode =
 		&crtc_state->hw.adjusted_mode;
 
-	if (HAS_GMCH(dev_priv))
-		return false;
-
-	if (bpc == 10 && DISPLAY_VER(dev_priv) < 11)
-		return false;
-
 	/*
 	 * HDMI deep color affects the clocks, so it's only possible
 	 * when not cloning with other encoder types.
-- 
2.26.3

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

  parent reply	other threads:[~2021-05-11 16:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 16:05 [Intel-gfx] [PATCH 0/6] drm/i915: Check HDMI sink deep color capabilities during .mode_valid() Ville Syrjala
2021-05-11 16:05 ` [Intel-gfx] [PATCH 1/6] drm/i915: Extract intel_hdmi_bpc_possible() Ville Syrjala
2021-05-14 17:33   ` Souza, Jose
2021-05-11 16:05 ` [Intel-gfx] [PATCH 2/6] drm/i915: Move has_hdmi_sink check into intel_hdmi_bpc_possible() Ville Syrjala
2021-05-14 17:33   ` Souza, Jose
2021-05-11 16:05 ` Ville Syrjala [this message]
2021-05-14 17:33   ` [Intel-gfx] [PATCH 3/6] drm/i915: Move platform checks " Souza, Jose
2021-05-11 16:05 ` [Intel-gfx] [PATCH 4/6] drm/i915: Check sink deep color capabilitis during HDMI .mode_valid() Ville Syrjala
2021-05-14 17:33   ` Souza, Jose
2021-05-11 16:05 ` [Intel-gfx] [PATCH 5/6] drm/i915: Move the TMDS clock division into intel_hdmi_mode_clock_valid() Ville Syrjala
2021-05-14 17:28   ` Souza, Jose
2021-05-14 17:36     ` Ville Syrjälä
2021-05-14 17:44       ` Souza, Jose
2021-05-11 16:05 ` [Intel-gfx] [PATCH 6/6] drm/i915: Drop redundant has_hdmi_sink check Ville Syrjala
2021-05-14 17:34   ` Souza, Jose
2021-05-11 19:02 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Check HDMI sink deep color capabilities during .mode_valid() Patchwork
2021-05-12 20:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Check HDMI sink deep color capabilities during .mode_valid() (rev2) Patchwork
2021-05-13  3:10 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-25 17:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Check HDMI sink deep color capabilities during .mode_valid() (rev3) Patchwork
2021-05-25 23:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=20210511160532.21446-4-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=wse@tuxedocomputers.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 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.