From patchwork Fri Aug 14 06:57:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1344658 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BSZ5P18xSz9sPB; Fri, 14 Aug 2020 16:58:01 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1k6Tf3-0007XD-20; Fri, 14 Aug 2020 06:57:57 +0000 Received: from mail-pj1-f65.google.com ([209.85.216.65]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k6Tf1-0007Vw-3w for kernel-team@lists.ubuntu.com; Fri, 14 Aug 2020 06:57:55 +0000 Received: by mail-pj1-f65.google.com with SMTP id mw10so3948049pjb.2 for ; Thu, 13 Aug 2020 23:57:54 -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:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K/MrVJEB7QEHAqLiivQNAEOTtx9HofSacQSa0rr0dCo=; b=hJZVev1fOnJ9f2VekPPDJrbB7KLvsl9wuajhOOTz033AZdn1UUzlVqyR+doDIkbdo0 Ec6QfwGKY5Un2A7ugNn9ZAXWABPD7nEOSKAQhMZr3ZqLAIQlIVKukMD406bEIy9ddUS8 Y2MPLjVtSo3C4eTHlNo0uOarSaoerMAGqDCAbHXVDFX7LrlGaEntgUv9At8Jsi8j4PFL PGfo0gYjWqDOmkj/hocwFeJ+8rDCKlaBEF0uJ+R7USv/A8Xs/Wj9Zo3dVKPkG4emwHvb A0j0fYfZAosXEB6sLz6797nwftwTp4IlIFQfbT2gTwvNyvnBSfDl+GYAVGfns1oHSfbz jBXg== X-Gm-Message-State: AOAM533pv8egxfUvFKiDJWHdIcICFIpJiCUH/4lx83x1o/tHMwXJ/g+g MCmcu2f3Deh3m+SdbQQICZgAMqdACBAlUA== X-Google-Smtp-Source: ABdhPJyjr0CIY49fGZut0A0/usQPXrDAbEzsy/GPS+e7KmtM5LGJnHCEMMTMdySvLRFoZerRiFnA5Q== X-Received: by 2002:a17:90a:eb0f:: with SMTP id j15mr1118107pjz.26.1597388272392; Thu, 13 Aug 2020 23:57:52 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id y135sm8406938pfg.148.2020.08.13.23.57.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Aug 2020 23:57:51 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 03/31][SRU][OEM-5.6] drm/i915: s/need_cd2x_updare/can_cd2x_update/ Date: Fri, 14 Aug 2020 14:57:12 +0800 Message-Id: <20200814065740.276039-4-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200814065740.276039-1-vicamo.yang@canonical.com> References: <20200814065740.276039-1-vicamo.yang@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.65; envelope-from=vicamo@gmail.com; helo=mail-pj1-f65.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Ville Syrjälä BugLink: https://bugs.launchpad.net/bugs/1891451 intel_cdclk_needs_cd2x_update() is named rather confusingly. We don't have to do a cd2x update, rather we are allowed to do one (as opposed to a full PLL reprogramming with its heavy handed modeset). So let's rename the function to intel_cdclk_can_cd2x_update(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200120174728.21095-7-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit 65c88a866d705589e898d288af25f6a3b7dfd829) Signed-off-by: You-Sheng Yang --- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c index ca0510e74516..37345ec04218 100644 --- a/drivers/gpu/drm/i915/display/intel_cdclk.c +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c @@ -1779,7 +1779,7 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_state *a, } /** - * intel_cdclk_needs_cd2x_update - Determine if two CDCLK states require a cd2x divider update + * intel_cdclk_can_cd2x_update - Determine if two CDCLK states need a cd2x divider update * @dev_priv: Not a CDCLK state, it's the drm_i915_private! * @a: first CDCLK state * @b: second CDCLK state @@ -1787,9 +1787,9 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_state *a, * Returns: * True if the CDCLK states require just a cd2x divider update, false if not. */ -static bool intel_cdclk_needs_cd2x_update(struct drm_i915_private *dev_priv, - const struct intel_cdclk_state *a, - const struct intel_cdclk_state *b) +static bool intel_cdclk_can_cd2x_update(struct drm_i915_private *dev_priv, + const struct intel_cdclk_state *a, + const struct intel_cdclk_state *b) { /* Older hw doesn't have the capability */ if (INTEL_GEN(dev_priv) < 10 && !IS_GEN9_LP(dev_priv)) @@ -2405,9 +2405,9 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state) } if (is_power_of_2(state->active_pipes) && - intel_cdclk_needs_cd2x_update(dev_priv, - &dev_priv->cdclk.actual, - &state->cdclk.actual)) { + intel_cdclk_can_cd2x_update(dev_priv, + &dev_priv->cdclk.actual, + &state->cdclk.actual)) { struct intel_crtc *crtc; struct intel_crtc_state *crtc_state;