All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "Nikula, Jani" <jani.nikula@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/psr: switch PSR debugfs to struct intel_connector
Date: Mon, 20 Mar 2023 08:50:30 +0000	[thread overview]
Message-ID: <cd1b3b54968eb1c955e73f4f154d0453b4bcdeb7.camel@intel.com> (raw)
In-Reply-To: <20230317134144.223936-2-jani.nikula@intel.com>

On Fri, 2023-03-17 at 15:41 +0200, Jani Nikula wrote:
> Prefer struct intel_connector over struct drm_connector.

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> 
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 23 ++++++++++------------
> -
>  1 file changed, 10 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 9d3205d99b54..bd1a1a2524b5 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -2879,7 +2879,8 @@ void intel_psr_debugfs_register(struct
> drm_i915_private *i915)
>  
>  static int i915_psr_sink_status_show(struct seq_file *m, void *data)
>  {
> -       u8 val;
> +       struct intel_connector *connector = m->private;
> +       struct intel_dp *intel_dp = intel_attached_dp(connector);
>         static const char * const sink_status[] = {
>                 "inactive",
>                 "transition to active, capture and display",
> @@ -2890,17 +2891,15 @@ static int i915_psr_sink_status_show(struct
> seq_file *m, void *data)
>                 "reserved",
>                 "sink internal error",
>         };
> -       struct drm_connector *connector = m->private;
> -       struct intel_dp *intel_dp =
> -               intel_attached_dp(to_intel_connector(connector));
>         int ret;
> +       u8 val;
>  
>         if (!CAN_PSR(intel_dp)) {
>                 seq_puts(m, "PSR Unsupported\n");
>                 return -ENODEV;
>         }
>  
> -       if (connector->status != connector_status_connected)
> +       if (connector->base.status != connector_status_connected)
>                 return -ENODEV;
>  
>         ret = drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_STATUS, &val);
> @@ -2922,21 +2921,19 @@ DEFINE_SHOW_ATTRIBUTE(i915_psr_sink_status);
>  
>  static int i915_psr_status_show(struct seq_file *m, void *data)
>  {
> -       struct drm_connector *connector = m->private;
> -       struct intel_dp *intel_dp =
> -               intel_attached_dp(to_intel_connector(connector));
> +       struct intel_connector *connector = m->private;
> +       struct intel_dp *intel_dp = intel_attached_dp(connector);
>  
>         return intel_psr_status(m, intel_dp);
>  }
>  DEFINE_SHOW_ATTRIBUTE(i915_psr_status);
>  
> -void intel_psr_connector_debugfs_add(struct intel_connector
> *intel_connector)
> +void intel_psr_connector_debugfs_add(struct intel_connector
> *connector)
>  {
> -       struct drm_connector *connector = &intel_connector->base;
> -       struct drm_i915_private *i915 = to_i915(connector->dev);
> -       struct dentry *root = connector->debugfs_entry;
> +       struct drm_i915_private *i915 = to_i915(connector->base.dev);
> +       struct dentry *root = connector->base.debugfs_entry;
>  
> -       if (connector->connector_type != DRM_MODE_CONNECTOR_eDP)
> +       if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP)
>                 return;
>  
>         debugfs_create_file("i915_psr_sink_status", 0444, root,


  reply	other threads:[~2023-03-20  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 13:41 [Intel-gfx] [PATCH 1/3] drm/i915/psr: move PSR debugfs to intel_psr.c Jani Nikula
2023-03-17 13:41 ` [Intel-gfx] [PATCH 2/3] drm/i915/psr: switch PSR debugfs to struct intel_connector Jani Nikula
2023-03-20  8:50   ` Hogander, Jouni [this message]
2023-03-17 13:41 ` [Intel-gfx] [PATCH 3/3] drm/i915/psr: clean up PSR debugfs sink status error handling Jani Nikula
2023-03-20  8:50   ` Hogander, Jouni
2023-03-17 18:07 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/psr: move PSR debugfs to intel_psr.c Patchwork
2023-03-17 18:07 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-17 18:07 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2023-03-17 18:20 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-17 20:54 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-03-20  8:50 ` [Intel-gfx] [PATCH 1/3] " Hogander, Jouni
2023-03-20 10:14   ` 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=cd1b3b54968eb1c955e73f4f154d0453b4bcdeb7.camel@intel.com \
    --to=jouni.hogander@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 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.