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=-3.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 97F2CC38A2A for ; Fri, 8 May 2020 11:03:15 +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 6BB52208CA for ; Fri, 8 May 2020 11:03:15 +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="cGnZ0+ZF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BB52208CA 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 033BE6EAE3; Fri, 8 May 2020 11:03:15 +0000 (UTC) Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F5AE6EAE3 for ; Fri, 8 May 2020 11:03:13 +0000 (UTC) Received: by mail-vs1-xe42.google.com with SMTP id s11so810528vsm.3 for ; Fri, 08 May 2020 04:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xsARK8m2kbq0Zr2zKJTKwOxWZK2b9prwvHMpuqEUsJE=; b=cGnZ0+ZF/Dx8pTwaHccjYE+sv8QDNdIrTeTdUueGoQQpqwxEgD5P7spn5lqDL3T1hH xBOYz3suUIVyNyxUDjr8ENFzWCf3sAXP0EVlb2ffYYGcMmrVYiBOq/bGK2BK+rK7Wxat PoU+z0UDXSKIyAazVWK9/DCKfYG+BfW4vJA9lTuY5hE+aFHmAW40owKTeex1dG/pCzF7 s4SSf2tm22GeMEPSNCHjiuajvOWvwZZ/GOpprxHSTGHDIuQqf/XJ2pK1xH5HHlyAXNTA xWybVQHKdZzobYQC9NCErKI763B0iuHm6wB7NPY3StdLFxY/75nDf0ircWN/9p1uOetI 7rNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xsARK8m2kbq0Zr2zKJTKwOxWZK2b9prwvHMpuqEUsJE=; b=UVGKO9foWFE+klA9SjsYadByr/2b3Ca+J0KkmUguZse1one9/rLBA3uDcLWIG42EaD fzeYp0WmP4u9UnkNOlkRFKr6lFVSrpRcm3BBRTbg3cOK3EU0QGkTbVi82s5DbUxDzj5B onXFTV5NStPvWBvy9Rd589BcRgMqqYGHdo/fs6v9ZYpW4yaQUwbwdS29ssjpostu5Ioq LYudsP9jsxeGjJZaAAZi5/wBQkNw0kZpR4OWpa8Y8jeHFEz5TXzs+6h5/iUKx2jsb+/T oQghqkOX7d3QTY+T430MgoLOFffE14JMHpeAcG402xD4tc7mt+SicEU6pYR9ZK3/Rd3u VgQQ== X-Gm-Message-State: AGi0PuY0/TaQgdtHYabDsO2okIbd0wU5bhnqpV9e1RNWCHu3izYzDSWK 0LfpzaejUPGJDibkt+6m8a1bwHwbna/s9smEzVqpRA== X-Google-Smtp-Source: APiQypLg2nw5JS30eG8gfMVjlZF4wIipc4S2/yOsZLaXmtS+vGoewtpS8IoEdUfGSOrd+rZntJigiKbfMoHIRnpR+68= X-Received: by 2002:a67:2c16:: with SMTP id s22mr1247832vss.85.1588935792154; Fri, 08 May 2020 04:03:12 -0700 (PDT) MIME-Version: 1.0 References: <20200507150822.114464-1-emil.l.velikov@gmail.com> <20200507150822.114464-11-emil.l.velikov@gmail.com> <20200508064053.GB1383626@phenom.ffwll.local> In-Reply-To: <20200508064053.GB1383626@phenom.ffwll.local> From: Emil Velikov Date: Fri, 8 May 2020 12:00:40 +0100 Message-ID: Subject: Re: [PATCH 10/36] drm/gem: add _locked suffix to drm_object_put To: Daniel Vetter 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: linux-arm-msm , Sean Paul , ML dri-devel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 8 May 2020 at 07:40, Daniel Vetter wrote: > > On Thu, May 07, 2020 at 04:07:56PM +0100, Emil Velikov wrote: > > From: Emil Velikov > > > > Vast majority of DRM (core and drivers) are struct_mutex free. > > > > As such we have only a handful of cases where the locked helper should > > be used. Make that stand out a little bit better. > > > > Done via the following script: > > > > __from=drm_gem_object_put > > __to=drm_gem_object_put_locked > > > > for __file in $(git grep --name-only --word-regexp $__from); do > > sed -i "s/\<$__from\>/$__to/g" $__file; > > done > > > > Cc: Rob Clark > > Cc: Sean Paul > > Cc: linux-arm-msm@vger.kernel.org > > Signed-off-by: Emil Velikov > > Since > > commit 48e7f18392c66f9b69ebac11c54f1a2e033ced54 > Author: Kristian H. Kristensen > Date: Wed Mar 20 10:09:08 2019 -0700 > > drm/msm: Implement .gem_free_object_unlocked > > msm doesn't need the struct_mutex in the bo_put anymore, the only reason > we had to use the _locked version here is historical accidents I think. > > I think you could convert these all to the _unlocked variant and then > entirely drop the _locked version. > Did not check the msm driver closely, but it makes sense. Let's keep that as follow-up series? We're already at 36 patches, plus mixing mostly mechanical and locking changes doesn't sound wise. > Once we have that we could move struct_mutex into each driver (at least > for msm and i915) since it's purely internal, and then wrap it in an > #ifdef CONFIG_DRM_LEGACY to gloriously sunset it all :-) > Indeed, we're nearly there. -Emil _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel