[igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Remove stale restrictions for HSW/BDW HDMI connector forcing

Ser, Simon simon.ser at intel.com
Mon Aug 26 13:05:51 UTC 2019


On Fri, 2019-08-23 at 21:33 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> We have no problems forcing HDMI connector status on HSW/BDW these days.
> Remove the bogus restriction.
> 
> Also DP forcing doesn't really work on any platform because the kernel
> can't get the DPCD if there's nothing actually connected. So keep
> refusing DP forcing, and in fact extend it to all platforms.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

LGTM and CI is happy.

Reviewed-by: Simon Ser <simon.ser at intel.com>

> ---
>  lib/igt_kms.c | 22 +++++++---------------
>  1 file changed, 7 insertions(+), 15 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 17a7d2b67f82..d8cdae76c913 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -980,23 +980,15 @@ bool kmstest_force_connector(int drm_fd, drmModeConnector *connector,
>  	char *path, **tmp;
>  	const char *value;
>  	drmModeConnector *temp;
> -	uint32_t devid;
>  	int len, dir, idx;
>  
> -	if (is_i915_device(drm_fd)) {
> -		devid = intel_get_drm_devid(drm_fd);
> -
> -		/*
> -		 * forcing hdmi or dp connectors on HSW and BDW doesn't
> -		 * currently work, so fail early to allow the test to skip if
> -		 * required
> -		 */
> -		if ((connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> -		     connector->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
> -		     connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort)
> -		    && (IS_HASWELL(devid) || IS_BROADWELL(devid)))
> -			return false;
> -	}
> +	/*
> +	 * Forcing DP connectors doesn't currently work, so
> +	 * fail early to allow the test to skip if required.
> +	 */
> +	if (is_i915_device(drm_fd) &&
> +	    connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort)
> +		return false;
>  
>  	switch (state) {
>  	case FORCE_CONNECTOR_ON:


More information about the igt-dev mailing list