Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp17638ybt; Tue, 30 Jun 2020 13:54:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbANiSO6eeAHfBBVgsFIsOSWgL+99/QfLK0qGFwYt2PZtJz+301zblF6zWJX+aUk2fohRA X-Received: by 2002:a17:906:5c0a:: with SMTP id e10mr20463890ejq.389.1593550013514; Tue, 30 Jun 2020 13:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593550013; cv=none; d=google.com; s=arc-20160816; b=xj1fn36dO06BYVDvMbPHHqbknooW4nsxyYGuUk4Ibl480vu9mDnWaD+iU47Utp+sHc FILeNHL/PAPUZ9hS7Iy13LbjndXEgU4T7iX7MLUpWM0kObeZ2BHrprCHbq/b8jXPFBjO W79DcfAG7B6mxt7rpZthEiK9bOoCtC0uvGNSGFss8odOhWDS332BMrHoNPz8OOWjYfje YVObD2xMMZ4zFd/VAZCwmmPxWW34b2q2RGekHkWzCf0ArmpSHvHGva/NQiwt12G+igr3 ePUG4t4J6ONOcAdtI1xit/8QVwIHL3GfDwKJP9RnhsuCQhafV6hUzZUmaDskPh33pVJm NfJg== 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=pCxMGoAE11mzNnegsROvEKZ7dz7oA11oMEGTQyVjkqw=; b=Dnoek6xb8Lp3EssZb9miy2Av8Lia1XUFvrTMRkMKyOTB8WQ6HVBGF9W9/LuUCLrC8l /WbQX8S8eERkjxJNnQfsiV5SEZNClA/NqH3le3GEUckcbZzELGyBsjyDPg9j/MQpcRPF dFecP0BJrkPGJRRUkoW3TTiR2WUhzYa+YFzTWoljLnk+Gahzx4IbKk7e4D/jFkI082n3 VUA7Br1r+rLWo9JEIq6W9sFOYhkbSlc3lkSnH4i9ZrvI1z+sJrXx73p/pVhE6Wg2SHwm J73jZ5vLc1/gOr4Z00Gyl35JL4WIwhQm22DwjrvJ6wBb31JdYy9QnSuIGLCd/OJvO6Ox NyYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=MUSFN5Ch; 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 bh13si2368775ejb.48.2020.06.30.13.46.30; Tue, 30 Jun 2020 13:46:53 -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=MUSFN5Ch; 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 S1726641AbgF3Sq2 (ORCPT + 99 others); Tue, 30 Jun 2020 14:46:28 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:29726 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgF3Sq0 (ORCPT ); Tue, 30 Jun 2020 14:46:26 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1593542785; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=pCxMGoAE11mzNnegsROvEKZ7dz7oA11oMEGTQyVjkqw=; b=MUSFN5ChhpeBfzbx/3ev0COh3s97muyZqWB9g+zCxhl4aB/KWS6Y9CN+COd/uEgyltXNhXFG gEYBJrIQ1LZxbUE0pGD+H3tTYhheS7LabvOUC9aOxwHbS9UNYkEvTua5TMNMechf2w7TzsSH yi6weF47bkY42MuPr7lTaBDPJtU= X-Mailgun-Sending-Ip: 104.130.122.29 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-n13.prod.us-west-2.postgun.com with SMTP id 5efb88806bebe35deb4d03fe (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 30 Jun 2020 18:46:24 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 504ADC433CB; Tue, 30 Jun 2020 18:46:24 +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 31A94C433C6; Tue, 30 Jun 2020 18:46:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 31A94C433C6 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: robh+dt@kernel.org, swboyd@chromium.org, sam@ravnborg.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, seanpaul@chromium.org, robdclark@gmail.com, daniel@ffwll.ch, airlied@linux.ie, aravindh@codeaurora.org, abhinavk@codeaurora.org, chandanu@codeaurora.org, varar@codeaurora.org, Tanmay Shah , Jani Nikula Subject: [PATCH v8 2/6] drm: add constant N value in helper file Date: Tue, 30 Jun 2020 11:45:03 -0700 Message-Id: <20200630184507.15589-3-tanmay@codeaurora.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630184507.15589-1-tanmay@codeaurora.org> References: <20200630184507.15589-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 c1836095ea38..81c461aeb3ba 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -8085,7 +8085,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 1165ec105638..73dae5bd6048 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