From mboxrd@z Thu Jan 1 00:00:00 1970 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 0B694C48BEB for ; Thu, 15 Feb 2024 11:01:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7816B10E5EA; Thu, 15 Feb 2024 11:01:30 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="SqcZG4TO"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B9A810E55B for ; Thu, 15 Feb 2024 11:01: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=1707994888; x=1739530888; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l6QzlcssIDhR7EgvE62NsNE59R16jlfPcjBP0HfBrzU=; b=SqcZG4TOJ1gruUVLUQc5jeNtI2i5iWc0Oo1lhgN9GcQc9i9M3P1azICG mPN+5QvV2PR+pQoTU8wPc9lN7A4DPUage75zQvvMCZIaYaYMF5STrQHBy ls6GtkjewhOePOaLsS1wsJTvnMmqPix4uqq4DG1PqnuooJBt2G8GI/+4A wW/IxnElvlIOIo5PY6lx5lniDeXFS47EQ6YM5BA50vtDa/5kOakZNtUuT hXJSWB05C7Q7nSI5YsXx8ymbeIVX0hUI/AnMZEsZpKxZR7H/2YTtwzf3J RvIycW7N4TFJc0dSerHdCXNuuOmAz7jsWBXeOAnyVLsGEY0nt7fdP0vVn Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="19494305" X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="19494305" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2024 03:01:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="3820908" Received: from kandpal-x299-ud4-pro.iind.intel.com ([10.190.239.32]) by orviesa007.jf.intel.com with ESMTP; 15 Feb 2024 03:01:26 -0800 From: Suraj Kandpal To: intel-gfx@lists.freedesktop.org Cc: jani.nikula@intel.com, uma.shankar@intel.com, ankit.k.nautiyal@intel.com, Suraj Kandpal Subject: [PATCH 03/13] drm/i915/hdcp: Refactor intel_dp_hdcp2_capable Date: Thu, 15 Feb 2024 16:29:09 +0530 Message-Id: <20240215105919.1439549-4-suraj.kandpal@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240215105919.1439549-1-suraj.kandpal@intel.com> References: <20240215105919.1439549-1-suraj.kandpal@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" Break intel_dp_hdcp2_capable so that the common the code can be reused for the remote capability check. Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c index defc90936317..9aeee6b49b3d 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c @@ -636,8 +636,8 @@ int intel_dp_hdcp2_check_link(struct intel_digital_port *dig_port, } static -int intel_dp_hdcp2_capable(struct intel_connector *connector, - bool *capable) +int _intel_dp_hdcp2_capable(struct drm_dp_aux *aux, + bool *capable) { struct intel_digital_port *dig_port = intel_attached_dig_port(connector); struct drm_dp_aux *aux = &dig_port->dp.aux; @@ -658,6 +658,16 @@ int intel_dp_hdcp2_capable(struct intel_connector *connector, return 0; } +static +int intel_dp_hdcp2_capable(struct intel_connector *connector, + bool *capable) +{ + struct intel_digital_port *dig_port = intel_attached_dig_port(connector); + struct drm_dp_aux *aux = &dig_port->dp.aux; + + return _intel_dp_hdcp2_capable(aux, capable); +} + static const struct intel_hdcp_shim intel_dp_hdcp_shim = { .write_an_aksv = intel_dp_hdcp_write_an_aksv, .read_bksv = intel_dp_hdcp_read_bksv, -- 2.25.1