Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e87eb57c authored by Hoegeun Kwon's avatar Hoegeun Kwon Committed by Inki Dae
Browse files

drm/exynos: mic: Add mode_set callback function



Before applying the patch, used the of_get_videomode function to
parse the display-timings in the panel which is the child driver
of dsi in the devicetree. this is wrong. So removed the
of_get_videomode and fixed to get videomode struct through
mode_set callback function.

Signed-off-by: default avatarHoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent a5b2b6eb
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -286,13 +286,6 @@ static int parse_dt(struct exynos_mic *mic)
			}
			nodes[j++] = remote_node;

			ret = of_get_videomode(remote_node,
							&mic->vm, 0);
			if (ret) {
				DRM_ERROR("mic: failed to get videomode");
				goto exit;
			}

			break;
		default:
			DRM_ERROR("mic: Unknown endpoint from MIC");
@@ -329,6 +322,17 @@ static void mic_post_disable(struct drm_bridge *bridge)
	mutex_unlock(&mic_mutex);
}

static void mic_mode_set(struct drm_bridge *bridge,
			struct drm_display_mode *mode,
			struct drm_display_mode *adjusted_mode)
{
	struct exynos_mic *mic = bridge->driver_private;

	mutex_lock(&mic_mutex);
	drm_display_mode_to_videomode(mode, &mic->vm);
	mutex_unlock(&mic_mutex);
}

static void mic_pre_enable(struct drm_bridge *bridge)
{
	struct exynos_mic *mic = bridge->driver_private;
@@ -377,6 +381,7 @@ static void mic_enable(struct drm_bridge *bridge) { }
static const struct drm_bridge_funcs mic_bridge_funcs = {
	.disable = mic_disable,
	.post_disable = mic_post_disable,
	.mode_set = mic_mode_set,
	.pre_enable = mic_pre_enable,
	.enable = mic_enable,
};