From patchwork Tue Oct 17 20:08:10 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: 10012807 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 6C4AB60235 for ; Tue, 17 Oct 2017 20:08:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CFEF28A13 for ; Tue, 17 Oct 2017 20:08:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 508E728A15; Tue, 17 Oct 2017 20:08:31 +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 D703128A13 for ; Tue, 17 Oct 2017 20:08:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F1C56E745; Tue, 17 Oct 2017 20:08:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3AC9D6E720 for ; Tue, 17 Oct 2017 20:08:23 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id k62so2905115wrc.9 for ; Tue, 17 Oct 2017 13:08:23 -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=2+rIq+FPr1UjFMo+A3V6OOH0R31BuCWKMaqmLNeDgP0=; b=u5xxDFl0W8LVqnrLrxQ1BtxokNH1oaNa4HZ1/S8nr6zh9sKxa1xbSOrEpL7Oh4HgtT gFyTGjyTE3k9Utv4aUa/18rFiJnljzPtjZrHqBB3cuF4zmP1DNnimiQoTBjaVpvryyxj mLy+vPn1RDLpCX99XWIvj+dOBGOpq4Oo9gT7HlAjFKq7X9GWKeBup3Ih7p35eiiB5Wxe SFVTmXCMnx/OdJmr2PpK1HOLdOvrWcvKGDXXqYbZJSsxtFKxpytAz0bZT99EYZGejKdg xwYzLO4zyucNA8QcKiPviurrg7QaLW+jeTI3e8jFeh3VglZff8E7Pbma7WV4/4MH4uh5 GhhQ== 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=2+rIq+FPr1UjFMo+A3V6OOH0R31BuCWKMaqmLNeDgP0=; b=fYu0IJX2RgDAF+3eN2KrqMmFOhDZiY3tgUD7K8yxYvkkTsacWAAAcP+m/2PRArjZGQ J57QK4KqzCx+HfsAbyJGWBirbB5lxKX/f0jDBpcUm/gDVz62NWx+adUaUgCfJajObUMy OkV4SpSeQCBhtgOX9MG1R0V+qrBlKKnDOTxNxF0tms3RoQHv6jj10DjO2YPe32baWPlD /2wSeuq6yeGKBVfDS/o870cVfbM7CwMfR4/oojWk3K2GvdfKJ1eAdWrZMXdq2nTtMIaE zUe0A8Blv33a0dOlc4JyXEH9Dbc/2DcnJTaYQTOfVfiEBo4IwU2qdfDIlsAwFzcvz6Zv 0zrQ== X-Gm-Message-State: AMCzsaU0RV8bGUR8yX9a+pRCMAhVEPgg09RbMvdOyhpwL6zVoOKBaZkA MLOPJ2IB23kYIya1peVsVF6b0A== X-Google-Smtp-Source: ABhQp+QgepeFpY52ZcoqwWmW+lObv5wTi9LJMAk5MDB0WChnlBhD5MDNQg7CtelbxKribk786ZQJew== X-Received: by 10.223.151.51 with SMTP id r48mr4615384wrb.164.1508270901642; Tue, 17 Oct 2017 13:08:21 -0700 (PDT) Received: from localhost.localdomain (77-105-101-149.lpok.fi. [77.105.101.149]) by smtp.gmail.com with ESMTPSA id r63sm14595562wmg.13.2017.10.17.13.08.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Oct 2017 13:08:21 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Tue, 17 Oct 2017 23:08:10 +0300 Message-Id: <1508270891-22186-5-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508270891-22186-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1508270891-22186-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH 4/5] 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 42d0fdf..bd62c0a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3541,23 +3541,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, @@ -13214,7 +13197,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); @@ -13224,7 +13207,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 4d267c4..a05ab3a 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1925,6 +1925,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 c3583dc..4fcf80c 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -311,7 +311,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);