Re: [RFC v2 PATCH v2 06/14] drm/exynos: support MIPI DSI command mode
On Mon, Apr 21, 2014 at 09:28:33PM +0900, YoungJun Cho wrote: [...] diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 7209df1..244d197 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -49,6 +49,7 @@ struct mipi_dsi_msg { * @detach: detach DSI device from DSI host * @transfer: send and/or receive DSI packet, return number of received bytes, * or error + * @te_handler: call CRTC TE handler callback from DSI host Perhaps you can explain some more what this means or why it would be necessary. diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index c2ab77a..0ad64ed 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -46,6 +46,13 @@ struct drm_panel { struct list_head list; }; +struct drm_panel_cpu_timings { + unsigned int cs_setup; + unsigned int wr_setup; + unsigned int wr_act; + unsigned int wr_hold; +}; Similarily here. What's this? Thierry pgpa1qjawTH3P.pgp Description: PGP signature
Re: [RFC v2 PATCH v2 06/14] drm/exynos: support MIPI DSI command mode
Hi Thierry Thank you for the comments. On 04/22/2014 04:34 PM, Thierry Reding wrote: On Mon, Apr 21, 2014 at 09:28:33PM +0900, YoungJun Cho wrote: [...] diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 7209df1..244d197 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -49,6 +49,7 @@ struct mipi_dsi_msg { * @detach: detach DSI device from DSI host * @transfer: send and/or receive DSI packet, return number of received bytes, * or error + * @te_handler: call CRTC TE handler callback from DSI host Perhaps you can explain some more what this means or why it would be necessary. I'll enhance the explanation. For your information, the panel generates Tearing Effect signal to synchronize between the MCU and Frame Memory Writing when displays video images. The display controller requires this signal to trigger video images, and there is no way to receive this signal directly. So the panel receive this signal as an IRQ and calls te_handler() chain for the display controller to trigger video image at that time. diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index c2ab77a..0ad64ed 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -46,6 +46,13 @@ struct drm_panel { struct list_head list; }; +struct drm_panel_cpu_timings { + unsigned int cs_setup; + unsigned int wr_setup; + unsigned int wr_act; + unsigned int wr_hold; +}; Similarily here. What's this? I'll enhance the explanation also. In panel DT bindings, I already explained them. Thank you. Best regards YJ Thierry -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC v2 PATCH v2 06/14] drm/exynos: support MIPI DSI command mode
This patch adds I80 interface for FIMD to support command mode panel. For this, the below features are added: - Sets display interface mode relevant registers properly according to the interface type from DT - Adds drm_panel_cpu_timings structure . The command mode panel sets them as the private attributes in struct drm_display_mode and FIMD gets them by fimd_mode_set(). - Adds TE interrupt handler . FIMD driver should know TE signal from lcd panel to avoid tearing issue. - Adds trigger feature . In case of command mode panel, FIMD should set trigger bit, so that image data has to be transferred to display bus or lcd panel. Changelog v2: - Moves CPU timings relevant properties to panel DT (commented by Laurent Pinchart, Andrzej Hajda) Signed-off-by: YoungJun Cho yj44@samsung.com Acked-by: Inki Dae inki@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/gpu/drm/exynos/Kconfig |1 + drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 ++ drivers/gpu/drm/exynos/exynos_drm_crtc.h |2 + drivers/gpu/drm/exynos/exynos_drm_drv.h |2 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 280 +- include/drm/drm_mipi_dsi.h |2 + include/drm/drm_panel.h |7 + include/video/samsung_fimd.h |3 +- 9 files changed, 277 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 5bf5bca..f4d34f0 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -28,6 +28,7 @@ config DRM_EXYNOS_FIMD bool Exynos DRM FIMD depends on DRM_EXYNOS !FB_S3C !ARCH_MULTIPLATFORM select FB_MODE_HELPERS + select MFD_SYSCON help Choose this option if you want to use Exynos FIMD for DRM. diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 1419d11..d902d64 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -491,3 +491,14 @@ void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb) manager-ops-wait_for_vblank(manager); } } + +int exynos_drm_crtc_te_handler(struct drm_crtc *crtc) +{ + struct exynos_drm_manager *manager = to_exynos_crtc(crtc)-manager; + int ret = 0; + + if (manager-ops-te_handler) + ret = manager-ops-te_handler(manager); + + return ret; +} diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.h b/drivers/gpu/drm/exynos/exynos_drm_crtc.h index c27b66c..8482df2 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.h +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.h @@ -32,4 +32,6 @@ void exynos_drm_crtc_plane_commit(struct drm_crtc *crtc, int zpos); void exynos_drm_crtc_plane_enable(struct drm_crtc *crtc, int zpos); void exynos_drm_crtc_plane_disable(struct drm_crtc *crtc, int zpos); +int exynos_drm_crtc_te_handler(struct drm_crtc *crtc); + #endif diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index 4c5cf68..7cb0baf 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -186,6 +186,7 @@ struct exynos_drm_display { * @win_commit: apply hardware specific overlay data to registers. * @win_enable: enable hardware specific overlay. * @win_disable: disable hardware specific overlay. + * @te_handler: call driver specific TE handler callback. */ struct exynos_drm_manager; struct exynos_drm_manager_ops { @@ -207,6 +208,7 @@ struct exynos_drm_manager_ops { void (*win_commit)(struct exynos_drm_manager *mgr, int zpos); void (*win_enable)(struct exynos_drm_manager *mgr, int zpos); void (*win_disable)(struct exynos_drm_manager *mgr, int zpos); + int (*te_handler)(struct exynos_drm_manager *mgr); }; /* diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 2cf1f0b..179f2fa 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -23,6 +23,7 @@ #include video/mipi_display.h #include video/videomode.h +#include exynos_drm_crtc.h #include exynos_drm_drv.h /* returns true iff both arguments logically differs */ @@ -1032,10 +1033,22 @@ static ssize_t exynos_dsi_host_transfer(struct mipi_dsi_host *host, return (ret 0) ? ret : xfer.rx_done; } +static int exynos_dsi_host_te_handler(struct mipi_dsi_host *host) +{ + struct exynos_dsi *dsi = host_to_dsi(host); + struct drm_encoder *encoder = dsi-encoder; + + if (!(dsi-state DSIM_STATE_ENABLED)) + return -EPERM; + + return exynos_drm_crtc_te_handler(encoder-crtc); +} + static const struct mipi_dsi_host_ops exynos_dsi_ops = { .attach = exynos_dsi_host_attach, .detach = exynos_dsi_host_detach,
Re: [RFC v2 PATCH v2 06/14] drm/exynos: support MIPI DSI command mode
Hi YoungJun, Thank you for the patch. On Monday 21 April 2014 21:28:33 YoungJun Cho wrote: This patch adds I80 interface for FIMD to support command mode panel. For this, the below features are added: - Sets display interface mode relevant registers properly according to the interface type from DT - Adds drm_panel_cpu_timings structure . The command mode panel sets them as the private attributes in struct drm_display_mode and FIMD gets them by fimd_mode_set(). - Adds TE interrupt handler . FIMD driver should know TE signal from lcd panel to avoid tearing issue. - Adds trigger feature . In case of command mode panel, FIMD should set trigger bit, so that image data has to be transferred to display bus or lcd panel. Changelog v2: - Moves CPU timings relevant properties to panel DT (commented by Laurent Pinchart, Andrzej Hajda) Signed-off-by: YoungJun Cho yj44@samsung.com Acked-by: Inki Dae inki@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/gpu/drm/exynos/Kconfig |1 + drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 ++ drivers/gpu/drm/exynos/exynos_drm_crtc.h |2 + drivers/gpu/drm/exynos/exynos_drm_drv.h |2 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 280 ++- include/drm/drm_mipi_dsi.h |2 + include/drm/drm_panel.h |7 + Could you please split the DRM core changes into two separate standalone patches (as they're unrelated to each other) ? include/video/samsung_fimd.h |3 +- 9 files changed, 277 insertions(+), 44 deletions(-) [snip] -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC v2 PATCH v2 06/14] drm/exynos: support MIPI DSI command mode
Hi Laurent, Thank you for the comment. On 04/22/2014 07:52 AM, Laurent Pinchart wrote: Hi YoungJun, Thank you for the patch. On Monday 21 April 2014 21:28:33 YoungJun Cho wrote: This patch adds I80 interface for FIMD to support command mode panel. For this, the below features are added: - Sets display interface mode relevant registers properly according to the interface type from DT - Adds drm_panel_cpu_timings structure . The command mode panel sets them as the private attributes in struct drm_display_mode and FIMD gets them by fimd_mode_set(). - Adds TE interrupt handler . FIMD driver should know TE signal from lcd panel to avoid tearing issue. - Adds trigger feature . In case of command mode panel, FIMD should set trigger bit, so that image data has to be transferred to display bus or lcd panel. Changelog v2: - Moves CPU timings relevant properties to panel DT (commented by Laurent Pinchart, Andrzej Hajda) Signed-off-by: YoungJun Cho yj44@samsung.com Acked-by: Inki Dae inki@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/gpu/drm/exynos/Kconfig |1 + drivers/gpu/drm/exynos/exynos_drm_crtc.c | 11 ++ drivers/gpu/drm/exynos/exynos_drm_crtc.h |2 + drivers/gpu/drm/exynos/exynos_drm_drv.h |2 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 ++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 280 ++- include/drm/drm_mipi_dsi.h |2 + include/drm/drm_panel.h |7 + Could you please split the DRM core changes into two separate standalone patches (as they're unrelated to each other) ? Ok, it could be split into core and driver ones. The DRM core changes are required to link with TE irq handler callback. I'll do it next patch set. Thank you. Best regards YJ include/video/samsung_fimd.h |3 +- 9 files changed, 277 insertions(+), 44 deletions(-) [snip] -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html