Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp155804pxb; Fri, 17 Sep 2021 22:11:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySnE4Q1B7m3+MV3IctxzloGwXDO9/ZKcfuKxYeLSJYjLiF/TpJ78t9+7od4aHwtNgtOST5 X-Received: by 2002:a92:dc02:: with SMTP id t2mr10435760iln.126.1631941891840; Fri, 17 Sep 2021 22:11:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631941891; cv=none; d=google.com; s=arc-20160816; b=IR438Vb++DcVKRTUqZDnJTUKOFEZnu3Y4DPizaA4X4iS2z/FGdEc4Sk6OnxxAq5dGp dr+FgAJe7pcsqd4n1Pin4LxZFwFOIzytJqUCv1fHD58wJE5wgSZdnSBPB4gWk2LquTvi +A6gEXwRmnnXWClOa46nKG0MdfjNE0LT42bLMjthPl6KoIcwz2/11mzotukNNBuK2GVr nCLAu7yUjEg81Vxb9o8o/S2nGDRu6ngX39Wvg8zByumAighNRRwFnx1wFcxuzAKTopOy /Xple5ywbVMtmiVQlfu+gPzTEEItWcWC0DtYT1KksYSpxrBrSUy9WrojEsdTHWq2a2Cg lvDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=WMLpEFBE93jrQXCWdCpO4Ix/sm2jroLMl/pxBagZPTo=; b=JxVMq1ceLvlkmBw06wgLGsLXptrE+FR5B6M984BtwWB3r8wMv+Z6uDoZUumfV6OLvw BEXn8hfHJdsy7hjtJ/m7kbmaWxRmmT95aXHK/D1sZwOsm9I6YSd2t5g2fwejdK/6NDD+ 0danbLQSucjhGUPDtQKqSYvTEzocke/M8Vt+/B29QrSRWUDJgu8AgcsAz6gdRiNG/ZWI GL5n6g4hhxr4xZe/kU9BYLExzuJQ18AmhDqHgCvARoaV6GsTIHtjLtQqga3iTzP+DapA aPYbk/PTOoSKwHQJmXPCCICLsvNQ584yVvwhw6jIjtC1EL2BXuaAhIJwU3Le+gWvtalv RWtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@u92.eu header.s=fm3 header.b=UucEzm++; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=KaVrhnyA; 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 x8si8446803jaq.91.2021.09.17.22.11.20; Fri, 17 Sep 2021 22:11:31 -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=@u92.eu header.s=fm3 header.b=UucEzm++; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=KaVrhnyA; 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 S243317AbhIQW7D (ORCPT + 99 others); Fri, 17 Sep 2021 18:59:03 -0400 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]:50493 "EHLO wnew3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231954AbhIQW7C (ORCPT ); Fri, 17 Sep 2021 18:59:02 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.west.internal (Postfix) with ESMTP id A55D82B00BD5; Fri, 17 Sep 2021 18:57:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 17 Sep 2021 18:57:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u92.eu; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=WMLpEFBE93jrQXCWdCpO4Ix/sm2 jroLMl/pxBagZPTo=; b=UucEzm++DdPegc7AIie9vkXls9cdxOuR/tbOhB2OS3c yjHTAhpwwSY0t9ERGUGvilcYQB0+9Q0nFmwaCMtbG6psDnd6DyRQ1P+Q5Z/USqDY 7MUDYAcpYI0bL6tjSfdobTf7eYgVldkdeY7SfLWu6vd1UzBqdkAuaBtSNCeGTeXV ztNEY4IuVotlC9QZB3U5DhiYL9IRX+lnAYS1lZcakZaeC8yRqRWlLShiJcuWvq9p 2Ig66C5G0SgWxaid9PnmP2LQbpQUdxX7PH+mdvo4Jlg/NwpaBvT/ef7a+jZ9wIoj EwYlYY4LNAVBguuYxHiVYCTEkz2j4OAQnSk0qC7UQ1Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=WMLpEF BE93jrQXCWdCpO4Ix/sm2jroLMl/pxBagZPTo=; b=KaVrhnyA+J97tyCTA/B8PE OpUr6t8TFqt9xWbXvQu6jE4U2fcFTf+RmqDuOmd0KS2+OXe8ht5wZk1Yy30z56eS cvRnQcutN1iT33QTKWfcKEJJ6yaqUkIw/6270BOAPNYQI/PHZiKN+tGPb5Py4e+r 7EbfujsB++dWI+6YumBBTPRIOq1wBVZ/sTB2y1xXC35j/m6FdK8LdYeQOHOOvuQ7 6qP6H0XtZSlJ7u7Cd39sp1vsne4HuGNaZTf8HC1mQI6iJOipuPX6zg1IqxjtLNyh iv4peoPLj45XNiUf5yXyKdybk89V2n5Bdx+Fdqdnbj+XezNDnR7eIQzeCknMcDAg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehjedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttdejnecuhfhrohhmpefhvghrnhgr nhguohcutfgrmhhoshcuoehgrhgvvghnfhhoohesuhelvddrvghuqeenucggtffrrghtth gvrhhnpedvjeeifeelhfetiefhhfdthfefkefhhfeutdetvdfgvefgveefheffgfekjeef heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrh gvvghnfhhoohesuhelvddrvghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Sep 2021 18:57:34 -0400 (EDT) Date: Sat, 18 Sep 2021 00:57:31 +0200 From: Fernando Ramos To: Sean Paul Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, 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 12/15] drm/i915: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN() Message-ID: References: <20210916211552.33490-1-greenfoo@u92.eu> <20210916211552.33490-13-greenfoo@u92.eu> <20210917154830.GM2515@art_vandelay> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210917154830.GM2515@art_vandelay> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > int i; > > + int ret; > > Please move up with i Done! > > + DRM_MODESET_LOCK_ALL_END((&dev_priv->drm), ctx, ret); > > > > return 0; > > Return ret here Done! > > + struct drm_modeset_acquire_ctx ctx; > > int i; > > + int ret; > > Please move up with i Done! > > - drm_modeset_unlock_all(dev); > > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > > > > return 0; > > Return ret Done! > > - drm_modeset_unlock_all(dev); > > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > > > > return 0; > > Return ret Done! > > - drm_modeset_unlock_all(dev); > > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > > > > Check ret here and return an error if it's != 0 Done! > > @@ -1194,14 +1195,11 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data, > > if (ret != 0) > > goto out_unlock; > > > > - drm_modeset_unlock_all(dev); > > - i915_gem_object_put(new_bo); > > - > > - return 0; > > - > > out_unlock: > > - drm_modeset_unlock_all(dev); > > - i915_gem_object_put(new_bo); > > + DRM_MODESET_LOCK_ALL_END(dev, ctx, ret); > > + > > + if (params->flags & I915_OVERLAY_ENABLE) > > + i915_gem_object_put(new_bo); > > This function refactor is a bit more involved than the > s/drm_modeset_lock_all/DRM_MODESET_LOCK_ALL_*/ changes in the rest of the patch. > Could you split it out into a separate patch so it's not hidden away? Sure, no problem.