Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6181678rwl; Mon, 9 Jan 2023 05:21:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXv+TvKmNWgAapYcT8O6yJDRUxuibMpIlSMnT/4jyN5zdspE5Uf//ujlqElwcy2mSlFamXsQ X-Received: by 2002:a17:907:9712:b0:7aa:491c:6cdf with SMTP id jg18-20020a170907971200b007aa491c6cdfmr68904227ejc.18.1673270506075; Mon, 09 Jan 2023 05:21:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673270506; cv=pass; d=google.com; s=arc-20160816; b=GEraxp2lJRVUXniDampAy6jg5gEkPhl9i/YF1mVu7coFlG9UZBwbJvuM8hB55U60+n YNmcC/e6Yw9Mphl7/C7KBCPq4y39crjhlg0nY19Dw5DnzDmA8GwIHXPDLaq+cPBnhegW rdzSuN3UsXBRUgb3QW6Ghhn2NfQmmsuiiYK7eHVDDLyC0N+RNnlfgs0SWYrzWYumdKQd 2mGi45y+OPGMeDA5U7m0T2D7KxPyHoHFZDo00qCsNmCdTfCLvbvmX7/HX1S0YyUub8xV X5ZhllkJx/O/hicnFClGs/xPWeZJF/DHz4b+ZIeXK+bDJ4H+Zm4siYukVjtImlzSWLfQ Y73Q== 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=4B/yhGIoBjfbicria+SnqvD0RZrkccqeOcCw0+ipmeg=; b=DZkQ8lnpb/BOgX059qSAAgD3O0y/o275xPxi9HBAVdM/of6PIcFFeaQsyN3FeJZyJC PxbbYL/1+72YLfbdiw9sBT9+9Mfy78Rdjh9T/Xt7HfU4mY932aYdlJIu+e4IpBwVTL57 h75Ic5hf5HpuQbC1hVOQnCVdyIXFI7cSstH6HgwQZk/RAsLuw3XbpujZpc/mzTavUKVz uSZBRj3BLla/tkRBzCu0HNwQ/rSlCvFFdD1LvCvuIFdqg0GSlchZy9n+CZI65bKvKUta tzjVXG03BmSx9mumf5z930Nmj9NxhUqRXVKe1EqIcI2yx8M58ec0C00VKbrNyrzCKkiJ +dSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=mDtK2Wpi; 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 a20-20020a17090680d400b00781d82a6fc9si7009034ejx.264.2023.01.09.05.21.31; Mon, 09 Jan 2023 05:21:46 -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=mDtK2Wpi; 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 S237179AbjAINDg (ORCPT + 53 others); Mon, 9 Jan 2023 08:03:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbjAINCl (ORCPT ); Mon, 9 Jan 2023 08:02:41 -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 C84251262E for ; Mon, 9 Jan 2023 05:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673269261; cv=none; d=zohomail.in; s=zohoarc; b=FdVT8a9dVH8KqlEHxZG9NcBU96O+uisUTqe2kxbTUlmHXw2+qndVUNVrE84xjYvK1GR0jkl05zu8GmZdlsPklJNULvHvAQ/ogzmZ8QbJq6lawsi8ZD6mdumhQP/TrMzs0Op5gMFRjmhaAOJL6APti14D2NT9dJ5Y1svOzQBJWFU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1673269261; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=4B/yhGIoBjfbicria+SnqvD0RZrkccqeOcCw0+ipmeg=; b=fCgo5eFzv8zw+Rr3lWorAIJ4MdfPtGbHqTLt3LN3INEscWGHHSq22cLLgX8q5+SnOmhrJCrswiYq9c+5GMHgz3H5IW3g9BPp8Tsu1gRvtn8Os9qyrc7NCQtKpsVYX6SDflKAMKaAAO9G0HUHCK7Do7q7iSa847h7d7EZt8d6G/Y= 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=1673269261; 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=4B/yhGIoBjfbicria+SnqvD0RZrkccqeOcCw0+ipmeg=; b=mDtK2WpiWloWduRQ82WtNsAI1mjChuZ/RNXkBskkdFmx1epHP/w1HVgFTt/YcHGg QePnMC29wVNgEddSyYEi1KcTRxub9S8M7OThO6qZntgl17NHg5Z8j9HaqFv1DXUvhNb xAIITt9ne/hdQyDmpl5b8vScjpYl7UmLDb+ikU/k= Received: from kampyooter.. (110.226.31.37 [110.226.31.37]) by mx.zoho.in with SMTPS id 1673269252990435.1243388913791; Mon, 9 Jan 2023 18:30:52 +0530 (IST) From: Siddh Raman Pant To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Simon Ser , Jim Cromie , Sam Ravnborg Cc: dri-devel , linux-kernel Message-ID: <71a443d705c62a217a3352b221b7a96c53bb1031.1673269059.git.code@siddh.me> Subject: [PATCH v6 10/10] drm/drm_lease: Remove usage of deprecated DRM_DEBUG_LEASE Date: Mon, 9 Jan 2023 18:30:35 +0530 X-Mailer: git-send-email 2.39.0 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.39.0