From patchwork Fri Dec 17 00:20:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 524986 Delivered-To: patch@linaro.org Received: by 2002:adf:eccd:0:0:0:0:0 with SMTP id s13csp871363wro; Thu, 16 Dec 2021 16:22:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7jZZ+Hnw+xgpy4BDj5jWdCAXfhJqmrQ0ABBJFQ2uNnhXsuxhZzsnepEumQfZO069YckuP X-Received: by 2002:a63:d04d:: with SMTP id s13mr568513pgi.151.1639700360407; Thu, 16 Dec 2021 16:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639700360; cv=none; d=google.com; s=arc-20160816; b=yUKKmztFGNhJ6bjun/v6QDgzDad+8HZacjU+v/QuWHWNc301pYsAPMFYq4YSZRSCU0 YPEcTGmCtTIAvOQLt73xbpXXF8SHZBAIiXi9EZahtQDqxkBIkibXIGmkHQYl+05bx8g1 AyUhg6PDSSyZtXQslE30ISQPwEtQwTnW2cC8X24bXUPG1EV1WppibM9FWEZGgnxuoB5W wQcwEzIdSIFr7g4+VvI3T9Uchqs52qO72Q4ktYViROgEfrWJZbiCCuAfaaWZBwtc4R1K 4y/ZjqNcHZ2QOm68qr7YwkRi8lFPRJL7SEIGVbVzLKrFnIY+we5W1ZHQP6Ga0K+J51x+ ndfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=ENSn6IuB+oeiV3yKnojaUGUax2jZ8l/NgiJmlnlGRM8=; b=TQoU0IK/XiKApUj0O/dgDrXXKEr0ox1TV5i2u/GhT8/9w5wepOajwrAzA680m1gfj/ IBe6FCJcb3dJw8Q2hompVpPd3Rq4xqcH5zpBLJTcozARFh5TxOIaVtbE0/rwr0Ds8lp7 1DhzDUm5wFHahu/P8zj7NTQzGRttpeey54hMwtkyToB9tnVt2U/sH81l8I2Wr9Uu1uqF zhfPkaE5SwDFmwP5v2OqkQD81/cAC4RohAaOfTytvPVPdEdYKjbKZzpNZvvVk8f4LMh4 o3HTIokWJWiqge4PlXOXUkoGCoIXGv+RGXIecgO3YW6Ur7NUjCwnuV7l5l4u16B8GKZS pfFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="fhm/OhQ/"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id z1si8390698pgc.101.2021.12.16.16.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 16:19:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="fhm/OhQ/"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABE0D10E1EF; Fri, 17 Dec 2021 00:19:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E81910E1BF for ; Fri, 17 Dec 2021 00:19:14 +0000 (UTC) Received: by mail-oi1-x233.google.com with SMTP id bk14so1264357oib.7 for ; Thu, 16 Dec 2021 16:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ENSn6IuB+oeiV3yKnojaUGUax2jZ8l/NgiJmlnlGRM8=; b=fhm/OhQ/sdR+Qhsb/I9XemcDSyVjaGBVqHbNBNF1QmgT+42HuyhEMSP79YqVh+pF3b dEpBWDTMly9uAy9dTi7R526EUDNhxh5Z8oDmMBdDr/dvWyMA9dqEnuz6RQiW08Hb1bEE ecE6Na4fYfIEHhtpSTPyTcEn/Noi5OzKJI0GwFoDPHvQZSrYqxNHbQQCO3e9w/cbGBHd 684j/j1/IJ10n3aDlFRCcvNhAl/SzDtwOKVYZP9c5nPAVgRkj9P0Q3yguLDqMAdUqCsM J4VlevGliw6ez+TD1DpXBBFmZn92ZXPYF3wo3197RqdBBnLEbVQ29yDHUiqKe0MULALF WgvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ENSn6IuB+oeiV3yKnojaUGUax2jZ8l/NgiJmlnlGRM8=; b=vifs1hY7xsOQOASmhVmJ7ymK0ov4qLXwAHUafjAxxkLLQhCTfqtMmAlo2KatHjH5Dk 2MxCLoYPLcDpFzU6e9tR97KRUxz13huoVxrJfUR9ygzNEsjYRQZxqRBdNIclL43Htpmw gkiTYO6JgDXEzSYcnyq8sc/RLKXcbe9QZNYdSNKKy8yX4gzvWFyZjLvRhVxfGU6fogAw 099yGN3d8/AFPdh4ZjdEnfPDiQcQ0SzK08J7f7sWMwxG8fdqt4yBc8bN+IYWGCBVHsXC CU6ocvqotjfyClBLSsb0CA6q0BAWbkePYQB+hscLA2R5JuVNXaKa0+BTUs0Yb3a2C0B1 f8eA== X-Gm-Message-State: AOAM531kAHUy4TXqORiHYCRZGD6zXPWxu9Ntr5aE7zyoLKg/GZR7DrCy kP0kIrLf6HbQBxPRuTit7REuMQ== X-Received: by 2002:a05:6808:209b:: with SMTP id s27mr255871oiw.43.1639700353143; Thu, 16 Dec 2021 16:19:13 -0800 (PST) Received: from ripper.. (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id e14sm1261737oie.7.2021.12.16.16.19.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 16:19:12 -0800 (PST) From: Bjorn Andersson To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov Subject: [PATCH v2] drm/msm/dp: Only create debugfs for PRIMARY minor Date: Thu, 16 Dec 2021 16:20:26 -0800 Message-Id: <20211217002026.2304973-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sean Paul , David Airlie , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" dpu_kms_debugfs_init() is invoked for each minor being registered. Most of the files created are unrelated to the minor, so there's no reason to present them per minor. The exception to this is the DisplayPort code, which ends up invoking dp_debug_get() for each minor, each time associate the allocated object with dp->debug. As such dp_debug will create debugfs files in both the PRIMARY and the RENDER minor's debugfs directory, but only the last reference will be remembered. The only use of this reference today is in the cleanup path in dp_display_deinit_sub_modules() and the dp_debug_private object does outlive the debugfs entries in either case, so there doesn't seem to be any adverse effects of this, but per the code the current behavior is unexpected, so change it to only create debugfs files for the PRIMARY minor. Signed-off-by: Bjorn Andersson Reviewed-by: Abhinav Kumar --- Changes since v1: - Moved the check up from msm_dp_debugfs_init() to dpu_kms_debugfs_init() drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 2ee70072a1b4..a54f7d373f14 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -193,6 +193,10 @@ static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) if (!p) return -EINVAL; + /* Only create one set of debugfs per DP instance */ + if (minor->type != DRM_MINOR_PRIMARY) + return 0; + dev = dpu_kms->dev; priv = dev->dev_private;