From patchwork Tue Oct 15 14:34:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 11190519 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B5AA912 for ; Tue, 15 Oct 2019 14:35: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 338F720854 for ; Tue, 15 Oct 2019 14:35:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 338F720854 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58B706E825; Tue, 15 Oct 2019 14:35:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADB596E823 for ; Tue, 15 Oct 2019 14:35:26 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id y21so20534130wmi.0 for ; Tue, 15 Oct 2019 07:35:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rMktrKxkm8fFb4FHC/LWbavGpA4bcLuBn62IAdf8rHc=; b=cA+892PVq9GX7dXc5NrrthD0Tkxr95P53kicFiFpbXYTLQpKQCMBMdBEEnjLI/HKEL kUFHYcYO5aJF5tMPgX9lkj67+lcwIn2FAuje7P/4XwK7qcoMt7Az5KhQuBUqE2TFjiex oBajT/pByVgGhu4zQVCX9Xqr7uKVbw8vhHLcVBwBiTtaYrZKDWGQ61+vgOzXx8e1TUow 6A9pp2CWkSXPyUeIk3dZ/tVOWdkfdN40UH5KpVLO36v2hsx7wvHRB+5yB/6VRzR9qOzf Q59w1o9w4NhsFkWb49Iy/P+a8vKtR+rv5b/GtPGgkg17hkz/fmt7C/n3u0y5fz8QTBfQ HAcA== X-Gm-Message-State: APjAAAVETB6OOIWaet3H8XmQ9l05HEwEVueCkylUrt0TSE9NAMISItZz TIorxVJcbhtspUWjguTb+mrKd/Fy X-Google-Smtp-Source: APXvYqw1Y//A7QgmiBex5F4/uag6LU9qDl+eKJAMOC34mAAsyVJBL9+lYu68ZTndGxbSiKPgEWAyIA== X-Received: by 2002:a05:600c:2388:: with SMTP id m8mr18611681wma.173.1571150124713; Tue, 15 Oct 2019 07:35:24 -0700 (PDT) Received: from localhost (p2E5BE2CE.dip0.t-ipconnect.de. [46.91.226.206]) by smtp.gmail.com with ESMTPSA id o4sm52850650wre.91.2019.10.15.07.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 07:35:23 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH 05/15] drm/dp: Add drm_dp_alternate_scrambler_reset_cap() helper Date: Tue, 15 Oct 2019 16:34:59 +0200 Message-Id: <20191015143509.1104985-6-thierry.reding@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191015143509.1104985-1-thierry.reding@gmail.com> References: <20191015143509.1104985-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rMktrKxkm8fFb4FHC/LWbavGpA4bcLuBn62IAdf8rHc=; b=t7g8cHd5T6MgEsQIOXGfWsepy7UfvS6L1yMQsDcaB1nZSjf6GEBepR4QLWqV545EMo OAuoaqIpO6I5g1fbhIUwROpdcKLn6dotEHeC9qcveWrZpcOU2VCCPO/rpYz3ScZeEhju ezDjgK6uxk9tndNOzvFDCwsCWvMrakb5SCxn7uMs7O1pJoCFxm2PzXJ/hzkceTn72Hc9 YHmFNDVp+bBf2hX1EQ3tSXB8BzB+uCDEgxKfB4J4XcLsHE3Ukviz7P5d0Ir5X8HYKe9f C5VXWpXp+DAE1l/FyeNCvp+f+DXnYEp3NtBMj3xUcTuODDDMEwzO8kIv0znzlo5K4eOJ /Biw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Thierry Reding Add a helper to check if the sink supports the eDP alternate scrambler reset value of 0xfffe. Signed-off-by: Thierry Reding Reviewed-by: Lyude Paul --- include/drm/drm_dp_helper.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 7ff7bf0e742d..7a537ffc2fb1 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1290,6 +1290,13 @@ drm_dp_channel_coding_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) return dpcd[DP_MAIN_LINK_CHANNEL_CODING] & DP_CAP_ANSI_8B10B; } +static inline bool +drm_dp_alternate_scrambler_reset_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) +{ + return dpcd[DP_EDP_CONFIGURATION_CAP] & + DP_ALTERNATE_SCRAMBLER_RESET_CAP; +} + /* * DisplayPort AUX channel */