Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2014127pxa; Fri, 7 Aug 2020 00:21:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyveg7NLiELuWg1Gd6f8yEzvDJDpjr+aUYJCTTgDGAknpODjMCphfgO0Fp6lUeWUbIo6/hz X-Received: by 2002:a17:906:eca4:: with SMTP id qh4mr7885322ejb.255.1596784874433; Fri, 07 Aug 2020 00:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596784874; cv=none; d=google.com; s=arc-20160816; b=qwWLEBV9rBjB+Xktyx7BVjlPVmtwRqcvt1N59nLsCmZ43Aefw51PRGy2eKRkbvQKQ8 H9Joy3OE6Es19IUSV5eSlRq/C9dQoPxAK0TrBt7FcHkHWXInbUrJg5nxsR0aIszxMacQ TLT/tB+bLdV/IeeWs/c8VvXlAZ8OjV88GVQ9egXEwHkmyMGtw7n3XQs8s/DwRHdg2Mzy 4soQYBW8+PtcXh54VvHcjAe/eNAYhlN5F2HSj7qEP9/o3jgWP/o+McqCZu8BjuHeV4FO cSOR+FCdhRf/Z6o8o2O2zaiPG5JwJEGf6naAbAUjOe9sFbqQr/LpfjD98E+ANYP60jpg XxJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=7Nq0wp135Nx/L6BNy6QbckpPhcDK+sMN43/Zq4/evXg=; b=eGqiTjTqM+dlBfN5j5Nu3RVNuPL5FiUsb5ryjbY8iKIdKkYEG17yzZmCB04RTTOJA7 32wxEjPC6GFgIvKKexrJMJDK/JDhooQ9PfzBLC/3Ir2xx7m9CfDYVms92sk/Iu+f7F7j 23hElSW6OjjEvq0baxcMElzGY3wWqa0NQpEvfCbrnnC8rB88TCXet7QXrvlHS74F0L3u eYHC613UlBGsGSo57rPbYeahZZzvYzL6mRWwWihOdoRYmHm1EDVD5idiMGuNjYWhOBn5 JELT0LLfTvCQYvtdzSaY9LtPc/uwJdZV6t+BoNCSPmAHO4Jgt6Ch+CxflgP69LZ+4gEb Vk3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=bUYEtPqC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si4860408edj.268.2020.08.07.00.20.51; Fri, 07 Aug 2020 00:21:14 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=bUYEtPqC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726889AbgHGHRl (ORCPT + 99 others); Fri, 7 Aug 2020 03:17:41 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:35083 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbgHGHRl (ORCPT ); Fri, 7 Aug 2020 03:17:41 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1596784660; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=7Nq0wp135Nx/L6BNy6QbckpPhcDK+sMN43/Zq4/evXg=; b=bUYEtPqCowEXbPIF9DYM8U9ml/ykm7EG8XdbB5KEMUfABGRmz+6tLr7rzNAKUGuw6CpnCN1o BsTcB5cZtejTvJ2BOvXKnIm8+qrQDqgVVeRoXoC2R1LCgwmDHlWkNvAtOwfhlFwn1HlD/r5C aQmhKwOR/oCKSyhTECpOjd7QcaA= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n15.prod.us-east-1.postgun.com with SMTP id 5f2d0014ba4c2cd367214f0f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 07 Aug 2020 07:17:40 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 6EB6BC433C6; Fri, 7 Aug 2020 07:17:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from linuxdisplay-lab-04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tanmay) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5FA69C433C6; Fri, 7 Aug 2020 07:17:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5FA69C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=tanmay@codeaurora.org From: Tanmay Shah To: swboyd@chromium.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com Cc: linux-kernel@vger.kernel.org, freedreno@lists.freedesktop.org, seanpaul@chromium.org, daniel@ffwll.ch, airlied@linux.ie, aravindh@codeaurora.org, abhinavk@codeaurora.org, khsieh@codeaurora.org, Chandan Uddaraju , Vara Reddy , Tanmay Shah , Jani Nikula Subject: [PATCH v9 1/5] drm: add constant N value in helper file Date: Fri, 7 Aug 2020 00:17:14 -0700 Message-Id: <20200807071718.17937-2-tanmay@codeaurora.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200807071718.17937-1-tanmay@codeaurora.org> References: <20200807071718.17937-1-tanmay@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chandan Uddaraju The constant N value (0x8000) is used by i915 DP driver. Define this value in dp helper header file to use in multiple Display Port drivers. Change i915 driver accordingly. Change in v6: Change commit message Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy Signed-off-by: Tanmay Shah Reviewed-by: Stephen Boyd Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- include/drm/drm_dp_helper.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 729ec6e0d43a..10b8310f290b 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -8114,7 +8114,7 @@ static void compute_m_n(unsigned int m, unsigned int n, * which the devices expect also in synchronous clock mode. */ if (constant_n) - *ret_n = 0x8000; + *ret_n = DP_LINK_CONSTANT_N_VALUE; else *ret_n = min_t(unsigned int, roundup_pow_of_two(n), DATA_LINK_N_MAX); diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index e47dc22ebf50..a31d7aebb8b8 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1134,6 +1134,7 @@ #define DP_MST_PHYSICAL_PORT_0 0 #define DP_MST_LOGICAL_PORT_0 8 +#define DP_LINK_CONSTANT_N_VALUE 0x8000 #define DP_LINK_STATUS_SIZE 6 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE], int lane_count); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project