From patchwork Wed Jan 31 19:32:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 13539912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 568A9C47DB3 for ; Wed, 31 Jan 2024 19:34:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2C7510F144; Wed, 31 Jan 2024 19:34:54 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id E2F8110FC87 for ; Wed, 31 Jan 2024 19:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706729691; x=1738265691; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jmpjHiRNCgiE8190Lo/IuAMLOfomnS6UeBDdhiaGpRs=; b=idKVJ0RRVenvNsSyoMJTph6VjBDsRyCsixbli8OdVl+wJ19NAUtKPKdt pZOTS05YHv+W3b659tIgn+dNGMcFbKowXB/71O/CcpCdLfOn3XeMwoffu rKR37+D8gJe1uekHViKTLLn1Ri921IwOi/rjfw1TG1S6aj/twjMaAeb0s Om48SlSzic1bJQOymKyGyNTAhKpM7eXYZcVPP5fxi6yHia7sToOO3NU5R AUSmTmHP/5jTNIF0MiLrqAc4uNTHsgL8OEXrdO4Y/ry9vbYuCClozzWtl LpDkDbrR0A8S8UGD9Bia2y7EDz4WUNfcz57+DPa/JAxmW+NGNn+9pr1Aw w==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="467936161" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="467936161" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 11:34:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="822686269" X-IronPort-AV: E=Sophos;i="6.05,233,1701158400"; d="scan'208";a="822686269" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.32]) by orsmga001.jf.intel.com with ESMTP; 31 Jan 2024 11:34:50 -0800 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org Subject: [PATCH 06/10] drm/i915/hdcp: HDCP Capability for the downstream device Date: Thu, 1 Feb 2024 01:02:37 +0530 Message-Id: <20240131193240.938405-7-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240131193240.938405-1-suraj.kandpal@intel.com> References: <20240131193240.938405-1-suraj.kandpal@intel.com> MIME-Version: 1.0 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Currently we are only checking capability of remote device and not immediate downstream device but during capability check we need are concerned with only the HDCP capability of downstream device. During i915_display_info reporting we need HDCP Capability for both the monitors and downstream branch device if any this patch adds that. --v2 -Use MST Hub HDCP version [Ankit] --v3 -Redefined how we seprate remote and direct read to make sure HDMI shim functions are not touched [Ankit] Signed-off-by: Suraj Kandpal --- .../drm/i915/display/intel_display_debugfs.c | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c index 6f2d13c8ccf7..41458f1cae38 100644 --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c @@ -188,7 +188,8 @@ static void intel_panel_info(struct seq_file *m, } static void intel_hdcp_info(struct seq_file *m, - struct intel_connector *intel_connector) + struct intel_connector *intel_connector, + bool remote_req) { bool hdcp_cap, hdcp2_cap; @@ -197,8 +198,13 @@ static void intel_hdcp_info(struct seq_file *m, goto out; } - hdcp_cap = intel_hdcp_capable(intel_connector); - hdcp2_cap = intel_hdcp2_capable(intel_connector); + if (remote_req) { + intel_hdcp_remote_cap(intel_connector, &hdcp_cap, + &hdcp2_cap); + } else { + hdcp_cap = intel_hdcp_capable(intel_connector); + hdcp2_cap = intel_hdcp2_capable(intel_connector); + } if (hdcp_cap) seq_puts(m, "HDCP1.4 "); @@ -285,7 +291,12 @@ static void intel_connector_info(struct seq_file *m, } seq_puts(m, "\tHDCP version: "); - intel_hdcp_info(m, intel_connector); + intel_hdcp_info(m, intel_connector, true); + + if (intel_encoder_is_mst(encoder)) { + seq_puts(m, "\tMST Hub HDCP version: "); + intel_hdcp_info(m, intel_connector, false); + } seq_printf(m, "\tmax bpc: %u\n", connector->display_info.bpc); @@ -1131,7 +1142,12 @@ static int i915_hdcp_sink_capability_show(struct seq_file *m, void *data) seq_printf(m, "%s:%d HDCP version: ", connector->base.name, connector->base.base.id); - intel_hdcp_info(m, connector); + intel_hdcp_info(m, connector, true); + + if (intel_encoder_is_mst(connector->encoder)) { + seq_puts(m, "\tMST Hub HDCP version: "); + intel_hdcp_info(m, connector, false); + } out: drm_modeset_unlock(&i915->drm.mode_config.connection_mutex);