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 8/9] drm/i915: Use intel_panel_edid_fixed_mode() for sdvo
Date: Mon, 28 Mar 2022 14:34:13 +0300	[thread overview]
Message-ID: <87lewue2fe.fsf@intel.com> (raw)
In-Reply-To: <20220323182935.4701-9-ville.syrjala@linux.intel.com>

On Wed, 23 Mar 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Despite the name intel_panel_edid_fixed_mode() doesn't actually
> look in the EDID. All it does is dig out the preferred mode from
> the connector's probed_modes list. That is also what the SDVO
> LVDS code is doing by hand. Let's just call
> intel_panel_edid_fixed_mode().
>
> The slight difference in behaviour is that the SDVO code currently
> bails if it can't find the preferred mode, whereas
> intel_panel_edid_fixed_mode() will fall back to just returning
> the first mode from the probed_modes list. Can't imagine why
> such an LVDS panel would even exist, and also why would you have
> a panel and be expected to not use it? So I'm going to assume
> this is a total non-issue.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

> ---
>  drivers/gpu/drm/i915/display/intel_sdvo.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index 27b3d3a79989..62e2e8b4358c 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -2886,7 +2886,7 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
>  	struct drm_connector *connector;
>  	struct intel_connector *intel_connector;
>  	struct intel_sdvo_connector *intel_sdvo_connector;
> -	struct drm_display_mode *mode;
> +	struct drm_display_mode *fixed_mode;
>  
>  	DRM_DEBUG_KMS("initialising LVDS device %d\n", device);
>  
> @@ -2917,16 +2917,9 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
>  
>  	intel_sdvo_get_lvds_modes(connector);
>  
> -	list_for_each_entry(mode, &connector->probed_modes, head) {
> -		if (mode->type & DRM_MODE_TYPE_PREFERRED) {
> -			struct drm_display_mode *fixed_mode =
> -				drm_mode_duplicate(connector->dev, mode);
> +	fixed_mode = intel_panel_edid_fixed_mode(intel_connector);
>  
> -			intel_panel_init(intel_connector,
> -					 fixed_mode, NULL);
> -			break;
> -		}
> -	}
> +	intel_panel_init(intel_connector, fixed_mode, NULL);
>  
>  	if (!intel_panel_preferred_fixed_mode(intel_connector))
>  		goto err;

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-03-28 11:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 18:29 [Intel-gfx] [PATCH 0/9] drm/i915: More fixed_mode refactoring Ville Syrjala
2022-03-23 18:29 ` [Intel-gfx] [PATCH 1/9] drm/i915: Pass intel_connector to intel_panel_{init, fini}() Ville Syrjala
2022-03-28 11:24   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 2/9] drm/i915: Use DRM_MODE_FMT+DRM_MODE_ARG() Ville Syrjala
2022-03-28 11:26   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 3/9] drm/i915: Extract intel_edp_add_properties() Ville Syrjala
2022-03-28 11:27   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 4/9] drm/i915: Use intel_panel_preferred_fixed_mode() more Ville Syrjala
2022-03-28 11:28   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 5/9] drm/i915: Rename intel_panel_vbt_fixed_mode() Ville Syrjala
2022-03-28 11:30   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 6/9] drm/i915: Extract intel_panel_vbt_sdvo_fixed_mode() Ville Syrjala
2022-03-28 11:31   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 7/9] drm/i915: Extract intel_panel_encoder_fixed_mode() Ville Syrjala
2022-03-28 11:32   ` Jani Nikula
2022-03-23 18:29 ` [Intel-gfx] [PATCH 8/9] drm/i915: Use intel_panel_edid_fixed_mode() for sdvo Ville Syrjala
2022-03-28 11:34   ` Jani Nikula [this message]
2022-03-23 18:29 ` [Intel-gfx] [PATCH 9/9] drm/i915: Change SDVO fixed mode handling Ville Syrjala
2022-03-28 11:35   ` Jani Nikula
2022-03-23 18:57 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: More fixed_mode refactoring Patchwork
2022-03-23 19:07   ` Ville Syrjälä
2022-03-23 19:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-23 20:30 ` [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=87lewue2fe.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.