All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 04/16] drm/i915: Simplify intel_panel_info()
Date: Mon, 14 Mar 2022 11:47:03 +0200	[thread overview]
Message-ID: <878rtcx3vs.fsf@intel.com> (raw)
In-Reply-To: <20220311172428.14685-5-ville.syrjala@linux.intel.com>

On Fri, 11 Mar 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> No need for all this connector type special casing. If the
> connector has a fixed mode just print it, otherwise don't.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  .../drm/i915/display/intel_display_debugfs.c  | 24 +++++++------------
>  1 file changed, 9 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 798bf233a60f..e511500ee26a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -544,11 +544,15 @@ static void intel_encoder_info(struct seq_file *m,
>  	drm_connector_list_iter_end(&conn_iter);
>  }
>  
> -static void intel_panel_info(struct seq_file *m, struct intel_panel *panel)
> +static void intel_panel_info(struct seq_file *m,
> +			     struct intel_connector *connector)
>  {
> -	const struct drm_display_mode *mode = panel->fixed_mode;
> +	const struct drm_display_mode *fixed_mode = connector->panel.fixed_mode;
>  
> -	seq_printf(m, "\tfixed mode: " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode));
> +	if (!fixed_mode)
> +		return;
> +
> +	seq_printf(m, "\tfixed mode: " DRM_MODE_FMT "\n", DRM_MODE_ARG(fixed_mode));
>  }
>  
>  static void intel_hdcp_info(struct seq_file *m,
> @@ -586,8 +590,6 @@ static void intel_dp_info(struct seq_file *m,
>  	seq_printf(m, "\tDPCD rev: %x\n", intel_dp->dpcd[DP_DPCD_REV]);
>  	seq_printf(m, "\taudio support: %s\n",
>  		   str_yes_no(intel_dp->has_audio));
> -	if (intel_connector->base.connector_type == DRM_MODE_CONNECTOR_eDP)
> -		intel_panel_info(m, &intel_connector->panel);
>  
>  	drm_dp_downstream_debug(m, intel_dp->dpcd, intel_dp->downstream_ports,
>  				edid ? edid->data : NULL, &intel_dp->aux);
> @@ -611,12 +613,6 @@ static void intel_hdmi_info(struct seq_file *m,
>  		   str_yes_no(intel_hdmi->has_audio));
>  }
>  
> -static void intel_lvds_info(struct seq_file *m,
> -			    struct intel_connector *intel_connector)
> -{
> -	intel_panel_info(m, &intel_connector->panel);
> -}
> -
>  static void intel_connector_info(struct seq_file *m,
>  				 struct drm_connector *connector)
>  {
> @@ -651,10 +647,6 @@ static void intel_connector_info(struct seq_file *m,
>  		else
>  			intel_dp_info(m, intel_connector);
>  		break;
> -	case DRM_MODE_CONNECTOR_LVDS:
> -		if (encoder->type == INTEL_OUTPUT_LVDS)
> -			intel_lvds_info(m, intel_connector);
> -		break;
>  	case DRM_MODE_CONNECTOR_HDMIA:
>  		if (encoder->type == INTEL_OUTPUT_HDMI ||
>  		    encoder->type == INTEL_OUTPUT_DDI)
> @@ -667,6 +659,8 @@ static void intel_connector_info(struct seq_file *m,
>  	seq_puts(m, "\tHDCP version: ");
>  	intel_hdcp_info(m, intel_connector);
>  
> +	intel_panel_info(m, intel_connector);
> +
>  	seq_printf(m, "\tmodes:\n");
>  	list_for_each_entry(mode, &connector->modes, head)
>  		intel_seq_print_mode(m, 2, mode);

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-03-14  9:47 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 17:24 [Intel-gfx] [PATCH v2 00/16] drm/i915: DRRS fixes/cleanups and start of static DRRS Ville Syrjala
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 01/16] drm/i915/dsi: Pass fixed_mode to *_dsi_add_properties() Ville Syrjala
2022-03-14  9:41   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 02/16] drm/i915/sdvo: Passt the requesed mode to intel_sdvo_create_preferred_input_timing() Ville Syrjala
2022-03-14  9:44   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 03/16] drm/i915/lvds: Pass fixed_mode to compute_is_dual_link_lvds() Ville Syrjala
2022-03-14  9:44   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 04/16] drm/i915: Simplify intel_panel_info() Ville Syrjala
2022-03-14  9:47   ` Jani Nikula [this message]
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 05/16] drm/i915: Nuke dev_priv->drrs.type Ville Syrjala
2022-03-14  9:47   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 06/16] drm/i915: Introduce intel_panel_{fixed, downclock}_mode() Ville Syrjala
2022-03-14 10:09   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 07/16] drm/i915: Introduce intel_panel_get_modes() Ville Syrjala
2022-03-14  9:57   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 08/16] drm/i915: Introduce intel_panel_preferred_fixed_mode() Ville Syrjala
2022-03-14 10:11   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 09/16] drm/i915: Introduce intel_panel_drrs_type() Ville Syrjala
2022-03-14 10:00   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 10/16] drm/i915: Introduce intel_drrs_type_str() Ville Syrjala
2022-03-14 10:00   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 11/16] drm/i915: Eliminate the intel_dp dependency from DRRS Ville Syrjala
2022-03-14 10:14   ` Jani Nikula
2022-03-14 10:16   ` Jani Nikula
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 12/16] drm/i915: Stash DRRS state under intel_crtc Ville Syrjala
2022-03-14 10:31   ` Jani Nikula
2022-03-14 15:11     ` Ville Syrjälä
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 13/16] drm/i915: Move DRRS enable/disable higher up Ville Syrjala
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 14/16] drm/i915: Enable eDP DRRS on ilk/snb port A Ville Syrjala
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 15/16] drm/i915: Implement static DRRS Ville Syrjala
2022-03-11 17:24 ` [Intel-gfx] [PATCH v2 16/16] drm/i915: Convert fixed_mode/downclock_mode into a list Ville Syrjala
2022-03-11 20:22   ` [Intel-gfx] [PATCH v3 " Ville Syrjala
2022-03-14 10:45     ` Jani Nikula
2022-03-14 15:27   ` [Intel-gfx] [PATCH v4 " Ville Syrjala
2022-03-11 19:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: DRRS fixes/cleanups and start of static DRRS (rev2) Patchwork
2022-03-11 19:12 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-11 19:43 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-03-11 21:55 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: DRRS fixes/cleanups and start of static DRRS (rev3) Patchwork
2022-03-11 21:57 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-11 22:27 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-12  0:51 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-14 16:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: DRRS fixes/cleanups and start of static DRRS (rev4) Patchwork
2022-03-14 16:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-14 17:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-14 19:18 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=878rtcx3vs.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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.