Message ID | MWHPR1201MB012793ED40432A2B0353C583FDCC0@MWHPR1201MB0127.namprd12.prod.outlook.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> 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 33BF9602DC for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 23 Feb 2018 09:48:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 313AA294CC for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 23 Feb 2018 09:48:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2397E294D1; Fri, 23 Feb 2018 09:48:40 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 A6B06294CC for <patchwork-dri-devel@patchwork.kernel.org>; Fri, 23 Feb 2018 09:48:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8D146F08A; Fri, 23 Feb 2018 09:48:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0083.outbound.protection.outlook.com [104.47.36.83]) by gabe.freedesktop.org (Postfix) with ESMTPS id E8CAA6F086; Fri, 23 Feb 2018 09:48:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MURUekEKRrPrEXGS5gju65fWpwjy74cxFgrh63w6qE0=; b=KZ0qlnyKPrSIO+RnvCY1bHF5UxwxLGeHYl2vfG32lWwvOMzb4Na6iO9Fxqi0vtJlztj8tr+PDA5GtV3NODeBw2icjxZyfq0gEHD8XmyOJvERkZH52MVaAhboxK47i6hbmS2/7YQnJL9D/48epSrh3Q2oqjsbvK3OeNQnIwa/OBE= Received: from MWHPR1201MB0127.namprd12.prod.outlook.com (10.174.98.142) by MWHPR1201MB0064.namprd12.prod.outlook.com (10.174.98.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Fri, 23 Feb 2018 09:48:33 +0000 Received: from MWHPR1201MB0127.namprd12.prod.outlook.com ([10.174.98.142]) by MWHPR1201MB0127.namprd12.prod.outlook.com ([10.174.98.142]) with mapi id 15.20.0485.022; Fri, 23 Feb 2018 09:48:33 +0000 From: "He, Roger" <Hongbo.He@amd.com> To: =?utf-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= <ckoenig.leichtzumerken@gmail.com>, "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>, "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: RE: [PATCH 2/4] drm/amdgpu: use new ww_mutex_is_owned_by function Thread-Topic: [PATCH 2/4] drm/amdgpu: use new ww_mutex_is_owned_by function Thread-Index: AQHTqkqIvom5e7gHz065IIcIszu5faOxwkmg Date: Fri, 23 Feb 2018 09:48:33 +0000 Message-ID: <MWHPR1201MB012793ED40432A2B0353C583FDCC0@MWHPR1201MB0127.namprd12.prod.outlook.com> References: <20180220125829.27060-1-christian.koenig@amd.com> <20180220125829.27060-2-christian.koenig@amd.com> In-Reply-To: <20180220125829.27060-2-christian.koenig@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Hongbo.He@amd.com; x-originating-ip: [116.228.147.241] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; MWHPR1201MB0064; 7:fLkoVpVu33rgHYAcY6ZBHxbkse6tJZpCKzxCTrD62+15dAq5JrgLyQ1d+gsF8ogBG860KklRqG5QZnzJRk2wR0+r+bK8AAbq/buCK/13t7PoxFRowU0V6DH2AkIoGbxE8KKFTJV+CuxZgFoCM8O6nyAcszLD11Ga/SJ/ip/dTSl3p3luRXghprrlWHKzHHxjVnbbyssUD3Clq9CSYB8Ofd54k9OqjEgbGCdhmT91qaGt0k38kA60Y5o0WQ8ctKYF; 20:5qzaCtvlOQq5G7Z/nRDqEFXSKxAl+PCmS7Vp2rLchLpQAPV4yGy07rZvAQE3/Oj/tJvPik9jl2RNCEcWiFUyY0XcJTuL27S1p5gkqDSteKtr76SlclGuoeaUDm11m/hI98VJ7FulzjQT0ThhmSisXfiy7duMvdak9Rmxc19YT/5GXiA3Wm7TEmYs/eWMpKPJ+sFrxgUqC0Zo79woT/LwTZmP22yObmD6uijY/iFNEz91bTFOCIVDRoDOXua/O9pW x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 9e6e6c08-3022-44c7-1102-08d57aa29a93 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7153060)(7193020); SRVR:MWHPR1201MB0064; x-ms-traffictypediagnostic: MWHPR1201MB0064: x-microsoft-antispam-prvs: <MWHPR1201MB0064413E963A47A40DC6F4F8FDCC0@MWHPR1201MB0064.namprd12.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(9452136761055)(767451399110)(217544274631240); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001082)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231101)(944501161)(10201501046)(6055026)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR1201MB0064; BCL:0; PCL:0; RULEID:; SRVR:MWHPR1201MB0064; x-forefront-prvs: 0592A9FDE6 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(376002)(346002)(39380400002)(189003)(199004)(13464003)(6246003)(25786009)(39060400002)(2501003)(3846002)(6116002)(110136005)(33656002)(2900100001)(97736004)(2906002)(575784001)(316002)(99286004)(2201001)(86362001)(9686003)(72206003)(77096007)(966005)(74316002)(2950100002)(26005)(7736002)(305945005)(186003)(478600001)(6506007)(59450400001)(68736007)(102836004)(53936002)(5660300001)(8676002)(81156014)(3660700001)(81166006)(6436002)(53546011)(14454004)(8936002)(55016002)(229853002)(6306002)(106356001)(3280700002)(66066001)(76176011)(105586002)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR1201MB0064; H:MWHPR1201MB0127.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 62zM0AqHowvpPAkiu1y3bc8ngl2X1SCmn8qFNvlmId4G36V4JuuQbRHr+9MkrQ2QApmYRkQYZwOKery1fjUKymk+6I4C2ya5Sw3LgOX1aJJArYVIEPZcHujujgeUxBluKM5OwhdD1bQnZKce7fwzeZYGRebhOIZTKShqfoyQkpA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e6e6c08-3022-44c7-1102-08d57aa29a93 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Feb 2018 09:48:33.8319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1201MB0064 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index eaa3cb0c3ad1..6db26a3144dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1594,7 +1594,7 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser, *map = mapping; /* Double check that the BO is reserved by this CS */ - if (READ_ONCE((*bo)->tbo.resv->lock.ctx) != &parser->ticket) + if (!ww_mutex_is_owned_by(&(*bo)->tbo.resv->lock, &parser->ticket)) return -EINVAL; if (!((*bo)->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)) {