From patchwork Tue Jul 14 19:29:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6788551 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DD25C9F2F0 for ; Tue, 14 Jul 2015 19:30:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1235B20722 for ; Tue, 14 Jul 2015 19:30:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 34BF1206BD for ; Tue, 14 Jul 2015 19:30:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BAFA96EA8A; Tue, 14 Jul 2015 12:30:01 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id CBCD46EA8B for ; Tue, 14 Jul 2015 12:29:59 -0700 (PDT) Received: by qkdv3 with SMTP id v3so1332461qkd.2 for ; Tue, 14 Jul 2015 12:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+v5emge1y3p6luh+v4yh7jibfhaYCrQS9px4vNck9DM=; b=BzojofuKdbl3/L8SokP1zN7gjW9p+ujruOoZdWZIYil+ZcvSS8xGMjs2pqKlvRFinM sW1rJi2fwGJGWD9SLTSiqWfoX+RDY2jSagbzTWFQj06ZuY9nZB4Q4qYH//l6flATtnb2 J67PVqkzHmwjDKi6Cz3/CiAjIvVN24pIGVboC8ByNDIB6T6UNkT2o+Z7RtcER7tE+AEg SnSwCwSaHAt0RR2AF89tzAQC1D3eT9/+2jj/lnUxLOz+i4+yVkZnUqzGkYiCPVUV4+RT j1X6bzdUCLGGahaWQN460CodBn9WPYwz0WzJ5wkZqfP7YNIR/5/XCV5HmmK6Umvu3gJs TZTw== X-Received: by 10.140.106.101 with SMTP id d92mr500421qgf.70.1436902199139; Tue, 14 Jul 2015 12:29:59 -0700 (PDT) Received: from localhost.localdomain (r130-pw-tresbarras.ibys.com.br. [189.76.1.243]) by smtp.gmail.com with ESMTPSA id f199sm957698qka.9.2015.07.14.12.29.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Jul 2015 12:29:58 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 14 Jul 2015 16:29:11 -0300 Message-Id: <1436902154-6979-3-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436902154-6979-1-git-send-email-przanoni@gmail.com> References: <1436902154-6979-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 2/4] drm/i915: don't call intel_fbc_update() at intel_unpin_work_fn() 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-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Paulo Zanoni Because intel_unpin_work_fn() already calls intel_frontbuffer_flip_complete() which will call intel_fbc_flush() which will call intel_fbc_update() when needed. We couldn't fix this previously due to the fact that FBC was not properly behaving as intended on frontbuffer flushes, but now that this is fixed, we can remove the additional call. Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/intel_display.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ad0fc6a..37b2528 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -10765,15 +10765,12 @@ static void intel_unpin_work_fn(struct work_struct *__work) container_of(__work, struct intel_unpin_work, work); struct intel_crtc *crtc = to_intel_crtc(work->crtc); struct drm_device *dev = crtc->base.dev; - struct drm_i915_private *dev_priv = dev->dev_private; struct drm_plane *primary = crtc->base.primary; mutex_lock(&dev->struct_mutex); intel_unpin_fb_obj(work->old_fb, primary->state); drm_gem_object_unreference(&work->pending_flip_obj->base); - intel_fbc_update(dev_priv); - if (work->flip_queued_req) i915_gem_request_assign(&work->flip_queued_req, NULL); mutex_unlock(&dev->struct_mutex);