From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/debugfs: remove i915_dpcd file
Date: Wed, 29 Jan 2020 13:57:38 +0200 [thread overview]
Message-ID: <20200129115738.GU13686@intel.com> (raw)
In-Reply-To: <20200117150551.9836-1-jani.nikula@intel.com>
On Fri, Jan 17, 2020 at 05:05:51PM +0200, Jani Nikula wrote:
> We've long had the more generic /dev/drm_dp_auxN devices for the same
> purpose. Drop the redundant and limited DPCD debugfs file.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 64 -----------------------------
> 1 file changed, 64 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index c05fa4205de8..e320b957b792 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4329,65 +4329,6 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
> minor->debugfs_root, minor);
> }
>
> -struct dpcd_block {
> - /* DPCD dump start address. */
> - unsigned int offset;
> - /* DPCD dump end address, inclusive. If unset, .size will be used. */
> - unsigned int end;
> - /* DPCD dump size. Used if .end is unset. If unset, defaults to 1. */
> - size_t size;
> - /* Only valid for eDP. */
> - bool edp;
> -};
> -
> -static const struct dpcd_block i915_dpcd_debug[] = {
> - { .offset = DP_DPCD_REV, .size = DP_RECEIVER_CAP_SIZE },
> - { .offset = DP_PSR_SUPPORT, .end = DP_PSR_CAPS },
> - { .offset = DP_DOWNSTREAM_PORT_0, .size = 16 },
> - { .offset = DP_LINK_BW_SET, .end = DP_EDP_CONFIGURATION_SET },
> - { .offset = DP_SINK_COUNT, .end = DP_ADJUST_REQUEST_LANE2_3 },
> - { .offset = DP_SET_POWER },
> - { .offset = DP_EDP_DPCD_REV },
> - { .offset = DP_EDP_GENERAL_CAP_1, .end = DP_EDP_GENERAL_CAP_3 },
> - { .offset = DP_EDP_DISPLAY_CONTROL_REGISTER, .end = DP_EDP_BACKLIGHT_FREQ_CAP_MAX_LSB },
> - { .offset = DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET, .end = DP_EDP_DBC_MAXIMUM_BRIGHTNESS_SET },
> -};
> -
> -static int i915_dpcd_show(struct seq_file *m, void *data)
> -{
> - struct drm_connector *connector = m->private;
> - struct intel_dp *intel_dp =
> - enc_to_intel_dp(intel_attached_encoder(to_intel_connector(connector)));
> - u8 buf[16];
> - ssize_t err;
> - int i;
> -
> - if (connector->status != connector_status_connected)
> - return -ENODEV;
> -
> - for (i = 0; i < ARRAY_SIZE(i915_dpcd_debug); i++) {
> - const struct dpcd_block *b = &i915_dpcd_debug[i];
> - size_t size = b->end ? b->end - b->offset + 1 : (b->size ?: 1);
> -
> - if (b->edp &&
> - connector->connector_type != DRM_MODE_CONNECTOR_eDP)
> - continue;
> -
> - /* low tech for now */
> - if (WARN_ON(size > sizeof(buf)))
> - continue;
> -
> - err = drm_dp_dpcd_read(&intel_dp->aux, b->offset, buf, size);
> - if (err < 0)
> - seq_printf(m, "%04x: ERROR %d\n", b->offset, (int)err);
> - else
> - seq_printf(m, "%04x: %*ph\n", b->offset, (int)err, buf);
> - }
> -
> - return 0;
> -}
> -DEFINE_SHOW_ATTRIBUTE(i915_dpcd);
> -
> static int i915_panel_show(struct seq_file *m, void *data)
> {
> struct drm_connector *connector = m->private;
> @@ -4552,11 +4493,6 @@ int i915_debugfs_connector_add(struct drm_connector *connector)
> if (!root)
> return -ENODEV;
>
> - if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
> - connector->connector_type == DRM_MODE_CONNECTOR_eDP)
> - debugfs_create_file("i915_dpcd", S_IRUGO, root,
> - connector, &i915_dpcd_fops);
> -
> if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
> debugfs_create_file("i915_panel_timings", S_IRUGO, root,
> connector, &i915_panel_fops);
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-01-29 11:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 15:05 [Intel-gfx] [PATCH] drm/i915/debugfs: remove i915_dpcd file Jani Nikula
2020-01-18 0:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-01-18 0:38 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2020-01-20 18:51 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2020-01-29 11:57 ` Ville Syrjälä [this message]
2020-01-29 12:06 ` [Intel-gfx] [PATCH] " Jani Nikula
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=20200129115738.GU13686@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox