From patchwork Tue May 21 08:14:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 13669009 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 EAC57C25B74 for ; Tue, 21 May 2024 08:17:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB43D10E1F7; Tue, 21 May 2024 08:17:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="O2LY7Slo"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC14710E1F7 for ; Tue, 21 May 2024 08:17:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716279448; x=1747815448; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BM54RSyoQvdvOXTLKYSsFK0ga+MsNiWG9p2KWL0m7Sc=; b=O2LY7SloEr9ttPApP7qwTXmbO0NKv5GqnGQ0kzgScZQA+5vceoWT0Xbg 8uCY84If4tD7fnNv37yxfyorMx48FswJEigeVz783qZvDXxBaUkTCjZO7 9kiBsuA4Oa3Gon5Or68ZeEWvi9jRyaE7aRhSqEmPJ7pe1oBux37ri0nEY 45OjSfF8Iai//gNTgLryn7LAS9sFHizfBHZavSWUcnnixM+mUzXM7nt2k vA3zQ+jmgem0CfsvaQWEwSscS2ts+pP1XSkwHQFbpwIKfkvpXuAOrBfk+ E0du5tU6MDKtFDSudUNSef0WFfonlIjOiMOMv9cZ2kHkETJxCQjGd8D4G A==; X-CSE-ConnectionGUID: URpsmTmKSMWJApmDxKosVw== X-CSE-MsgGUID: KsNwvSFGQwKHkDO2ugqvTw== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12394152" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12394152" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:17:26 -0700 X-CSE-ConnectionGUID: WwycJPqySbSLXwMbIF32Rw== X-CSE-MsgGUID: N2CJzEPjQMuF8jmj9J+4Gw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="32858119" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.32]) by fmviesa006.fm.intel.com with ESMTP; 21 May 2024 01:17:24 -0700 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, Suraj Kandpal , Imre Deak Subject: [PATCH 1/2] drm/i915/hdcp: Move aux assignment after connector type check Date: Tue, 21 May 2024 13:44:56 +0530 Message-ID: <20240521081458.1500327-2-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240521081458.1500327-1-suraj.kandpal@intel.com> References: <20240521081458.1500327-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" Move assignment of aux after connector type check as port may not exist if connector is not DPMST. --v2 -Fix unwanted change in intel_encoder check [Jani] Signed-off-by: Suraj Kandpal Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c index 92b03073acdd..551c862ed7a6 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c @@ -687,7 +687,7 @@ int intel_dp_hdcp_get_remote_capability(struct intel_connector *connector, bool *hdcp2_capable) { struct drm_i915_private *i915 = to_i915(connector->base.dev); - struct drm_dp_aux *aux = &connector->port->aux; + struct drm_dp_aux *aux; u8 bcaps; int ret; @@ -696,6 +696,7 @@ int intel_dp_hdcp_get_remote_capability(struct intel_connector *connector, if (!intel_encoder_is_mst(connector->encoder)) return -EINVAL; + aux = &connector->port->aux; ret = _intel_dp_hdcp2_get_capability(aux, hdcp2_capable); if (ret) drm_dbg_kms(&i915->drm, From patchwork Tue May 21 08:14:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kandpal, Suraj" X-Patchwork-Id: 13669010 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 50E29C25B74 for ; Tue, 21 May 2024 08:17:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36A9110E326; Tue, 21 May 2024 08:17:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="keWr/tHm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id 471BD10E2AB for ; Tue, 21 May 2024 08:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716279448; x=1747815448; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/qa51wWxKplpvYvwKULKJ/xqBE62fghMhLeVE557QSc=; b=keWr/tHmgLBKtimhnb9pmZaQSi0tEwHz/FourtSGqLbyXz0MGbnyUo2l h+MjHE7DFjg8InIxWnIDjssoMbJm83FVjcnxFuCn+/RJ7v64yI5u9bPDR VtC3Rl9nBV2m7zd1ActuH2jj6A36Flx4O+aDbEehkLFsxgX9Cu6FWY96L ComXl0zrsNZXxLCibgX8HUdVs4O1Ww5SzI3+985/3WV3lbguMFTZolJ3z mHkyAm0iuTt/vyPVCyD+P6Y2/6t+V/GXXxTmxNV/ALpCKhxgErSvUI/LZ yViLOBU7G2wS8hLrBP52mH7rRpTdz5BzlN4vydE09FIQND58Q8nxQt5Xw g==; X-CSE-ConnectionGUID: 6mJKdt0fQi+UjVVZsM0zLg== X-CSE-MsgGUID: 6HbR3JvXScugUdWcWI7KKA== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12394153" X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="12394153" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2024 01:17:28 -0700 X-CSE-ConnectionGUID: nX9zklFNSl+wv7nJeeBZSg== X-CSE-MsgGUID: Bea50M+7S8+dj2jBKmg/FA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,177,1712646000"; d="scan'208";a="32858131" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.32]) by fmviesa006.fm.intel.com with ESMTP; 21 May 2024 01:17:25 -0700 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org Cc: animesh.manna@intel.com, Suraj Kandpal , Imre Deak Subject: [PATCH 2/2] drm/i915/hdcp: Check mst_port to determine connector type Date: Tue, 21 May 2024 13:44:57 +0530 Message-ID: <20240521081458.1500327-3-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240521081458.1500327-1-suraj.kandpal@intel.com> References: <20240521081458.1500327-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" Check mst_port field in intel_connector to check connector type rather than rely on encoder as it may not be attached to connector at times. --v2 -Add closes tag [Imre] Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10898 Signed-off-by: Suraj Kandpal Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c index 551c862ed7a6..2edffe62f360 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c @@ -693,7 +693,7 @@ int intel_dp_hdcp_get_remote_capability(struct intel_connector *connector, *hdcp_capable = false; *hdcp2_capable = false; - if (!intel_encoder_is_mst(connector->encoder)) + if (!connector->mst_port) return -EINVAL; aux = &connector->port->aux;