From: Hoegeun Kwon <hoegeun.kwon@samsung.com> To: robh@kernel.org, thierry.reding@gmail.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, inki.dae@samsung.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, a.hajda@samsung.com, cw00.choi@samsung.com, jh80.chung@samsung.com, Hoegeun Kwon <hoegeun.kwon@samsung.com> Subject: [PATCH v6 1/4] drm/exynos: mic: Add mode_set callback function Date: Thu, 05 Jan 2017 15:45:47 +0900 [thread overview] Message-ID: <1483598750-15062-2-git-send-email-hoegeun.kwon@samsung.com> (raw) In-Reply-To: <1483598750-15062-1-git-send-email-hoegeun.kwon@samsung.com> 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: Hoegeun Kwon <hoegeun.kwon@samsung.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index a0def0b..a0f459c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -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,24 @@ 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); + + if (!mic->i80_mode) + mic_set_porch_timing(mic); + mic_set_img_size(mic); + mic_set_output_timing(mic); + + mutex_unlock(&mic_mutex); +} + static void mic_pre_enable(struct drm_bridge *bridge) { struct exynos_mic *mic = bridge->driver_private; @@ -355,10 +366,6 @@ static void mic_pre_enable(struct drm_bridge *bridge) goto turn_off_clks; } - if (!mic->i80_mode) - mic_set_porch_timing(mic); - mic_set_img_size(mic); - mic_set_output_timing(mic); mic_set_reg_on(mic, 1); mic->enabled = 1; mutex_unlock(&mic_mutex); @@ -377,6 +384,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, }; -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: Hoegeun Kwon <hoegeun.kwon@samsung.com> To: robh@kernel.org, thierry.reding@gmail.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, inki.dae@samsung.com Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, jh80.chung@samsung.com, cw00.choi@samsung.com, Hoegeun Kwon <hoegeun.kwon@samsung.com> Subject: [PATCH v6 1/4] drm/exynos: mic: Add mode_set callback function Date: Thu, 05 Jan 2017 15:45:47 +0900 [thread overview] Message-ID: <1483598750-15062-2-git-send-email-hoegeun.kwon@samsung.com> (raw) In-Reply-To: <1483598750-15062-1-git-send-email-hoegeun.kwon@samsung.com> 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: Hoegeun Kwon <hoegeun.kwon@samsung.com> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index a0def0b..a0f459c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -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,24 @@ 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); + + if (!mic->i80_mode) + mic_set_porch_timing(mic); + mic_set_img_size(mic); + mic_set_output_timing(mic); + + mutex_unlock(&mic_mutex); +} + static void mic_pre_enable(struct drm_bridge *bridge) { struct exynos_mic *mic = bridge->driver_private; @@ -355,10 +366,6 @@ static void mic_pre_enable(struct drm_bridge *bridge) goto turn_off_clks; } - if (!mic->i80_mode) - mic_set_porch_timing(mic); - mic_set_img_size(mic); - mic_set_output_timing(mic); mic_set_reg_on(mic, 1); mic->enabled = 1; mutex_unlock(&mic_mutex); @@ -377,6 +384,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, }; -- 1.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-01-05 6:48 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20170105064607epcas1p1219d09b7d884f91b5063accf57794ec7@epcas1p1.samsung.com> 2017-01-05 6:45 ` [PATCH v6 0/4] Add support for the S6E3HA2 panel on TM2 board Hoegeun Kwon 2017-01-05 6:45 ` Hoegeun Kwon [not found] ` <CGME20170105064607epcas5p3a5185e95807b28cc137842fce9a04ada@epcas5p3.samsung.com> 2017-01-05 6:45 ` Hoegeun Kwon [this message] 2017-01-05 6:45 ` [PATCH v6 1/4] drm/exynos: mic: Add mode_set callback function Hoegeun Kwon [not found] ` <CGME20170105064608epcas5p373b4b3b7669411ef6dd3b35cc30fe6aa@epcas5p3.samsung.com> 2017-01-05 6:45 ` [PATCH v6 2/4] drm/exynos: mic: Fix parse_dt function Hoegeun Kwon 2017-01-05 6:45 ` Hoegeun Kwon [not found] ` <CGME20170105064608epcas5p338d5a6518a8d75e410dc181cb22a6e8c@epcas5p3.samsung.com> 2017-01-05 6:45 ` [PATCH v6 3/4] drm/panel: Add support for S6E3HA2 panel driver on TM2 board Hoegeun Kwon 2017-01-05 6:45 ` Hoegeun Kwon 2017-01-05 7:05 ` Andrzej Hajda 2017-01-05 7:05 ` Andrzej Hajda [not found] ` <CGME20170105064609epcas5p3e7ca4d3ee6a8b3d2a1d0fd11794eff12@epcas5p3.samsung.com> 2017-01-05 6:45 ` [PATCH v6 4/4] arm64: dts: exynos: Add support for S6E3HA2 panel device " Hoegeun Kwon 2017-01-05 6:45 ` Hoegeun Kwon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1483598750-15062-2-git-send-email-hoegeun.kwon@samsung.com \ --to=hoegeun.kwon@samsung.com \ --cc=a.hajda@samsung.com \ --cc=airlied@linux.ie \ --cc=cw00.choi@samsung.com \ --cc=devicetree@vger.kernel.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=inki.dae@samsung.com \ --cc=jh80.chung@samsung.com \ --cc=kgene@kernel.org \ --cc=krzk@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=robh@kernel.org \ --cc=thierry.reding@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.