Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1513056rwl; Thu, 5 Jan 2023 14:58:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXu0Qhq9l3LKY8uaP7E4MkU1rCw7D3zQ8LRP9B6GUniMXU5AIS5oBtTwffZi77dMo0+vn6xV X-Received: by 2002:a62:506:0:b0:56d:d678:aecd with SMTP id 6-20020a620506000000b0056dd678aecdmr51546815pff.23.1672959507885; Thu, 05 Jan 2023 14:58:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672959507; cv=pass; d=google.com; s=arc-20160816; b=Wstr+HQBZsaSZeI+A8KTq33Q6Q3Id3gv5s6OatqVOKgoXUrPxDxU9rJqWdb/yxJcg9 23x3VYEBi/N/QLxF7Iwf025r9wAxVor3+p06ciEfIjF7OdSdDnnS5lB8E7a/ADWX+ilv nfaH6J3C8aUglvFsdxpVVIznB31XQolxp10YGFUk/zsR9Su+vWxj7C+GzSzzSaiA6lF0 uqQct9ovUWHKILQ2xz8Ya6+avdZcV5DIW6F0vHslPNGzNWlVYU15ui2PSMtCM08/kMF5 yDFX/vLdFj/ugOzQvV0DO0Ff2B3SWnaDUuXn46nr5VRl9HCjKmaP4rzdm6H50Ce3jp3m C8qw== 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=ACj02pL9UjXnarNCDg5NngEKwl8eyoHzv2FjmlkVq8R3NCzePTW/NGt+Uf+hk3/DLl RnhRrpmDmOIe/Z8lHvXaNXX3yocWOWB+WNRb8F1RJVzKxIi2KtwMx/xZzTgvzI5hYaQy e0TtXeZtHhqFBUFNQAFtbdCAV+tGQp7Fq//Wa9IuVPnR9eeAnrfXZrb00beAbtcJuvQx mmf5UPqE4imkKLZCTpdr+5BzQYo8j3Wld/DuChAzZJ5DLqeKQ9KomfE+1+RxGBWubzEe wiVWwrOkoJRcZECC00rf5V7wtWV80FV3Yny9bTaoZlabB5kHiiuy0k8qgM2TfJ2qrtGB 9GCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siddh.me header.s=zmail header.b=fTBDBeyU; 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 192-20020a6219c9000000b00581e2a41c28si20033335pfz.307.2023.01.05.14.58.20; Thu, 05 Jan 2023 14:58:27 -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=fTBDBeyU; 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 S235863AbjAEWZy (ORCPT + 57 others); Thu, 5 Jan 2023 17:25:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235894AbjAEWZp (ORCPT ); Thu, 5 Jan 2023 17:25:45 -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 E1DE36D532 for ; Thu, 5 Jan 2023 14:25:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672957510; cv=none; d=zohomail.in; s=zohoarc; b=HGUSY1UWBRGFRqu1Fs/T0Q3xNfSBc+BluPj8ej2gP52wzki0e94IbHMz+4kOzfEp85P9SPcUgqOUxp9CgLXtWaDoaF7+1G6mfpucCe6pl8ehR+GrGFeq85250cbC60gjZhNuwtW7L+5dGlz4yNJi9lUCheeHF9KSaLoYlhcSS3k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.in; s=zohoarc; t=1672957510; 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=SFMKPguyIZuBYmiSqrKdxPsEmbMYUL6Cnfi0JkDvMLAtmEYzVi9IctAZV9jGLDq0MbX6ejoWOl3E5FR6nsfc81R9NzR2ovqLG6WHgaVfGDltr4QK2qmEg9UbVX28MCZXc/kJavxIU4at85g1asiZt+nKaLB4mgdwIteung25QeQ= 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=1672957510; 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=fTBDBeyUOlOZdx3P/HeE8HSDz18BXQMo/OVi4zhGjG4XtJSYuYPBb5JYdXZB+VS9 Ohs1NxKeoPd4KQcT80L4oh7ey381QJ+wSQ+boBL7B8gk6QrEv7rmkR8IDzj8ZjhN9CV +Co2tergo4Z7CoonhiK2W50JTC9CCy/udsFvRVi4= Received: from kampyooter.. (110.226.31.37 [110.226.31.37]) by mx.zoho.in with SMTPS id 1672957509483808.6352086601697; Fri, 6 Jan 2023 03:55:09 +0530 (IST) From: Siddh Raman Pant To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Simon Ser , Jim Cromie Cc: dri-devel , linux-kernel Message-ID: Subject: [PATCH v4 10/10] drm/drm_lease: Remove usage of deprecated DRM_DEBUG_LEASE Date: Fri, 6 Jan 2023 03:55:01 +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