From patchwork Tue May 11 16:05:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 12251453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD8E7C43470 for ; Tue, 11 May 2021 16:06:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6492161261 for ; Tue, 11 May 2021 16:06:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6492161261 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0756E6EA79; Tue, 11 May 2021 16:06:34 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 767FC6EA80 for ; Tue, 11 May 2021 16:06:32 +0000 (UTC) IronPort-SDR: jkALedeyz3QUGi6xSaBviRlaBA1ElCRA8rN7bggqXrQTRJIFKqZA2qn+GlUFaMivuZIYHqmnth hdsmLW1IgO+w== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="263410926" X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="263410926" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 09:05:48 -0700 IronPort-SDR: i4sHEErJtbyjjmkX+Ps5su5JgUrRHumhSbb5ElV7bYf6Fy5U/JdLo9JBPCN11r5Q7clLTgeDPZ Bi4izeca18mw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="434618746" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by fmsmga008.fm.intel.com with SMTP; 11 May 2021 09:05:40 -0700 Received: by stinkbox (sSMTP sendmail emulation); Tue, 11 May 2021 19:05:38 +0300 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Tue, 11 May 2021 19:05:28 +0300 Message-Id: <20210511160532.21446-3-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210511160532.21446-1-ville.syrjala@linux.intel.com> References: <20210511160532.21446-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/6] drm/i915: Move has_hdmi_sink check into intel_hdmi_bpc_possible() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Werner Sembach Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Ville Syrjälä We wish intel_hdmi_bpc_possible() to consider whether the sink supports HDMI or just DVI when checking whether it'll support HDMI deep color or not. This also takes care of the "force DVI" property. Cc: Werner Sembach Signed-off-by: Ville Syrjälä Reviewed-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_hdmi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index 3dec3307c2b5..e696766f2b4b 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -1870,11 +1870,17 @@ static bool intel_hdmi_bpc_possible(struct drm_connector *connector, switch (bpc) { case 12: + if (!has_hdmi_sink) + return false; + if (ycbcr420_output) return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_36; else return info->edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_36; case 10: + if (!has_hdmi_sink) + return false; + if (ycbcr420_output) return hdmi->y420_dc_modes & DRM_EDID_YCBCR420_DC_30; else @@ -1972,9 +1978,6 @@ bool intel_hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state, if (crtc_state->pipe_bpp < bpc * 3) return false; - if (!has_hdmi_sink) - return false; - for_each_new_connector_in_state(state, connector, connector_state, i) { if (connector_state->crtc != crtc_state->uapi.crtc) continue;