Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3938095pxb; Tue, 2 Nov 2021 00:51:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyrPJ9MViHNGqMRMHtZCz25w9lswIOHM8A8remAVp/221VaOtkFQu+csI0TAJJCBp5FP0I X-Received: by 2002:a6b:d20f:: with SMTP id q15mr7110627iob.39.1635839463780; Tue, 02 Nov 2021 00:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635839463; cv=none; d=google.com; s=arc-20160816; b=t5/Ers2pTO3wf9kkvCOm8BCGjnUSjzI2P2ERLUIzBqC2BKofZ8dasTU17wUKGPitOS x23684MhwVgh/wgjCjeVKmTTZ0lqpqGWUdM/nNmR4dLccv0EqXmBAz8Sv/0w9yYIhOZa +QuqpTFWaAVVExrSz5L4J+LM4IYZNwHm1HScvta29Q39FplD2SSkEItnmN1kXUQ12pw2 Ro3/g3Bg9J5stOjWeM1oaYcL6IHC+0+C4HvmOMs3fS6Jv4J4UQ/ktDA5/PARm2DvwyDx YePBspbcvTYOlg1+qXNEvMu/JEnZQQpqSP7tFyJkbtLwKdNbDvWe3HgkSAgiKd78APzu +qzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bUC50mfIJyBns7fqhgK329wyRxmw8IFfdQcl4OGlqUc=; b=Nwl0GTvQupDfb45e4mBZUrqW9+5mbS+WfJ2ywrrrqmVZH4xOJrtLWOdMWVXL8MCEKt qin+s1Zp5RHormHT37h3e+QvA1VvI2Xi+mq2P8ym5WuQ+TxtZnCVIooeAHCSMAckUqKk RJvXf4QqEsgReJJI6bd/UlRxG4LFmK5nRbQhtDfQH/nj/wzUYUEhVAeWvTmZ4CMLzPKV QADucIFb8DED6Ahx/W0gFyJtJtLIUODvIr+cvW8QbZ1QmVldxpmTop060O/syphiJLMM FjB95B3oZIWW+o8KkvLoYFqphiqqKgWYtmrAd2ti7U1TC/WeGWSslNr3Ijn5AOQJOqq6 Vx3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=qsHviMpe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c30si17676640jaf.100.2021.11.02.00.50.51; Tue, 02 Nov 2021 00:51:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=qsHviMpe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231219AbhKBHwJ (ORCPT + 99 others); Tue, 2 Nov 2021 03:52:09 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:35738 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231265AbhKBHwG (ORCPT ); Tue, 2 Nov 2021 03:52:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1635839372; x=1667375372; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=bUC50mfIJyBns7fqhgK329wyRxmw8IFfdQcl4OGlqUc=; b=qsHviMpejWMT0D3xNhcpX6Ts7TpjsvMGXskqDQo71VafpBVIO3GpQsdG 3RAMozE9udivyXc1QQ2CuZZTXK0ar74JoNOuJVGSwv7XgnW1jKtvYXSa5 +HqHp1E9LIVZZKnRuPCj6elruBALGyIETnPYQil3TwuzqQjO0yArPoCSh M=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-02.qualcomm.com with ESMTP; 02 Nov 2021 00:49:32 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2021 00:49:31 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 2 Nov 2021 00:49:31 -0700 Received: from sbillaka-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Tue, 2 Nov 2021 00:49:27 -0700 From: Sankeerth Billakanti To: , , , CC: Sankeerth Billakanti , , , , , , , , Subject: [PATCH v4 3/5] drm/dp: Add macro to check max_downspread capability Date: Tue, 2 Nov 2021 13:18:43 +0530 Message-ID: <1635839325-401-4-git-send-email-quic_sbillaka@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1635839325-401-1-git-send-email-quic_sbillaka@quicinc.com> References: <1635839325-401-1-git-send-email-quic_sbillaka@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a macro to check for the max_downspread capability in drm_dp_helper. Signed-off-by: Sankeerth Billakanti Reviewed-by: Stephen Boyd changes in v4: - Return 1 for DPCD version >= v1.1 (Stephen Boyd) --- 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 b52df4d..596635c 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1767,6 +1767,13 @@ drm_dp_tps3_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) } static inline bool +drm_dp_max_downspread(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) +{ + return dpcd[DP_DPCD_REV] >= 0x11 || + dpcd[DP_MAX_DOWNSPREAD] & DP_MAX_DOWNSPREAD_0_5; +} + +static inline bool drm_dp_tps4_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) { return dpcd[DP_DPCD_REV] >= 0x14 && -- 2.7.4