Re: [PATCH] drm/i915: Introduce Kabypoint PCH for Kabylake H/DT.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2016-07-01 at 17:07 -0700, Rodrigo Vivi wrote:
> Some Kabylake SKUs are going to use Kabypoint PCH.
> It is mainly for Halo and DT ones.
> 
> From our specs it doesn't seem that KBP brings
> any change on the display south engine. So let's consider
> this as a continuation of SunrisePoint, i.e., SPT+.
> 
> Since it is easy to get confused by a letter change:
> KBL = Kabylake - CPU/GPU codename.
> KBP = Kabypoint - PCH codename.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96826

> ---
>  drivers/gpu/drm/i915/i915_drv.c    | 4 ++++
>  drivers/gpu/drm/i915/i915_drv.h    | 3 +++
>  drivers/gpu/drm/i915/i915_irq.c    | 4 ++--
>  drivers/gpu/drm/i915/intel_panel.c | 3 ++-
>  4 files changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index c9abf91..725fd15 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -204,6 +204,10 @@ static void intel_detect_pch(struct drm_device *dev)
>  				DRM_DEBUG_KMS("Found SunrisePoint LP PCH\n");
>  				WARN_ON(!IS_SKYLAKE(dev) &&
>  					!IS_KABYLAKE(dev));
> +			} else if (id == INTEL_PCH_KBP_DEVICE_ID_TYPE) {
> +				dev_priv->pch_type = PCH_KBP;
> +				DRM_DEBUG_KMS("Found KabyPoint PCH\n");
> +				WARN_ON(!IS_KABYLAKE(dev));
>  			} else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
>  				   (id == INTEL_PCH_P3X_DEVICE_ID_TYPE) ||
>  				   ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 0dcc43d..f63ca93 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1020,6 +1020,7 @@ enum intel_pch {
>  	PCH_CPT,	/* Cougarpoint PCH */
>  	PCH_LPT,	/* Lynxpoint PCH */
>  	PCH_SPT,        /* Sunrisepoint PCH */
> +	PCH_KBP,        /* Kabypoint PCH */
>  	PCH_NOP,
>  };
>  
> @@ -2882,11 +2883,13 @@ struct drm_i915_cmd_table {
>  #define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE		0x9c00
>  #define INTEL_PCH_SPT_DEVICE_ID_TYPE		0xA100
>  #define INTEL_PCH_SPT_LP_DEVICE_ID_TYPE		0x9D00
> +#define INTEL_PCH_KBP_DEVICE_ID_TYPE		0xA200
>  #define INTEL_PCH_P2X_DEVICE_ID_TYPE		0x7100
>  #define INTEL_PCH_P3X_DEVICE_ID_TYPE		0x7000
>  #define INTEL_PCH_QEMU_DEVICE_ID_TYPE		0x2900 /* qemu q35 has
> 2918 */
>  
>  #define INTEL_PCH_TYPE(dev) (__I915__(dev)->pch_type)
> +#define HAS_PCH_KBP(dev) (INTEL_PCH_TYPE(dev) == PCH_KBP)
>  #define HAS_PCH_SPT(dev) (INTEL_PCH_TYPE(dev) == PCH_SPT)
>  #define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
>  #define HAS_PCH_LPT_LP(dev) (__I915__(dev)->pch_id ==
> INTEL_PCH_LPT_LP_DEVICE_ID_TYPE)
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 53d4c80..dd5ebb5 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -2433,7 +2433,7 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv,
> u32 master_ctl)
>  			I915_WRITE(SDEIIR, iir);
>  			ret = IRQ_HANDLED;
>  
> -			if (HAS_PCH_SPT(dev_priv))
> +			if (HAS_PCH_SPT(dev_priv) || HAS_PCH_KBP(dev_priv))
>  				spt_irq_handler(dev_priv, iir);

For CougarPoint and PantherPoint we just set the pch type to PCH_CPT and avoid
the extra HAS_PCH_PPT() macros. Should we do the same thing here?

But either way,

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@xxxxxxxxx>


>  			else
>  				cpt_irq_handler(dev_priv, iir);
> @@ -4594,7 +4594,7 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
>  		dev->driver->disable_vblank = gen8_disable_vblank;
>  		if (IS_BROXTON(dev))
>  			dev_priv->display.hpd_irq_setup = bxt_hpd_irq_setup;
> -		else if (HAS_PCH_SPT(dev))
> +		else if (HAS_PCH_SPT(dev) || HAS_PCH_KBP(dev))
>  			dev_priv->display.hpd_irq_setup = spt_hpd_irq_setup;
>  		else
>  			dev_priv->display.hpd_irq_setup = ilk_hpd_irq_setup;
> diff --git a/drivers/gpu/drm/i915/intel_panel.c
> b/drivers/gpu/drm/i915/intel_panel.c
> index 3c0b97f0..0c8b2f7 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -1731,7 +1731,8 @@ intel_panel_init_backlight_funcs(struct intel_panel
> *panel)
>  		panel->backlight.set = bxt_set_backlight;
>  		panel->backlight.get = bxt_get_backlight;
>  		panel->backlight.hz_to_pwm = bxt_hz_to_pwm;
> -	} else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_SPT(dev_priv)) {
> +	} else if (HAS_PCH_LPT(dev_priv) || HAS_PCH_SPT(dev_priv) ||
> +		   HAS_PCH_KBP(dev_priv)) {
>  		panel->backlight.setup = lpt_setup_backlight;
>  		panel->backlight.enable = lpt_enable_backlight;
>  		panel->backlight.disable = lpt_disable_backlight;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux