From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915/lvds: nuke intel_lvds_supported()
Date: Tue, 22 Jan 2019 10:23:50 +0200 [thread overview]
Message-ID: <87o9893xt5.fsf@intel.com> (raw)
In-Reply-To: <20190121193117.GS20097@intel.com>
On Mon, 21 Jan 2019, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Mon, Jan 21, 2019 at 04:21:32PM +0200, Jani Nikula wrote:
>> Now that intel_lvds_init() is only called for platforms that might have
>> LVDS, move the remaining checks to intel_setup_outputs(), again similar
>> to other outputs, and remove the overlapping checks.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 6 ++++--
>> drivers/gpu/drm/i915/intel_lvds.c | 23 -----------------------
>> 2 files changed, 4 insertions(+), 25 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 4b5704a87934..4207ee0b83ce 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -14464,7 +14464,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>
> Had to read the earlier patch twice to make sure we're not leaving
> ibx/cpt/ppt or pnv behind.
>
>> } else if (IS_GEN_RANGE(dev_priv, 3, 4)) {
>> bool found = false;
>>
>> - intel_lvds_init(dev_priv);
>> + if (IS_MOBILE(dev_priv))
>> + intel_lvds_init(dev_priv);
>>
>> if (dev_priv->vbt.int_crt_support)
>> intel_crt_init(dev_priv);
>> @@ -14501,7 +14502,8 @@ static void intel_setup_outputs(struct drm_i915_private *dev_priv)
>> if (IS_G4X(dev_priv) && (I915_READ(DP_D) & DP_DETECTED))
>> intel_dp_init(dev_priv, DP_D, PORT_D);
>> } else if (IS_GEN(dev_priv, 2)) {
>> - intel_lvds_init(dev_priv);
>> + if (IS_MOBILE(dev_priv) && !IS_I830(dev_priv))
>
> aka. IS_I85X()
Made the change in a separate patch.
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thanks,
Jani.
>
>> + intel_lvds_init(dev_priv);
>>
>> if (dev_priv->vbt.int_crt_support)
>> intel_crt_init(dev_priv);
>> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
>> index 46a5dfd5cdf7..815ed463d9c5 100644
>> --- a/drivers/gpu/drm/i915/intel_lvds.c
>> +++ b/drivers/gpu/drm/i915/intel_lvds.c
>> @@ -798,26 +798,6 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)
>> return (val & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP;
>> }
>>
>> -static bool intel_lvds_supported(struct drm_i915_private *dev_priv)
>> -{
>> - /*
>> - * With the introduction of the PCH we gained a dedicated
>> - * LVDS presence pin, use it.
>> - */
>> - if (HAS_PCH_IBX(dev_priv) || HAS_PCH_CPT(dev_priv))
>> - return true;
>> -
>> - /*
>> - * Otherwise LVDS was only attached to mobile products,
>> - * except for the inglorious 830gm
>> - */
>> - if (INTEL_GEN(dev_priv) <= 4 &&
>> - IS_MOBILE(dev_priv) && !IS_I830(dev_priv))
>> - return true;
>> -
>> - return false;
>> -}
>> -
>> /**
>> * intel_lvds_init - setup LVDS connectors on this device
>> * @dev_priv: i915 device
>> @@ -842,9 +822,6 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
>> u8 pin;
>> u32 allowed_scalers;
>>
>> - if (!intel_lvds_supported(dev_priv))
>> - return;
>> -
>> /* Skip init on machines we know falsely report LVDS */
>> if (dmi_check_system(intel_no_lvds)) {
>> WARN(!dev_priv->vbt.int_lvds_support,
>> --
>> 2.20.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-22 8:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 14:21 [PATCH 1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup Jani Nikula
2019-01-21 14:21 ` [PATCH 2/5] drm/i915/lvds: only call intel_lvds_init() on platforms that might have LVDS Jani Nikula
2019-01-21 19:30 ` Ville Syrjälä
2019-01-21 14:21 ` [PATCH 3/5] drm/i915/lvds: nuke intel_lvds_supported() Jani Nikula
2019-01-21 19:31 ` Ville Syrjälä
2019-01-22 8:23 ` Jani Nikula [this message]
2019-01-21 14:21 ` [PATCH 4/5] drm/i915/tv: only call intel_tv_init() on platforms that might have TV Jani Nikula
2019-01-21 19:33 ` Ville Syrjälä
2019-01-22 8:25 ` Jani Nikula
2019-01-21 14:21 ` [PATCH 5/5] drm/i915: rename has_edp_a() to intel_pch_has_edp_a() Jani Nikula
2019-01-21 19:36 ` Ville Syrjälä
2019-01-21 15:39 ` ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915/crt: split out intel_crt_present() to platform specific setup Patchwork
2019-01-21 19:03 ` ✓ Fi.CI.IGT: " Patchwork
2019-01-21 19:30 ` [PATCH 1/5] " Ville Syrjälä
2019-01-22 8:26 ` 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=87o9893xt5.fsf@intel.com \
--to=jani.nikula@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