From patchwork Wed Jan 11 15:50:40 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: 3875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3397088wrt; Wed, 11 Jan 2023 07:54:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXuLvN4SPwvgpr0ayRJgYYnGyxKNvF8SyfCagQPpzTNYHBoeSnsjSpwPuk34RSPzbbd99A7E X-Received: by 2002:aa7:8e59:0:b0:58b:453e:77e0 with SMTP id d25-20020aa78e59000000b0058b453e77e0mr3749988pfr.20.1673452496514; Wed, 11 Jan 2023 07:54:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673452496; cv=none; d=google.com; s=arc-20160816; b=qbuE82wHQebicbNTbwY0yct0q/fwbEQaihg16eTVb/tm7yO9K57f9SzMemslC03Fgi 1Y9s7MjTQQe7N3kOp/GL64BP9yl689amxbjAXLkh/UU7BPUmoZJDSI9KqcLKNyO9IcIX 630jeekAdmizGVdeiF4puoTrgAn80LZwlsqd/5eoYkm+yuvUR0a3TlqvEV74/2nDOOr1 yDUJlKauQAtREhYZu01uAmCeCuJcdpjNzGfY/70ZF/OzRPrPOQkgHUxinT7ff8FOnnJi lRaXIGek1LixXAoQjkoGOVhs+EonoqTTDe1Rour+8cOoBmD+Sx3F96M3cdKwLJLl1nAG jUVA== 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=4yrcISEtYLZVPggehKA/sFvFxBtT7bUVCPfY7QA8n2Y=; b=lFfAGRUQiEwEKMFKYQxcYYCYY/7H9pEGxk9/D59V+lOQgRgBrxbgwH3krNcMicnMW6 113OzjXgacnh947/IjpJUGzpVlMTq7PTBf0oXjzCM/ZIKahwnORPEv5fBhC448n3z8+L I5uqmCZ+9Ffi7l0V/YG6lJRB+bO9zdi/zJi5V8dGvMbgZc/TxHQxWuRiWISJSLUMD0vW o0G0i6FjSY/8zvJF33wBZjLRQe2NkKss3N0o0rd+8Ip7QJORUTMVGTm6gkCYpu5EKDyJ 1uw+himyZ+w0NAPfZoQpSjZ8379wlJs3e00KARSXZhvclDU+ahL7UekKQ1opXV5+xGVv /DRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=b1xwBMzS; 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 f22-20020a056a0022d600b005785dbe7066si15243406pfj.187.2023.01.11.07.54.41; Wed, 11 Jan 2023 07:54:56 -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=b1xwBMzS; 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 S239247AbjAKPvd (ORCPT + 99 others); Wed, 11 Jan 2023 10:51:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232320AbjAKPvM (ORCPT ); Wed, 11 Jan 2023 10:51:12 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7F8DFC4 for ; Wed, 11 Jan 2023 07:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673452244; bh=dejsgE3Ez/67WXZ8VD64EdJhbcaTHAeJCXvwM7APl2o=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=b1xwBMzSmZjZAGrMcc5ukE1wtNmAp3WxjkT4sWFQGR38WpcBunwCqGr1Zas1/jQyV S0LTaFpCMIYoNG4R4sXAKfrdwuzAsfts7CQ0Vuu03XbtK54ljfWRVavykPoV42HSB9 KU3tFGK8dZlaREldkf7dGk32PXdWG/MmogmvqYIc= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via ip-206.mailobj.net [213.182.55.206] Wed, 11 Jan 2023 16:50:44 +0100 (CET) X-EA-Auth: TMlNij5nhUdtDQ4SpLM6IYnEDTxtuqjBkguRcd4KwH/DlESbPp9RituNi8rLvrnlqMWLkEhVjODFBx/z+HL5Fr66OQ31zz/p Date: Wed, 11 Jan 2023 21:20:40 +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 v3 0/2] 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?1754742125199162626?= X-GMAIL-MSGID: =?utf-8?q?1754742125199162626?= 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 v3: Patch 1/2: fix checkpatch function parameter alignment complaint Patch 2/2: None 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(-)