Beispiel #1
0
static int exynos_dp_sw_link_training(struct exynos_dp_device *dp)
{
    int retval = 0;
    int training_finished;

    /* Turn off unnecessary lane */
    if (dp->link_train.lane_count == 1)
        exynos_dp_set_analog_power_down(dp, CH1_BLOCK, 1);

    training_finished = 0;

    dp->link_train.lt_state = START;

    /* Process here */
    while (!training_finished) {
        switch (dp->link_train.lt_state) {
        case START:
            exynos_dp_link_start(dp);
            break;
        case CLOCK_RECOVERY:
            exynos_dp_process_clock_recovery(dp);
            break;
        case EQUALIZER_TRAINING:
            exynos_dp_process_equalizer_training(dp);
            break;
        case FINISHED:
            training_finished = 1;
            break;
        case FAILED:
            return -EREMOTEIO;
        }
    }

    return retval;
}
Beispiel #2
0
static int exynos_dp_sw_link_training(struct exynos_dp_device *dp)
{
	int retval = 0;
	int training_finished = 0;

	dp->link_train.lt_state = START;

	/* Process here */
	while (!training_finished) {
		switch (dp->link_train.lt_state) {
		case START:
			exynos_dp_link_start(dp);
			break;
		case CLOCK_RECOVERY:
			retval = exynos_dp_process_clock_recovery(dp);
			if (retval)
				dev_err(dp->dev, "LT CR failed!\n");
			break;
		case EQUALIZER_TRAINING:
			retval = exynos_dp_process_equalizer_training(dp);
			if (retval)
				dev_err(dp->dev, "LT EQ failed!\n");
			break;
		case FINISHED:
			training_finished = 1;
			break;
		case FAILED:
			return -EREMOTEIO;
		}
	}

	return retval;
}