From patchwork Tue Jan 10 18:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak R Varma X-Patchwork-Id: 3818 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2898390wrt; Tue, 10 Jan 2023 10:17:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXv+qb2pxg+544hb920eoHgncFZILVUPrbtkWNFPdHKoVr8y3GoT719GiYt25mhf9yynce+a X-Received: by 2002:a17:906:c24f:b0:7c0:efb9:bc0e with SMTP id bl15-20020a170906c24f00b007c0efb9bc0emr54494042ejb.62.1673374667544; Tue, 10 Jan 2023 10:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673374667; cv=none; d=google.com; s=arc-20160816; b=WZpkcSSuK1y7Ji/2EULIjts/KEeh169LPNQ0jyEGs2iVqfy20EDBjLhSnZJKa8rlVE zG6FS+7RJPnYRuANzzACBhL9eSc5lu6MvQyramTHlYVsCRexKSx5NuOfhn/gQWFWezsN vDo+Ay0IUQEJn9cGGuGxWwdI0F9bGqztcQLSK42yL4Q92GCAlRSqSNLMd6UsNyYv4rMf xoHVWBoCjdFxE2loctdrkk1QojDNoH6lPdIjsYkdceJWOvt7LMtBa0QrLARNTfuhh+K4 WUv/GYVPU2NDPojh+KKnEcBRuI/g/OwKsBBss9U35CrfyDDLCL7xze/PxUqRft1X+Tj3 2mzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=7l4ARWEUtVR0WggMbHVMOOjAWPJECrn0Zex0t4+m4Fo=; b=OouG8ESCyLErDt5Roam1m1hWFxiGnvn/jRBVDZJSr/FEiuam2bsSeiwQcFPc69oSWM tFdhB4mdbV6vcEdYO93R1i2CE7vCxSVovTs9FIGQVAr3ywlqY8YbcT67dX4xsEwtmqGK hnYi6z1STaXF2keYA49rVJbH7ZHewcj/moecSyKWlp9SLQsvf+eZ4+70LsHOOT7uZ2UT s4zH21liLVnk+mNEwANgP85brTFCF4gu7jXPeGjH+YoCz33T6gCkUCsMKkGVogbZFS2a GLoLEeyD8jSbzjN6s71LdmG1t+4qn1POTuHbrH885m+p2qYjevUtPSXfPICSHc21213O HwwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=Jn1YXEur; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xc2-20020a170907074200b007aeec2bf18fsi1611317ejb.543.2023.01.10.10.17.24; Tue, 10 Jan 2023 10:17:47 -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=fail header.i=@mailo.com header.s=mailo header.b=Jn1YXEur; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238987AbjAJSQr (ORCPT + 99 others); Tue, 10 Jan 2023 13:16:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238666AbjAJSQN (ORCPT ); Tue, 10 Jan 2023 13:16:13 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8976F958D for ; Tue, 10 Jan 2023 10:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673374469; bh=BP8fagD2rIBJsB+DjFjKHbnp/WzXsnoEt5DapCoyVWU=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=Jn1YXEur7bthJi5xxwfIkStoLuh4tBqDhZ9GjSAW8fs+0J5L6Uf59jCz/ZNA9Nm/Z yJ23slL+CIe5YnX9cbwA6ZT9QHQwLacRy9yaXBK3S0SMPGseQZWHfXAtJQQysYo8Qa Pxe1oFmxspxpsr2tBJMB3Q9Acw9ygUJVazgzxPhw= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Tue, 10 Jan 2023 19:14:29 +0100 (CET) X-EA-Auth: QNB2G+cU2H9ThzhKZlRn8Hg9+WHzGrrh9Qs6+1zlJ9VmyoQAT61YO+A7FAMrUmIwj/4NOqQHuch6mRZiyGECDgtiPBNBHvxG Date: Tue, 10 Jan 2023 23:44:24 +0530 From: Deepak R Varma To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar Subject: [PATCH 0/2 v2] drm/i915: Avoid full proxy f_ops debug attributes Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754660515358064219?= X-GMAIL-MSGID: =?utf-8?q?1754660515358064219?= This patch series proposes to replace a combination of DEFINE_SIMPLE_ATTRIBUTE() + debugfs_create_file() by a combination of DEFINE_DEBUGFS_ATTRIBUTE() + debugfs_create_file_unsafe(). The change reduced overhead in terms of managing the full proxy f_ops at runtime. The patches 1 & 2 covers for the DRRS and FBC f_ops debugfs attributes respectively. Following coccicheck make command helped identify this change: make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Changes in v2: - Individual patches clubbed in patch set - Update patch log message to include coccicheck make command Deepak R Varma (2): drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes drivers/gpu/drm/i915/display/intel_drrs.c | 8 ++++---- drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-)