From patchwork Wed Aug 9 17:22:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinclair Yeh X-Patchwork-Id: 9891383 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 E929D601EB for ; Wed, 9 Aug 2017 17:23:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D11C228AA8 for ; Wed, 9 Aug 2017 17:23:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C608228AAB; Wed, 9 Aug 2017 17:23:44 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 642D228AA8 for ; Wed, 9 Aug 2017 17:23:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FEBB6E382; Wed, 9 Aug 2017 17:23:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EX13-EDG-OU-001.vmware.com (ex13-edg-ou-001.vmware.com [208.91.0.189]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0131C6E384 for ; Wed, 9 Aug 2017 17:23:31 +0000 (UTC) Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Wed, 9 Aug 2017 10:22:35 -0700 Received: from vmware.com (promb-2n-dhcp29.eng.vmware.com [10.20.88.29]) by sc9-mailhost3.vmware.com (Postfix) with SMTP id 7E831402CE; Wed, 9 Aug 2017 10:23:10 -0700 (PDT) Received: by vmware.com (sSMTP sendmail emulation); Wed, 09 Aug 2017 19:23:13 +0200 From: Sinclair Yeh To: Subject: [PATCH 4/9] drm/vmwgfx: Fix incorrect command header offset at restart Date: Wed, 9 Aug 2017 19:22:59 +0200 Message-ID: <1502299384-63140-5-git-send-email-syeh@vmware.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502299384-63140-1-git-send-email-syeh@vmware.com> References: <1502299384-63140-1-git-send-email-syeh@vmware.com> MIME-Version: 1.0 Received-SPF: None (EX13-EDG-OU-001.vmware.com: syeh@vmware.com does not designate permitted sender hosts) Cc: Thomas Hellstrom 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 From: Thomas Hellstrom Sometimes it appears like the device modifies the command header offset member. So explicitly clear it when restarting after an error. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c index a916864..ce92198 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c @@ -563,6 +563,7 @@ static void vmw_cmdbuf_work_func(struct work_struct *work) entry->cmd += new_start_offset; cb_hdr->length -= new_start_offset; cb_hdr->errorOffset = 0; + cb_hdr->offset = 0; list_add_tail(&entry->list, &restart_head[entry->cb_context]); man->ctx[entry->cb_context].block_submission = true; }