From patchwork Tue Feb 7 05:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun R Murthy X-Patchwork-Id: 13131083 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 9818EC636CD for ; Tue, 7 Feb 2023 05:32:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF0A410E2EB; Tue, 7 Feb 2023 05:32:29 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id E433710E2EB; Tue, 7 Feb 2023 05:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675747946; x=1707283946; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AASS0FwnVNe/OPJgQFOtVGbVsH7cgW31yZ998Bbq/EI=; b=Gn57F/61gaoAooqMf8FlLXSE0zl+bodHiq5FMsEaTO8kMV4F9avYib93 gV6AqbcHuemlyDKVSCi94LKil92CPm5tvref56LezocgOJMh0HF9YRxsT FYw64XciFBX0+dNzM9akxw5lsF/7dGnAjvcnHHXtosWvCxjJXORqkfFZP xj8Jj5lhCkOy5CT0tpQ3rmdzvexSEdtExf150kqct5ivhR8HsqalfUeq7 Ym03hcQNIOqcuOHOeo+1zvJuIcKe+7lmPpJPUNU7C2FhR8xgoK5oEy7Zz BikjfiT+JzPFbUu6LSv3c70K2CG9tw0xBRnaR9eqBooT6QYrlM3LbNDhI A==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="356778178" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="356778178" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 21:32:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="790666566" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="790666566" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by orsmga004.jf.intel.com with ESMTP; 06 Feb 2023 21:32:24 -0800 From: Arun R Murthy To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, jani.nikula@intel.com Subject: [PATCHv2 1/2] drm: Add SDP Error Detection Configuration Register Date: Tue, 7 Feb 2023 10:56:56 +0530 Message-Id: <20230207052657.2917314-2-arun.r.murthy@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230207052657.2917314-1-arun.r.murthy@intel.com> References: <20230120061600.1451088-1-arun.r.murthy@intel.com> <20230207052657.2917314-1-arun.r.murthy@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arun R Murthy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" DP2.0 E11 defines a new register to facilitate SDP error detection by a 128B/132B capable DPRX device. v2: Update the macro name to reflect the DP spec(Harry) Signed-off-by: Arun R Murthy Reviewed-by: Harry Wentland --- include/drm/display/drm_dp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index 632376c291db..358db4a9f167 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -692,6 +692,9 @@ # define DP_FEC_LANE_2_SELECT (2 << 4) # define DP_FEC_LANE_3_SELECT (3 << 4) +#define DP_SDP_ERROR_DETECTION_CONFIGURATION 0x121 /* DP 2.0 E11 */ +#define DP_SDP_CRC16_128B132B_EN BIT(0) + #define DP_AUX_FRAME_SYNC_VALUE 0x15c /* eDP 1.4 */ # define DP_AUX_FRAME_SYNC_VALID (1 << 0) From patchwork Tue Feb 7 05:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun R Murthy X-Patchwork-Id: 13131084 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 189BCC636CC for ; Tue, 7 Feb 2023 05:32:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A858010E44E; Tue, 7 Feb 2023 05:32:31 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id ECB4D10E2EB; Tue, 7 Feb 2023 05:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675747949; x=1707283949; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oYmFhq34i8kMKrh1iOfyufUErGhdEMAkJysV8Gz+w4Q=; b=nQJIJhHnkVhjTu7+ibRS8SiFDH1oTwMA7CWlMlwxXOb68Tzgu1G27gje 0Bq2B6udU9EKv6SAQvhUvsoe/QPNK6omFRCpWzAPsLiQqbH4k48oKi1Aj hFwmoiHHG18F6D+6ThNnb4lBCIITcZB3TMernV4XvWKEQdjsZT8W0vL62 UGd0BkT9E5WPe8XiB0TzPQMbguu4XuzUb0bKXYa+KZnN/aYaKaDaTYLtp wV0n1uf8AD6gvs3QkKBbSDnRgo+lQ6EKgVxNtKVzXozTkM134xw0r88/O ALr7nRPxRDIq9hryfvge1N5QiujpfE/ppfutv0GEvvrvf0juW+63pMMaJ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="356778189" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="356778189" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2023 21:32:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10613"; a="790666596" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="790666596" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by orsmga004.jf.intel.com with ESMTP; 06 Feb 2023 21:32:26 -0800 From: Arun R Murthy To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, jani.nikula@intel.com Subject: [PATCHv3 2/2] i915/display/dp: SDP CRC16 for 128b132b link layer Date: Tue, 7 Feb 2023 10:56:57 +0530 Message-Id: <20230207052657.2917314-3-arun.r.murthy@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230207052657.2917314-1-arun.r.murthy@intel.com> References: <20230120061600.1451088-1-arun.r.murthy@intel.com> <20230207052657.2917314-1-arun.r.murthy@intel.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arun R Murthy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Enable SDP error detection configuration, this will set CRC16 in 128b/132b link layer. For Display version 13 a hardware bit31 in register VIDEO_DIP_CTL is added to enable/disable SDP CRC applicable for DP2.0 only, but the default value of this bit will enable CRC16 in 128b/132b hence skipping this write. Corrective actions on SDP corruption is yet to be defined. v2: Moved the CRC enable to link training init(Jani N) v3: Moved crc enable to ddi pre enable Signed-off-by: Arun R Murthy --- .../gpu/drm/i915/display/intel_dp_link_training.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index 3d3efcf02011..7064e465423b 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -1453,4 +1453,16 @@ void intel_dp_start_link_train(struct intel_dp *intel_dp, if (!passed) intel_dp_schedule_fallback_link_training(intel_dp, crtc_state); + + /* DP v2.0 SCR on SDP CRC16 for 128b/132b Link Layer */ + if (intel_dp_is_uhbr(crtc_state) && passed) + drm_dp_dpcd_writeb(&intel_dp->aux, + DP_SDP_ERROR_DETECTION_CONFIGURATION, + DP_SDP_CRC16_128B132B_EN); + /* + * VIDEO_DIP_CTL register bit 31 should be set to '0' to not + * disable SDP CRC. This is applicable for Display version 13. + * Default value of bit 31 is '0' hence discarding the write + */ + /* TODO: Corrective actions on SDP corruption yet to be defined */ }