From: Jani Nikula <jani.nikula@intel.com>
To: Animesh Manna <animesh.manna@intel.com>, intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, jouni.hogander@intel.com,
arun.r.murthy@intel.com, Animesh Manna <animesh.manna@intel.com>
Subject: Re: [PATCH v2 6/6] drm/i915/alpm: Add debugfs for LOBF
Date: Mon, 15 Apr 2024 14:53:02 +0300 [thread overview]
Message-ID: <87sezm3krl.fsf@intel.com> (raw)
In-Reply-To: <20240412155243.2891996-7-animesh.manna@intel.com>
On Fri, 12 Apr 2024, Animesh Manna <animesh.manna@intel.com> wrote:
> For validation purpose add debugfs for LOBF.
>
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_alpm.c | 47 +++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_alpm.h | 2 +
> .../drm/i915/display/intel_display_debugfs.c | 2 +
> 3 files changed, 51 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
> index ae894c85233c..21dfc06952d7 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -339,3 +339,50 @@ void intel_alpm_configure(struct intel_dp *intel_dp)
> {
> lnl_alpm_configure(intel_dp);
> }
> +
> +static int i915_edp_lobf_support_show(struct seq_file *m, void *data)
> +{
> + struct intel_connector *connector = m->private;
> + struct intel_dp *intel_dp = intel_attached_dp(connector);
> +
> + seq_printf(m, "LOBF support: = %s",
> + str_yes_no(intel_dp->lobf_supported));
If you have individual debugfs files, where the name tells you what it's
about, what's the point in printing "LOBF support" here?
Moreover, please be more careful, this now prints "LOBF support: =
yes". And you'll want the \n in the end.
> +
> + return 0;
> +}
> +
> +DEFINE_SHOW_ATTRIBUTE(i915_edp_lobf_support);
> +
> +static int i915_edp_lobf_status_show(struct seq_file *m, void *data)
> +{
> + struct intel_connector *connector = m->private;
> + struct intel_dp *intel_dp = intel_attached_dp(connector);
> + const char *status;
> +
> + if (intel_dp->lobf_enabled)
> + status = "enabled";
> + else
> + status = "disabled";
> +
> + seq_printf(m, "LOBF: %s\n", status);
Ditto. But there's also str_enabled_disabled().
I mean you could have a read-only info file which prints all of this
info with the prefixes. But if it's one attribute per file, why have the
extra prints? Maybe it should be just alpm info? Idk.
BR,
Jani.
> +
> + return 0;
> +}
> +
> +DEFINE_SHOW_ATTRIBUTE(i915_edp_lobf_status);
> +
> +void intel_alpm_lobf_debugfs_add(struct intel_connector *connector)
> +{
> + struct drm_i915_private *i915 = to_i915(connector->base.dev);
> + struct dentry *root = connector->base.debugfs_entry;
> +
> + if (DISPLAY_VER(i915) >= 20 &&
> + connector->base.connector_type != DRM_MODE_CONNECTOR_eDP)
> + return;
> +
> + debugfs_create_file("i915_edp_lobf_supported", 0444, root,
> + connector, &i915_edp_lobf_support_fops);
> +
> + debugfs_create_file("i915_edp_lobf_status", 0444, root,
> + connector, &i915_edp_lobf_status_fops);
> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h b/drivers/gpu/drm/i915/display/intel_alpm.h
> index c341d2c2b7f7..66e81ed8b2fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.h
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.h
> @@ -11,6 +11,7 @@
> struct intel_dp;
> struct intel_crtc_state;
> struct drm_connector_state;
> +struct intel_connector;
>
> bool intel_dp_get_aux_less_alpm_status(struct intel_dp *intel_dp);
> bool intel_alpm_compute_params(struct intel_dp *intel_dp,
> @@ -19,5 +20,6 @@ void intel_alpm_compute_lobf_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *crtc_state,
> struct drm_connector_state *conn_state);
> void intel_alpm_configure(struct intel_dp *intel_dp);
> +void intel_alpm_lobf_debugfs_add(struct intel_connector *connector);
>
> #endif
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 0feffe8d4e45..ba1530149836 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -13,6 +13,7 @@
> #include "i915_debugfs.h"
> #include "i915_irq.h"
> #include "i915_reg.h"
> +#include "intel_alpm.h"
> #include "intel_crtc.h"
> #include "intel_de.h"
> #include "intel_crtc_state_dump.h"
> @@ -1542,6 +1543,7 @@ void intel_connector_debugfs_add(struct intel_connector *connector)
> intel_drrs_connector_debugfs_add(connector);
> intel_pps_connector_debugfs_add(connector);
> intel_psr_connector_debugfs_add(connector);
> + intel_alpm_lobf_debugfs_add(connector);
>
> if (connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
> connector_type == DRM_MODE_CONNECTOR_HDMIA ||
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-04-15 11:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 15:52 [PATCH v2 0/6] Link off between frames for edp Animesh Manna
2024-04-12 15:52 ` [PATCH v2 1/6] drm/i915/alpm: Move alpm parameters from intel_psr Animesh Manna
2024-04-12 15:52 ` [PATCH v2 2/6] drm/i915/alpm: Move alpm related code to a new file Animesh Manna
2024-04-15 11:46 ` Jani Nikula
2024-04-16 8:22 ` Manna, Animesh
2024-04-12 15:52 ` [PATCH v2 3/6] drm/display: Add missing aux less alpm wake related bits Animesh Manna
2024-04-12 15:52 ` [PATCH v2 4/6] drm/i915/alpm: Add compute config for lobf Animesh Manna
2024-04-15 10:06 ` Hogander, Jouni
2024-04-16 8:15 ` Manna, Animesh
2024-04-16 9:06 ` Hogander, Jouni
2024-04-15 11:47 ` Jani Nikula
2024-04-16 8:24 ` Manna, Animesh
2024-04-12 15:52 ` [PATCH v2 5/6] drm/i915/alpm: Enable lobf from source in ALPM_CTL Animesh Manna
2024-04-15 10:09 ` Hogander, Jouni
2024-04-16 8:20 ` Manna, Animesh
2024-04-16 9:10 ` Hogander, Jouni
2024-04-15 11:48 ` Jani Nikula
2024-04-16 8:36 ` Manna, Animesh
2024-04-12 15:52 ` [PATCH v2 6/6] drm/i915/alpm: Add debugfs for LOBF Animesh Manna
2024-04-15 10:14 ` Hogander, Jouni
2024-04-16 8:21 ` Manna, Animesh
2024-04-15 11:53 ` Jani Nikula [this message]
2024-04-16 8:43 ` Manna, Animesh
2024-04-15 12:58 ` ✗ Fi.CI.CHECKPATCH: warning for Link off between frames for edp (rev2) Patchwork
2024-04-15 12:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-04-15 13:08 ` ✗ Fi.CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sezm3krl.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=animesh.manna@intel.com \
--cc=arun.r.murthy@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.