From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01795C4363A for ; Mon, 12 Oct 2020 02:09:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 940692078A for ; Mon, 12 Oct 2020 02:09:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="afbaQ4gV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 940692078A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A1126E20B; Mon, 12 Oct 2020 02:09:31 +0000 (UTC) Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id C5F2E6E1E0; Mon, 12 Oct 2020 02:09:30 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id d23so7762595pll.7; Sun, 11 Oct 2020 19:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ycYG7+4yZf0+EawqBCWFVGsugPtbJtT4YGGzzwI3EFY=; b=afbaQ4gVwtW7UpRdOzzW2yXOcH1/zUxpxTtkIMNtP7+mHx5erxv40REjWFquDcrnu7 aKtsd7Ny1Kgeb2np5L4Tk6gVFnLei/u8KKP6szTjkLPm8/XeQtaa3yieh71HEy7UOGob swQDSNZWnXlbMLD6bmylhV2w0o/B7ELqBaEaCxgihbIGhDKOK2Ishd2Dwphu8fiYzYbP hQvPa4GZSug7CD54x8aLpJGPlJ8ZcQNht/53yGmoYcmZddTLxtzv/R/btas+my/I0xqt ideudZNuUUDjVtj9Bze7+Jk/rPeOITf7g8aMOGvDLZexHzZ8XybPZFa8Av/MOpTPTF45 gGmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ycYG7+4yZf0+EawqBCWFVGsugPtbJtT4YGGzzwI3EFY=; b=Ja2R6xko7fxor+s1PrBEvYRCFG82uQMC3mwngrCdek069jiBrAitHtAH5YQj9DwCCk 7gPdfh+RF1WAassW13GQgm3vDHcelq+5KaGEyBq/okiBA+o6LOLSGPZYSyOZYdVmpgjp 589u5te2ZuA5+bVYIxly0tRu89RbVGrAU0MwY1D3v+OGNvta8twQLURVyTAxur/7wtt7 raQu4Yw7XvESIPHpYXSxNnEjvtSZwQXThgYPFiQkGX0G2IEm5nuXn7Y/BMj2eg9W+mCi bKfIJ3+ThaaAwBkvIZFQKj4xqGUqw+id0n0oDENOQZ6XuAX0PQxaptSuWmv1YKJVAtx0 9irA== X-Gm-Message-State: AOAM532vIaZYtiNbHeTzdO6Gb9DD4G8SdlGMCC5dNVnP7T/9RWdy+e6n 8VbCaqMbsIv1AYRf49yVBz5UJdTrCe0iErt5 X-Google-Smtp-Source: ABdhPJz4Kg/jGVAqQXCBqhA6ZjgK+Nv2BP6zRV2+ijSWDL3K4XKVh1dGgPPwaINSnIHTRCVz5ZZ9lg== X-Received: by 2002:a17:902:8307:b029:d3:89e2:7866 with SMTP id bd7-20020a1709028307b02900d389e27866mr21601707plb.42.1602468569792; Sun, 11 Oct 2020 19:09:29 -0700 (PDT) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id i1sm22456217pjh.52.2020.10.11.19.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 19:09:28 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 17/22] drm/msm: Drop struct_mutex from the retire path Date: Sun, 11 Oct 2020 19:09:44 -0700 Message-Id: <20201012020958.229288-18-robdclark@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201012020958.229288-1-robdclark@gmail.com> References: <20201012020958.229288-1-robdclark@gmail.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , "open list:DRM DRIVER FOR MSM ADRENO GPU" , David Airlie , "open list:DRM DRIVER FOR MSM ADRENO GPU" , open list , Sean Paul Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Rob Clark Now that we are not relying on dev->struct_mutex to protect the ring->submits lists, drop the struct_mutex lock. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/msm_gpu.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 8278a4df331a..a754e84b8b5d 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -707,7 +707,7 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring, msm_gem_active_put(&msm_obj->base); msm_gem_unpin_iova(&msm_obj->base, submit->aspace); - drm_gem_object_put_locked(&msm_obj->base); + drm_gem_object_put(&msm_obj->base); } pm_runtime_mark_last_busy(&gpu->pdev->dev); @@ -722,11 +722,8 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring, static void retire_submits(struct msm_gpu *gpu) { - struct drm_device *dev = gpu->dev; int i; - WARN_ON(!mutex_is_locked(&dev->struct_mutex)); - /* Retire the commits starting with highest priority */ for (i = 0; i < gpu->nr_rings; i++) { struct msm_ringbuffer *ring = gpu->rb[i]; @@ -756,15 +753,12 @@ static void retire_submits(struct msm_gpu *gpu) static void retire_worker(struct work_struct *work) { struct msm_gpu *gpu = container_of(work, struct msm_gpu, retire_work); - struct drm_device *dev = gpu->dev; int i; for (i = 0; i < gpu->nr_rings; i++) update_fences(gpu, gpu->rb[i], gpu->rb[i]->memptrs->fence); - mutex_lock(&dev->struct_mutex); retire_submits(gpu); - mutex_unlock(&dev->struct_mutex); } /* call from irq handler to schedule work to retire bo's */ -- 2.26.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel