Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp568207yba; Fri, 12 Apr 2019 09:06:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqykZ/5utALs2alrCs7jXcr8ovwIipSc02vy59bWWYAXCSTLLAElBSpPVpl4sJpjJb4jFzx/ X-Received: by 2002:a63:614c:: with SMTP id v73mr53459823pgb.395.1555085189902; Fri, 12 Apr 2019 09:06:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555085189; cv=none; d=google.com; s=arc-20160816; b=hUozEpeY4katm+GKZVthqsIh+791YVXN5sXIQBjlzVtOTL/K41VClmIkKLcBFdu9Tu JkrnztusiJsUBp5JmCqZ1U0Gq3y1c8CAKM+xSxBmgLUJOao1gEIBDtw3vyuWlZmmM1sO 1iJ3HXJdqoHN0OzR5MDf2Tbtf3/jhc9moiDIh8Fkm+/u0bCwWO7+j1wqoyWyXYQBSazv Venietx/TKXMJwYwOB7ULNllh1V/0aggnyzI/F2V8xEbxPZ4IyJdeoTo3p8moYyEazFk 8eV1rNxT0sI40wXdT5znEVEqjQMtDtiPvuXNreB+9+akE7rvK2ecYaZQ5qJVDn6O/000 7SXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=fs75xpU6o9YbigRr9rq9X7v7KyvhsIeFEr62OvZ3q5s=; b=KAJNQyCGHUuMVgtvP2ChvhOUCwNwnO+mfZQVmDuQPdcXKwUcXNB+I3pxW+Tby3dNXb jfuO1w2tGQV7SdbEigxtzjFUNd66yIxlAY3FNHCp1P9FyRL/xB1XpFQ32e0OBYKFjTgM cOqKg9Cy3c+g9H9ilVPGPwN9u+oaxtVoOCZ68hAFTTXonoCXWEP3B0fIIgGW43F4xdZe IUb+YLDj0bO4Z4fEPeoc+Qxkf/sGr/PmLecZwb24XipzvOkhmH7e3f60iGauKRpJ6b74 xUtJy54mlOnT3nqWJd8iKnRMAGe1at83w4hgW4kWPBH/TBKpD2j/jrlEL2E2RRX8N0vY hfwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vmware.com header.s=selector1 header.b=ebCrAARM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si32958841plz.387.2019.04.12.09.06.13; Fri, 12 Apr 2019 09:06:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@vmware.com header.s=selector1 header.b=ebCrAARM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727230AbfDLQFS (ORCPT + 99 others); Fri, 12 Apr 2019 12:05:18 -0400 Received: from mail-eopbgr800080.outbound.protection.outlook.com ([40.107.80.80]:63072 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726755AbfDLQFR (ORCPT ); Fri, 12 Apr 2019 12:05:17 -0400 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=fs75xpU6o9YbigRr9rq9X7v7KyvhsIeFEr62OvZ3q5s=; b=ebCrAARMNBrr1JvkWYe/p5YAl5UmP2o9LZQAKt/NvigZvW9eVpnnas2aGU6sBZ9u9VmI08zaVBA5giKqj94/0y4RhARd/dvwIgqqOJQVxMOMHAupdXIJQpfRe/o8P7xh9L5RmIuApMjBnCyDgh9AFRB6yEg9eTcwf+k6BE7PAio= Received: from MN2PR05MB6141.namprd05.prod.outlook.com (20.178.241.217) by MN2PR05MB6030.namprd05.prod.outlook.com (20.178.241.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.9; Fri, 12 Apr 2019 16:04:32 +0000 Received: from MN2PR05MB6141.namprd05.prod.outlook.com ([fe80::91e:292d:e304:78ad]) by MN2PR05MB6141.namprd05.prod.outlook.com ([fe80::91e:292d:e304:78ad%7]) with mapi id 15.20.1792.009; Fri, 12 Apr 2019 16:04:31 +0000 From: Thomas Hellstrom To: "dri-devel@lists.freedesktop.org" , Linux-graphics-maintainer , "linux-kernel@vger.kernel.org" CC: Thomas Hellstrom Subject: [PATCH 9/9] drm/vmwgfx: Add surface dirty-tracking callbacks Thread-Topic: [PATCH 9/9] drm/vmwgfx: Add surface dirty-tracking callbacks Thread-Index: AQHU8UlqFLnynglV10eZ2smkgN8z3A== Date: Fri, 12 Apr 2019 16:04:31 +0000 Message-ID: <20190412160338.64994-10-thellstrom@vmware.com> References: <20190412160338.64994-1-thellstrom@vmware.com> In-Reply-To: <20190412160338.64994-1-thellstrom@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VE1PR03CA0023.eurprd03.prod.outlook.com (2603:10a6:802:a0::35) To MN2PR05MB6141.namprd05.prod.outlook.com (2603:10b6:208:c7::25) authentication-results: spf=none (sender IP is ) smtp.mailfrom=thellstrom@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [155.4.205.35] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f897f792-0461-497e-4d54-08d6bf608c67 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328)(7193020);SRVR:MN2PR05MB6030; x-ms-traffictypediagnostic: MN2PR05MB6030: x-ld-processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0005B05917 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(136003)(366004)(346002)(376002)(39860400002)(396003)(199004)(189003)(110136005)(25786009)(476003)(2616005)(71190400001)(6512007)(53946003)(2906002)(186003)(486006)(316002)(68736007)(1076003)(6486002)(6436002)(446003)(19627235002)(478600001)(3846002)(71200400001)(6116002)(11346002)(99286004)(256004)(14444005)(14454004)(2501003)(8676002)(107886003)(66066001)(7736002)(4326008)(6506007)(81166006)(36756003)(81156014)(386003)(97736004)(102836004)(50226002)(106356001)(30864003)(52116002)(5660300002)(53936002)(8936002)(305945005)(76176011)(26005)(86362001)(105586002)(14143004)(579004)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR05MB6030;H:MN2PR05MB6141.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: vtmLkbpZz1T8M/eWVAAJp02qGHNWDZ/ZxpJITLK7TWA7vh3UotfQuUnFBZI20HPDvME3GEt9hm2kfNCMNX+K3EBSPJuLXeU6Aauk7WtFCbL055PjFEiBG6CLHGOPKWAG93YwgK5hgswmMaI3sCDP/YfDY2drQ0GCuC1TCmhlLtvQPJpvA2aE1MHRYpaLm2aL4TakY5qzqHbD0f9hRb9GO49KqI98P/tCERdVjVmTfdZAdHHNDC2J9AzG96mJI//Lkazc4ucP7wS9A/G8ejpOPpbDyMNbjyXLLqCECt8DUhVpqDTSEY78Ur5+oKF3j1Nodegy6ELAaI60FPaia8MWwkegYv2WT0bm8vFBqYIfXaYM6iaYVMNjxFAIu8RjQ+IBHnQ4jeHvI70X2XiVP/eYBh0OFntqowRIlIwHHVubgiQ= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: f897f792-0461-497e-4d54-08d6bf608c67 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Apr 2019 16:04:31.8914 (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: MN2PR05MB6030 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWRkIHRoZSBjYWxsYmFja3MgbmVjZXNzYXJ5IHRvIGltcGxlbWVudCBlbXVsYXRlZCBjb2hlcmVu dCBtZW1vcnkgZm9yDQpzdXJmYWNlcy4gQWRkIGEgZmxhZyB0byB0aGUgZ2Jfc3VyZmFjZV9jcmVh dGUgaW9jdGwgdG8gaW5kaWNhdGUgdGhhdA0Kc3VyZmFjZSBtZW1vcnkgc2hvdWxkIGJlIGNvaGVy ZW50Lg0KQWxzbyBidW1wIHRoZSBkcm0gbWlub3IgdmVyc2lvbiB0byBzaWduYWwgdGhlIGF2YWls YWJpbGl0eSBvZiBjb2hlcmVudA0Kc3VyZmFjZXMuDQoNClNpZ25lZC1vZmYtYnk6IFRob21hcyBI ZWxsc3Ryb20gPHRoZWxsc3Ryb21Adm13YXJlLmNvbT4NCi0tLQ0KIC4uLi9kZXZpY2VfaW5jbHVk ZS9zdmdhM2Rfc3VyZmFjZWRlZnMuaCAgICAgICB8IDIwOSArKysrKysrKystDQog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