Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp343941rwj; Thu, 22 Dec 2022 08:24:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuSNHJupAncpPgrLKEsKEtR7q9CbElRfIWgpzg7oaEsCsprfvVLP3x9ADGQx9foSZdbnIBC X-Received: by 2002:a17:906:4cd2:b0:7c0:e5c6:2a74 with SMTP id q18-20020a1709064cd200b007c0e5c62a74mr4912620ejt.34.1671726252603; Thu, 22 Dec 2022 08:24:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671726252; cv=pass; d=google.com; s=arc-20160816; b=n8XJZ6BUhSpJBl+1pqZWGyuXIN7B6VEejC0m49V4YbfKiZyfuXBSP/lo+UPAwAqT8R NJnSZDOOPokA0BMA5E9T5XEV3K8onISfb0xFDdpq5MDZx3vOyB5iQu+T1SlJfkakYeUA cVpkKv0JgvnEcyC8R7WsoltPkVDWozqHeGKl9jeVh65U0N6ArtSgAjNHebIoFNGdECYk WXvkrH9QAniIyzm1nf26I2NYWoOJVPoeOuhn6VtST5EKhhc6j+lMq/ovYuxT+ie+1j8n G9uaIl/QcpxdTYZiA2vAWhD6/GbFcNKTAHoLsCaSiW6lsyPPoRuTULYHOUIV+/ZGHREp 4KYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:subject:message-id:cc:to:from :dkim-signature; bh=iZz7X6e3jG+2rIkRvN509bNCkZ80pmjJN8lTLn7L8aw=; b=wBmDZ6XTfFJP9wAKctUba7HUWrOgH8JgkdbOPVMxMASnDP/dde+WzP5gwfROcZN4ap XAIb3m+wwHMUzwjtq5OM3yerXAYSMMFS0YVzjsEF2MxxfO2yRp+bEhsgt7d64yJEf3LP +rwJ1WMGlRpczFM9k2OShAcHjdWvhlggZ2UrOeLX61X70ZRFkKYKANWvcMqilZcFJqJZ y4/Qd524c9Jqc8eg30Smn3MaC/I76C8ySjciLzqCdBGEVY6sAkQs9+/ws0H3V7mDnlYI OnMCZw0ybch2Bn0GoxQtUXI+yMHSM46UuNfrD55S3nsjVvwoEr92pHyO5BBg8+4vu4Nd 31MA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=e9kMocEB; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y20-20020a056402271400b0046a84b922a2si993142edd.499.2022.12.22.08.23.56; Thu, 22 Dec 2022 08:24:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=e9kMocEB; arc=pass (i=1 spf=pass spfdomain=siddh.me dkim=pass dkdomain=siddh.me dmarc=pass fromdomain=siddh.me>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siddh.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235227AbiLVPln (ORCPT + 67 others); Thu, 22 Dec 2022 10:41:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbiLVPla (ORCPT ); Thu, 22 Dec 2022 10:41:30 -0500 Received: from sender-of-o50.zoho.in (sender-of-o50.zoho.in [103.117.158.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29E8711453 for ; Thu, 22 Dec 2022 07:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671723652; cv=none; d=zohomail.in; s=zohoarc; b=TFaGR2XcNqR08I95QmCsDEI+2RsYKIgUe8iT6mzW8JNR6+uVtI48g68h4QH95JCPpDOfhrXbUBayvQ2nuOO+HRJ3FsEQdqvfU297dFjf++du/OEJcWHS+UfGHHX9Rs5Cut4d79hCq/QUJKQRt53qzFfgKQ4zF7B1ZiCKRJwyOew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1671723652; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=iZz7X6e3jG+2rIkRvN509bNCkZ80pmjJN8lTLn7L8aw=; b=IU64PLwoXT1GLArrrfI0nDsCJJd+fEhM88nAhLdhj83RD/9bCpHh4VvaFeUJZ9LFiIXcd04gIFBUD86x/QIlIqTweknJhwwB07xkr2y6TO+1DXR9zPZgeMUIAwE1Dd//2755bq0kceU+w6LxpsZ1YrtxmyWE8IyGwKiTdTChAxY= ARC-Authentication-Results: i=1; mx.zohomail.in; dkim=pass header.i=siddh.me; spf=pass smtp.mailfrom=code@siddh.me; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1671723652; s=zmail; d=siddh.me; i=code@siddh.me; h=From:From:To:To:Cc:Cc:Message-ID:Subject:Subject:Date:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=iZz7X6e3jG+2rIkRvN509bNCkZ80pmjJN8lTLn7L8aw=; b=e9kMocEBUsI03h4fI+PbQDjGMe3qoBDMTuaC1CQIOo1hokiTDCaiCEuiC8qjhE5h AT9Kw75SRIODili26mNQa1Dis8fsTQeYaSdxHG+QaB3v0kGqlqheLMyNKx2HYySY8Ic IPFLjRKynn968e/K+7d7BKGLqW97pLBZ/V2fGJaE= Received: from kampyooter.. (110.226.31.37 [110.226.31.37]) by mx.zoho.in with SMTPS id 16717236509871003.0139285664518; Thu, 22 Dec 2022 21:10:50 +0530 (IST) From: Siddh Raman Pant To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Simon Ser Cc: dri-devel , linux-kernel Message-ID: <1a9995a54f7309b4d120582b36ebb7950d5ddeba.1671723195.git.code@siddh.me> Subject: [PATCH v2 9/9] drm/drm_lease: Remove usage of deprecated DRM_DEBUG_LEASE Date: Thu, 22 Dec 2022 21:10:43 +0530 X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset=utf8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org drm_print.h says DRM_DEBUG_LEASE is deprecated in favor of drm_dbg_lease(). Signed-off-by: Siddh Raman Pant Reviewed-by: Simon Ser --- drivers/gpu/drm/drm_lease.c | 64 ++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c index c442d5e766d1..08b4f29f8b61 100644 --- a/drivers/gpu/drm/drm_lease.c +++ b/drivers/gpu/drm/drm_lease.c @@ -213,11 +213,11 @@ static struct drm_master *drm_lease_create(struct drm= _master *lessor, struct idr =09int id; =09void *entry; =20 -=09DRM_DEBUG_LEASE("lessor %d\n", lessor->lessee_id); +=09drm_dbg_lease(dev, "lessor %d\n", lessor->lessee_id); =20 =09lessee =3D drm_master_create(lessor->dev); =09if (!lessee) { -=09=09DRM_DEBUG_LEASE("drm_master_create failed\n"); +=09=09drm_dbg_lease(dev, "drm_master_create failed\n"); =09=09return ERR_PTR(-ENOMEM); =09} =20 @@ -231,7 +231,7 @@ static struct drm_master *drm_lease_create(struct drm_m= aster *lessor, struct idr =09=09=09error =3D -EBUSY; =20 =09=09if (error !=3D 0) { -=09=09=09DRM_DEBUG_LEASE("object %d failed %d\n", object, error); +=09=09=09drm_dbg_lease(dev, "object %d failed %d\n", object, error); =09=09=09goto out_lessee; =09=09} =09} @@ -249,7 +249,8 @@ static struct drm_master *drm_lease_create(struct drm_m= aster *lessor, struct idr =20 =09/* Move the leases over */ =09lessee->leases =3D *leases; -=09DRM_DEBUG_LEASE("new lessee %d %p, lessor %d %p\n", lessee->lessee_id, = lessee, lessor->lessee_id, lessor); +=09drm_dbg_lease(dev, "new lessee %d %p, lessor %d %p\n", +=09=09 lessee->lessee_id, lessee, lessor->lessee_id, lessor); =20 =09mutex_unlock(&dev->mode_config.idr_mutex); =09return lessee; @@ -268,7 +269,7 @@ void drm_lease_destroy(struct drm_master *master) =20 =09mutex_lock(&dev->mode_config.idr_mutex); =20 -=09DRM_DEBUG_LEASE("drm_lease_destroy %d\n", master->lessee_id); +=09drm_dbg_lease(dev, "drm_lease_destroy %d\n", master->lessee_id); =20 =09/* This master is referenced by all lessees, hence it cannot be destroy= ed =09 * until all of them have been @@ -277,7 +278,8 @@ void drm_lease_destroy(struct drm_master *master) =20 =09/* Remove this master from the lessee idr in the owner */ =09if (master->lessee_id !=3D 0) { -=09=09DRM_DEBUG_LEASE("remove master %d from device list of lessees\n", ma= ster->lessee_id); +=09=09drm_dbg_lease(dev, "remove master %d from device list of lessees\n", +=09=09=09 master->lessee_id); =09=09idr_remove(&(drm_lease_owner(master)->lessee_idr), master->lessee_id= ); =09} =20 @@ -292,7 +294,7 @@ void drm_lease_destroy(struct drm_master *master) =09=09drm_master_put(&master->lessor); =09} =20 -=09DRM_DEBUG_LEASE("drm_lease_destroy done %d\n", master->lessee_id); +=09drm_dbg_lease(dev, "drm_lease_destroy done %d\n", master->lessee_id); } =20 static void _drm_lease_revoke(struct drm_master *top) @@ -308,7 +310,8 @@ static void _drm_lease_revoke(struct drm_master *top) =09 * the tree is fully connected, we can do this without recursing =09 */ =09for (;;) { -=09=09DRM_DEBUG_LEASE("revoke leases for %p %d\n", master, master->lessee_= id); +=09=09drm_dbg_lease(master->dev, "revoke leases for %p %d\n", +=09=09=09 master, master->lessee_id); =20 =09=09/* Evacuate the lease */ =09=09idr_for_each_entry(&master->leases, entry, object) @@ -408,7 +411,7 @@ static int fill_object_idr(struct drm_device *dev, =20 =09ret =3D validate_lease(dev, object_count, objects, universal_planes); =09if (ret) { -=09=09DRM_DEBUG_LEASE("lease validation failed\n"); +=09=09drm_dbg_lease(dev, "lease validation failed\n"); =09=09goto out_free_objects; =09} =20 @@ -418,7 +421,7 @@ static int fill_object_idr(struct drm_device *dev, =09=09struct drm_mode_object *obj =3D objects[o]; =09=09u32 object_id =3D objects[o]->id; =20 -=09=09DRM_DEBUG_LEASE("Adding object %d to lease\n", object_id); +=09=09drm_dbg_lease(dev, "Adding object %d to lease\n", object_id); =20 =09=09/* =09=09 * We're using an IDR to hold the set of leased @@ -430,8 +433,8 @@ static int fill_object_idr(struct drm_device *dev, =09=09 */ =09=09ret =3D idr_alloc(leases, &drm_lease_idr_object , object_id, object_= id + 1, GFP_KERNEL); =09=09if (ret < 0) { -=09=09=09DRM_DEBUG_LEASE("Object %d cannot be inserted into leases (%d)\n"= , -=09=09=09=09=09object_id, ret); +=09=09=09drm_dbg_lease(dev, "Object %d cannot be inserted into leases (%d)= \n", +=09=09=09=09 object_id, ret); =09=09=09goto out_free_objects; =09=09} =09=09if (obj->type =3D=3D DRM_MODE_OBJECT_CRTC && !universal_planes) { @@ -439,15 +442,15 @@ static int fill_object_idr(struct drm_device *dev, =20 =09=09=09ret =3D idr_alloc(leases, &drm_lease_idr_object, crtc->primary->b= ase.id, crtc->primary->base.id + 1, GFP_KERNEL); =09=09=09if (ret < 0) { -=09=09=09=09DRM_DEBUG_LEASE("Object primary plane %d cannot be inserted in= to leases (%d)\n", -=09=09=09=09=09=09object_id, ret); +=09=09=09=09drm_dbg_lease(dev, "Object primary plane %d cannot be inserted= into leases (%d)\n", +=09=09=09=09=09 object_id, ret); =09=09=09=09goto out_free_objects; =09=09=09} =09=09=09if (crtc->cursor) { =09=09=09=09ret =3D idr_alloc(leases, &drm_lease_idr_object, crtc->cursor-= >base.id, crtc->cursor->base.id + 1, GFP_KERNEL); =09=09=09=09if (ret < 0) { -=09=09=09=09=09DRM_DEBUG_LEASE("Object cursor plane %d cannot be inserted = into leases (%d)\n", -=09=09=09=09=09=09=09object_id, ret); +=09=09=09=09=09drm_dbg_lease(dev, "Object cursor plane %d cannot be insert= ed into leases (%d)\n", +=09=09=09=09=09=09 object_id, ret); =09=09=09=09=09goto out_free_objects; =09=09=09=09} =09=09=09} @@ -490,14 +493,14 @@ int drm_mode_create_lease_ioctl(struct drm_device *de= v, =09=09return -EOPNOTSUPP; =20 =09if (cl->flags && (cl->flags & ~(O_CLOEXEC | O_NONBLOCK))) { -=09=09DRM_DEBUG_LEASE("invalid flags\n"); +=09=09drm_dbg_lease(dev, "invalid flags\n"); =09=09return -EINVAL; =09} =20 =09lessor =3D drm_file_get_master(lessor_priv); =09/* Do not allow sub-leases */ =09if (lessor->lessor) { -=09=09DRM_DEBUG_LEASE("recursive leasing not allowed\n"); +=09=09drm_dbg_lease(dev, "recursive leasing not allowed\n"); =09=09ret =3D -EINVAL; =09=09goto out_lessor; =09} @@ -520,7 +523,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, =09=09=09=09 object_count, object_ids); =09=09kfree(object_ids); =09=09if (ret) { -=09=09=09DRM_DEBUG_LEASE("lease object lookup failed: %i\n", ret); +=09=09=09drm_dbg_lease(dev, "lease object lookup failed: %i\n", ret); =09=09=09idr_destroy(&leases); =09=09=09goto out_lessor; =09=09} @@ -534,7 +537,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, =09=09goto out_lessor; =09} =20 -=09DRM_DEBUG_LEASE("Creating lease\n"); +=09drm_dbg_lease(dev, "Creating lease\n"); =09/* lessee will take the ownership of leases */ =09lessee =3D drm_lease_create(lessor, &leases); =20 @@ -545,7 +548,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, =09} =20 =09/* Clone the lessor file to create a new file for us */ -=09DRM_DEBUG_LEASE("Allocating lease file\n"); +=09drm_dbg_lease(dev, "Allocating lease file\n"); =09lessee_file =3D file_clone_open(lessor_file); =09if (IS_ERR(lessee_file)) { =09=09ret =3D PTR_ERR(lessee_file); @@ -560,7 +563,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, =09lessee_priv->authenticated =3D 1; =20 =09/* Pass fd back to userspace */ -=09DRM_DEBUG_LEASE("Returning fd %d id %d\n", fd, lessee->lessee_id); +=09drm_dbg_lease(dev, "Returning fd %d id %d\n", fd, lessee->lessee_id); =09cl->fd =3D fd; =09cl->lessee_id =3D lessee->lessee_id; =20 @@ -568,7 +571,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, =09fd_install(fd, lessee_file); =20 =09drm_master_put(&lessor); -=09DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl succeeded\n"); +=09drm_dbg_lease(dev, "drm_mode_create_lease_ioctl succeeded\n"); =09return 0; =20 out_lessee: @@ -579,7 +582,7 @@ int drm_mode_create_lease_ioctl(struct drm_device *dev, =20 out_lessor: =09drm_master_put(&lessor); -=09DRM_DEBUG_LEASE("drm_mode_create_lease_ioctl failed: %d\n", ret); +=09drm_dbg_lease(dev, "drm_mode_create_lease_ioctl failed: %d\n", ret); =09return ret; } =20 @@ -601,7 +604,7 @@ int drm_mode_list_lessees_ioctl(struct drm_device *dev, =09=09return -EOPNOTSUPP; =20 =09lessor =3D drm_file_get_master(lessor_priv); -=09DRM_DEBUG_LEASE("List lessees for %d\n", lessor->lessee_id); +=09drm_dbg_lease(dev, "List lessees for %d\n", lessor->lessee_id); =20 =09mutex_lock(&dev->mode_config.idr_mutex); =20 @@ -610,7 +613,8 @@ int drm_mode_list_lessees_ioctl(struct drm_device *dev, =09=09/* Only list un-revoked leases */ =09=09if (!idr_is_empty(&lessee->leases)) { =09=09=09if (count_lessees > count) { -=09=09=09=09DRM_DEBUG_LEASE("Add lessee %d\n", lessee->lessee_id); +=09=09=09=09drm_dbg_lease(dev, "Add lessee %d\n", +=09=09=09=09=09 lessee->lessee_id); =09=09=09=09ret =3D put_user(lessee->lessee_id, lessee_ids + count); =09=09=09=09if (ret) =09=09=09=09=09break; @@ -619,7 +623,7 @@ int drm_mode_list_lessees_ioctl(struct drm_device *dev, =09=09} =09} =20 -=09DRM_DEBUG_LEASE("Lessor leases to %d\n", count); +=09drm_dbg_lease(dev, "Lessor leases to %d\n", count); =09if (ret =3D=3D 0) =09=09arg->count_lessees =3D count; =20 @@ -651,7 +655,7 @@ int drm_mode_get_lease_ioctl(struct drm_device *dev, =09=09return -EOPNOTSUPP; =20 =09lessee =3D drm_file_get_master(lessee_priv); -=09DRM_DEBUG_LEASE("get lease for %d\n", lessee->lessee_id); +=09drm_dbg_lease(dev, "get lease for %d\n", lessee->lessee_id); =20 =09mutex_lock(&dev->mode_config.idr_mutex); =20 @@ -665,7 +669,7 @@ int drm_mode_get_lease_ioctl(struct drm_device *dev, =09count =3D 0; =09idr_for_each_entry(object_idr, entry, object) { =09=09if (count_objects > count) { -=09=09=09DRM_DEBUG_LEASE("adding object %d\n", object); +=09=09=09drm_dbg_lease(dev, "adding object %d\n", object); =09=09=09ret =3D put_user(object, object_ids + count); =09=09=09if (ret) =09=09=09=09break; @@ -696,7 +700,7 @@ int drm_mode_revoke_lease_ioctl(struct drm_device *dev, =09struct drm_master *lessee; =09int ret =3D 0; =20 -=09DRM_DEBUG_LEASE("revoke lease for %d\n", arg->lessee_id); +=09drm_dbg_lease(dev, "revoke lease for %d\n", arg->lessee_id); =20 =09/* Can't lease without MODESET */ =09if (!drm_core_check_feature(dev, DRIVER_MODESET)) --=20 2.35.1