From patchwork Tue Sep 12 09:19:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juha-Pekka Heikkila X-Patchwork-Id: 9948819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CDD2A60360 for ; Tue, 12 Sep 2017 09:19:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCDEF28C0F for ; Tue, 12 Sep 2017 09:19:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1D0128C1C; Tue, 12 Sep 2017 09:19:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 64C6E28C0F for ; Tue, 12 Sep 2017 09:19:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 985EB6E5A2; Tue, 12 Sep 2017 09:19:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F30A6E59A for ; Tue, 12 Sep 2017 09:19:50 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id p37so5609361wrb.5 for ; Tue, 12 Sep 2017 02:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IKojLZTsW2TkcpugkDCuDXPtvsl6wlT+VztoHD1sqlI=; b=OeZ4LbDjGob9oXiPFrYnbW4i7dVE67nWwmBtTJBfWJaJANrgPIkQ4P0gsgXgabv1tP WwTHZNAIY1XW6eCjq+YwrAeSbxdSxGS3XrxKMiZeD9x3FQhr3P4eGdRXcbAIUHnNi7Fo 3U/EQCc34yHdas5qm2jt8vbw/4pRksYNznoAKqBSIatJjmSOfNDdllm8CxXrXimk7Fgb NtclnurKzI5eBdZIoDel8jpGjBtoZ4XxOTb0fbMfXv++KbgLNi94KtLkub412AAG/kDK 4zeOGWugTY4rlyKdhPpAriGyK5LPd55356Vm0jVCXIsZzkuoZBdc6+PmvQTRdTWOfDHs Qc8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IKojLZTsW2TkcpugkDCuDXPtvsl6wlT+VztoHD1sqlI=; b=W7wZfYc/CYk7M9vPaNff6FUDd956KwADkxHSD6yFZ5yn9qIA+EBoPs/8TQPVRs+E0Y 4BrwKdLgnBu0FSBxtWE6M7YQf+Hms3RfwQ1Cp/L5dxgUcHuLy237IfZhAL6HoDHlf9mD XeCysf8xfX1RrNf5KluKCxUmz6KNZmUdicpU5374wBZCsUNa/Hjt+UfHKjaZUCFCbTGD jZC/rDG1lB/sbYgX+OpOdskNmYYQLVKIocf0os2ztj0RtPhIIHGLh63hURWyFQh+xcji saFIkqHwoFOeLHvSdTIdv015zJrx7NpsnQ7fu4T/xVGU/JHf6SN+8unRipmXsOqbkSQA 9yDA== X-Gm-Message-State: AHPjjUgx9q4xQ5FmI+Dm3bzj3q+ffho3vxrCVP54PyNXQl/B1LXpqJqG nHujXgReq5Lcf3Zz X-Google-Smtp-Source: ADKCNb5rj8Q2LRfaRGvEBmPQQffGt56rx0MbgFF37kfaIQRvakrXqi/NpRUlDgtR3DZSnfu/qNM23A== X-Received: by 10.223.150.113 with SMTP id c46mr10413945wra.30.1505207988868; Tue, 12 Sep 2017 02:19:48 -0700 (PDT) Received: from jheikkil-MOBL1.fi.intel.com ([2001:998:22:0:4038:d2aa:1534:de4d]) by smtp.gmail.com with ESMTPSA id w82sm16097443wme.5.2017.09.12.02.19.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Sep 2017 02:19:48 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 12 Sep 2017 12:19:40 +0300 Message-Id: <1505207980-18439-4-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505207980-18439-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1505207980-18439-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH 3/3] drm/i915: Unify skylake plane disable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Don't handle skylake primary plane separately as it is similar plane as the others. Signed-off-by: Juha-Pekka Heikkila --- drivers/gpu/drm/i915/intel_display.c | 21 ++------------------- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_sprite.c | 2 +- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 739003d..afead21 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3550,23 +3550,6 @@ u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state, return plane_ctl; } -static void skylake_disable_primary_plane(struct intel_plane *primary, - struct intel_crtc *crtc) -{ - struct drm_i915_private *dev_priv = to_i915(primary->base.dev); - enum plane_id plane_id = primary->id; - enum pipe pipe = primary->pipe; - unsigned long irqflags; - - spin_lock_irqsave(&dev_priv->uncore.lock, irqflags); - - I915_WRITE_FW(PLANE_CTL(pipe, plane_id), 0); - I915_WRITE_FW(PLANE_SURF(pipe, plane_id), 0); - POSTING_READ_FW(PLANE_SURF(pipe, plane_id)); - - spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); -} - static int __intel_display_resume(struct drm_device *dev, struct drm_atomic_state *state, @@ -13150,7 +13133,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) modifiers = skl_format_modifiers_ccs; primary->update_plane = skl_update_plane; - primary->disable_plane = skylake_disable_primary_plane; + primary->disable_plane = skl_disable_plane; } else if (INTEL_GEN(dev_priv) >= 9) { intel_primary_formats = skl_primary_formats; num_formats = ARRAY_SIZE(skl_primary_formats); @@ -13160,7 +13143,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) modifiers = skl_format_modifiers_noccs; primary->update_plane = skl_update_plane; - primary->disable_plane = skylake_disable_primary_plane; + primary->disable_plane = skl_disable_plane; } else if (INTEL_GEN(dev_priv) >= 4) { intel_primary_formats = i965_primary_formats; num_formats = ARRAY_SIZE(i965_primary_formats); diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index a690cc5..a92c2e2 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1915,6 +1915,7 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state); void skl_update_plane(struct intel_plane *plane, const struct intel_crtc_state *crtc_state, const struct intel_plane_state *plane_state); +void skl_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc); /* intel_tv.c */ void intel_tv_init(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 2ec4108..22598c2 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -305,7 +305,7 @@ skl_update_plane(struct intel_plane *plane, spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags); } -static void +void skl_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc) { struct drm_i915_private *dev_priv = to_i915(plane->base.dev);