From patchwork Fri Nov 13 17:12:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zanoni, Paulo R" X-Patchwork-Id: 7613081 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 2177EC05CA for ; Fri, 13 Nov 2015 17:13:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E9C920661 for ; Fri, 13 Nov 2015 17:13:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 72B4D20658 for ; Fri, 13 Nov 2015 17:13:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B30F56E641; Fri, 13 Nov 2015 09:13:29 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 750456E63D for ; Fri, 13 Nov 2015 09:13:28 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 13 Nov 2015 09:13:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,288,1444719600"; d="scan'208";a="837185167" Received: from jh1011-mobl1.gar.corp.intel.com (HELO panetone.amr.corp.intel.com) ([10.252.192.177]) by fmsmga001.fm.intel.com with ESMTP; 13 Nov 2015 09:13:04 -0800 From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 13 Nov 2015 15:12:42 -0200 Message-Id: <1447434771-19337-2-git-send-email-paulo.r.zanoni@intel.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1447434771-19337-1-git-send-email-paulo.r.zanoni@intel.com> References: <1447434771-19337-1-git-send-email-paulo.r.zanoni@intel.com> Subject: [Intel-gfx] [PATCH igt 01/10] lib/igt_fb: fix fb->size when provided by the user 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.5 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 I want to have a little more control over the size of the buffers in kms_frontbuffer_tracking, so I decided to start calling igt_create_fb_with_bo_size() instead of igt_create_fb(). The problem is that create_bo_for_fb() returns its own calculated size as size_ret instead of the actual used size. So we fix this by returning the actual size, the one used in gem_create instead of the calculated size that's not used anywhere. Signed-off-by: Paulo Zanoni --- lib/igt_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 13a6a34..c70fb2c 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -116,7 +116,7 @@ static int create_bo_for_fb(int fd, int width, int height, int bpp, ret = __gem_set_tiling(fd, gem_handle, I915_TILING_X, stride); *stride_ret = stride; - *size_ret = size; + *size_ret = bo_size; *gem_handle_ret = gem_handle; return ret;