public inbox for intel-gfx@lists.freedesktop.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 06/11] drm/i915: Mark ns2501 as LVDS without a fixed mode
Date: Tue, 28 Jan 2020 10:42:03 +0200	[thread overview]
Message-ID: <87zhe89dlw.fsf@intel.com> (raw)
In-Reply-To: <20200121171100.4370-7-ville.syrjala@linux.intel.com>

On Tue, 21 Jan 2020, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> ns2501 has a builtin scaler so it doesn't need a fixed mode, but
> let's still mark it as LVDS instead of TMDS/DVI to make life less
> confusing.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dvo.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
> index 86a337c9d85d..0d4719daec8e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_dvo.c
> @@ -44,6 +44,7 @@
>  #define INTEL_DVO_CHIP_LVDS	1
>  #define INTEL_DVO_CHIP_TMDS	2
>  #define INTEL_DVO_CHIP_TVOUT	4
> +#define INTEL_DVO_CHIP_LVDS_NO_FIXED	5
>  
>  #define SIL164_ADDR	0x38
>  #define CH7xxx_ADDR	0x76
> @@ -101,13 +102,13 @@ static const struct intel_dvo_device intel_dvo_devices[] = {
>  		.dev_ops = &ch7017_ops,
>  	},
>  	{
> -	        .type = INTEL_DVO_CHIP_TMDS,
> +		.type = INTEL_DVO_CHIP_LVDS_NO_FIXED,
>  		.name = "ns2501",
>  		.dvo_reg = DVOB,
>  		.dvo_srcdim_reg = DVOB_SRCDIM,
>  		.slave_addr = NS2501_ADDR,
>  		.dev_ops = &ns2501_ops,
> -       }
> +	},
>  };
>  
>  struct intel_dvo {
> @@ -507,17 +508,19 @@ void intel_dvo_init(struct drm_i915_private *dev_priv)
>  		intel_encoder->port = port;
>  		intel_encoder->pipe_mask = ~0;
>  
> -		switch (dvo->type) {
> -		case INTEL_DVO_CHIP_TMDS:
> +		if (dvo->type != INTEL_DVO_CHIP_LVDS)
>  			intel_encoder->cloneable = (1 << INTEL_OUTPUT_ANALOG) |
>  				(1 << INTEL_OUTPUT_DVO);
> +
> +		switch (dvo->type) {
> +		case INTEL_DVO_CHIP_TMDS:
>  			drm_connector_init(&dev_priv->drm, connector,
>  					   &intel_dvo_connector_funcs,
>  					   DRM_MODE_CONNECTOR_DVII);
>  			encoder_type = DRM_MODE_ENCODER_TMDS;
>  			break;
> +		case INTEL_DVO_CHIP_LVDS_NO_FIXED:
>  		case INTEL_DVO_CHIP_LVDS:
> -			intel_encoder->cloneable = 0;
>  			drm_connector_init(&dev_priv->drm, connector,
>  					   &intel_dvo_connector_funcs,
>  					   DRM_MODE_CONNECTOR_LVDS);

Not sure if the consecutive if and switch here make this part less
confusing, but perhaps the higher level semantic change is more
important? *shrug*

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


-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-01-28  8:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21 17:10 [Intel-gfx] [PATCH 00/11] drm/i915: Hotplug cleanups Ville Syrjala
2020-01-21 17:10 ` [Intel-gfx] [PATCH 01/11] drm/i915: Prefer intel_connector over drm_connector in hotplug code Ville Syrjala
2020-01-22  9:50   ` Jani Nikula
2020-01-21 17:10 ` [Intel-gfx] [PATCH 02/11] drm/i915: Introduce intel_connector_hpd_pin() Ville Syrjala
2020-01-28  8:22   ` Jani Nikula
2020-01-21 17:10 ` [Intel-gfx] [PATCH 03/11] drm/i915/crt: Configure connector->polled and encoder->hpd_pin consistently Ville Syrjala
2020-01-28  8:23   ` Jani Nikula
2020-01-21 17:10 ` [Intel-gfx] [PATCH 04/11] drm/i915/hpd: Replace the loop-within-loop with two independent loops Ville Syrjala
2020-01-21 17:10 ` [Intel-gfx] [PATCH 05/11] drm/i915: Mark all HPD capabled connectors as such Ville Syrjala
2020-01-21 17:10 ` [Intel-gfx] [PATCH 06/11] drm/i915: Mark ns2501 as LVDS without a fixed mode Ville Syrjala
2020-01-28  8:42   ` Jani Nikula [this message]
2020-01-21 17:10 ` [Intel-gfx] [PATCH 07/11] drm/i915/dvo: Mark TMDS DVO connectors as polled Ville Syrjala
2020-01-28  8:45   ` Jani Nikula
2020-01-21 17:10 ` [Intel-gfx] [PATCH 08/11] drm/i915: Sprinkle missing commas Ville Syrjala
2020-01-28  8:36   ` Jani Nikula
2020-01-21 17:10 ` [Intel-gfx] [PATCH 09/11] drm/i915: Turn intel_digital_port_connected() in a vfunc Ville Syrjala
2020-01-21 19:44   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2020-01-28  9:06     ` Jani Nikula
2020-02-04 21:07       ` Ville Syrjälä
2020-01-21 17:10 ` [Intel-gfx] [PATCH 10/11] drm/i915: Stash hpd status bits under dev_priv Ville Syrjala
2020-01-21 17:11 ` [Intel-gfx] [PATCH 11/11] drm/i915: Use stashed away hpd isr bits in intel_digital_port_connected() Ville Syrjala
2020-01-21 19:18 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Hotplug cleanups Patchwork
2020-01-21 20:52 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Hotplug cleanups (rev2) Patchwork
2020-01-23  3:35 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2020-01-23 18:07 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=87zhe89dlw.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