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 9/9] drm/i915: Change SDVO fixed mode handling
Date: Mon, 28 Mar 2022 14:35:27 +0300 [thread overview]
Message-ID: <87ilrye2dc.fsf@intel.com> (raw)
In-Reply-To: <20220323182935.4701-10-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>
>
> SDVO is the only connector type currently returning the VBT
> fixed mode directly from .get_modes(), everyone else just
> adds it to the fixed_modes list and then returns that from
> .get_modes(). Adjust SDVO to follow the common behaviour.
>
> 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 | 29 ++++++++---------------
> 1 file changed, 10 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index 62e2e8b4358c..c9c3f71818d9 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -2291,27 +2291,12 @@ static int intel_sdvo_get_lvds_modes(struct drm_connector *connector)
> {
> struct intel_sdvo *intel_sdvo = intel_attached_sdvo(to_intel_connector(connector));
> struct drm_i915_private *dev_priv = to_i915(connector->dev);
> - struct drm_display_mode *newmode;
> int num_modes = 0;
>
> drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]\n",
> connector->base.id, connector->name);
>
> - /*
> - * Fetch modes from VBT. For SDVO prefer the VBT mode since some
> - * SDVO->LVDS transcoders can't cope with the EDID mode.
> - */
> - newmode = intel_panel_vbt_sdvo_fixed_mode(to_intel_connector(connector));
> - if (newmode) {
> - drm_mode_probed_add(connector, newmode);
> - num_modes++;
> - }
> -
> - /*
> - * Attempt to get the mode list from DDC.
> - * Assume that the preferred modes are
> - * arranged in priority order.
> - */
> + num_modes += intel_panel_get_modes(to_intel_connector(connector));
> num_modes += intel_ddc_get_modes(connector, &intel_sdvo->ddc);
>
> return num_modes;
> @@ -2915,9 +2900,15 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
> if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
> goto err;
>
> - intel_sdvo_get_lvds_modes(connector);
> -
> - fixed_mode = intel_panel_edid_fixed_mode(intel_connector);
> + /*
> + * Fetch modes from VBT. For SDVO prefer the VBT mode since some
> + * SDVO->LVDS transcoders can't cope with the EDID mode.
> + */
> + fixed_mode = intel_panel_vbt_sdvo_fixed_mode(intel_connector);
> + if (!fixed_mode) {
> + intel_ddc_get_modes(connector, &intel_sdvo->ddc);
> + fixed_mode = intel_panel_edid_fixed_mode(intel_connector);
> + }
>
> intel_panel_init(intel_connector, fixed_mode, NULL);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-03-28 11:35 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
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 [this message]
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=87ilrye2dc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox