[igt-dev] [PATCH i-g-t] i915/pm_rpm: Probe connectors to run standalone

Imre Deak imre.deak at intel.com
Mon May 27 10:56:48 UTC 2019


On Fri, May 24, 2019 at 10:39:42PM +0100, Chris Wilson wrote:
> In order to run as a standalone test (i.e. immediately after booting a
> device), we need to explicitly probe the connectors.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Good to not depend on a preceding (cached) state:
Reviewed-by: Imre Deak <imre.deak at intel.com>

Btw, the driver does an initial probing during loading via
poll_init_work, can you confirm that the point here is that you don't
want to depend on that, since it happens asynchronously?

> ---
>  tests/i915/i915_pm_rpm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index a2c9d0ede..2f7e30592 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -394,8 +394,9 @@ static void init_mode_set_data(struct mode_set_data *data)
>  	if (data->res) {
>  		igt_assert(data->res->count_connectors <= MAX_CONNECTORS);
>  		for (int i = 0; i < data->res->count_connectors; i++) {
> -			data->connectors[i] = drmModeGetConnectorCurrent(drm_fd,
> -									 data->res->connectors[i]);
> +			data->connectors[i] =
> +				drmModeGetConnector(drm_fd,
> +						    data->res->connectors[i]);
>  			data->edids[i] = get_connector_edid(data->connectors[i], i);
>  		}
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list