From patchwork Wed Aug 14 02:54:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 11093065 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 E4C1F912 for ; Wed, 14 Aug 2019 02:54:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFB052872A for ; Wed, 14 Aug 2019 02:54:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B09D22873F; Wed, 14 Aug 2019 02:54: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=-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 0A9252872A for ; Wed, 14 Aug 2019 02:54:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AFF886E21A; Wed, 14 Aug 2019 02:54:42 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F54F6E21A; Wed, 14 Aug 2019 02:54:40 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 467Z1Q3Zrpz9sN1; Wed, 14 Aug 2019 12:54:33 +1000 (AEST) Date: Wed, 14 Aug 2019 12:54:33 +1000 From: Stephen Rothwell To: Daniel Vetter , Intel Graphics , DRI , Dave Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi Message-ID: <20190814125433.20147fb7@canb.auug.org.au> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201702; t=1565751277; bh=pnshXtAEAaY0k7nVDf7DTgaFW2krmKG1q4o+k+yvbPU=; h=Date:From:To:Cc:Subject:From; b=MSegR/AvH8/o79fAuMHcrDSCK/M0pb7KnAPJrpbAhsRVGeefdLNr65v7lVcMMN7Tc K0U6s5L054IPTsOQx2oF2mFGgeUUPIPjB2Qj0PB/KmqzCVsKtfrEjerSLA/cP+u7UV Qd22ZgjS7P87zqDepi6oWCotZdhYFk8Idl092FKrkRbWClQ2LSI/IVXzughxycRZjx yOmjRxPH29ZnecSXbtGuIef5VwPFMmTBq+On4ksUnrJg+hYrjIOvMYeEToUgUv4pCA ur6UaFfbKlWaskzrN+NxaWSY/8mPmc0auEHWSgm+21C6wQ6qaMFZ9K/10B5tx6zFYl p2ID6CZetpwSA== Subject: [Intel-gfx] linux-next: manual merge of the drm-misc tree with the drm and drm-intel trees X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Felix Kuehling , Linux Kernel Mailing List , Linux Next Mailing List , Alex Deucher , Christian =?utf-8?b?S8O2bmln?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Hi all, Today's linux-next merge of the drm-misc tree got a conflict in: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c drivers/gpu/drm/i915/i915_vma.c drivers/gpu/drm/i915/i915_gem_batch_pool.c drivers/gpu/drm/i915/gem/i915_gem_object.c drivers/gpu/drm/i915/gt/intel_engine_pool.c between commits: a93615f900bd ("drm/i915: Throw away the active object retirement complexity") 12c255b5dad1 ("drm/i915: Provide an i915_active.acquire callback") cd2a4eaf8c79 ("drm/i915: Report resv_obj allocation failure") b40d73784ffc ("drm/i915: Replace struct_mutex for batch pool serialisation") ab2f7a5c18b5 ("drm/amdgpu: Implement VRAM wipe on release") 0c159ffef628 ("drm/i915/gem: Defer obj->base.resv fini until RCU callback") from the drm and drm-intel trees and commit: 52791eeec1d9 ("dma-buf: rename reservation_object to dma_resv") from the drm-misc tree. I fixed it up (see below and I added the following merge fix patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. From: Stephen Rothwell Date: Wed, 14 Aug 2019 12:48:39 +1000 Subject: [PATCH] drm: fix up fallout from "dma-buf: rename reservation_object to dma_resv" Signed-off-by: Stephen Rothwell Reviewed-by: Christian König Signed-off-by: Stephen Rothwell --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 +- drivers/gpu/drm/i915/gt/intel_engine_pool.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) +++ b/drivers/gpu/drm/i915/i915_vma.c @@@ -911,21 -951,16 +911,21 @@@ int i915_vma_move_to_active(struct i915 if (intel_fb_obj_invalidate(obj, ORIGIN_CS)) __i915_active_request_set(&obj->frontbuffer_write, rq); - reservation_object_add_excl_fence(vma->resv, &rq->fence); ++ dma_resv_add_excl_fence(vma->resv, &rq->fence); + obj->write_domain = I915_GEM_DOMAIN_RENDER; obj->read_domains = 0; + } else { - err = reservation_object_reserve_shared(vma->resv, 1); ++ err = dma_resv_reserve_shared(vma->resv, 1); + if (unlikely(err)) + return err; + - reservation_object_add_shared_fence(vma->resv, &rq->fence); ++ dma_resv_add_shared_fence(vma->resv, &rq->fence); + obj->write_domain = 0; } obj->read_domains |= I915_GEM_GPU_DOMAINS; + obj->mm.dirty = true; - if (flags & EXEC_OBJECT_NEEDS_FENCE) - __i915_active_request_set(&vma->last_fence, rq); - - export_fence(vma, rq, flags); + GEM_BUG_ON(!i915_vma_is_active(vma)); return 0; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index dfd4aa68c806..6ebe61e14f29 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -1242,7 +1242,7 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo) !(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE)) return; - reservation_object_lock(bo->base.resv, NULL); + dma_resv_lock(bo->base.resv, NULL); r = amdgpu_fill_buffer(abo, AMDGPU_POISON, bo->base.resv, &fence); if (!WARN_ON(r)) { @@ -1250,7 +1250,7 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo) dma_fence_put(fence); } - reservation_object_unlock(bo->base.resv); + dma_resv_unlock(bo->base.resv); } /** diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c index 3929c3a6b281..67dc61e02c9f 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_object.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c @@ -154,7 +154,7 @@ static void __i915_gem_free_object_rcu(struct rcu_head *head) container_of(head, typeof(*obj), rcu); struct drm_i915_private *i915 = to_i915(obj->base.dev); - reservation_object_fini(&obj->base._resv); + dma_resv_fini(&obj->base._resv); i915_gem_object_free(obj); GEM_BUG_ON(!atomic_read(&i915->mm.free_count)); diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pool.c b/drivers/gpu/drm/i915/gt/intel_engine_pool.c index 03d90b49584a..4cd54c569911 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_pool.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_pool.c @@ -43,12 +43,12 @@ static int pool_active(struct i915_active *ref) { struct intel_engine_pool_node *node = container_of(ref, typeof(*node), active); - struct reservation_object *resv = node->obj->base.resv; + struct dma_resv *resv = node->obj->base.resv; int err; - if (reservation_object_trylock(resv)) { - reservation_object_add_excl_fence(resv, NULL); - reservation_object_unlock(resv); + if (dma_resv_trylock(resv)) { + dma_resv_add_excl_fence(resv, NULL); + dma_resv_unlock(resv); } err = i915_gem_object_pin_pages(node->obj); -- 2.20.1 -- Cheers, Stephen Rothwell diff --cc drivers/gpu/drm/i915/i915_vma.c index 8be1bbef40e5,ebfd03d117cd..000000000000 --- a/drivers/gpu/drm/i915/i915_vma.c