Re: [PATCH 2/3] drm/i915/bios: parse dsi devices in parse_ddi_ports()

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

 



On Wed, Mar 06, 2019 at 05:34:15PM +0200, Jani Nikula wrote:
> For the time being this is only for completeness and better debug
> logging of DSI ports.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_drv.h   |  1 +
>  drivers/gpu/drm/i915/intel_bios.c | 14 ++++++++------
>  2 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index eeeb0d9cfdcd..e14563418aad 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -951,6 +951,7 @@ struct ddi_vbt_port_info {
>  	u8 supports_hdmi:1;
>  	u8 supports_dp:1;
>  	u8 supports_edp:1;
> +	u8 supports_dsi:1;
>  	u8 supports_typec_usb:1;
>  	u8 supports_tbt:1;
>  
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index fc27ffe81c14..9beff569b010 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1333,9 +1333,9 @@ static enum port dvo_port_to_port(u8 dvo_port)
>  	 * so look for all the possible values for each port.
>  	 */
>  	static const int dvo_ports[][3] = {
> -		[PORT_A] = { DVO_PORT_HDMIA, DVO_PORT_DPA, -1},
> -		[PORT_B] = { DVO_PORT_HDMIB, DVO_PORT_DPB, -1},
> -		[PORT_C] = { DVO_PORT_HDMIC, DVO_PORT_DPC, -1},
> +		[PORT_A] = { DVO_PORT_HDMIA, DVO_PORT_DPA, DVO_PORT_MIPIA },
> +		[PORT_B] = { DVO_PORT_HDMIB, DVO_PORT_DPB, DVO_PORT_MIPIB },
> +		[PORT_C] = { DVO_PORT_HDMIC, DVO_PORT_DPC, DVO_PORT_MIPIC },

I wonder if this is going to end up badly on CHV...

>  		[PORT_D] = { DVO_PORT_HDMID, DVO_PORT_DPD, -1},
>  		[PORT_E] = { DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE},
>  		[PORT_F] = { DVO_PORT_HDMIF, DVO_PORT_DPF, -1},
> @@ -1361,7 +1361,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>  			   u8 bdb_version)
>  {
>  	struct ddi_vbt_port_info *info;
> -	bool is_dvi, is_hdmi, is_dp, is_edp, is_crt;
> +	bool is_dvi, is_hdmi, is_dp, is_edp, is_crt, is_dsi;
>  	enum port port;
>  
>  	port = dvo_port_to_port(child->dvo_port);
> @@ -1383,6 +1383,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>  	is_crt = child->device_type & DEVICE_TYPE_ANALOG_OUTPUT;
>  	is_hdmi = is_dvi && (child->device_type & DEVICE_TYPE_NOT_HDMI_OUTPUT) == 0;
>  	is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
> +	is_dsi = child->device_type & DEVICE_TYPE_MIPI_OUTPUT;
>  
>  	if (port == PORT_A && is_dvi) {
>  		DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n",
> @@ -1395,6 +1396,7 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>  	info->supports_hdmi = is_hdmi;
>  	info->supports_dp = is_dp;
>  	info->supports_edp = is_edp;
> +	info->supports_dsi = is_dsi;
>  
>  	if (bdb_version >= 195)
>  		info->supports_typec_usb = child->dp_usb_type_c;
> @@ -1402,8 +1404,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
>  	if (bdb_version >= 209)
>  		info->supports_tbt = child->tbt;
>  
> -	DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d CRT:%d TCUSB:%d TBT:%d\n",
> -		      port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_crt,
> +	DRM_DEBUG_KMS("Port %c VBT info: DP:%d HDMI:%d DVI:%d EDP:%d DSI:%d CRT:%d TCUSB:%d TBT:%d\n",
> +		      port_name(port), is_dp, is_hdmi, is_dvi, is_edp, is_dsi, is_crt,
>  		      info->supports_typec_usb, info->supports_tbt);
>  
>  	if (is_edp && is_dvi)
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux