From patchwork Mon Apr 4 15:47:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marius Vlad X-Patchwork-Id: 8741971 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 2127BC0553 for ; Mon, 4 Apr 2016 15:46:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 606A32028D for ; Mon, 4 Apr 2016 15:46:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4EABD20204 for ; Mon, 4 Apr 2016 15:46:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A366C6E226; Mon, 4 Apr 2016 15:46:26 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTP id 8AE6B6E226 for ; Mon, 4 Apr 2016 15:46:25 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 04 Apr 2016 08:46:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,441,1455004800"; d="scan'208";a="680596080" Received: from mcvlad-wk.rb.intel.com ([10.237.105.57]) by FMSMGA003.fm.intel.com with ESMTP; 04 Apr 2016 08:46:25 -0700 From: Marius Vlad To: intel-gfx@lists.freedesktop.org Date: Mon, 4 Apr 2016 18:47:25 +0300 Message-Id: <1459784845-13517-1-git-send-email-marius.c.vlad@intel.com> X-Mailer: git-send-email 2.8.0.rc3 Subject: [Intel-gfx] [PATCH i-g-t] lib/igt_kms: Fix atomic plane commit when fb_id is 0. 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=-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 igt_atomic_prepare_plane_commit() assumes that the framebuffer is always set-up. Signed-off-by: Marius Vlad Reviewed-by: Lionel Landwerlin --- lib/igt_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 82257a6..30c5b7e 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1585,7 +1585,7 @@ igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_output_t *output, igt_atomic_populate_plane_req(req, plane, IGT_PLANE_FB_ID, fb_id); } - if (plane->position_changed || plane->size_changed) { + if ((plane->position_changed || plane->size_changed) && fb_id != 0) { uint32_t src_x = IGT_FIXED(plane->fb->src_x, 0); /* src_x */ uint32_t src_y = IGT_FIXED(plane->fb->src_y, 0); /* src_y */ uint32_t src_w = IGT_FIXED(plane->fb->src_w, 0); /* src_w */