All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Todd Previte <tprevite@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH V4] drm/i915: VLV2 - Fix hotplug detect bits
Date: Thu, 23 Jan 2014 11:50:38 +0100	[thread overview]
Message-ID: <20140123105038.GS9772@phenom.ffwll.local> (raw)
In-Reply-To: <1390461221-19715-2-git-send-email-tprevite@gmail.com>

On Thu, Jan 23, 2014 at 12:13:41AM -0700, Todd Previte wrote:
> Add new definitions for hotplug live status bits for VLV2 since they're
> in reverse order from the gen4x ones.
> 
> Changelog:
> - Restored gen4 bit definitions
> - Added new definitions for VLV2
> - Added platform check for IS_VALLEYVIEW() in dp_detect to use the correct
>   bit defintions
> - Replaced a lost trailing brace for the added switch()
> 
> Signed-off-by: Todd Previte <tprevite@gmail.com>

I've bikeshedded your patch a bit for more consistency. Wrt the patch
changelog please don't smash it all into one but keep a separate changelog
per revision. Otherwise it's not clear what e.g. changed from v3->v4 and
so no too useful for reviewers when rechecking patches.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_reg.h | 11 ++++++++---
>  drivers/gpu/drm/i915/intel_dp.c | 40 ++++++++++++++++++++++++++++------------
>  2 files changed, 36 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 10ecf90..0e65717 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2083,9 +2083,14 @@
>   * Please check the detailed lore in the commit message for for experimental
>   * evidence.
>   */
> -#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 29)
> -#define   PORTC_HOTPLUG_LIVE_STATUS               (1 << 28)
> -#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 27)
> +/* VLV hot plug bits are different */
> +#define   VLV_PORTD_HOTPLUG_LIVE_STATUS	(1 << 27)
> +#define   VLV_PORTC_HOTPLUG_LIVE_STATUS	(1 << 28)
> +#define   VLV_PORTB_HOTPLUG_LIVE_STATUS	(1 << 29)
> +
> +#define   PORTD_HOTPLUG_LIVE_STATUS		(1 << 29)
> +#define   PORTC_HOTPLUG_LIVE_STATUS		(1 << 28)
> +#define   PORTB_HOTPLUG_LIVE_STATUS		(1 << 27)
>  #define   PORTD_HOTPLUG_INT_STATUS		(3 << 21)
>  #define   PORTC_HOTPLUG_INT_STATUS		(3 << 19)
>  #define   PORTB_HOTPLUG_INT_STATUS		(3 << 17)
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 1386efb..51c6497 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2946,18 +2946,34 @@ g4x_dp_detect(struct intel_dp *intel_dp)
>  		return status;
>  	}
>  
> -	switch (intel_dig_port->port) {
> -	case PORT_B:
> -		bit = PORTB_HOTPLUG_LIVE_STATUS;
> -		break;
> -	case PORT_C:
> -		bit = PORTC_HOTPLUG_LIVE_STATUS;
> -		break;
> -	case PORT_D:
> -		bit = PORTD_HOTPLUG_LIVE_STATUS;
> -		break;
> -	default:
> -		return connector_status_unknown;
> +	if (IS_VALLEYVIEW(dev)) {
> +		switch (intel_dig_port->port) {
> +		case PORT_B:
> +			bit = VLV_PORTB_HOTPLUG_LIVE_STATUS;
> +			break;
> +		case PORT_C:
> +			bit = VLV_PORTC_HOTPLUG_LIVE_STATUS;
> +			break;
> +		case PORT_D:
> +			bit = VLV_PORTD_HOTPLUG_LIVE_STATUS;
> +			break;
> +		default:
> +			return connector_status_unknown;
> +		}
> +	} else {
> +		switch (intel_dig_port->port) {
> +		case PORT_B:
> +			bit = PORTB_HOTPLUG_LIVE_STATUS;
> +			break;
> +		case PORT_C:
> +			bit = PORTC_HOTPLUG_LIVE_STATUS;
> +			break;
> +		case PORT_D:
> +			bit = PORTD_HOTPLUG_LIVE_STATUS;
> +			break;
> +		default:
> +			return connector_status_unknown;
> +		}
>  	}
>  
>  	if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0)
> -- 
> 1.8.3.2
> 
> _______________________________________________
> 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:[~2014-01-23 10:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 16:38 [PATCH] drm/i915: (VLV2) Fix the hotplug detection bits Todd Previte
2014-01-21 17:14 ` Jani Nikula
2014-01-21 17:22 ` [PATCH V2] " Todd Previte
2014-01-21 17:45   ` Daniel Vetter
2014-01-21 18:12     ` Ville Syrjälä
2014-01-21 17:49   ` Jani Nikula
2014-01-23  4:22 ` (no subject) Todd Previte
2014-01-23  4:22   ` [PATCH v3] drm/i915: VLV2 - Fix hotplug detect bits Todd Previte
2014-01-23  6:39     ` Jani Nikula
2014-01-23  6:41     ` Jani Nikula
2014-01-23  7:16       ` Todd Previte
2014-01-23  7:13 ` [PATCH V4] " Todd Previte
2014-01-23  7:13   ` [PATCH V4] drm/i915: " Todd Previte
2014-01-23 10:50     ` Daniel Vetter [this message]
2014-01-23 10:52       ` Daniel Vetter

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=20140123105038.GS9772@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tprevite@gmail.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.