From patchwork Mon Dec 8 16:09:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 5457351 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 82D75BEEA8 for ; Mon, 8 Dec 2014 16:10:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA4D920155 for ; Mon, 8 Dec 2014 16:10:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7D38F20166 for ; Mon, 8 Dec 2014 16:10:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25F216E7AD; Mon, 8 Dec 2014 08:10:40 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 306BA6E7B4 for ; Mon, 8 Dec 2014 08:10:38 -0800 (PST) Received: by mail-qa0-f54.google.com with SMTP id i13so3472998qae.41 for ; Mon, 08 Dec 2014 08:10:37 -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=fqFA3F5jFqhGjQD52kmvq7un9DzHksHA1L4USGqia8Q=; b=e7DrLLU67E+ye9dPeevdZKa7lP4tz1sh6E/LK5m78w8t4xGerrWU3arG7JNONvj+uC UakxfYA4aFm8dkntzltkUgh7ybhCE0AxoTDg1q5ngmk2zssjl6Z5Fba+Nz7sMHi9ZYxa jT2Fwfj6YlOuT6UPfZ3vN5Pg38lPuz59jnx3tPpgLAa20qF0Me5O5hTiOeSHN0jYyfAv JUEG+cJl4TJYMjjbVmASsZukRdqgNgociDKKrfpGSaaw5GrDCgqBREC4BG8m7TugXR1X lzj/ZNNIpcWooClguNtNDzodfV4GJSdggwuobdsEejsfyqjj/quTE2Kpqi2TnKy9z5yV yHDw== X-Received: by 10.224.4.197 with SMTP id 5mr54870598qas.74.1418055037505; Mon, 08 Dec 2014 08:10:37 -0800 (PST) Received: from localhost.localdomain ([187.95.104.42]) by mx.google.com with ESMTPSA id d9sm38189123qam.26.2014.12.08.08.10.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 08:10:36 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 8 Dec 2014 14:09:16 -0200 Message-Id: <1418054960-1403-8-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418054960-1403-1-git-send-email-przanoni@gmail.com> References: <1418054960-1403-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 07/11] 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. Signed-off-by: Paulo Zanoni Reviewed-by: Rodrigo Vivi --- 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 7ef12e8..b8c906e 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1117,6 +1117,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: