All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Intel Graphics <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2 7/9] drm/i915: Add eDP support for Valleyview
Date: Fri, 28 Sep 2012 17:08:27 +0200	[thread overview]
Message-ID: <20120928150827.GN2098@bremse> (raw)
In-Reply-To: <20120927082446.464a8fc6@jbarnes-desktop>

On Thu, Sep 27, 2012 at 08:24:46AM -0700, Jesse Barnes wrote:
> On Thu, 27 Sep 2012 19:13:07 +0530
> Vijay Purushothaman <vijay.a.purushothaman@intel.com> wrote:
> 
> > From: Gajanan Bhat <gajanan.bhat@intel.com>
> > 
> > Eventhough Valleyview display block is derived from Cantiga, VLV
> > supports eDP. So, added eDP checks in i9xx_crtc_mode_set path.
> > 
> > v2: use different DPIO_DIVISOR values for VGA, DP and eDP
> > v3: fix DPIO value calculation to use same values for all display
> > interfaces
> > v4: removed unconditional enabling of 6bpc dithering based on comments
> > from Daniel & Jani Nikula. Also changed the display enabling order to
> > force eDP detection first.
> > 
> > Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com>
> > Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>

Ok, I've slurped in the patches with the exception of the vga detect quirk
(maybe that'll go away with the hpd rework anyway) and the panel stuff
(since no one volunteered yet to smash an r-b onto it).

For the edp stuff here I think we need to add a bit more abstraction
eventually - maybe add an enum of the different kinds of DP connectors
(cpu, fdi, gmch) or add some vtable interfaces for the things which are
different on different platforms/ports ...

Thanks, Daniel

> > ---
> >  drivers/gpu/drm/i915/intel_display.c |   15 ++++++++++++---
> >  drivers/gpu/drm/i915/intel_dp.c      |   17 ++++++++++++-----
> >  2 files changed, 24 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index ed749c4..0362c80 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -4413,6 +4413,14 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
> >  		}
> >  	}
> >  
> > +	if (IS_VALLEYVIEW(dev) && intel_pipe_has_type(crtc, INTEL_OUTPUT_EDP)) {
> > +		if (adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) {
> > +			pipeconf |= PIPECONF_BPP_6 |
> > +					PIPECONF_ENABLE |
> > +					I965_PIPECONF_ACTIVE;
> > +		}
> > +	}
> > +
> >  	DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
> >  	drm_mode_debug_printmodeline(mode);
> >  
> > @@ -7623,6 +7631,10 @@ static void intel_setup_outputs(struct drm_device *dev)
> >  	} else if (IS_VALLEYVIEW(dev)) {
> >  		int found;
> >  
> > +		/* Check for built-in panel first. Shares lanes with HDMI on SDVOC */
> > +		if (I915_READ(DP_C) & DP_DETECTED)
> > +			intel_dp_init(dev, DP_C, PORT_C);
> > +
> >  		if (I915_READ(SDVOB) & PORT_DETECTED) {
> >  			/* SDVOB multiplex with HDMIB */
> >  			found = intel_sdvo_init(dev, SDVOB, true);
> > @@ -7635,9 +7647,6 @@ static void intel_setup_outputs(struct drm_device *dev)
> >  		if (I915_READ(SDVOC) & PORT_DETECTED)
> >  			intel_hdmi_init(dev, SDVOC, PORT_C);
> >  
> > -		/* Shares lanes with HDMI on SDVOC */
> > -		if (I915_READ(DP_C) & DP_DETECTED)
> > -			intel_dp_init(dev, DP_C, PORT_C);
> >  	} else if (SUPPORTS_DIGITAL_OUTPUTS(dev)) {
> >  		bool found = false;
> >  
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index c111c3f..867c568 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -885,7 +885,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
> >  
> >  	/* Split out the IBX/CPU vs CPT settings */
> >  
> > -	if (is_cpu_edp(intel_dp) && IS_GEN7(dev)) {
> > +	if (is_cpu_edp(intel_dp) && IS_GEN7(dev) && !IS_VALLEYVIEW(dev)) {
> >  		if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
> >  			intel_dp->DP |= DP_SYNC_HS_HIGH;
> >  		if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
> > @@ -1474,7 +1474,7 @@ intel_dp_pre_emphasis_max(struct intel_dp *intel_dp, uint8_t voltage_swing)
> >  {
> >  	struct drm_device *dev = intel_dp->base.base.dev;
> >  
> > -	if (IS_GEN7(dev) && is_cpu_edp(intel_dp)) {
> > +	if (IS_GEN7(dev) && is_cpu_edp(intel_dp) && !IS_VALLEYVIEW(dev)) {
> >  		switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
> >  		case DP_TRAIN_VOLTAGE_SWING_400:
> >  			return DP_TRAIN_PRE_EMPHASIS_6;
> > @@ -1773,7 +1773,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
> >  		uint32_t    signal_levels;
> >  
> >  
> > -		if (IS_GEN7(dev) && is_cpu_edp(intel_dp)) {
> > +		if (IS_GEN7(dev) && is_cpu_edp(intel_dp) && !IS_VALLEYVIEW(dev)) {
> >  			signal_levels = intel_gen7_edp_signal_levels(intel_dp->train_set[0]);
> >  			DP = (DP & ~EDP_LINK_TRAIN_VOL_EMP_MASK_IVB) | signal_levels;
> >  		} else if (IS_GEN6(dev) && is_cpu_edp(intel_dp)) {
> > @@ -1859,7 +1859,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
> >  			break;
> >  		}
> >  
> > -		if (IS_GEN7(dev) && is_cpu_edp(intel_dp)) {
> > +		if (IS_GEN7(dev) && is_cpu_edp(intel_dp) && !IS_VALLEYVIEW(dev)) {
> >  			signal_levels = intel_gen7_edp_signal_levels(intel_dp->train_set[0]);
> >  			DP = (DP & ~EDP_LINK_TRAIN_VOL_EMP_MASK_IVB) | signal_levels;
> >  		} else if (IS_GEN6(dev) && is_cpu_edp(intel_dp)) {
> > @@ -2471,7 +2471,14 @@ intel_dp_init(struct drm_device *dev, int output_reg, enum port port)
> >  		if (intel_dpd_is_edp(dev))
> >  			intel_dp->is_pch_edp = true;
> >  
> > -	if (output_reg == DP_A || is_pch_edp(intel_dp)) {
> > +	/*
> > +	 * FIXME : We need to initialize built-in panels before external panels.
> > +	 * For X0, DP_C is fixed as eDP. Revisit this as part of VLV eDP cleanup
> > +	 */
> > +	if (IS_VALLEYVIEW(dev) && output_reg == DP_C) {
> > +		type = DRM_MODE_CONNECTOR_eDP;
> > +		intel_encoder->type = INTEL_OUTPUT_EDP;
> > +	} else if (output_reg == DP_A || is_pch_edp(intel_dp)) {
> >  		type = DRM_MODE_CONNECTOR_eDP;
> >  		intel_encoder->type = INTEL_OUTPUT_EDP;
> >  	} else {
> 
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> 
> -- 
> Jesse Barnes, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2012-09-28 15:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 13:43 [PATCH v2 0/9] Enable all display interfaces in Valleyview Vijay Purushothaman
2012-09-27 13:43 ` [PATCH v2 1/9] drm/i915: Set aux clk to 100MHz for Valleyview Vijay Purushothaman
2012-09-27 15:11   ` Jesse Barnes
2012-09-27 13:43 ` [PATCH v2 2/9] drm/i915: Fix SDVO IER and status bits " Vijay Purushothaman
2012-09-27 15:13   ` Jesse Barnes
2012-09-27 13:43 ` [PATCH v2 3/9] drm/i915: Add Valleyview lane control definitions Vijay Purushothaman
2012-09-27 15:17   ` Jesse Barnes
2012-09-27 13:43 ` [PATCH v2 4/9] drm/i915: Program correct m n tu register for Valleyview Vijay Purushothaman
2012-09-27 15:18   ` Jesse Barnes
2012-09-27 13:43 ` [PATCH v2 5/9] drm/i915: Disable CRT hotplug detection for valleyview Vijay Purushothaman
2012-09-27 15:20   ` Jesse Barnes
2012-09-28 14:51     ` Daniel Vetter
2012-09-27 15:34   ` Jesse Barnes
2012-09-27 13:43 ` [PATCH v2 6/9] drm/i915: Enable DisplayPort in Valleyview Vijay Purushothaman
2012-09-27 15:23   ` Jesse Barnes
2012-09-28 15:03     ` Daniel Vetter
2012-09-27 13:43 ` [PATCH v2 7/9] drm/i915: Add eDP support for Valleyview Vijay Purushothaman
2012-09-27 15:24   ` Jesse Barnes
2012-09-28 15:08     ` Daniel Vetter [this message]
2012-09-27 13:43 ` [PATCH v2 8/9] drm/i915: panel power sequencing for VLV eDP Vijay Purushothaman
2012-09-27 15:26   ` Jesse Barnes
2012-09-27 16:59     ` Daniel Vetter
2012-09-27 13:43 ` [PATCH v2 9/9] drm/i915: Fixup HDMI output on Valleyview Vijay Purushothaman
2012-09-27 15:26   ` Jesse Barnes

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=20120928150827.GN2098@bremse \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    /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.