From patchwork Mon Feb 9 16:46:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 5802211 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9F9F3BF440 for ; Mon, 9 Feb 2015 16:47:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D35C42008F for ; Mon, 9 Feb 2015 16:47:37 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0A98920109 for ; Mon, 9 Feb 2015 16:47:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C03C6E54C; Mon, 9 Feb 2015 08:47:36 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f175.google.com (mail-qc0-f175.google.com [209.85.216.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 629F26E54C for ; Mon, 9 Feb 2015 08:47:35 -0800 (PST) Received: by mail-qc0-f175.google.com with SMTP id c9so23651309qcz.6 for ; Mon, 09 Feb 2015 08:47:35 -0800 (PST) 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=CCuLEnE1glI8Ew14tbJtLuIxkp90/pQmM5sAsfnOVfM=; b=DGrJm8P3GK8pmnZrtJOp0TzppD3bdVIH3Fu3rhNU8zZ2DmZJdwfvEA28iK3+bNoLLO LwzRUg2R7uaT9Be5B0KrZbz+jsR7BOsa52dADp9m+gdGSqee/RZHN9kMIFmi1Xr9DILT 50LowcUurBm9vlCDoxF9q6b/IcRamUNBzCxh7EzFHwkUjpze1hMOtXYLHX1G5vWOQftG LxxDJAREhYnngGfrrz3tGLuKbclBOTREpZfixeX2o4Co4wkaimm/b7wa0pROSyd5KpGh azoed7m6kkB64pLNERM9xN/15NMZVghlf2Ky14hel1cS3SXY004aoIfvaLKLKVDsnmMZ ZyiA== X-Received: by 10.140.109.164 with SMTP id l33mr40880176qgf.91.1423500454972; Mon, 09 Feb 2015 08:47:34 -0800 (PST) Received: from localhost.localdomain ([177.220.182.131]) by mx.google.com with ESMTPSA id e2sm12329034qaf.49.2015.02.09.08.47.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Feb 2015 08:47:34 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 9 Feb 2015 14:46:31 -0200 Message-Id: <1423500395-1787-6-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1423500395-1787-1-git-send-email-przanoni@gmail.com> References: <1423500395-1787-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 5/9] drm/i915: also do frontbuffer tracking on pwrites 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=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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: Paulo Zanoni We need this for FBC, and possibly for PSR too. Reviewed-by: Rodrigo Vivi Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_gem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 3d198f8..15910fa 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1111,6 +1111,10 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data, ret = i915_gem_phys_pwrite(obj, args, file); else ret = i915_gem_shmem_pwrite(dev, obj, args, file); + + intel_fb_obj_flush(obj, false, ORIGIN_CPU); + } else { + intel_fb_obj_flush(obj, false, ORIGIN_GTT); } out: