add atomic_check callback to exynos_crtc
Subsystems (4)
cover add atomic_check callback to exynos_crtc
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
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/7 drm/exynos: add atomic_check callback to exynos_crtc
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.
--- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 ++++++++++++ drivers/gpu/drm/exynos/exynos_drm_drv.h | 3 +++ 2 files changed, 15 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +12 -0
@@ -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, };
drivers/gpu/drm/exynos/exynos_drm_drv.h +3 -0
@@ -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,
Signature · 1 line
1.9.1
PATCH 2/7 drm/exynos/mixer: replace direct cross-driver call with drm mode validation
In reply to Andrzej HajdaHDMI driver called directly function from MIXER driver to invalidate modes not supported by MIXER. The patch replaces the hack with proper .atomic_check callback.
--- 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
drivers/gpu/drm/exynos/exynos_hdmi.c +0 -5
@@ -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 ;
drivers/gpu/drm/exynos/exynos_mixer.c +4 -2
@@ -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 = {
drivers/gpu/drm/exynos/exynos_mixer.h deleted +0 -20
@@ -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
Signature · 1 line
1.9.1
Re: [PATCH 2/7] drm/exynos/mixer: replace direct cross-driver call with drm mode validation
Hello Andrzej,
Quoted 6 lines · Andrzej Hajda
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 <[email protected]>---
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
PATCH 1/1 drm/exynos: atomic check only enabled crtc states
Since atomic check is called also for disabled crtcs it should skip mode checking as it can be uninitialized. The patch fixes it.
---
Hi Javier,
Could you check with this patch.
Regards
Andrzej
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/exynos/exynos_drm_crtc.c +3 -0
@@ -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);
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/exynos: atomic check only enabled crtc states
Hello Andrzej,
Quoted 10 lines · Andrzej Hajda
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 <[email protected]>Suggested-by Daniel Vetter <[email protected]>---
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:
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Re: [PATCH] drm/exynos: atomic check only enabled crtc states
Hello Inki,
Quoted 11 lines · Javier Martinez Canillas
Hello Andrzej,
Quoted 8 lines · Andrzej Hajda
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 <[email protected]>Suggested-by Daniel Vetter <[email protected]>---
Hi Javier,
Quoted 8 lines
Quoted 2 lines
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:
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,
Signature · 7 lines
Javier Martinez Canillas Open Source Group Samsung Research America _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/exynos: atomic check only enabled crtc states
Hi Javier,
2015-12-09 19:51 GMT+09:00 Javier Martinez Canillas <[email protected]>:
Quoted 20 lines
Hello Inki,
Quoted 17 lines · Javier Martinez Canillas
Hello Andrzej,
Quoted 10 lines · Andrzej Hajda
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 <[email protected]>Suggested-by Daniel Vetter <[email protected]>---
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:
Quoted 6 lines
Quoted 2 lines
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
Quoted 10 lines
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/7 ARM: exynos_defconfig: enable Exynos DRM Mixer driver
In reply to Andrzej HajdaMixer 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.
--- arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/exynos_defconfig +1 -0
@@ -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
Signature · 1 line
1.9.1
Re: [PATCH 3/7] ARM: exynos_defconfig: enable Exynos DRM Mixer driver
Quoted 9 lines · Andrzej Hajda
Mixer driver is selected by
CONFIG_DRM_EXYNOS_HDMIoption. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig beforeKconfigwill allow to keep bisectability.Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
I guess this will go with rest of patchset through Exynos DRM tree:
Best regards,
Krzysztof
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainerRe: [PATCH 3/7] ARM: exynos_defconfig: enable Exynos DRM Mixer driver
2015년 10월 28일 15:09에 Krzysztof Kozlowski 이(가) 쓴 글:
Quoted 11 lines · Andrzej Hajda
Quoted 9 lines
Mixer driver is selected by
CONFIG_DRM_EXYNOS_HDMIoption. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig beforeKconfigwill allow to keep bisectability.Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
Quoted 4 lines
Reviewed-by Krzysztof Kozlowski <[email protected]>I guess this will go with rest of patchset through Exynos DRM tree:
Thanks for ack. I will pick it up.
Thanks,
Inki Dae
Quoted 10 lines
Best regards,
Krzysztof--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski
AppliedRe: [PATCH 3/7] ARM: exynos_defconfig: enable Exynos DRM Mixer driver
In reply to Andrzej HajdaQuoted 9 lines · Andrzej Hajda
Mixer driver is selected by
CONFIG_DRM_EXYNOS_HDMIoption. Since Exynos5433 HDMI does not require Mixer. There will be separate options to select Mixer and HDMI. Adding new option to defconfig beforeKconfigwill allow to keep bisectability.Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/configs/exynos_defconfig | 1 + 1 file changed, 1 insertion(+)
Thanks, applied.
Krzysztof
PATCH 4/7 drm/exynos: separate Mixer and HDMI drivers
In reply to Andrzej HajdaLatest Exynos SoCs does not have Mixer IP, but they still have HDMI IP. Their drivers should be configurable separately.
--- 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(-)
drivers/gpu/drm/exynos/Kconfig +7 -1
@@ -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.
drivers/gpu/drm/exynos/Makefile +2 -1
@@ -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
drivers/gpu/drm/exynos/exynos_drm_drv.c +3 -1
@@ -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
Signature · 1 line
1.9.1
PATCH 5/7 drm/exynos: abstract out common dependency
In reply to Andrzej HajdaAll options depends on DRM_EXYNOS so it can be moved to enclosing if clause.
--- drivers/gpu/drm/exynos/Kconfig | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
drivers/gpu/drm/exynos/Kconfig +14 -13
@@ -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
Signature · 1 line
1.9.1
PATCH 6/7 drm/exynos: re-arrange Kconfig entries
In reply to Andrzej HajdaExynos 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.
--- drivers/gpu/drm/exynos/Kconfig | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)
drivers/gpu/drm/exynos/Kconfig +22 -16
@@ -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
Signature · 1 line
1.9.1
PATCH 7/7 drm/exynos: simplify Kconfig component names
In reply to Andrzej HajdaMany 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.
--- drivers/gpu/drm/exynos/Kconfig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
drivers/gpu/drm/exynos/Kconfig +15 -15
@@ -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.
Signature · 1 line
1.9.1
Quoted 10 lines · Andrzej Hajda
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding
atomic_checkcallback toexynos_crtcand 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 differentKconfigoptions, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP.
Additionally patchset performs smallKconfigrefactoring.
Quoted 2 lines
Krzysztof could you look at
exynos_defconfigpatch. 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
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Inki Dae
maintainer2015년 10월 28일 10:37에 Krzysztof Kozlowski 이(가) 쓴 글:
Quoted 11 lines · Andrzej Hajda
Quoted 10 lines
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding
atomic_checkcallback toexynos_crtcand 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 differentKconfigoptions, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP.
Additionally patchset performs smallKconfigrefactoring.
Quoted 6 lines
Quoted 2 lines
Krzysztof could you look at
exynos_defconfigpatch. 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_HDMIhas 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
Quoted 9 lines
Best regards,
Krzysztof--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 17 lines · Inki Dae
2015년 10월 28일 10:37에 Krzysztof Kozlowski 이(가) 쓴 글:
Quoted 14 lines · Andrzej Hajda
Quoted 12 lines
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding
atomic_checkcallback toexynos_crtcand 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 differentKconfigoptions, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP.
Additionally patchset performs smallKconfigrefactoring.Krzysztof could you look at
exynos_defconfigpatch. Maybe it would be good to merge it before next patch to allow full bi-sectability :)
Quoted 7 lines
Quoted 3 lines
I would be happy to see similar for
multi_v7. HDMI is already there.I also wonder why actually
DRM_EXYNOS_HDMIhas 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 forDRM_EXYNOS_HDMIto 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
Quoted 22 lines · Krzysztof Kozlowski
Quoted 21 lines · Inki Dae
2015년 10월 28일 10:37에 Krzysztof Kozlowski 이(가) 쓴 글:
Quoted 17 lines · Andrzej Hajda
Quoted 10 lines
Hi Inki,
This patchset removes hacky mode validation in Mixer driver by adding
atomic_checkcallback toexynos_crtcand 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 differentKconfigoptions, it is usefull especially for latests SoCs which do have HDMI IP but do not have MIXER IP.
Additionally patchset performs smallKconfigrefactoring.Quoted 2 lines
Krzysztof could you look at
exynos_defconfigpatch. 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_HDMIhas to depend on MIXER or DECON?
Quoted 8 lines
Quoted 3 lines
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 forDRM_EXYNOS_HDMIto 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
PATCH 1/1 ARM: multi_v7_defconfig: enable Exynos DRM Mixer driver
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.
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
@@ -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
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] ARM: multi_v7_defconfig: enable Exynos DRM Mixer driver
Quoted 8 lines · Andrzej Hajda
Mixer driver is selected by
CONFIG_DRM_EXYNOS_HDMIoption. Since Exynos5433 HDMI does not require Mixer and there are separate options to select Mixer and HDMI.Signed-off-by Andrzej Hajda <[email protected]>--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)
+Cc Arnd, Kevin, Kukjin and Olof,
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
Quoted 14 lines
arch/arm/configs/multi_v7_defconfig +1
-0@@ -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