From patchwork Fri Apr 5 18:40:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Singh Rawat X-Patchwork-Id: 10887741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E91591575 for ; Fri, 5 Apr 2019 18:40:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2B8328AB7 for ; Fri, 5 Apr 2019 18:40:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C702628AF7; Fri, 5 Apr 2019 18:40:54 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 7C12E28AB7 for ; Fri, 5 Apr 2019 18:40:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 45AB589FE6; Fri, 5 Apr 2019 18:40:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-eopbgr810085.outbound.protection.outlook.com [40.107.81.85]) by gabe.freedesktop.org (Postfix) with ESMTPS id 15FAF89FE6 for ; Fri, 5 Apr 2019 18:40:52 +0000 (UTC) Received: from BL0PR05MB5233.namprd05.prod.outlook.com (20.177.242.28) by BL0PR05MB5330.namprd05.prod.outlook.com (10.167.233.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1771.15; Fri, 5 Apr 2019 18:40:47 +0000 Received: from BL0PR05MB5233.namprd05.prod.outlook.com ([fe80::40f5:3b8:9a54:9377]) by BL0PR05MB5233.namprd05.prod.outlook.com ([fe80::40f5:3b8:9a54:9377%7]) with mapi id 15.20.1771.014; Fri, 5 Apr 2019 18:40:47 +0000 From: Deepak Singh Rawat To: "dri-devel@lists.freedesktop.org" Subject: [PATCH 09/11] drm/vmwgfx: Use VMW_DEBUG_USER for device command buffer errors Thread-Topic: [PATCH 09/11] drm/vmwgfx: Use VMW_DEBUG_USER for device command buffer errors Thread-Index: AQHU698V+EqAjCJFhkCU/+K6clBTfg== Date: Fri, 5 Apr 2019 18:40:47 +0000 Message-ID: <20190405184024.4452-9-drawat@vmware.com> References: <20190405184024.4452-1-drawat@vmware.com> In-Reply-To: <20190405184024.4452-1-drawat@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BYAPR05CA0069.namprd05.prod.outlook.com (2603:10b6:a03:74::46) To BL0PR05MB5233.namprd05.prod.outlook.com (2603:10b6:208:88::28) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [66.170.99.2] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e854cea6-320b-4e46-205d-08d6b9f637fa x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020); SRVR:BL0PR05MB5330; x-ms-traffictypediagnostic: BL0PR05MB5330: x-ld-processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0998671D02 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(39860400002)(346002)(366004)(376002)(189003)(199004)(102836004)(107886003)(25786009)(3846002)(316002)(5640700003)(7736002)(6116002)(36756003)(26005)(81156014)(8936002)(2906002)(50226002)(6436002)(8676002)(81166006)(6506007)(1076003)(4326008)(68736007)(76176011)(71200400001)(256004)(54906003)(386003)(86362001)(305945005)(71190400001)(6486002)(5660300002)(2501003)(99286004)(14454004)(97736004)(105586002)(186003)(2351001)(6916009)(6512007)(52116002)(106356001)(66066001)(2616005)(476003)(446003)(11346002)(53936002)(486006)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR05MB5330; H:BL0PR05MB5233.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: wpribnGKYih9gWV7j9kittLis4Wh+UWUVbSVFK4PU/6tmVwdiwKVNZQxzj9J5Bwz2E9uMA0Rl8YhGwuRySnRop9hk9J/f2+53nDTVAbg4bXnvZOAgX7qf+4bhIQ+p+78Z9Mm5YJfbhir1CINM9Y+Je3Ex8sq6ALKqP1olXNvXCkPWB14ONTJwNfqL1cNfHQc2utw/QhdEpjSbgHrF5jpHE13fGDIHAITZQX7bN5JZTJxuhPN7auYEHPCQz8esXyhMIKCLsguQocxS/Yv5b5si+jM9kddOGltkd9F1gkjWUlHuMgF1y7OsWS/7gpuQ1GfZedRDUE6uVUHv7HZ1gZvPvdL1V0/wXkkojvPk2W0vdYgPmZwMFtML+TBAov/rbV/yPWnVwH3wBALaNCnXiHVPReYyLbVZM/O/S+jsoBE8lA= MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: e854cea6-320b-4e46-205d-08d6b9f637fa X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2019 18:40:47.6423 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR05MB5330 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jv2iYiwyRYhgwjn94s0+KNTdC5QOTeUoCx9ijTDZjuo=; b=G9t4dvo4xcmcprALO67a6fPlhzRNbFMTQsopuZH5ZZys4vubpyCX2qQrFi2to4vTAtc5KFfvQBLufV9kDJN+bGNPfX4q1FM+NbzapXskoyndBrR1hlgb4eS9+VjyvJpjzn8bZep8D9TMtb2TllvERjI6k4EyzVEPt5m4L3OKyW0= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=drawat@vmware.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Deepak Singh Rawat , Linux-graphics-maintainer Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP DRM_ERROR overwhelms dmesgi so use VMW_DEBUG_USER instead. Any malformed command should not really go to device so WARN_ONCE to spot this. Signed-off-by: Deepak Rawat Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c index ed15655eacd2..56979e412ca8 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c @@ -393,6 +393,7 @@ static void vmw_cmdbuf_ctx_process(struct vmw_cmdbuf_man *man, __vmw_cmdbuf_header_free(entry); break; case SVGA_CB_STATUS_COMMAND_ERROR: + WARN_ONCE(true, "Command buffer error.\n"); entry->cb_header->status = SVGA_CB_STATUS_NONE; list_add_tail(&entry->list, &man->error); schedule_work(&man->work); @@ -533,19 +534,20 @@ static void vmw_cmdbuf_work_func(struct work_struct *work) global_block = true; if (!vmw_cmd_describe(header, &error_cmd_size, &cmd_name)) { - DRM_ERROR("Unknown command causing device error.\n"); - DRM_ERROR("Command buffer offset is %lu\n", - (unsigned long) cb_hdr->errorOffset); + VMW_DEBUG_USER("Unknown command causing device error.\n"); + VMW_DEBUG_USER("Command buffer offset is %lu\n", + (unsigned long) cb_hdr->errorOffset); __vmw_cmdbuf_header_free(entry); send_fence = true; continue; } - DRM_ERROR("Command \"%s\" causing device error.\n", cmd_name); - DRM_ERROR("Command buffer offset is %lu\n", - (unsigned long) cb_hdr->errorOffset); - DRM_ERROR("Command size is %lu\n", - (unsigned long) error_cmd_size); + VMW_DEBUG_USER("Command \"%s\" causing device error.\n", + cmd_name); + VMW_DEBUG_USER("Command buffer offset is %lu\n", + (unsigned long) cb_hdr->errorOffset); + VMW_DEBUG_USER("Command size is %lu\n", + (unsigned long) error_cmd_size); new_start_offset = cb_hdr->errorOffset + error_cmd_size;