From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D73FCC3F2D7 for ; Thu, 5 Mar 2020 00:11:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B051720842 for ; Thu, 5 Mar 2020 00:11:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="LZevHuRf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388425AbgCEALc (ORCPT ); Wed, 4 Mar 2020 19:11:32 -0500 Received: from mail27.static.mailgun.info ([104.130.122.27]:49248 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388389AbgCEALc (ORCPT ); Wed, 4 Mar 2020 19:11:32 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1583367091; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=a2qLUsfIPfcf4tgdzrpDFkKT98/Q6dNMQ8W3/hianHQ=; b=LZevHuRfDfIx23RnjtFFnmN4MYoADfpVBQfkIyrRQeyLergbn0pLxj7L7zNxhMob6R63M2to IGkkSvWidPVXVNoIS8N7gMdIpmFCs1bxEzsn4WFge7RjsXDgwVSwV+fXVipXq+BCGJG1oAuh /BW+l/QiWfkWy54xDGJbl5y8qXo= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e6043ac.7f4ae05b8030-smtp-out-n01; Thu, 05 Mar 2020 00:11:24 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id AB5D4C4479D; Thu, 5 Mar 2020 00:11:24 +0000 (UTC) Received: from displaysanity13-linux.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: varar) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8D4DFC4479C; Thu, 5 Mar 2020 00:11:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8D4DFC4479C 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=varar@codeaurora.org From: Vara Reddy To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, seanpaul@chromium.org Cc: Chandan Uddaraju , robdclark@gmail.com, abhinavk@codeaurora.org, nganji@codeaurora.org, jsanka@codeaurora.org, hoegsberg@google.com, aravindh@codeaurora.org, dri-devel@lists.freedesktop.org, Vara Reddy Subject: [DPU PATCH v4 2/5] drm: add constant N value in helper file Date: Wed, 4 Mar 2020 16:10:25 -0800 Message-Id: <1583367028-19979-3-git-send-email-varar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1583367028-19979-1-git-send-email-varar@codeaurora.org> References: <1583367028-19979-1-git-send-email-varar@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Chandan Uddaraju The constant N value (0x8000) is used by multiple DP drivers. Define this value in header file and use this in the existing i915 display driver. Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index effc425..3c016f3 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7618,7 +7618,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 51ecb51..b509e74 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1455,6 +1455,8 @@ static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux, int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux, u8 status[DP_LINK_STATUS_SIZE]); +#define DP_LINK_CONSTANT_N_VALUE 0x8000 + int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE], const u8 port_cap[4]); int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE], -- $(echo -e 'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project') From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B9B8C3F2D7 for ; Thu, 5 Mar 2020 08:15:29 +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 6449F2073D for ; Thu, 5 Mar 2020 08:15:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="LZevHuRf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6449F2073D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org 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 D743D6EB9E; Thu, 5 Mar 2020 08:14:57 +0000 (UTC) Received: from mail26.static.mailgun.info (mail26.static.mailgun.info [104.130.122.26]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1D97B6EB80 for ; Thu, 5 Mar 2020 00:11:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1583367091; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=a2qLUsfIPfcf4tgdzrpDFkKT98/Q6dNMQ8W3/hianHQ=; b=LZevHuRfDfIx23RnjtFFnmN4MYoADfpVBQfkIyrRQeyLergbn0pLxj7L7zNxhMob6R63M2to IGkkSvWidPVXVNoIS8N7gMdIpmFCs1bxEzsn4WFge7RjsXDgwVSwV+fXVipXq+BCGJG1oAuh /BW+l/QiWfkWy54xDGJbl5y8qXo= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyJkOTU5ZSIsICJkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e6043ac.7f8bff7e2bc8-smtp-out-n03; Thu, 05 Mar 2020 00:11:24 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B583EC447A3; Thu, 5 Mar 2020 00:11:24 +0000 (UTC) Received: from displaysanity13-linux.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: varar) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8D4DFC4479C; Thu, 5 Mar 2020 00:11:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8D4DFC4479C 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=varar@codeaurora.org From: Vara Reddy To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, seanpaul@chromium.org Subject: [DPU PATCH v4 2/5] drm: add constant N value in helper file Date: Wed, 4 Mar 2020 16:10:25 -0800 Message-Id: <1583367028-19979-3-git-send-email-varar@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1583367028-19979-1-git-send-email-varar@codeaurora.org> References: <1583367028-19979-1-git-send-email-varar@codeaurora.org> X-Mailman-Approved-At: Thu, 05 Mar 2020 08:14:30 +0000 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: abhinavk@codeaurora.org, hoegsberg@google.com, dri-devel@lists.freedesktop.org, Vara Reddy , aravindh@codeaurora.org, Chandan Uddaraju MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chandan Uddaraju The constant N value (0x8000) is used by multiple DP drivers. Define this value in header file and use this in the existing i915 display driver. Signed-off-by: Chandan Uddaraju Signed-off-by: Vara Reddy --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index effc425..3c016f3 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7618,7 +7618,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 51ecb51..b509e74 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -1455,6 +1455,8 @@ static inline ssize_t drm_dp_dpcd_writeb(struct drm_dp_aux *aux, int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux, u8 status[DP_LINK_STATUS_SIZE]); +#define DP_LINK_CONSTANT_N_VALUE 0x8000 + int drm_dp_downstream_max_clock(const u8 dpcd[DP_RECEIVER_CAP_SIZE], const u8 port_cap[4]); int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE], -- $(echo -e 'The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project') _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel