public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 06/12] drm/i915: Remove distinction between DDI 2 vs 4 lanes
Date: Wed, 11 Nov 2015 21:10:39 +0200	[thread overview]
Message-ID: <1447269039.24928.33.camel@intel.com> (raw)
In-Reply-To: <1447084107-8521-7-git-send-email-patrik.jakobsson@linux.intel.com>

On ma, 2015-11-09 at 16:48 +0100, Patrik Jakobsson wrote:
> We never make use of the distinction between 2 vs 4 lanes so combine
> them into a per port domain instead. This saves us a few bits in the
> power domain mask. Change suggested by Ville.
> 
> Signed-off-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c     | 28 +++++--------
>  drivers/gpu/drm/i915/i915_drv.h         | 14 +++----
>  drivers/gpu/drm/i915/intel_display.c    | 10 ++---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 71 ++++++++++++-----------
> ----------
>  4 files changed, 45 insertions(+), 78 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c
> b/drivers/gpu/drm/i915/i915_debugfs.c
> index 40ec895..2fad0a9 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2706,24 +2706,16 @@ static const char *power_domain_str(enum
> intel_display_power_domain domain)
>  		return "TRANSCODER_C";
>  	case POWER_DOMAIN_TRANSCODER_EDP:
>  		return "TRANSCODER_EDP";
> -	case POWER_DOMAIN_PORT_DDI_A_2_LANES:
> -		return "PORT_DDI_A_2_LANES";
> -	case POWER_DOMAIN_PORT_DDI_A_4_LANES:
> -		return "PORT_DDI_A_4_LANES";
> -	case POWER_DOMAIN_PORT_DDI_B_2_LANES:
> -		return "PORT_DDI_B_2_LANES";
> -	case POWER_DOMAIN_PORT_DDI_B_4_LANES:
> -		return "PORT_DDI_B_4_LANES";
> -	case POWER_DOMAIN_PORT_DDI_C_2_LANES:
> -		return "PORT_DDI_C_2_LANES";
> -	case POWER_DOMAIN_PORT_DDI_C_4_LANES:
> -		return "PORT_DDI_C_4_LANES";
> -	case POWER_DOMAIN_PORT_DDI_D_2_LANES:
> -		return "PORT_DDI_D_2_LANES";
> -	case POWER_DOMAIN_PORT_DDI_D_4_LANES:
> -		return "PORT_DDI_D_4_LANES";
> -	case POWER_DOMAIN_PORT_DDI_E_2_LANES:
> -		return "PORT_DDI_E_2_LANES";
> +	case POWER_DOMAIN_PORT_DDI_A_LANES:
> +		return "PORT_DDI_A_LANES";
> +	case POWER_DOMAIN_PORT_DDI_B_LANES:
> +		return "PORT_DDI_B_LANES";
> +	case POWER_DOMAIN_PORT_DDI_C_LANES:
> +		return "PORT_DDI_C_LANES";
> +	case POWER_DOMAIN_PORT_DDI_D_LANES:
> +		return "PORT_DDI_D_LANES";
> +	case POWER_DOMAIN_PORT_DDI_E_LANES:
> +		return "PORT_DDI_E_LANES";
>  	case POWER_DOMAIN_PORT_DSI:
>  		return "PORT_DSI";
>  	case POWER_DOMAIN_PORT_CRT:
> diff --git a/drivers/gpu/drm/i915/i915_drv.h
> b/drivers/gpu/drm/i915/i915_drv.h
> index cef0588..fff7f63 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -180,15 +180,11 @@ enum intel_display_power_domain {
>  	POWER_DOMAIN_TRANSCODER_B,
>  	POWER_DOMAIN_TRANSCODER_C,
>  	POWER_DOMAIN_TRANSCODER_EDP,
> -	POWER_DOMAIN_PORT_DDI_A_2_LANES,
> -	POWER_DOMAIN_PORT_DDI_A_4_LANES,
> -	POWER_DOMAIN_PORT_DDI_B_2_LANES,
> -	POWER_DOMAIN_PORT_DDI_B_4_LANES,
> -	POWER_DOMAIN_PORT_DDI_C_2_LANES,
> -	POWER_DOMAIN_PORT_DDI_C_4_LANES,
> -	POWER_DOMAIN_PORT_DDI_D_2_LANES,
> -	POWER_DOMAIN_PORT_DDI_D_4_LANES,
> -	POWER_DOMAIN_PORT_DDI_E_2_LANES,
> +	POWER_DOMAIN_PORT_DDI_A_LANES,
> +	POWER_DOMAIN_PORT_DDI_B_LANES,
> +	POWER_DOMAIN_PORT_DDI_C_LANES,
> +	POWER_DOMAIN_PORT_DDI_D_LANES,
> +	POWER_DOMAIN_PORT_DDI_E_LANES,
>  	POWER_DOMAIN_PORT_DSI,
>  	POWER_DOMAIN_PORT_CRT,
>  	POWER_DOMAIN_PORT_OTHER,
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index c2578d9..649ac34 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5128,15 +5128,15 @@ static enum intel_display_power_domain
> port_to_power_domain(enum port port)
>  {
>  	switch (port) {
>  	case PORT_A:
> -		return POWER_DOMAIN_PORT_DDI_A_4_LANES;
> +		return POWER_DOMAIN_PORT_DDI_A_LANES;
>  	case PORT_B:
> -		return POWER_DOMAIN_PORT_DDI_B_4_LANES;
> +		return POWER_DOMAIN_PORT_DDI_B_LANES;
>  	case PORT_C:
> -		return POWER_DOMAIN_PORT_DDI_C_4_LANES;
> +		return POWER_DOMAIN_PORT_DDI_C_LANES;
>  	case PORT_D:
> -		return POWER_DOMAIN_PORT_DDI_D_4_LANES;
> +		return POWER_DOMAIN_PORT_DDI_D_LANES;
>  	case PORT_E:
> -		return POWER_DOMAIN_PORT_DDI_E_2_LANES;
> +		return POWER_DOMAIN_PORT_DDI_E_LANES;
>  	default:
>  		WARN_ON_ONCE(1);
>  		return POWER_DOMAIN_PORT_OTHER;
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index c9cb94d..fc206bb 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -286,13 +286,10 @@ static void hsw_set_power_well(struct
> drm_i915_private *dev_priv,
>  	BIT(POWER_DOMAIN_TRANSCODER_C) |		\
>  	BIT(POWER_DOMAIN_PIPE_B_PANEL_FITTER) |		\
>  	BIT(POWER_DOMAIN_PIPE_C_PANEL_FITTER) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_E_2_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_D_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_E_LANES) |		\
>  	BIT(POWER_DOMAIN_AUX_B) |                       \
>  	BIT(POWER_DOMAIN_AUX_C) |			\
>  	BIT(POWER_DOMAIN_AUX_D) |			\
> @@ -300,21 +297,17 @@ static void hsw_set_power_well(struct
> drm_i915_private *dev_priv,
>  	BIT(POWER_DOMAIN_VGA) |				\
>  	BIT(POWER_DOMAIN_INIT))
>  #define SKL_DISPLAY_DDI_A_E_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_A_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_A_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_E_2_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_A_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_E_LANES) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  #define SKL_DISPLAY_DDI_B_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  #define SKL_DISPLAY_DDI_C_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  #define SKL_DISPLAY_DDI_D_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_4_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_D_LANES) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  #define SKL_DISPLAY_ALWAYS_ON_POWER_DOMAINS (		\
>  	(POWER_DOMAIN_MASK & ~(				\
> @@ -329,10 +322,8 @@ static void hsw_set_power_well(struct
> drm_i915_private *dev_priv,
>  	BIT(POWER_DOMAIN_TRANSCODER_C) |		\
>  	BIT(POWER_DOMAIN_PIPE_B_PANEL_FITTER) |		\
>  	BIT(POWER_DOMAIN_PIPE_C_PANEL_FITTER) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |		\
>  	BIT(POWER_DOMAIN_AUX_B) |			\
>  	BIT(POWER_DOMAIN_AUX_C) |			\
>  	BIT(POWER_DOMAIN_AUDIO) |			\
> @@ -344,8 +335,7 @@ static void hsw_set_power_well(struct
> drm_i915_private *dev_priv,
>  	BIT(POWER_DOMAIN_PIPE_A) |			\
>  	BIT(POWER_DOMAIN_TRANSCODER_EDP) |		\
>  	BIT(POWER_DOMAIN_PIPE_A_PANEL_FITTER) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_A_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_A_4_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_A_LANES) |		\
>  	BIT(POWER_DOMAIN_AUX_A) |			\
>  	BIT(POWER_DOMAIN_PLLS) |			\
>  	BIT(POWER_DOMAIN_INIT))
> @@ -1420,14 +1410,10 @@ void intel_display_power_put(struct
> drm_i915_private *dev_priv,
>  #define HSW_ALWAYS_ON_POWER_DOMAINS (			\
>  	BIT(POWER_DOMAIN_PIPE_A) |			\
>  	BIT(POWER_DOMAIN_TRANSCODER_EDP) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_A_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_A_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_2_LANES) |		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_4_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_A_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |		\
> +	BIT(POWER_DOMAIN_PORT_DDI_D_LANES) |		\
>  	BIT(POWER_DOMAIN_PORT_CRT) |			\
>  	BIT(POWER_DOMAIN_PLLS) |			\
>  	BIT(POWER_DOMAIN_AUX_A) |			\
> @@ -1451,49 +1437,42 @@ void intel_display_power_put(struct
> drm_i915_private *dev_priv,
>  #define VLV_DISPLAY_POWER_DOMAINS	POWER_DOMAIN_MASK
>  
>  #define VLV_DPIO_CMN_BC_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |	\
>  	BIT(POWER_DOMAIN_PORT_CRT) |		\
>  	BIT(POWER_DOMAIN_AUX_B) |		\
>  	BIT(POWER_DOMAIN_AUX_C) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
>  #define VLV_DPIO_TX_B_LANES_01_POWER_DOMAINS (	\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |	\
>  	BIT(POWER_DOMAIN_AUX_B) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
>  #define VLV_DPIO_TX_B_LANES_23_POWER_DOMAINS (	\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |	\
>  	BIT(POWER_DOMAIN_AUX_B) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
>  #define VLV_DPIO_TX_C_LANES_01_POWER_DOMAINS (	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |	\
>  	BIT(POWER_DOMAIN_AUX_C) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
>  #define VLV_DPIO_TX_C_LANES_23_POWER_DOMAINS (	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |	\
>  	BIT(POWER_DOMAIN_AUX_C) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
>  #define CHV_DPIO_CMN_BC_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_B_4_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_C_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_B_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_C_LANES) |	\
>  	BIT(POWER_DOMAIN_AUX_B) |		\
>  	BIT(POWER_DOMAIN_AUX_C) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
>  #define CHV_DPIO_CMN_D_POWER_DOMAINS (		\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_2_LANES) |	\
> -	BIT(POWER_DOMAIN_PORT_DDI_D_4_LANES) |	\
> +	BIT(POWER_DOMAIN_PORT_DDI_D_LANES) |	\
>  	BIT(POWER_DOMAIN_AUX_D) |		\
>  	BIT(POWER_DOMAIN_INIT))
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-11-11 19:10 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 15:48 [PATCH v2 00/12] Skylake DMC/DC-state fixes and redesign Patrik Jakobsson
2015-11-09 15:48 ` [PATCH 01/12] drm/i915: Don't trust CSR program memory contents Patrik Jakobsson
2015-11-11 19:05   ` Imre Deak
2015-11-09 15:48 ` [PATCH 02/12] drm/i915/gen9: Always set mask memory up when enabling DC5 or DC6 Patrik Jakobsson
2015-11-11 19:08   ` Imre Deak
2015-11-09 15:48 ` [PATCH 03/12] drm/i915: Clean up AUX power domain handling Patrik Jakobsson
2015-11-11 18:22   ` Imre Deak
2015-11-11 18:37     ` Ville Syrjälä
2015-11-12  9:02       ` Patrik Jakobsson
2015-11-12 10:15         ` Ville Syrjälä
2015-11-16 14:01   ` [PATCH v2 " Patrik Jakobsson
2015-11-09 15:48 ` [PATCH 04/12] drm/i915: Introduce a gmbus power domain Patrik Jakobsson
2015-11-09 15:48 ` [PATCH 05/12] drm/i915: Remove DDI power domain exclusion SKL_DISPLAY_ALWAYS_ON_POWER_DOMAINS Patrik Jakobsson
2015-11-09 15:48 ` [PATCH 06/12] drm/i915: Remove distinction between DDI 2 vs 4 lanes Patrik Jakobsson
2015-11-11 19:10   ` Imre Deak [this message]
2015-11-09 15:48 ` [PATCH 07/12] drm/i915: Add a modeset power domain Patrik Jakobsson
2015-11-11 19:11   ` Imre Deak
2015-11-09 15:48 ` [PATCH 08/12] drm/i915: Do not warn on PG2 enabled in gen9_disable_dc5() Patrik Jakobsson
2015-11-09 15:48 ` [PATCH 09/12] drm/i915: Explain usage of power well IDs vs bit groups Patrik Jakobsson
2015-11-11 19:13   ` Imre Deak
2015-11-12 13:15     ` Patrik Jakobsson
2015-11-16 14:01   ` [PATCH v2 " Patrik Jakobsson
2015-11-09 15:48 ` [PATCH v2 10/12] drm/i915/gen9: Turn DC handling into a power well Patrik Jakobsson
2015-11-11 18:57   ` Imre Deak
2015-11-12 12:24     ` Patrik Jakobsson
2015-11-12 13:30       ` Imre Deak
2015-11-13 17:53         ` Imre Deak
2015-11-11 19:23   ` Imre Deak
2015-11-12 12:55     ` Patrik Jakobsson
2015-11-16 14:01   ` [PATCH v3 " Patrik Jakobsson
2015-11-16 14:41     ` Patrik Jakobsson
2015-11-16 15:20     ` [PATCH v4 " Patrik Jakobsson
2015-11-17 19:21       ` Imre Deak
2015-11-23 22:58       ` Matt Roper
2015-11-23 23:09         ` Imre Deak
2015-11-24 12:24           ` Daniel Vetter
2015-11-16 19:28     ` [PATCH v3 " Imre Deak
2015-11-16 19:46       ` Patrik Jakobsson
2015-11-09 15:48 ` [PATCH v2 11/12] drm/i915/gen9: Add boot parameter for disabling DC6 Patrik Jakobsson
2015-11-11 19:04   ` Imre Deak
2015-11-12 12:51     ` Patrik Jakobsson
2015-11-12 13:52       ` Imre Deak
2015-11-16 14:01   ` [PATCH v3 " Patrik Jakobsson
2015-11-16 19:25     ` Imre Deak
2015-11-09 15:48 ` [PATCH 12/12] drm/i915/skl: Remove unused suspend and resume callbacks Patrik Jakobsson
2015-11-17 18:28   ` Imre Deak
2015-11-17 19:54 ` [PATCH v2 00/12] Skylake DMC/DC-state fixes and redesign Imre Deak

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=1447269039.24928.33.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=patrik.jakobsson@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