From patchwork Wed Apr 20 18:16:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 8893971 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 E689DBF29F for ; Wed, 20 Apr 2016 18:16:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2975B2025A for ; Wed, 20 Apr 2016 18:16:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0EC6420254 for ; Wed, 20 Apr 2016 18:16:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 652F36EAC8; Wed, 20 Apr 2016 18:16:38 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id BF1F36EAC8 for ; Wed, 20 Apr 2016 18:16:36 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 20 Apr 2016 11:16:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,510,1455004800"; d="scan'208";a="949372499" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 20 Apr 2016 11:16:33 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 20 Apr 2016 21:16:27 +0300 From: ville.syrjala@linux.intel.com To: intel-gfx@lists.freedesktop.org Date: Wed, 20 Apr 2016 21:16:27 +0300 Message-Id: <1461176187-7381-1-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Cc: Tomeu Vizoso Subject: [Intel-gfx] [PATCH i-g-t] lib: Pass format instead of bpp to create_bo_for_fb() 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 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: Ville Syrjälä create_bo_for_fb() expects the drm format as a parameter since commit 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions") but not all callers were updated. Fix that up. Cc: Tomeu Vizoso Fixes: 8a1a38661f56 ("lib: Add igt_create_bo_with_dimensions") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93328 Signed-off-by: Ville Syrjälä Reviewed-by: Tomeu Vizoso --- lib/igt_fb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index c4f87898e82e..3e53d3b8cd3d 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1006,7 +1006,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb) struct fb_blit_upload *blit; cairo_format_t cairo_format; unsigned int obj_tiling = fb_mod_to_obj_tiling(fb->tiling); - int bpp, ret; + int ret; blit = malloc(sizeof(*blit)); igt_assert(blit); @@ -1016,8 +1016,7 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb) * cairo). This linear bo will be then blitted to its final * destination, tiling it at the same time. */ - bpp = igt_drm_format_to_bpp(fb->drm_format); - ret = create_bo_for_fb(fd, fb->width, fb->height, bpp, + ret = create_bo_for_fb(fd, fb->width, fb->height, fb->drm_format, LOCAL_DRM_FORMAT_MOD_NONE, 0, 0, &blit->linear.handle, &blit->linear.size,