From patchwork Mon Oct 16 06:04:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Wang, Zhi A" X-Patchwork-Id: 10007715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 05D9E60235 for ; Mon, 16 Oct 2017 06:04:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC0E7228C9 for ; Mon, 16 Oct 2017 06:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E08BC23B34; Mon, 16 Oct 2017 06:04:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, TRACKER_ID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 99FB5228C9 for ; Mon, 16 Oct 2017 06:04:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A1786E1C1; Mon, 16 Oct 2017 06:04:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94D316E1AB; Mon, 16 Oct 2017 06:04:19 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2017 23:04:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,385,1503385200"; d="scan'208";a="160883995" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 15 Oct 2017 23:04:18 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 15 Oct 2017 23:04:18 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 15 Oct 2017 23:04:17 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Mon, 16 Oct 2017 14:04:15 +0800 From: "Wang, Zhi A" To: Christos Gkekas , "Gao, Fred" , Zhenyu Wang , Jani Nikula , Joonas Lahtinen , "Vivi, Rodrigo" , David Airlie , "intel-gvt-dev@lists.freedesktop.org" , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] drm/i915/gvt: Fix error handling bug in perform_bb_shadow Thread-Topic: [PATCH] drm/i915/gvt: Fix error handling bug in perform_bb_shadow Thread-Index: AQHTRgN47nSjN6DqCkGRu4sDrxBBVKLl/HZg Date: Mon, 16 Oct 2017 06:04:14 +0000 Message-ID: References: <1508105875-14425-1-git-send-email-chris.gekas@gmail.com> In-Reply-To: <1508105875-14425-1-git-send-email-chris.gekas@gmail.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi: Thanks for the patch. This problem has been fixed on staging branch with: a8e18bfc854141621a29600a6c13e5f40c6e9f19 drm/i915/gvt: Refine shadow batch buffer Thanks, Zhi. -----Original Message----- From: Christos Gkekas [mailto:chris.gekas@gmail.com] Sent: Monday, October 16, 2017 1:18 AM To: Gao, Fred ; Zhenyu Wang ; Wang, Zhi A ; Jani Nikula ; Joonas Lahtinen ; Vivi, Rodrigo ; David Airlie ; intel-gvt-dev@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org Cc: Christos Gkekas Subject: [PATCH] drm/i915/gvt: Fix error handling bug in perform_bb_shadow Change the type of variable 'bb_size' from uint32_t to int to be able to hold error return values from find_bb_size(). This change seems to have been missed from previous commit 1e3197d6ad73. Signed-off-by: Christos Gkekas --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 2c0ccbb..f41cbf6 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -1628,7 +1628,7 @@ static int perform_bb_shadow(struct parser_exec_state *s) struct intel_shadow_bb_entry *entry_obj; struct intel_vgpu *vgpu = s->vgpu; unsigned long gma = 0; - uint32_t bb_size; + int bb_size; void *dst = NULL; int ret = 0;