Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding atomic_check callback to exynos_crtc and replacing direct function call with DRM framework validation. As a result HDMI driver does not depend anymore on MIXER driver and both drivers can be selected with different Kconfig options, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP. Additionally patchset performs small Kconfig refactoring.
Krzysztof could you look at exynos_defconfig patch. Maybe it would be good to merge it before next patch to allow full bi-sectability :)
Regards Andrzej
Andrzej Hajda (7): drm/exynos: add atomic_check callback to exynos_crtc drm/exynos/mixer: replace direct cross-driver call with drm mode validation ARM: exynos_defconfig: enable Exynos DRM Mixer driver drm/exynos: separate Mixer and HDMI drivers drm/exynos: abstract out common dependency drm/exynos: re-arrange Kconfig entries drm/exynos: simplify Kconfig component names
arch/arm/configs/exynos_defconfig | 1 + drivers/gpu/drm/exynos/Kconfig | 75 +++++++++++++++++++------------- drivers/gpu/drm/exynos/Makefile | 3 +- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 +++++ drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 ++ drivers/gpu/drm/exynos/exynos_hdmi.c | 5 --- drivers/gpu/drm/exynos/exynos_mixer.c | 6 ++- drivers/gpu/drm/exynos/exynos_mixer.h | 20 --------- 9 files changed, 69 insertions(+), 60 deletions(-) delete mode 100644 drivers/gpu/drm/exynos/exynos_mixer.h
Some CRTCs needs mode validation, this patch adds neccessary callback to Exynos DRM framework. It is called from DRM core via atomic_check helper for drm_crtc.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 ++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +++ 2 files changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 50dec0d..b3ba27f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -50,6 +50,17 @@ exynos_drm_crtc_mode_set_nofb(struct drm_crtc *crtc) exynos_crtc->ops->commit(exynos_crtc); }
+static int exynos_crtc_atomic_check(struct drm_crtc *crtc, + struct drm_crtc_state *state) +{ + struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); + + if (exynos_crtc->ops->atomic_check) + return exynos_crtc->ops->atomic_check(exynos_crtc, state); + + return 0; +} + static void exynos_crtc_atomic_begin(struct drm_crtc *crtc, struct drm_crtc_state *old_crtc_state) { @@ -86,6 +97,7 @@ static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { .enable = exynos_drm_crtc_enable, .disable = exynos_drm_crtc_disable, .mode_set_nofb = exynos_drm_crtc_mode_set_nofb, + .atomic_check = exynos_crtc_atomic_check, .atomic_begin = exynos_crtc_atomic_begin, .atomic_flush = exynos_crtc_atomic_flush, }; diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index 638fc43..f1eda7f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -89,6 +89,7 @@ struct exynos_drm_plane { * @disable_vblank: specific driver callback for disabling vblank interrupt. * @wait_for_vblank: wait for vblank interrupt to make sure that * hardware overlay is updated. + * @atomic_check: validate state * @atomic_begin: prepare a window to receive a update * @atomic_flush: mark the end of a window update * @update_plane: apply hardware specific overlay data to registers. @@ -108,6 +109,8 @@ struct exynos_drm_crtc_ops { int (*enable_vblank)(struct exynos_drm_crtc *crtc); void (*disable_vblank)(struct exynos_drm_crtc *crtc); void (*wait_for_vblank)(struct exynos_drm_crtc *crtc); + int (*atomic_check)(struct exynos_drm_crtc *crtc, + struct drm_crtc_state *state); void (*atomic_begin)(struct exynos_drm_crtc *crtc, struct exynos_drm_plane *plane); void (*update_plane)(struct exynos_drm_crtc *crtc,
HDMI driver called directly function from MIXER driver to invalidate modes not supported by MIXER. The patch replaces the hack with proper .atomic_check callback.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- drivers/gpu/drm/exynos/exynos_hdmi.c | 5 ----- drivers/gpu/drm/exynos/exynos_mixer.c | 6 ++++-- drivers/gpu/drm/exynos/exynos_mixer.h | 20 -------------------- 3 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 drivers/gpu/drm/exynos/exynos_mixer.h
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index b0f5ff4..57b6755 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -44,7 +44,6 @@
#include "exynos_drm_drv.h" #include "exynos_drm_crtc.h" -#include "exynos_mixer.h"
#define HOTPLUG_DEBOUNCE_MS 1100
@@ -1017,10 +1016,6 @@ static int hdmi_mode_valid(struct drm_connector *connector, (mode->flags & DRM_MODE_FLAG_INTERLACE) ? true : false, mode->clock * 1000);
- ret = mixer_check_mode(mode); - if (ret) - return MODE_BAD; - ret = hdmi_find_phy_conf(hdata, mode->clock * 1000); if (ret < 0) return MODE_BAD; diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index 3f9f072..d09f8f9 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -39,7 +39,6 @@ #include "exynos_drm_crtc.h" #include "exynos_drm_plane.h" #include "exynos_drm_iommu.h" -#include "exynos_mixer.h"
#define MIXER_WIN_NR 3 #define VP_DEFAULT_WIN 2 @@ -1096,8 +1095,10 @@ static void mixer_disable(struct exynos_drm_crtc *crtc) }
/* Only valid for Mixer version 16.0.33.0 */ -int mixer_check_mode(struct drm_display_mode *mode) +static int mixer_atomic_check(struct exynos_drm_crtc *crtc, + struct drm_crtc_state *state) { + struct drm_display_mode *mode = &state->adjusted_mode; u32 w, h;
w = mode->hdisplay; @@ -1123,6 +1124,7 @@ static const struct exynos_drm_crtc_ops mixer_crtc_ops = { .wait_for_vblank = mixer_wait_for_vblank, .update_plane = mixer_update_plane, .disable_plane = mixer_disable_plane, + .atomic_check = mixer_atomic_check, };
static struct mixer_drv_data exynos5420_mxr_drv_data = { diff --git a/drivers/gpu/drm/exynos/exynos_mixer.h b/drivers/gpu/drm/exynos/exynos_mixer.h deleted file mode 100644 index 3811e41..0000000 --- a/drivers/gpu/drm/exynos/exynos_mixer.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2013 Google, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef _EXYNOS_MIXER_H_ -#define _EXYNOS_MIXER_H_ - -/* This function returns 0 if the given timing is valid for the mixer */ -int mixer_check_mode(struct drm_display_mode *mode); - -#endif
Hello Andrzej,
On Mon, Oct 26, 2015 at 9:03 AM, Andrzej Hajda a.hajda@samsung.com wrote:
HDMI driver called directly function from MIXER driver to invalidate modes not supported by MIXER. The patch replaces the hack with proper .atomic_check callback.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com
It seems this patch is not a drop-in replacement since it causes a "Division by zero in kernel" error with v4.4-rc2 on an Exynos5800 Peach Pi, causing the display console to not be initialized. X works correctly though.
An interesting data point is that it only happens when the HDMI monitor is not plugged on the first mode set, everything works correctly when booting with a HDMI monitor plugged.
Following is the relevant messages from the kernel log buffer:
[ 14.295702] Division by zero in kernel. [ 14.298191] CPU: 0 PID: 2008 Comm: Xorg Not tainted 4.4.0-rc2 #111 [ 14.304243] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 14.310334] [<c0015f08>] (unwind_backtrace) from [<c0012c94>] (show_stack+0x10/0x14) [ 14.318072] [<c0012c94>] (show_stack) from [<c01f8f80>] (dump_stack+0x84/0xc4) [ 14.325264] [<c01f8f80>] (dump_stack) from [<c01f7a90>] (Ldiv0+0x8/0x10) [ 14.331943] [<c01f7a90>] (Ldiv0) from [<c02b34f8>] (fimd_commit+0x1f0/0x2b4) [ 14.338968] [<c02b34f8>] (fimd_commit) from [<c02b0788>] (exynos_drm_crtc_enable+0x1c/0x28) [ 14.347303] [<c02b0788>] (exynos_drm_crtc_enable) from [<c028b328>] (drm_atomic_helper_commit_modeset_enables+0x98/0x198) [ 14.358227] [<c028b328>] (drm_atomic_helper_commit_modeset_enables) from [<c02afc40>] (exynos_atomic_commit_complete+0x2c/0x1c4) [ 14.369761] [<c02afc40>] (exynos_atomic_commit_complete) from [<c02b0604>] (exynos_atomic_commit+0x180/0x1cc) [ 14.379681] [<c02b0604>] (exynos_atomic_commit) from [<c028c770>] (drm_atomic_helper_set_config+0x6c/0x90) [ 14.389301] [<c028c770>] (drm_atomic_helper_set_config) from [<c029cabc>] (drm_mode_set_config_internal+0x58/0xd4) [ 14.399629] [<c029cabc>] (drm_mode_set_config_internal) from [<c02a18d0>] (drm_mode_setcrtc+0x148/0x4bc) [ 14.409078] [<c02a18d0>] (drm_mode_setcrtc) from [<c029489c>] (drm_ioctl+0x12c/0x49c) [ 14.416892] [<c029489c>] (drm_ioctl) from [<c00ec19c>] (do_vfs_ioctl+0x498/0x6c8) [ 14.424346] [<c00ec19c>] (do_vfs_ioctl) from [<c00ec400>] (SyS_ioctl+0x34/0x5c) [ 14.431638] [<c00ec400>] (SyS_ioctl) from [<c000f600>] (ret_fast_syscall+0x0/0x3c)
Best regards, Javier
Since atomic check is called also for disabled crtcs it should skip mode checking as it can be uninitialized. The patch fixes it.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch --- Hi Javier,
Could you check with this patch.
Regards Andrzej
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index b3ba27f..e693571 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -55,6 +55,9 @@ static int exynos_crtc_atomic_check(struct drm_crtc *crtc, { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
+ if (!state->enable) + return 0; + if (exynos_crtc->ops->atomic_check) return exynos_crtc->ops->atomic_check(exynos_crtc, state);
Hello Andrzej,
On 11/27/2015 03:57 AM, Andrzej Hajda wrote:
Since atomic check is called also for disabled crtcs it should skip mode checking as it can be uninitialized. The patch fixes it.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch
Hi Javier,
Could you check with this patch.
The patch fixes the issue I reported. The display mode is correctly set with and without a HDMI monitor plugged. So on an Exynos5800 Peach Pi:
Tested-by: Javier Martinez Canillas javier@osg.samsung.com
Best regards,
Hello Inki,
On 11/27/2015 10:00 AM, Javier Martinez Canillas wrote:
Hello Andrzej,
On 11/27/2015 03:57 AM, Andrzej Hajda wrote:
Since atomic check is called also for disabled crtcs it should skip mode checking as it can be uninitialized. The patch fixes it.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch
Hi Javier,
Could you check with this patch.
The patch fixes the issue I reported. The display mode is correctly set with and without a HDMI monitor plugged. So on an Exynos5800 Peach Pi:
Tested-by: Javier Martinez Canillas javier@osg.samsung.com
This patch was never picked but fixes and important bug introduced in the v4.4 merge window so it should be sent during the v4.4-rc cycle.
Best regards,
Hi Javier,
2015-12-09 19:51 GMT+09:00 Javier Martinez Canillas javier@osg.samsung.com:
Hello Inki,
On 11/27/2015 10:00 AM, Javier Martinez Canillas wrote:
Hello Andrzej,
On 11/27/2015 03:57 AM, Andrzej Hajda wrote:
Since atomic check is called also for disabled crtcs it should skip mode checking as it can be uninitialized. The patch fixes it.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com Suggested-by: Daniel Vetter daniel.vetter@ffwll.ch
Hi Javier,
Could you check with this patch.
The patch fixes the issue I reported. The display mode is correctly set with and without a HDMI monitor plugged. So on an Exynos5800 Peach Pi:
Tested-by: Javier Martinez Canillas javier@osg.samsung.com
This patch was never picked but fixes and important bug introduced in the v4.4 merge window so it should be sent during the v4.4-rc cycle.
Don't worry about that.
Thanks, Inki Dae
Best regards,
Javier Martinez Canillas Open Source Group Samsung Research America _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Mixer driver is selected by CONFIG_DRM_EXYNOS_HDMI option. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig before Kconfig will allow to keep bisectability.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig index 1ff2bfa..af79a21 100644 --- a/arch/arm/configs/exynos_defconfig +++ b/arch/arm/configs/exynos_defconfig @@ -132,6 +132,7 @@ CONFIG_DRM_PARADE_PS8622=y CONFIG_DRM_EXYNOS=y CONFIG_DRM_EXYNOS_FIMD=y CONFIG_DRM_EXYNOS_DSI=y +CONFIG_DRM_EXYNOS_MIXER=y CONFIG_DRM_EXYNOS_HDMI=y CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=y
On 26.10.2015 21:03, Andrzej Hajda wrote:
Mixer driver is selected by CONFIG_DRM_EXYNOS_HDMI option. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig before Kconfig will allow to keep bisectability.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com
arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Krzysztof Kozlowski k.kozlowski@samsung.com
I guess this will go with rest of patchset through Exynos DRM tree: Acked-by: Krzysztof Kozlowski k.kozlowski@samsung.com
Best regards, Krzysztof
2015년 10월 28일 15:09에 Krzysztof Kozlowski 이(가) 쓴 글:
On 26.10.2015 21:03, Andrzej Hajda wrote:
Mixer driver is selected by CONFIG_DRM_EXYNOS_HDMI option. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig before Kconfig will allow to keep bisectability.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com
arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Krzysztof Kozlowski k.kozlowski@samsung.com
I guess this will go with rest of patchset through Exynos DRM tree: Acked-by: Krzysztof Kozlowski k.kozlowski@samsung.com
Thanks for ack. I will pick it up.
Thanks, Inki Dae
Best regards, Krzysztof
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/26/2015 01:03 PM, Andrzej Hajda wrote:
Mixer driver is selected by CONFIG_DRM_EXYNOS_HDMI option. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig before Kconfig will allow to keep bisectability.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com
arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
Thanks, applied.
Krzysztof
Latest Exynos SoCs does not have Mixer IP, but they still have HDMI IP. Their drivers should be configurable separately.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- drivers/gpu/drm/exynos/Kconfig | 8 +++++++- drivers/gpu/drm/exynos/Makefile | 3 ++- drivers/gpu/drm/exynos/exynos_drm_drv.c | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 16cb1f7..c0dc056 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -62,9 +62,15 @@ config DRM_EXYNOS_DP help This enables support for DP device.
+config DRM_EXYNOS_MIXER + bool "Exynos DRM Mixer" + depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_TV + help + Choose this option if you want to use Exynos Mixer for DRM. + config DRM_EXYNOS_HDMI bool "Exynos DRM HDMI" - depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_TV + depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_TV && (DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON) help Choose this option if you want to use Exynos HDMI for DRM.
diff --git a/drivers/gpu/drm/exynos/Makefile b/drivers/gpu/drm/exynos/Makefile index 02aecfe..6496532 100644 --- a/drivers/gpu/drm/exynos/Makefile +++ b/drivers/gpu/drm/exynos/Makefile @@ -14,7 +14,8 @@ exynosdrm-$(CONFIG_DRM_EXYNOS7_DECON) += exynos7_drm_decon.o exynosdrm-$(CONFIG_DRM_EXYNOS_DPI) += exynos_drm_dpi.o exynosdrm-$(CONFIG_DRM_EXYNOS_DSI) += exynos_drm_dsi.o exynosdrm-$(CONFIG_DRM_EXYNOS_DP) += exynos_dp_core.o exynos_dp_reg.o -exynosdrm-$(CONFIG_DRM_EXYNOS_HDMI) += exynos_hdmi.o exynos_mixer.o +exynosdrm-$(CONFIG_DRM_EXYNOS_MIXER) += exynos_mixer.o +exynosdrm-$(CONFIG_DRM_EXYNOS_HDMI) += exynos_hdmi.o exynosdrm-$(CONFIG_DRM_EXYNOS_VIDI) += exynos_drm_vidi.o exynosdrm-$(CONFIG_DRM_EXYNOS_G2D) += exynos_drm_g2d.o exynosdrm-$(CONFIG_DRM_EXYNOS_IPP) += exynos_drm_ipp.o diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 0a05117..ba4de7d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -531,8 +531,10 @@ static struct platform_driver *const exynos_drm_kms_drivers[] = { #ifdef CONFIG_DRM_EXYNOS_DSI &dsi_driver, #endif -#ifdef CONFIG_DRM_EXYNOS_HDMI +#ifdef CONFIG_DRM_EXYNOS_MIXER &mixer_driver, +#endif +#ifdef CONFIG_DRM_EXYNOS_HDMI &hdmi_driver, #endif #ifdef CONFIG_DRM_EXYNOS_VIDI
All options depends on DRM_EXYNOS so it can be moved to enclosing if clause.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- drivers/gpu/drm/exynos/Kconfig | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index c0dc056..25351d0 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -11,14 +11,16 @@ config DRM_EXYNOS Choose this option if you have a Samsung SoC EXYNOS chipset. If M is selected the module will be called exynosdrm.
+if DRM_EXYNOS + config DRM_EXYNOS_IOMMU bool - depends on DRM_EXYNOS && EXYNOS_IOMMU && ARM_DMA_USE_IOMMU + depends on EXYNOS_IOMMU && ARM_DMA_USE_IOMMU default y
config DRM_EXYNOS_FIMD bool "Exynos DRM FIMD" - depends on DRM_EXYNOS && !FB_S3C + depends on !FB_S3C select FB_MODE_HELPERS select MFD_SYSCON help @@ -26,20 +28,19 @@ config DRM_EXYNOS_FIMD
config DRM_EXYNOS5433_DECON bool "Exynos5433 DRM DECON" - depends on DRM_EXYNOS help Choose this option if you want to use Exynos5433 DECON for DRM.
config DRM_EXYNOS7_DECON bool "Exynos7 DRM DECON" - depends on DRM_EXYNOS && !FB_S3C + depends on !FB_S3C select FB_MODE_HELPERS help Choose this option if you want to use Exynos DECON for DRM.
config DRM_EXYNOS_DPI bool "EXYNOS DRM parallel output support" - depends on DRM_EXYNOS && (DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON) + depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON select DRM_PANEL default n help @@ -47,7 +48,7 @@ config DRM_EXYNOS_DPI
config DRM_EXYNOS_DSI bool "EXYNOS DRM MIPI-DSI driver support" - depends on DRM_EXYNOS && (DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON) + depends on DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON select DRM_MIPI_DSI select DRM_PANEL default n @@ -56,7 +57,7 @@ config DRM_EXYNOS_DSI
config DRM_EXYNOS_DP bool "EXYNOS DRM DP driver support" - depends on DRM_EXYNOS && (DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON) + depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON default DRM_EXYNOS select DRM_PANEL help @@ -64,32 +65,30 @@ config DRM_EXYNOS_DP
config DRM_EXYNOS_MIXER bool "Exynos DRM Mixer" - depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_TV + depends on !VIDEO_SAMSUNG_S5P_TV help Choose this option if you want to use Exynos Mixer for DRM.
config DRM_EXYNOS_HDMI bool "Exynos DRM HDMI" - depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_TV && (DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON) + depends on !VIDEO_SAMSUNG_S5P_TV && (DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON) help Choose this option if you want to use Exynos HDMI for DRM.
config DRM_EXYNOS_VIDI bool "Exynos DRM Virtual Display" - depends on DRM_EXYNOS help Choose this option if you want to use Exynos VIDI for DRM.
config DRM_EXYNOS_G2D bool "Exynos DRM G2D" - depends on DRM_EXYNOS && !VIDEO_SAMSUNG_S5P_G2D + depends on !VIDEO_SAMSUNG_S5P_G2D select FRAME_VECTOR help Choose this option if you want to use Exynos G2D for DRM.
config DRM_EXYNOS_IPP bool "Exynos DRM IPP" - depends on DRM_EXYNOS help Choose this option if you want to use IPP feature for DRM.
@@ -113,6 +112,8 @@ config DRM_EXYNOS_GSC
config DRM_EXYNOS_MIC bool "Exynos DRM MIC" - depends on (DRM_EXYNOS && DRM_EXYNOS5433_DECON) + depends on DRM_EXYNOS5433_DECON help Choose this option if you want to use Exynos MIC for DRM. + +endif
Exynos DRM driver have quite big number of components and options. The patch re-arranges them into three logical groups: - CRTCs, - Encoders and Bridges, - Sub-drivers. It should make driver options more clear.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- drivers/gpu/drm/exynos/Kconfig | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 25351d0..86ff8ab 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -18,6 +18,8 @@ config DRM_EXYNOS_IOMMU depends on EXYNOS_IOMMU && ARM_DMA_USE_IOMMU default y
+comment "CRTCs" + config DRM_EXYNOS_FIMD bool "Exynos DRM FIMD" depends on !FB_S3C @@ -38,9 +40,22 @@ config DRM_EXYNOS7_DECON help Choose this option if you want to use Exynos DECON for DRM.
+config DRM_EXYNOS_MIXER + bool "Exynos DRM Mixer" + depends on !VIDEO_SAMSUNG_S5P_TV + help + Choose this option if you want to use Exynos Mixer for DRM. + +config DRM_EXYNOS_VIDI + bool "Exynos DRM Virtual Display" + help + Choose this option if you want to use Exynos VIDI for DRM. + +comment "Encoders and Bridges" + config DRM_EXYNOS_DPI bool "EXYNOS DRM parallel output support" - depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON + depends on DRM_EXYNOS_FIMD select DRM_PANEL default n help @@ -63,22 +78,19 @@ config DRM_EXYNOS_DP help This enables support for DP device.
-config DRM_EXYNOS_MIXER - bool "Exynos DRM Mixer" - depends on !VIDEO_SAMSUNG_S5P_TV - help - Choose this option if you want to use Exynos Mixer for DRM. - config DRM_EXYNOS_HDMI bool "Exynos DRM HDMI" depends on !VIDEO_SAMSUNG_S5P_TV && (DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON) help Choose this option if you want to use Exynos HDMI for DRM.
-config DRM_EXYNOS_VIDI - bool "Exynos DRM Virtual Display" +config DRM_EXYNOS_MIC + bool "Exynos DRM MIC" + depends on DRM_EXYNOS5433_DECON help - Choose this option if you want to use Exynos VIDI for DRM. + Choose this option if you want to use Exynos MIC for DRM. + +comment "Sub-drivers"
config DRM_EXYNOS_G2D bool "Exynos DRM G2D" @@ -110,10 +122,4 @@ config DRM_EXYNOS_GSC help Choose this option if you want to use Exynos GSC for DRM.
-config DRM_EXYNOS_MIC - bool "Exynos DRM MIC" - depends on DRM_EXYNOS5433_DECON - help - Choose this option if you want to use Exynos MIC for DRM. - endif
Many Exynos DRM sub-options mentions Exynos DRM in their titles. It is redundant and can be safely shortened. The patch additionally makes some entries more descriptive.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- drivers/gpu/drm/exynos/Kconfig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 86ff8ab..fbc28fa 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -21,7 +21,7 @@ config DRM_EXYNOS_IOMMU comment "CRTCs"
config DRM_EXYNOS_FIMD - bool "Exynos DRM FIMD" + bool "FIMD" depends on !FB_S3C select FB_MODE_HELPERS select MFD_SYSCON @@ -29,32 +29,32 @@ config DRM_EXYNOS_FIMD Choose this option if you want to use Exynos FIMD for DRM.
config DRM_EXYNOS5433_DECON - bool "Exynos5433 DRM DECON" + bool "DECON on Exynos5433" help Choose this option if you want to use Exynos5433 DECON for DRM.
config DRM_EXYNOS7_DECON - bool "Exynos7 DRM DECON" + bool "DECON on Exynos7" depends on !FB_S3C select FB_MODE_HELPERS help Choose this option if you want to use Exynos DECON for DRM.
config DRM_EXYNOS_MIXER - bool "Exynos DRM Mixer" + bool "Mixer" depends on !VIDEO_SAMSUNG_S5P_TV help Choose this option if you want to use Exynos Mixer for DRM.
config DRM_EXYNOS_VIDI - bool "Exynos DRM Virtual Display" + bool "Virtual Display" help Choose this option if you want to use Exynos VIDI for DRM.
comment "Encoders and Bridges"
config DRM_EXYNOS_DPI - bool "EXYNOS DRM parallel output support" + bool "Parallel output" depends on DRM_EXYNOS_FIMD select DRM_PANEL default n @@ -62,7 +62,7 @@ config DRM_EXYNOS_DPI This enables support for Exynos parallel output.
config DRM_EXYNOS_DSI - bool "EXYNOS DRM MIPI-DSI driver support" + bool "MIPI-DSI host" depends on DRM_EXYNOS_FIMD || DRM_EXYNOS5433_DECON || DRM_EXYNOS7_DECON select DRM_MIPI_DSI select DRM_PANEL @@ -71,7 +71,7 @@ config DRM_EXYNOS_DSI This enables support for Exynos MIPI-DSI device.
config DRM_EXYNOS_DP - bool "EXYNOS DRM DP driver support" + bool "Display Port" depends on DRM_EXYNOS_FIMD || DRM_EXYNOS7_DECON default DRM_EXYNOS select DRM_PANEL @@ -79,13 +79,13 @@ config DRM_EXYNOS_DP This enables support for DP device.
config DRM_EXYNOS_HDMI - bool "Exynos DRM HDMI" + bool "HDMI" depends on !VIDEO_SAMSUNG_S5P_TV && (DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON) help Choose this option if you want to use Exynos HDMI for DRM.
config DRM_EXYNOS_MIC - bool "Exynos DRM MIC" + bool "Mobile Image Compressor" depends on DRM_EXYNOS5433_DECON help Choose this option if you want to use Exynos MIC for DRM. @@ -93,31 +93,31 @@ config DRM_EXYNOS_MIC comment "Sub-drivers"
config DRM_EXYNOS_G2D - bool "Exynos DRM G2D" + bool "G2D" depends on !VIDEO_SAMSUNG_S5P_G2D select FRAME_VECTOR help Choose this option if you want to use Exynos G2D for DRM.
config DRM_EXYNOS_IPP - bool "Exynos DRM IPP" + bool "Image Post Processor" help Choose this option if you want to use IPP feature for DRM.
config DRM_EXYNOS_FIMC - bool "Exynos DRM FIMC" + bool "FIMC" depends on DRM_EXYNOS_IPP && MFD_SYSCON help Choose this option if you want to use Exynos FIMC for DRM.
config DRM_EXYNOS_ROTATOR - bool "Exynos DRM Rotator" + bool "Rotator" depends on DRM_EXYNOS_IPP help Choose this option if you want to use Exynos Rotator for DRM.
config DRM_EXYNOS_GSC - bool "Exynos DRM GSC" + bool "GScaler" depends on DRM_EXYNOS_IPP && ARCH_EXYNOS5 && !ARCH_MULTIPLATFORM help Choose this option if you want to use Exynos GSC for DRM.
On 26.10.2015 21:03, Andrzej Hajda wrote:
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding atomic_check callback to exynos_crtc and replacing direct function call with DRM framework validation. As a result HDMI driver does not depend anymore on MIXER driver and both drivers can be selected with different Kconfig options, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP. Additionally patchset performs small Kconfig refactoring.
Krzysztof could you look at exynos_defconfig patch. Maybe it would be good to merge it before next patch to allow full bi-sectability :)
I would be happy to see similar for multi_v7. HDMI is already there.
I also wonder why actually DRM_EXYNOS_HDMI has to depend on MIXER or DECON?
Best regards, Krzysztof
2015년 10월 28일 10:37에 Krzysztof Kozlowski 이(가) 쓴 글:
On 26.10.2015 21:03, Andrzej Hajda wrote:
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding atomic_check callback to exynos_crtc and replacing direct function call with DRM framework validation. As a result HDMI driver does not depend anymore on MIXER driver and both drivers can be selected with different Kconfig options, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP. Additionally patchset performs small Kconfig refactoring.
Krzysztof could you look at exynos_defconfig patch. Maybe it would be good to merge it before next patch to allow full bi-sectability :)
I would be happy to see similar for multi_v7. HDMI is already there.
I also wonder why actually DRM_EXYNOS_HDMI has to depend on MIXER or DECON?
DECON controller has two kinds of data paths in case of Exynos5433 or later. One is Display path and other is TV path. So it'd be reasonable for DRM_EXYNOS_HDMI to depend on MIXER or DECON - TV path of DECON controller transfers Display data to HDMI like MIXER IP of previous Exynos SoC did.
Thanks, Inki Dae
Best regards, Krzysztof
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 28.10.2015 14:30, Inki Dae wrote:
2015년 10월 28일 10:37에 Krzysztof Kozlowski 이(가) 쓴 글:
On 26.10.2015 21:03, Andrzej Hajda wrote:
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding atomic_check callback to exynos_crtc and replacing direct function call with DRM framework validation. As a result HDMI driver does not depend anymore on MIXER driver and both drivers can be selected with different Kconfig options, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP. Additionally patchset performs small Kconfig refactoring.
Krzysztof could you look at exynos_defconfig patch. Maybe it would be good to merge it before next patch to allow full bi-sectability :)
I would be happy to see similar for multi_v7. HDMI is already there.
I also wonder why actually DRM_EXYNOS_HDMI has to depend on MIXER or DECON?
DECON controller has two kinds of data paths in case of Exynos5433 or later. One is Display path and other is TV path. So it'd be reasonable for DRM_EXYNOS_HDMI to depend on MIXER or DECON - TV path of DECON controller transfers Display data to HDMI like MIXER IP of previous Exynos SoC did.
So this is not a build-time dependency but rather runtime? What will happen if HDMI is compiled and enabled (for example in DTB) but there will be no DECON nor MIXER compiled in?
Best regards, Krzysztof
On 28.10.2015 14:38, Krzysztof Kozlowski wrote:
On 28.10.2015 14:30, Inki Dae wrote:
2015년 10월 28일 10:37에 Krzysztof Kozlowski 이(가) 쓴 글:
On 26.10.2015 21:03, Andrzej Hajda wrote:
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding atomic_check callback to exynos_crtc and replacing direct function call with DRM framework validation. As a result HDMI driver does not depend anymore on MIXER driver and both drivers can be selected with different Kconfig options, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP. Additionally patchset performs small Kconfig refactoring.
Krzysztof could you look at exynos_defconfig patch. Maybe it would be good to merge it before next patch to allow full bi-sectability :)
I would be happy to see similar for multi_v7. HDMI is already there.
I also wonder why actually DRM_EXYNOS_HDMI has to depend on MIXER or DECON?
DECON controller has two kinds of data paths in case of Exynos5433 or later. One is Display path and other is TV path. So it'd be reasonable for DRM_EXYNOS_HDMI to depend on MIXER or DECON - TV path of DECON controller transfers Display data to HDMI like MIXER IP of previous Exynos SoC did.
So this is not a build-time dependency but rather runtime? What will happen if HDMI is compiled and enabled (for example in DTB) but there will be no DECON nor MIXER compiled in?
Okay, I received the explanation off-line. :)
The solution looks good to me, I'll give the respective tags for individual patches (please submit also multi_v7).
Best regards, Krzysztof
Mixer driver is selected by CONFIG_DRM_EXYNOS_HDMI option. Since Exynos5433 HDMI does not require Mixer and there are separate options to select Mixer and HDMI.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 03deb7f..ca5e928 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -449,6 +449,7 @@ CONFIG_DRM_NOUVEAU=m CONFIG_DRM_EXYNOS=m CONFIG_DRM_EXYNOS_DSI=y CONFIG_DRM_EXYNOS_FIMD=y +CONFIG_DRM_EXYNOS_MIXER=y CONFIG_DRM_EXYNOS_HDMI=y CONFIG_DRM_RCAR_DU=m CONFIG_DRM_TEGRA=y
On 29.10.2015 23:25, Andrzej Hajda wrote:
Mixer driver is selected by CONFIG_DRM_EXYNOS_HDMI option. Since Exynos5433 HDMI does not require Mixer and there are separate options to select Mixer and HDMI.
Signed-off-by: Andrzej Hajda a.hajda@samsung.com
arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
+Cc Arnd, Kevin, Kukjin and Olof,
Reviewed-by: Krzysztof Kozlowski k.kozlowski@samsung.com
The patch should go with (or before) patchset: - add atomic_check callback to exynos_crtc http://www.spinics.net/lists/dri-devel/msg93137.html to avoid loosing the HDMI support in multi_v7.
Best regards, Krzysztof
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 03deb7f..ca5e928 100644 --- a/arch/arm/configs/multi_v7_defconfig +++ b/arch/arm/configs/multi_v7_defconfig @@ -449,6 +449,7 @@ CONFIG_DRM_NOUVEAU=m CONFIG_DRM_EXYNOS=m CONFIG_DRM_EXYNOS_DSI=y CONFIG_DRM_EXYNOS_FIMD=y +CONFIG_DRM_EXYNOS_MIXER=y CONFIG_DRM_EXYNOS_HDMI=y CONFIG_DRM_RCAR_DU=m CONFIG_DRM_TEGRA=y
dri-devel@lists.freedesktop.org