Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2707451pxb; Fri, 17 Sep 2021 16:37:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm2u402bsp0OJHGehkolgJXRLwdhHOi+ncTVW7oNCj6vSbbWXpl1YHQh4edSMFjdmi3Y8O X-Received: by 2002:a92:c8d2:: with SMTP id c18mr9587067ilq.121.1631921827239; Fri, 17 Sep 2021 16:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631921827; cv=none; d=google.com; s=arc-20160816; b=Y6183HYZ+gSFJrRd83E/eF1qeCj7LPHODTbv95TP0DAwy6h8ZKDWosfpYXmMl0/2De EwJc70RC2235f8NgppByrpxyYRvnX5ND8HKmBJaAa5X0v1Tn1UBmzwByUBduoTKXtGTW H/Gk61fen7j+6ExLpLYCP4VhI05G1SiAx1WRKpH74fAgU/+qIu1CgXXRt4SlZKZp6wIa 2fCcsT0OOv1oMC2mB7RCthNJUZNheXhQSDB8J+DoB7xNLlA7CGXMB6aFmk5fwQHHjZOf qITvoUX3O+wkZdj/F1gSQmnlZAjQibmeBhfTNL5iRew8BVnK1jLDSby4nnfnPCdOhx6f KJ2Q== 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=7X1afZ73VKSyODOmfKxOaEasFjcfN4b6MQLd6Hy3k8E=; b=QHC0wm4koe2p44CcqYIK7jyH3zEpWV3epZgY08x22PlvFBT6gta9yqJ9jHyBClULnK VmcVkzqdVlQvvz+001BrA7waenMTMMuR/A+KLqCU03quFN5zScqizbKJwTz3JrSQzOL5 NM3HXad2PfNpB6sRalFUQUq7Gm/EGT2+A3wbbwgAsjaARf/Dh5UE1RuUIenSHMovyuNp YB3htSCH/ZADY+2Gw5o6SgN66NYdRKcZ1NiObR2QHbqc1NEr1Gqq8Sozb+fzaPhg2J1e ROorwMXlDzrKB2ikp+aMKIrdWE1EQUqJycW68J3w5z6Kfm8mEH4xNbeQC24/Kxy6VApt 7sjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b=Er3xcMkH; 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 r17si8665056iov.104.2021.09.17.16.36.55; Fri, 17 Sep 2021 16:37:07 -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=Er3xcMkH; 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 S235072AbhIQPc2 (ORCPT + 99 others); Fri, 17 Sep 2021 11:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234687AbhIQPc1 (ORCPT ); Fri, 17 Sep 2021 11:32:27 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38DE8C061764 for ; Fri, 17 Sep 2021 08:31:05 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id g11so9070272qtk.5 for ; Fri, 17 Sep 2021 08:31:05 -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=7X1afZ73VKSyODOmfKxOaEasFjcfN4b6MQLd6Hy3k8E=; b=Er3xcMkHW0Vd5RfakskLkNxvu6I+CSGw4v7JtnwtV+IUFBr19q+6slAsRatI7PbFTk 9VT0CMP4hPoWeZ4JgRzCV0XT7vaF8r3bSRZpgo4kIx8hyzfrvkC5Z/s2W8EOpwNmpDgS qEzdPEH8KT1m1/62h3M4j1Zc05hlau/qAgt2dIQqae+jvCXHdW+u2wR5hKU2lTgc1ZvP 3zYIBGcvDAN/C9kDi+ykBi/zazwH7XO9UxyVj3zG33fT06KJelUzUlO+R2WacTqIYyB0 aL3EkSwp5VDt6wJ7COgzOzgrGhpDskS57wTQ38WZouFAtyJtEdQf78lov2eDmfFmFhZV HwGg== 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=7X1afZ73VKSyODOmfKxOaEasFjcfN4b6MQLd6Hy3k8E=; b=3C6h/ugxPHGZWVCzYORJCvecgJhsXI6JgIK2qjlG6mOEsRV2QeDtiojZ+PA5VWMT5E nT+xmiq+AEEzhh9tBrfezxuRc9FvvbPQZh4FhHkM1xrTd1iFUbkruRRIOAEzmrjB1zaa 7jndp3V96Yxdxvfg3wL7QO9QSuU6uF5S5OwOV9rVHO2ZZHAjRZn0wkVochyiRJsWXHPV EnG2AbU8cTWnJnMG4frrz9YkviypG0lyqVJph7QJos1btyPM3nXPk4oJKAxy9wWf5tyv B1I+eZH1xC0SYQs/oh4q2hXHHwkaUDU8FkKBWsOwRST/tX67NpIkGoymMLG+IjaUdsUd 68IA== X-Gm-Message-State: AOAM5305zUz76cZaspAq2q3thjGpghW77ljZMoYnoZ1UE1aYD7Et5haX 0HrT/iFBZw4c4H2TZD4baVp2EA== X-Received: by 2002:ac8:7cb:: with SMTP id m11mr11330316qth.72.1631892664440; Fri, 17 Sep 2021 08:31:04 -0700 (PDT) Received: from localhost ([167.100.64.199]) by smtp.gmail.com with ESMTPSA id 69sm5573766qke.55.2021.09.17.08.31.03 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Sep 2021 08:31:04 -0700 (PDT) Date: Fri, 17 Sep 2021 11:31:02 -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 02/15] dmr/i915: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN() Message-ID: <20210917153102.GC2515@art_vandelay> References: <20210916211552.33490-1-greenfoo@u92.eu> <20210916211552.33490-3-greenfoo@u92.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210916211552.33490-3-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:39PM +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/i915/display/intel_display.c | 17 ++++------------- > 1 file changed, 4 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 134a6acbd8fb..997a16e85c85 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -13476,22 +13476,13 @@ void intel_display_resume(struct drm_device *dev) > if (state) > state->acquire_ctx = &ctx; > > - drm_modeset_acquire_init(&ctx, 0); > - > - while (1) { > - ret = drm_modeset_lock_all_ctx(dev, &ctx); > - if (ret != -EDEADLK) > - break; > - > - drm_modeset_backoff(&ctx); > - } > + DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret); > > - if (!ret) > - ret = __intel_display_resume(dev, state, &ctx); > + ret = __intel_display_resume(dev, state, &ctx); > > intel_enable_ipc(dev_priv); > - drm_modeset_drop_locks(&ctx); > - drm_modeset_acquire_fini(&ctx); > + > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > > if (ret) > drm_err(&dev_priv->drm, > -- > 2.33.0 > -- Sean Paul, Software Engineer, Google / Chromium OS