From patchwork Fri Oct 24 13:51:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5147591 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9928CC11AC for ; Fri, 24 Oct 2014 13:51:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDF9F2026D for ; Fri, 24 Oct 2014 13:51:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 09ED22026C for ; Fri, 24 Oct 2014 13:51:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 47A456E5C9; Fri, 24 Oct 2014 06:51:41 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 7796F6E5C7; Fri, 24 Oct 2014 06:51:39 -0700 (PDT) Received: by mail-wi0-f179.google.com with SMTP id d1so1322578wiv.6 for ; Fri, 24 Oct 2014 06:51:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H+pVenSqiEQTdA7Mof/M3Oxm8j/uTURbSzA0Yh0dZdE=; b=nNn5vDqFg444ZU8cIhLI9KVu+ldMu2kb1aozRQHgPksJMbVyjepYaUt12UZ8hztTzx MCEFvfmp/J6kFHf47YzMFZ/h6VFte5sF1N6OMYdY/BzKZvSjKr3ksFQD5sLHzxbyV6qM rElXQGY9ngSwHliCUMphVtumBon+SauhrEm+BwwDJktddqtZEBsP71zR9bNJF0wf8WKn 8tkKQMORJNGq1yLZqB94myhzanQQ7sl/7qyyuQrDu778/kbOdEC6TnOPkWYh+EHPx9Bz GKCFGKcZKXb3BdsSP5bc+GlLAExaEEBj0rGM5O3JcejCzuWNJ4t8D57IAronu9YuUsBQ bGIQ== X-Received: by 10.180.24.167 with SMTP id v7mr4284917wif.41.1414158698752; Fri, 24 Oct 2014 06:51:38 -0700 (PDT) Received: from jasmin.cbg.collabora.co.uk (pakora.collabora.co.uk. [93.93.133.71]) by mx.google.com with ESMTPSA id ei1sm2082840wib.20.2014.10.24.06.51.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Oct 2014 06:51:38 -0700 (PDT) From: Gustavo Padovan To: intel-gfx@lists.freedesktop.org Subject: [PATCH v4 4/5] drm/i915: only flip frontbuffer if crtc is active Date: Fri, 24 Oct 2014 14:51:34 +0100 Message-Id: <1414158695-31605-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1414158695-31605-1-git-send-email-gustavo@padovan.org> References: <1414158695-31605-1-git-send-email-gustavo@padovan.org> Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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: Gustavo Padovan There is no point in flipping a buffer for a disabled crtc. Signed-off-by: Gustavo Padovan Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 8530401..9a913f5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8544,9 +8544,9 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, if (old_width != width) intel_update_watermarks(crtc); intel_crtc_update_cursor(crtc, intel_crtc->cursor_bo != NULL); - } - intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe)); + intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_CURSOR(pipe)); + } return 0; fail_unpin: