Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2389955pxb; Fri, 17 Sep 2021 08:43:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1wFuheg5y+z2l/1iMA8cj+Au4f4100OgMxxjqB0HDx5kCYn4G0d5Bvu2t/jmhJtShPmpv X-Received: by 2002:aa7:da91:: with SMTP id q17mr12856981eds.276.1631893394949; Fri, 17 Sep 2021 08:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631893394; cv=none; d=google.com; s=arc-20160816; b=gD6w1EDb1HQABJTqBBZ3wqQewDGZqZRJrf2RLQ8FNJQ7zQ6kNpAPvWTTXopurwD1DL 7krAUpk2OOusFC0JL46p71ew7V/Y8xFDTB3rglmxgjH57u8QBgWcYak4Hv4fkfJraFRO r6fw1zi0K+2Kh3ZUDDG4bDLZersOsoUYgOM79SGp103z/g/iiiHuaZtFyhVyY2TPzw0I q420uRYDN+i2JGhtonVwvZ+iux9RMMvqx3Hxij5Ak2ZonliyZm7nREuZKi2tzC9JYxaQ 5QnI+FN4Jnk/km0p1mJ6VDLHrAq2Cx3zETxtje4/VrTon+yxQCSS/hQYX4SjJaTeDCy0 5g4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KHwshkfOobpUiyWJGT/sc1wahk7nb4ZeHc0Yrl5d/XE=; b=kMtipVG9Y9+oPLoD9VmVcaXCohSQ4gfp4ZSlnGcTPVNuU+Qb4hz8Drt/l1zabfl+3t tsXWtVriXGVJGVvD5PwqeFvUbUx+zOKSsw0jIU6FKaZyF8SuZwrOUg1B2KenKuqCm430 65yvU5gjExOB4nnsT+K1DMWDzxcyhgwSBo6g+M1FxSIJjOEGvKIRYivyF4S/sG7z78cr +qdA3zS1t6BIYewb/8My7ZYPc8uKP2oYqVlYlVkIRzPNjIXWy+RHub13qJ0CgTdCAW+3 lxv/KWrCiPffslU1JpQwetqRUvK3RzwvinVtyFFGcpWN4w5BrAcbh8/3/OL5u1m5h+eS Vsjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=POwr8Ra8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd5si8204102ejc.375.2021.09.17.08.42.48; Fri, 17 Sep 2021 08:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=POwr8Ra8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234037AbhIQPbY (ORCPT + 99 others); Fri, 17 Sep 2021 11:31:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbhIQPbX (ORCPT ); Fri, 17 Sep 2021 11:31:23 -0400 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1ECDC061574 for ; Fri, 17 Sep 2021 08:30:00 -0700 (PDT) Received: by mail-qv1-xf32.google.com with SMTP id gs10so6606168qvb.13 for ; Fri, 17 Sep 2021 08:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KHwshkfOobpUiyWJGT/sc1wahk7nb4ZeHc0Yrl5d/XE=; b=POwr8Ra8WFfBSIMITD2RubEZl7eQfdxtM2iafMf/fkRw/O+0FXSaT37UzJjFF6WEfY r/ZBrJdjRnRpamNC9aRJ1AE5ZJoSZE9Obu1M9D22mRc3d3BpvR/jtVTFwXIisu23LpFJ XEp9DzMqgBGkEUNDJVJE+6YIG7tSVb73g5w5svj0+P+FLbCtLlpMctxdT0U/eNwgyXnb 2mgatcLE6eh+reSYTc3tuviRvzBcIVL1EiSNkOtKAdGurf/Y8jyfmW5/isZj5/RHXrfL ZbD/JWXYuzDApDVyj9fuAE+huZIcVgoKOl335Rq4RQYhkcxZ5YO7qEOulnJhbrJKy8Ri jVVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KHwshkfOobpUiyWJGT/sc1wahk7nb4ZeHc0Yrl5d/XE=; b=o3eXCw2oKn9MO9oM+a3Fo7itbIXJw1bQsQRpNke9EUcruQxKeYfgx4m8wvPOQT5vH3 eC8DLpA72zVRmAX5vQckYKig+Eh55Zs47QqCL/ZXfsj7puw9GGSkvwC3qdA26HutLkcO NsZjGVQKB2IjoEG2XvZr5mosGlNaoHB7CDiD1IZjx/2RJfiwCXO4A+WPEdcEDyMkR0mz PsvN8wCc2s2uxszr9HSBtfaDb0oJsnwgKNJM5SguZPFdQvVecEKQnmviZTYofargRVxv W/PvhrMR0vuKcLdqqo0IwUjlDjVcxXfCZ8pzg0ie0MOdkO1Gz7oP5VeaHZmQNrnhyDv/ SVqQ== X-Gm-Message-State: AOAM533g1T3RIV2fQEEHb5kuP+f32avounBWOXb14R25VkA+qcXjNY57 GThCUFF98qTRKgdoljnIPZRhyA== X-Received: by 2002:a0c:dc12:: with SMTP id s18mr11664646qvk.67.1631892600201; Fri, 17 Sep 2021 08:30:00 -0700 (PDT) Received: from localhost ([167.100.64.199]) by smtp.gmail.com with ESMTPSA id s10sm4855841qko.134.2021.09.17.08.29.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Sep 2021 08:29:59 -0700 (PDT) Date: Fri, 17 Sep 2021 11:29:58 -0400 From: Sean Paul To: Fernando Ramos Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, sean@poorly.run, linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH 03/15] dmr/msm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN() Message-ID: <20210917152958.GB2515@art_vandelay> References: <20210916211552.33490-1-greenfoo@u92.eu> <20210916211552.33490-4-greenfoo@u92.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916211552.33490-4-greenfoo@u92.eu> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 11:15:40PM +0200, Fernando Ramos wrote: > As requested in Documentation/gpu/todo.rst, replace the boilerplate code > surrounding drm_modeset_lock_all_ctx() with DRM_MODESET_LOCK_ALL_BEGIN() > and DRM_MODESET_LOCK_ALL_END() > With the subject fixed (s/dmr/drm/), Reviewed-by: Sean Paul > Signed-off-by: Fernando Ramos > --- > drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c > index cabe15190ec1..c83db90b0e02 100644 > --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c > +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c > @@ -99,20 +99,18 @@ static void msm_disp_capture_atomic_state(struct msm_disp_state *disp_state) > { > struct drm_device *ddev; > struct drm_modeset_acquire_ctx ctx; > + int ret; > > disp_state->timestamp = ktime_get(); > > ddev = disp_state->drm_dev; > > - drm_modeset_acquire_init(&ctx, 0); > - > - while (drm_modeset_lock_all_ctx(ddev, &ctx) != 0) > - drm_modeset_backoff(&ctx); > + DRM_MODESET_LOCK_ALL_BEGIN(ddev, ctx, 0, ret); > > disp_state->atomic_state = drm_atomic_helper_duplicate_state(ddev, > &ctx); > - drm_modeset_drop_locks(&ctx); > - drm_modeset_acquire_fini(&ctx); > + > + DRM_MODESET_LOCK_ALL_END(ddev, ctx, ret); > } > > void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state) > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS