From patchwork Wed Apr 22 14:11:27 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: 1275074 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 496j7W1xDcz9sSs; Thu, 23 Apr 2020 00:12:39 +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 1jRG78-00022B-CL; Wed, 22 Apr 2020 14:12:34 +0000 Received: from mail-pj1-f66.google.com ([209.85.216.66]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jRG74-0001za-1v for kernel-team@lists.ubuntu.com; Wed, 22 Apr 2020 14:12:30 +0000 Received: by mail-pj1-f66.google.com with SMTP id t40so1020281pjb.3 for ; Wed, 22 Apr 2020 07:12:29 -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=esaiZIkYrdqaeO7oSn+51+8P+H5rFDENR//ElOMTcrE=; b=HLpx8wJ4V0haYAgdTXn1d1PBQ9KM3rtneNuW0AG+za1XaDogllMn6u5CSelEK+/tN0 n4Ts7HQTuTOI7eiQQ2ZaRWbfMBqxkJh7nCubr4PlQxsc9Vu4pAJd3Ojh+/ffS+I59JAl 45IRkMX0lmI77XiRGPLUULs5/Yeua9W4iMqVUo+7QPhu3UO1hVc0BVbN5Qsf+scJ0KWX 6iyMstcUi+qOBImP/pVrzGsQ+qtbcHcT4ho/8eKFShV1JmtVY9AZPrSXz+pZp5O7Y3/l QGG1dSvysGlXI25NN00Kn3R7HrH379clsDnxdhHXcXCY0kEuNt6Neo9wa75N2mC2HFAy nm0A== X-Gm-Message-State: AGi0PuYArKXMSC5hcSm5HOtuzS0WmP4EWqZbVJjafsxpqArdLiMJ0uQa FNsLkmc1FvAoGT5qbh2zGPsLH6jkwwQ= X-Google-Smtp-Source: APiQypLkKboxzLwyfzC+QK8QCb39MfT3445Qma70gHjnsrNdIiTQY9vVBSwCLzXkgAst346mbjANVA== X-Received: by 2002:a17:902:8546:: with SMTP id d6mr26905626plo.280.1587564748236; Wed, 22 Apr 2020 07:12:28 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id a7sm5751954pfg.157.2020.04.22.07.12.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2020 07:12:27 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [SRU][E][PATCH 04/52] drm/i915: Use intel_crtc_state in sanitize_watermarks() too Date: Wed, 22 Apr 2020 22:11:27 +0800 Message-Id: <20200422141215.1548544-5-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200422141215.1548544-1-vicamo.yang@canonical.com> References: <20200422141215.1548544-1-vicamo.yang@canonical.com> MIME-Version: 1.0 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: Maarten Lankhorst BugLink: https://bugs.launchpad.net/bugs/1868936 Get rid of all instances of drm_crtc_state, and rename cstate to crtc_state for more clarity. Signed-off-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190628085517.31886-5-maarten.lankhorst@linux.intel.com (cherry picked from commit 49743e1dfb2a1f345f21ad84104663d92b4ba440) Signed-off-by: You-Sheng Yang --- drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index b32d83a705d5..dc7450dd3a81 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -15759,8 +15759,8 @@ static void sanitize_watermarks(struct drm_device *dev) struct drm_i915_private *dev_priv = to_i915(dev); struct drm_atomic_state *state; struct intel_atomic_state *intel_state; - struct drm_crtc *crtc; - struct drm_crtc_state *cstate; + struct intel_crtc *crtc; + struct intel_crtc_state *crtc_state; struct drm_modeset_acquire_ctx ctx; int ret; int i; @@ -15815,13 +15815,11 @@ static void sanitize_watermarks(struct drm_device *dev) } /* Write calculated watermark values back */ - for_each_new_crtc_in_state(state, crtc, cstate, i) { - struct intel_crtc_state *cs = to_intel_crtc_state(cstate); - - cs->wm.need_postvbl_update = true; - dev_priv->display.optimize_watermarks(intel_state, cs); + for_each_new_intel_crtc_in_state(intel_state, crtc, crtc_state, i) { + crtc_state->wm.need_postvbl_update = true; + dev_priv->display.optimize_watermarks(intel_state, crtc_state); - to_intel_crtc_state(crtc->state)->wm = cs->wm; + to_intel_crtc_state(crtc->base.state)->wm = crtc_state->wm; } put_state: