Re: [PATCH] MAINTAINERS: drm/sti: mark it as Odd Fixes

2024-07-09 Thread Alain Volmat
Hi Maxime,

On Mon, Jul 08, 2024 at 04:57:49PM +0200, Maxime Ripard wrote:
> On Fri, Jul 05, 2024 at 05:14:36PM GMT, Alain Volmat wrote:
> > Hi Krzysztof, Daniel, and Maxime,
> > 
> > On Fri, Jul 05, 2024 at 03:41:26PM +0200, Daniel Vetter wrote:
> > > On Fri, Jul 05, 2024 at 01:33:38PM +0200, Krzysztof Kozlowski wrote:
> > > > On 05/07/2024 13:22, Maxime Ripard wrote:
> > > > > On Fri, Jul 05, 2024 at 01:19:50PM GMT, Daniel Vetter wrote:
> > > > >> On Fri, Jul 05, 2024 at 12:03:56PM +0200, Krzysztof Kozlowski wrote:
> > > > >>> Patches to STI DRM are not being picked up, so even though there is
> > > > >>> maintainer activity, it seems that these drivers are not being 
> > > > >>> actively
> > > > >>> looked at.  Reflect this in maintainer status.
> > > > >>
> > > > >> Note that since the driver is in drm-misc, other committers can also 
> > > > >> pick
> > > > >> up patches and push them. Both Neil and Dimtry have commit rights and
> > > > >> should be able to pick up your patches for you, if they get stuck.
> > > > > 
> > > > > I've applied the patches.
> > > > > 
> > > > > I don't think we should merge this one though, a one-off mishap can 
> > > > > happen.
> > > > 
> > > > Sure.
> > > > 
> > > > Folks, maybe then pattern in maintainers should be somehow changed or 
> > > > grew?
> > > > 
> > > > The recommendation to all submitters is to use get_maintainers.pl. b4
> > > > also does it. In this particular case, using get_maintainers.pl or b4
> > > > will result in patches not being picked up.
> > > 
> > > I think get_maintainers.pl is correct: You get the driver maintainer, plus
> > > drm-misc maintainers as official fallback, plus Dave as fallback of
> > > last resorts. So all correct.
> > > 
> > > What's special with the commit rights model is that other committers that
> > > work all over the subsystem can also pick up the patches for you, so that
> > > the drm-misc mainters don't become a bottleneck. But the ideal person
> > > there are drm-misc committers who work in your team or company, or someone
> > > else where you have some goodwill credits to spend with and ask them for a
> > > favour. And there's just no way to model that and make sure the script
> > > gives you the right suggestions.
> > 
> > Many thanks for all your emails and your support.
> > 
> > In the past, I've never committed patches to drm-misc myself and, to be 
> > honest,
> > missed the point that as a drm driver maintainer, I should also do so.
> 
> Are you saying you don't have a drm-misc account, or that you don't want
> to participate?

I don't have (yet) a drm-misc account.  But following recents email exchanges,
expectations are now clear so I will request an account in order to merge as 
well
patches of drm/sti.

Thanks a lot Maxime for all the explanations.

Alain

> 
> > Thanks to recent discussions, I now fully understand how it should be done.
> > 
> > That said, since the volume of drm/sti patches is rather small, I will
> > from now on request help for commit from drm/stm (Philippe, Yannick,
> > and Raphael) and drm-misc maintainers in a more "pro-active" way :-)
> > 
> > Sorry for the inconvenience, and once again, many thanks for your
> > support.
> 
> Sorry, but the expectation is very much that you merge at least some of
> the patches for the driver you maintain, and not just rely on someone
> eventually picking it up.
> 
> Maxime




Re: [PATCH] MAINTAINERS: drm/sti: mark it as Odd Fixes

2024-07-05 Thread Alain Volmat
Hi Krzysztof, Daniel, and Maxime,

On Fri, Jul 05, 2024 at 03:41:26PM +0200, Daniel Vetter wrote:
> On Fri, Jul 05, 2024 at 01:33:38PM +0200, Krzysztof Kozlowski wrote:
> > On 05/07/2024 13:22, Maxime Ripard wrote:
> > > On Fri, Jul 05, 2024 at 01:19:50PM GMT, Daniel Vetter wrote:
> > >> On Fri, Jul 05, 2024 at 12:03:56PM +0200, Krzysztof Kozlowski wrote:
> > >>> Patches to STI DRM are not being picked up, so even though there is
> > >>> maintainer activity, it seems that these drivers are not being actively
> > >>> looked at.  Reflect this in maintainer status.
> > >>
> > >> Note that since the driver is in drm-misc, other committers can also pick
> > >> up patches and push them. Both Neil and Dimtry have commit rights and
> > >> should be able to pick up your patches for you, if they get stuck.
> > > 
> > > I've applied the patches.
> > > 
> > > I don't think we should merge this one though, a one-off mishap can 
> > > happen.
> > 
> > Sure.
> > 
> > Folks, maybe then pattern in maintainers should be somehow changed or grew?
> > 
> > The recommendation to all submitters is to use get_maintainers.pl. b4
> > also does it. In this particular case, using get_maintainers.pl or b4
> > will result in patches not being picked up.
> 
> I think get_maintainers.pl is correct: You get the driver maintainer, plus
> drm-misc maintainers as official fallback, plus Dave as fallback of
> last resorts. So all correct.
> 
> What's special with the commit rights model is that other committers that
> work all over the subsystem can also pick up the patches for you, so that
> the drm-misc mainters don't become a bottleneck. But the ideal person
> there are drm-misc committers who work in your team or company, or someone
> else where you have some goodwill credits to spend with and ask them for a
> favour. And there's just no way to model that and make sure the script
> gives you the right suggestions.

Many thanks for all your emails and your support.

In the past, I've never committed patches to drm-misc myself and, to be honest,
missed the point that as a drm driver maintainer, I should also do so.
Thanks to recent discussions, I now fully understand how it should be done.

That said, since the volume of drm/sti patches is rather small,
I will from now on request help for commit from drm/stm (Philippe, Yannick, and 
Raphael)
and drm-misc maintainers in a more "pro-active" way :-)

Sorry for the inconvenience, and once again, many thanks for your support.

Alain


> -Sima
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch


Re: [PATCH 4/4] drm/sti: vtg: drop driver owner assignment

2024-05-27 Thread Alain Volmat
Hi Krzysztof,

thanks for your patch, sorry for the delay.

On Sat, Mar 30, 2024 at 09:38:31PM +0100, Krzysztof Kozlowski wrote:
> Core in platform_driver_register() already sets the .owner, so driver
> does not need to.  Whatever is set here will be anyway overwritten by
> main driver calling platform_driver_register().
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
>  drivers/gpu/drm/sti/sti_vtg.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
> index 5e5f82b6a5d9..5ba469b711b5 100644
> --- a/drivers/gpu/drm/sti/sti_vtg.c
> +++ b/drivers/gpu/drm/sti/sti_vtg.c
> @@ -431,7 +431,6 @@ MODULE_DEVICE_TABLE(of, vtg_of_match);
>  struct platform_driver sti_vtg_driver = {
>   .driver = {
>   .name = "sti-vtg",
> - .owner = THIS_MODULE,
>   .of_match_table = vtg_of_match,
>   },
>   .probe  = vtg_probe,
> -- 
> 2.34.1
> 
Acked-by: Alain Volmat 

Alain


Re: [PATCH 07/21] drm/sti: Allow build with COMPILE_TEST=y

2024-05-27 Thread Alain Volmat
Hi Ville,

thank you for your patch.

On Mon, Apr 08, 2024 at 08:04:12PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Allow sti to be built with COMPILE_TEST=y for greater
> coverage. Builds fine on x86/x86_64 at least.
> 
> Cc: Alain Volmat 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/sti/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
> index 3c7a5feff8de..75c301aadcbc 100644
> --- a/drivers/gpu/drm/sti/Kconfig
> +++ b/drivers/gpu/drm/sti/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config DRM_STI
>   tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
> - depends on OF && DRM && ARCH_STI
> + depends on OF && DRM && (ARCH_STI || COMPILE_TEST)
>   select RESET_CONTROLLER
>   select DRM_KMS_HELPER
>   select DRM_GEM_DMA_HELPER
> -- 
> 2.43.2
> 

Acked-by: Alain Volmat 

Alain


Re: [PATCH 06/21] drm/sti: Include linux/io.h for devm_ioremap()

2024-05-27 Thread Alain Volmat
Hi Ville,

thank you for your patch.

On Mon, Apr 08, 2024 at 08:04:11PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Include linux/io.h for devm_ioremap().
> 
> When built on x86_64 w/ COMPILE_TEST=y:
> ../drivers/gpu/drm/sti/sti_dvo.c:531:21: error: implicit declaration of 
> function ‘devm_ioremap’ [-Werror=implicit-function-declaration]
>   531 | dvo->regs = devm_ioremap(dev, res->start,
>   | ^~~~
> ../drivers/gpu/drm/sti/sti_dvo.c:531:19: error: assignment to ‘void *’ from 
> ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
>   531 | dvo->regs = devm_ioremap(dev, res->start,
>   |   ^
> 
> Cc: Alain Volmat 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/sti/sti_dvo.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index fd1df4ce3852..48a5d49fc131 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -7,6 +7,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> -- 
> 2.43.2
> 

Acked-by: Alain Volmat 

Alain


Re: [PATCH 3/4] drm/sti: tvout: drop driver owner assignment

2024-05-27 Thread Alain Volmat
Hi Krzysztof,

thanks for your patch, sorry for the delay.

On Sat, Mar 30, 2024 at 09:38:30PM +0100, Krzysztof Kozlowski wrote:
> Core in platform_driver_register() already sets the .owner, so driver
> does not need to.  Whatever is set here will be anyway overwritten by
> main driver calling platform_driver_register().
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
>  drivers/gpu/drm/sti/sti_tvout.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
> index 64615638b79a..e714c232026c 100644
> --- a/drivers/gpu/drm/sti/sti_tvout.c
> +++ b/drivers/gpu/drm/sti/sti_tvout.c
> @@ -886,7 +886,6 @@ MODULE_DEVICE_TABLE(of, tvout_of_match);
>  struct platform_driver sti_tvout_driver = {
>   .driver = {
>   .name = "sti-tvout",
> - .owner = THIS_MODULE,
>   .of_match_table = tvout_of_match,
>   },
>   .probe = sti_tvout_probe,
> -- 
> 2.34.1
> 
Acked-by: Alain Volmat 

Alain


Re: [PATCH 2/4] drm/sti: hda: drop driver owner assignment

2024-05-27 Thread Alain Volmat
Hi Krzysztof,

thanks for your patch, sorry for the delay.

On Sat, Mar 30, 2024 at 09:38:29PM +0100, Krzysztof Kozlowski wrote:
> Core in platform_driver_register() already sets the .owner, so driver
> does not need to.  Whatever is set here will be anyway overwritten by
> main driver calling platform_driver_register().
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
>  drivers/gpu/drm/sti/sti_hda.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
> index 6ee35612a14e..f18faad974aa 100644
> --- a/drivers/gpu/drm/sti/sti_hda.c
> +++ b/drivers/gpu/drm/sti/sti_hda.c
> @@ -807,7 +807,6 @@ MODULE_DEVICE_TABLE(of, hda_of_match);
>  struct platform_driver sti_hda_driver = {
>   .driver = {
>   .name = "sti-hda",
> - .owner = THIS_MODULE,
>   .of_match_table = hda_of_match,
>   },
>   .probe = sti_hda_probe,
> -- 
> 2.34.1
> 

Acked-by: Alain Volmat 

Alain


Re: [PATCH 1/4] drm/sti: dvo: drop driver owner assignment

2024-05-27 Thread Alain Volmat
Hi Krzysztof,

sorry for the delay.

On Sat, Mar 30, 2024 at 09:38:28PM +0100, Krzysztof Kozlowski wrote:
> Core in platform_driver_register() already sets the .owner, so driver
> does not need to.  Whatever is set here will be anyway overwritten by
> main driver calling platform_driver_register().
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
>  drivers/gpu/drm/sti/sti_dvo.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index fd1df4ce3852..00502889c7f4 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -581,7 +581,6 @@ MODULE_DEVICE_TABLE(of, dvo_of_match);
>  struct platform_driver sti_dvo_driver = {
>   .driver = {
>   .name = "sti-dvo",
> - .owner = THIS_MODULE,
>   .of_match_table = dvo_of_match,
>   },
>   .probe = sti_dvo_probe,
> -- 
> 2.34.1
> 

Acked-by: Alain Volmat 

Alain



Re: [PATCH 5/6] drm/sti: hdmi: drop driver owner assignment

2024-05-27 Thread Alain Volmat
Hi Krzysztof,

thanks for your patch, sorry for the delay.

On Sat, Mar 30, 2024 at 09:57:21PM +0100, Krzysztof Kozlowski wrote:
> Core in platform_driver_register() already sets the .owner, so driver
> does not need to.  Whatever is set here will be anyway overwritten by
> main driver calling platform_driver_register().
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
> 
> I forgot two drivers.
>  drivers/gpu/drm/sti/sti_hdmi.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index 500936d5743c..b0d84440a87b 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -1485,7 +1485,6 @@ static void sti_hdmi_remove(struct platform_device 
> *pdev)
>  struct platform_driver sti_hdmi_driver = {
>   .driver = {
>   .name = "sti-hdmi",
> - .owner = THIS_MODULE,
>   .of_match_table = hdmi_of_match,
>   },
>   .probe = sti_hdmi_probe,
> -- 
> 2.34.1
> 

Acked-by: Alain Volmat 

Alain


Re: [PATCH 6/6] drm/sti: hqvdp: drop driver owner assignment

2024-05-27 Thread Alain Volmat
Hi Krzysztof,

thanks for your patch, sorry for the delay.

On Sat, Mar 30, 2024 at 09:57:22PM +0100, Krzysztof Kozlowski wrote:
> Core in platform_driver_register() already sets the .owner, so driver
> does not need to.  Whatever is set here will be anyway overwritten by
> main driver calling platform_driver_register().
> 
> Signed-off-by: Krzysztof Kozlowski 
> ---
>  drivers/gpu/drm/sti/sti_hqvdp.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 0fb48ac044d8..acbf70b95aeb 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -1414,7 +1414,6 @@ MODULE_DEVICE_TABLE(of, hqvdp_of_match);
>  struct platform_driver sti_hqvdp_driver = {
>   .driver = {
>   .name = "sti-hqvdp",
> - .owner = THIS_MODULE,
>   .of_match_table = hqvdp_of_match,
>   },
>   .probe = sti_hqvdp_probe,
> -- 
> 2.34.1
> 
Acked-by: Alain Volmat 

Alain


[PATCH 07/14] drm/sti: add more possible GDP / VID planes entries in sti_plane

2023-07-27 Thread Alain Volmat
In order to address the STiH418, add more entries in sti_plane

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_plane.c | 8 
 drivers/gpu/drm/sti/sti_plane.h | 8 +++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c
index 29e669ccec5b..f8d65d608b64 100644
--- a/drivers/gpu/drm/sti/sti_plane.c
+++ b/drivers/gpu/drm/sti/sti_plane.c
@@ -28,8 +28,16 @@ const char *sti_plane_to_str(struct sti_plane *plane)
return "GDP2";
case STI_GDP_3:
return "GDP3";
+   case STI_GDP_4:
+   return "GDP4";
+   case STI_GDP_5:
+   return "GDP5";
case STI_HQVDP_0:
return "HQVDP0";
+   case STI_HQVDP_1:
+   return "HQVDP1";
+   case STI_HQVDP_2:
+   return "HQVDP2";
case STI_CURSOR:
return "CURSOR";
default:
diff --git a/drivers/gpu/drm/sti/sti_plane.h b/drivers/gpu/drm/sti/sti_plane.h
index 2c0156bede9c..51fc25ed0287 100644
--- a/drivers/gpu/drm/sti/sti_plane.h
+++ b/drivers/gpu/drm/sti/sti_plane.h
@@ -25,7 +25,9 @@ enum sti_plane_id_of_type {
STI_ID_0 = 0,
STI_ID_1 = 1,
STI_ID_2 = 2,
-   STI_ID_3 = 3
+   STI_ID_3 = 3,
+   STI_ID_4 = 4,
+   STI_ID_5 = 5,
 };
 
 enum sti_plane_desc {
@@ -33,7 +35,11 @@ enum sti_plane_desc {
STI_GDP_1   = STI_GDP | STI_ID_1,
STI_GDP_2   = STI_GDP | STI_ID_2,
STI_GDP_3   = STI_GDP | STI_ID_3,
+   STI_GDP_4   = STI_GDP | STI_ID_4,
+   STI_GDP_5   = STI_GDP | STI_ID_5,
STI_HQVDP_0 = STI_VDP | STI_ID_0,
+   STI_HQVDP_1 = STI_VDP | STI_ID_1,
+   STI_HQVDP_2 = STI_VDP | STI_ID_2,
STI_CURSOR  = STI_CUR,
STI_BACK= STI_BCK
 };
-- 
2.34.1



[PATCH 02/14] dt-bindings: display: add st, stih418-vtg compatible for sti vtg

2023-07-27 Thread Alain Volmat
Add a new compatible in st,stih4xx.txt in order to support sti vtg on
stih418 platforms.

Signed-off-by: Alain Volmat 
---
 Documentation/devicetree/bindings/display/st,stih4xx.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/st,stih4xx.txt 
b/Documentation/devicetree/bindings/display/st,stih4xx.txt
index 6778b3e7ad5b..5450e1db8b8d 100644
--- a/Documentation/devicetree/bindings/display/st,stih4xx.txt
+++ b/Documentation/devicetree/bindings/display/st,stih4xx.txt
@@ -2,7 +2,7 @@ STMicroelectronics stih4xx platforms
 
 - sti-vtg: video timing generator
   Required properties:
-  - compatible: "st,vtg"
+  - compatible: "st,vtg" or "st,stih418-vtg"
   - reg: Physical base address of the IP registers and length of memory mapped 
region.
   Optional properties:
   - interrupts : VTG interrupt number to the CPU.
-- 
2.34.1



[PATCH 08/14] drm/sti: add more planes supports in sti_mixer

2023-07-27 Thread Alain Volmat
On STiH418, the mixer is able to driver more layers of
planes.  For this purpose, add those new possible entries
and allow it to work in either STiH407 or STiH418 mode.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_mixer.c | 66 -
 drivers/gpu/drm/sti/sti_mixer.h |  3 +-
 2 files changed, 58 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 9cd780403d7b..d30e31e62268 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -42,7 +42,9 @@ module_param_named(bkgcolor, bkg_color, int, 0644);
 #define GAM_DEPTH_GDP1_ID  4
 #define GAM_DEPTH_GDP2_ID  5
 #define GAM_DEPTH_GDP3_ID  6
-#define GAM_DEPTH_MASK_ID  7
+#define GAM_DEPTH_GDP4_ID  7
+#define GAM_DEPTH_GDP5_ID  8
+#define GAM_DEPTH_VID2_ID  9
 
 /* mask in CTL reg */
 #define GAM_CTL_BACK_MASK  BIT(0)
@@ -52,6 +54,10 @@ module_param_named(bkgcolor, bkg_color, int, 0644);
 #define GAM_CTL_GDP1_MASK  BIT(4)
 #define GAM_CTL_GDP2_MASK  BIT(5)
 #define GAM_CTL_GDP3_MASK  BIT(6)
+#define GAM_CTL_GDP4_MASK  BIT(7)
+#define GAM_CTL_GDP5_MASK  BIT(8)
+/* CURSOR doesn't exist on STiH418 where VID2 exist */
+#define GAM_CTL_VID2_MASK  BIT(9)
 #define GAM_CTL_CURSOR_MASK BIT(9)
 
 const char *sti_mixer_to_str(struct sti_mixer *mixer)
@@ -80,15 +86,16 @@ static inline void sti_mixer_reg_write(struct sti_mixer 
*mixer,
 #define DBGFS_DUMP(reg) seq_printf(s, "\n  %-25s 0x%08X", #reg, \
   sti_mixer_reg_read(mixer, reg))
 
-static void mixer_dbg_ctl(struct seq_file *s, int val)
+static void mixer_dbg_ctl(struct seq_file *s, int val, int depth)
 {
unsigned int i;
int count = 0;
char *const disp_layer[] = {"BKG", "VID0", "VID1", "GDP0",
-   "GDP1", "GDP2", "GDP3"};
+   "GDP1", "GDP2", "GDP3", "GDP4",
+   "GDP5", "VID2"};
 
seq_puts(s, "\tEnabled: ");
-   for (i = 0; i < 7; i++) {
+   for (i = 0; i < depth; i++) {
if (val & 1) {
seq_printf(s, "%s ", disp_layer[i]);
count++;
@@ -108,18 +115,20 @@ static void mixer_dbg_ctl(struct seq_file *s, int val)
 static void mixer_dbg_crb(struct seq_file *s, struct sti_mixer *mixer, u64 val)
 {
int i;
-   u32 shift, mask_id;
+   u32 shift, mask_id, mixer_depth;
 
if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih418-compositor")) {
shift = 4;
mask_id = 0x0f;
+   mixer_depth = GAM_MIXER_NB_DEPTH_LEVEL_STIH418;
} else {
shift = 3;
mask_id = 0x07;
+   mixer_depth = GAM_MIXER_NB_DEPTH_LEVEL_STIH407;
}
 
seq_puts(s, "\tDepth: ");
-   for (i = 0; i < GAM_MIXER_NB_DEPTH_LEVEL; i++) {
+   for (i = 0; i < mixer_depth; i++) {
switch (val & mask_id) {
case GAM_DEPTH_VID0_ID:
seq_puts(s, "VID0");
@@ -139,11 +148,20 @@ static void mixer_dbg_crb(struct seq_file *s, struct 
sti_mixer *mixer, u64 val)
case GAM_DEPTH_GDP3_ID:
seq_puts(s, "GDP3");
break;
+   case GAM_DEPTH_GDP4_ID:
+   seq_puts(s, "GDP4");
+   break;
+   case GAM_DEPTH_GDP5_ID:
+   seq_puts(s, "GDP5");
+   break;
+   case GAM_DEPTH_VID2_ID:
+   seq_puts(s, "VID2");
+   break;
default:
seq_puts(s, "---");
}
 
-   if (i < GAM_MIXER_NB_DEPTH_LEVEL - 1)
+   if (i < mixer_depth - 1)
seq_puts(s, " < ");
val = val >> shift;
}
@@ -161,13 +179,19 @@ static int mixer_dbg_show(struct seq_file *s, void *arg)
 {
struct drm_info_node *node = s->private;
struct sti_mixer *mixer = (struct sti_mixer *)node->info_ent->data;
+   int depth;
u64 val;
 
+   if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih418-compositor"))
+   depth = GAM_MIXER_NB_DEPTH_LEVEL_STIH418 + 1;
+   else
+   depth = GAM_MIXER_NB_DEPTH_LEVEL_STIH407 + 1;
+
seq_printf(s, "%s: (vaddr = 0x%p)",
   sti_mixer_to_str(mixer), mixer->regs);
 
DBGFS_DUMP(GAM_MIXER_CTL);
-   mixer_dbg_ctl(s, sti_mixer_reg_read(mixer, GAM_MIXER_CTL));
+   mixer_dbg_ctl(s, sti_mixer_reg_read(mixer, GAM_MIXER_CTL), dep

[PATCH 04/14] drm/sti: add STih418 platform support in sti mixer

2023-07-27 Thread Alain Volmat
On the STiH418, since there are more planes attached to the
mixer, the bit field for each depth of is now coded using 4 bits
instead of 3 bits.  Some registers as well differ between STiH407
and STiH418 leading on relying on the st,stih418-compositor compatible
to distinguish proper behavior.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_mixer.c | 71 ++---
 1 file changed, 57 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 7e5f14646625..9cd780403d7b 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -7,6 +7,7 @@
  */
 
 #include 
+#include 
 #include 
 
 #include 
@@ -23,10 +24,12 @@ module_param_named(bkgcolor, bkg_color, int, 0644);
 /* regs offset */
 #define GAM_MIXER_CTL  0x00
 #define GAM_MIXER_BKC  0x04
+#define GAM_MIXER_OFF 0x08 /* Only for STiH418 */
 #define GAM_MIXER_BCO  0x0C
 #define GAM_MIXER_BCS  0x10
 #define GAM_MIXER_AVO  0x28
 #define GAM_MIXER_AVS  0x2C
+#define GAM_MIXER_CRB2 0x30 /* Only for STiH418 */
 #define GAM_MIXER_CRB  0x34
 #define GAM_MIXER_ACT  0x38
 #define GAM_MIXER_MBP  0x3C
@@ -102,13 +105,22 @@ static void mixer_dbg_ctl(struct seq_file *s, int val)
seq_puts(s, "Nothing");
 }
 
-static void mixer_dbg_crb(struct seq_file *s, int val)
+static void mixer_dbg_crb(struct seq_file *s, struct sti_mixer *mixer, u64 val)
 {
int i;
+   u32 shift, mask_id;
+
+   if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih418-compositor")) {
+   shift = 4;
+   mask_id = 0x0f;
+   } else {
+   shift = 3;
+   mask_id = 0x07;
+   }
 
seq_puts(s, "\tDepth: ");
for (i = 0; i < GAM_MIXER_NB_DEPTH_LEVEL; i++) {
-   switch (val & GAM_DEPTH_MASK_ID) {
+   switch (val & mask_id) {
case GAM_DEPTH_VID0_ID:
seq_puts(s, "VID0");
break;
@@ -133,7 +145,7 @@ static void mixer_dbg_crb(struct seq_file *s, int val)
 
if (i < GAM_MIXER_NB_DEPTH_LEVEL - 1)
seq_puts(s, " < ");
-   val = val >> 3;
+   val = val >> shift;
}
 }
 
@@ -149,6 +161,7 @@ static int mixer_dbg_show(struct seq_file *s, void *arg)
 {
struct drm_info_node *node = s->private;
struct sti_mixer *mixer = (struct sti_mixer *)node->info_ent->data;
+   u64 val;
 
seq_printf(s, "%s: (vaddr = 0x%p)",
   sti_mixer_to_str(mixer), mixer->regs);
@@ -161,11 +174,18 @@ static int mixer_dbg_show(struct seq_file *s, void *arg)
DBGFS_DUMP(GAM_MIXER_AVO);
DBGFS_DUMP(GAM_MIXER_AVS);
DBGFS_DUMP(GAM_MIXER_CRB);
-   mixer_dbg_crb(s, sti_mixer_reg_read(mixer, GAM_MIXER_CRB));
+   val = sti_mixer_reg_read(mixer, GAM_MIXER_CRB);
+   if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih418-compositor")) {
+   DBGFS_DUMP(GAM_MIXER_CRB2);
+   val |= ((u64)sti_mixer_reg_read(mixer, GAM_MIXER_CRB2) << 32);
+   }
+   mixer_dbg_crb(s, mixer, val);
DBGFS_DUMP(GAM_MIXER_ACT);
-   DBGFS_DUMP(GAM_MIXER_MBP);
-   DBGFS_DUMP(GAM_MIXER_MX0);
-   mixer_dbg_mxn(s, mixer->regs + GAM_MIXER_MX0);
+   if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih407-compositor")) {
+   DBGFS_DUMP(GAM_MIXER_MBP);
+   DBGFS_DUMP(GAM_MIXER_MX0);
+   mixer_dbg_mxn(s, mixer->regs + GAM_MIXER_MX0);
+   }
seq_putc(s, '\n');
return 0;
 }
@@ -238,7 +258,16 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, 
struct sti_plane *plane)
 {
int plane_id, depth = plane->drm_plane.state->normalized_zpos;
unsigned int i;
-   u32 mask, val;
+   u64 mask, val;
+   u32 shift, mask_id;
+
+   if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih418-compositor")) {
+   shift = 4;
+   mask_id = 0x0f;
+   } else {
+   shift = 3;
+   mask_id = 0x07;
+   }
 
switch (plane->desc) {
case STI_GDP_0:
@@ -266,26 +295,37 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, 
struct sti_plane *plane)
 
/* Search if a previous depth was already assigned to the plane */
val = sti_mixer_reg_read(mixer, GAM_MIXER_CRB);
+   if (of_device_is_compatible(mixer->dev->of_node, 
"st,stih418-compositor"))
+   val |= ((u64)sti_mixer_reg_read(mixer, GAM_MIXER_CRB2) << 32);
for (i = 0; i < GAM_MIXER_NB_DEPTH_LEVEL; i++) {
-   mask = GAM_DEPTH_MASK_ID << (3 * i);
-   if ((val & mask) == plane_id

[PATCH 10/14] drm/sti: add compositor support for stih418 platform

2023-07-27 Thread Alain Volmat
On the STiH418, a new clock (proc_mixer) must be enabled in order
to have the plane mixers properly behaving.  Add a new
st,stih418-compositor in order to describe the planes/mixers
available on this platform.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_compositor.c | 26 ++
 drivers/gpu/drm/sti/sti_compositor.h |  2 ++
 drivers/gpu/drm/sti/sti_crtc.c   | 11 +++
 3 files changed, 39 insertions(+)

diff --git a/drivers/gpu/drm/sti/sti_compositor.c 
b/drivers/gpu/drm/sti/sti_compositor.c
index 4bd7e305ab75..dfea3c1191a6 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -43,6 +43,23 @@ static const struct sti_compositor_data 
stih407_compositor_data = {
},
 };
 
+/*
+ * stiH418 compositor properties
+ */
+static const struct sti_compositor_data stih418_compositor_data = {
+   .nb_subdev = 8,
+   .subdev_desc = {
+   {STI_GPDPLUS_SUBDEV, (int)STI_GDP_0, 0x0},
+   {STI_GPDPLUS_SUBDEV, (int)STI_GDP_1, 0x1},
+   {STI_GPDPLUS_SUBDEV, (int)STI_GDP_2, 0x2},
+   {STI_GPDPLUS_SUBDEV, (int)STI_GDP_3, 0x3},
+   {STI_GPD_SUBDEV, (int)STI_GDP_4, 0x4},
+   {STI_GPD_SUBDEV, (int)STI_GDP_5, 0x5},
+   {STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0x10},
+   {STI_MIXER_AUX_SUBDEV, STI_MIXER_AUX, 0x11},
+   },
+};
+
 void sti_compositor_debugfs_init(struct sti_compositor *compo,
 struct drm_minor *minor)
 {
@@ -169,6 +186,9 @@ static const struct of_device_id compositor_of_match[] = {
{
.compatible = "st,stih407-compositor",
.data = _compositor_data,
+   }, {
+   .compatible = "st,stih418-compositor",
+   .data = _compositor_data,
}, {
/* end node */
}
@@ -236,6 +256,12 @@ static int sti_compositor_probe(struct platform_device 
*pdev)
return PTR_ERR(compo->clk_pix_aux);
}
 
+   compo->clk_proc_mixer = devm_clk_get_optional(dev, "proc_mixer");
+   if (IS_ERR(compo->clk_proc_mixer)) {
+   DRM_ERROR("Cannot get proc_mixer clock\n");
+   return PTR_ERR(compo->clk_proc_mixer);
+   }
+
/* Get reset resources */
compo->rst_main = devm_reset_control_get_shared(dev, "compo-main");
/* Take compo main out of reset */
diff --git a/drivers/gpu/drm/sti/sti_compositor.h 
b/drivers/gpu/drm/sti/sti_compositor.h
index 62545210b96d..fdc655f78579 100644
--- a/drivers/gpu/drm/sti/sti_compositor.h
+++ b/drivers/gpu/drm/sti/sti_compositor.h
@@ -57,6 +57,7 @@ struct sti_compositor_data {
  * @clk_compo_aux: clock for aux compo
  * @clk_pix_main: pixel clock for main path
  * @clk_pix_aux: pixel clock for aux path
+ * @clk_proc_mixer: clock for the mixers
  * @rst_main: reset control of the main path
  * @rst_aux: reset control of the aux path
  * @mixer: array of mixers
@@ -72,6 +73,7 @@ struct sti_compositor {
struct clk *clk_compo_aux;
struct clk *clk_pix_main;
struct clk *clk_pix_aux;
+   struct clk *clk_proc_mixer;
struct reset_control *rst_main;
struct reset_control *rst_aux;
struct sti_mixer *mixer[STI_MAX_MIXER];
diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c
index 3c7154f2d5f3..d93764e99b0e 100644
--- a/drivers/gpu/drm/sti/sti_crtc.c
+++ b/drivers/gpu/drm/sti/sti_crtc.c
@@ -67,6 +67,12 @@ sti_crtc_mode_set(struct drm_crtc *crtc, struct 
drm_display_mode *mode)
pix_clk = compo->clk_pix_aux;
}
 
+   /* Enable the mixer processing clock (if applicable) */
+   if (clk_prepare_enable(compo->clk_proc_mixer)) {
+   DRM_INFO("Failed to prepare/enable processing mixer clk\n");
+   goto proc_mixer_error;
+   }
+
/* Prepare and enable the compo IP clock */
if (clk_prepare_enable(compo_clk)) {
DRM_INFO("Failed to prepare/enable compositor clk\n");
@@ -97,6 +103,8 @@ sti_crtc_mode_set(struct drm_crtc *crtc, struct 
drm_display_mode *mode)
 pix_error:
clk_disable_unprepare(compo_clk);
 compo_error:
+   clk_disable_unprepare(compo->clk_proc_mixer);
+proc_mixer_error:
return -EINVAL;
 }
 
@@ -122,6 +130,9 @@ static void sti_crtc_disable(struct drm_crtc *crtc)
clk_disable_unprepare(compo->clk_compo_aux);
}
 
+   /* Disable the mixer clock (if applicable) */
+   clk_disable_unprepare(compo->clk_proc_mixer);
+
mixer->status = STI_MIXER_DISABLED;
 }
 
-- 
2.34.1



[PATCH 05/14] drm/sti: add support for stih418 in tvout

2023-07-27 Thread Alain Volmat
The tvout for stih407 and stih418 differ in the connection with the
vtg regarding to the hdmi output.  In order to cop with that, introduce
a new compatible st,stih418-tvout in order to have the hdmi_sync_id
being part of the data attached to each compatible.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_tvout.c | 35 +
 1 file changed, 27 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
index 64615638b79a..685c0a4ba1be 100644
--- a/drivers/gpu/drm/sti/sti_tvout.c
+++ b/drivers/gpu/drm/sti/sti_tvout.c
@@ -118,6 +118,7 @@ struct sti_tvout {
struct drm_encoder *hda;
struct drm_encoder *dvo;
bool debugfs_registered;
+   unsigned int hdmi_sync_id;
 };
 
 struct sti_tvout_encoder {
@@ -130,6 +131,10 @@ struct sti_tvout_encoder {
 
 #define to_sti_tvout(x) to_sti_tvout_encoder(x)->tvout
 
+struct sti_tvout_data {
+   unsigned int hdmi_sync_id;
+};
+
 /* preformatter conversion matrix */
 static const u32 rgb_to_ycbcr_601[8] = {
0xF927082E, 0x04C9FEAB, 0x01D30964, 0xFA95FD3D,
@@ -359,14 +364,14 @@ static void tvout_hdmi_start(struct sti_tvout *tvout, 
bool main_path)
DRM_DEBUG_DRIVER("main vip for hdmi\n");
/* select the input sync for hdmi */
tvout_write(tvout,
-   TVO_SYNC_MAIN_VTG_SET_REF | VTG_SYNC_ID_HDMI,
+   TVO_SYNC_MAIN_VTG_SET_REF | tvout->hdmi_sync_id,
TVO_HDMI_SYNC_SEL);
tvo_in_vid_format = TVO_MAIN_IN_VID_FORMAT;
} else {
DRM_DEBUG_DRIVER("aux vip for hdmi\n");
/* select the input sync for hdmi */
tvout_write(tvout,
-   TVO_SYNC_AUX_VTG_SET_REF | VTG_SYNC_ID_HDMI,
+   TVO_SYNC_AUX_VTG_SET_REF | tvout->hdmi_sync_id,
TVO_HDMI_SYNC_SEL);
tvo_in_vid_format = TVO_AUX_IN_VID_FORMAT;
}
@@ -833,10 +838,26 @@ static const struct component_ops sti_tvout_ops = {
.unbind = sti_tvout_unbind,
 };
 
+static const struct sti_tvout_data stih407_tvout_data = {
+   .hdmi_sync_id = 1,
+};
+
+static const struct sti_tvout_data stih418_tvout_data = {
+   .hdmi_sync_id = 5,
+};
+
+static const struct of_device_id tvout_of_match[] = {
+   { .compatible = "st,stih407-tvout", .data = _tvout_data, },
+   { .compatible = "st,stih418-tvout", .data = _tvout_data, },
+   { /* end node */ }
+};
+MODULE_DEVICE_TABLE(of, tvout_of_match);
+
 static int sti_tvout_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
struct device_node *node = dev->of_node;
+   const struct sti_tvout_data *data;
struct sti_tvout *tvout;
struct resource *res;
 
@@ -851,6 +872,10 @@ static int sti_tvout_probe(struct platform_device *pdev)
 
tvout->dev = dev;
 
+   /* populate data structure depending on compatibility */
+   data = of_match_node(tvout_of_match, node)->data;
+   tvout->hdmi_sync_id = data->hdmi_sync_id;
+
/* get memory resources */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "tvout-reg");
if (!res) {
@@ -877,12 +902,6 @@ static void sti_tvout_remove(struct platform_device *pdev)
component_del(>dev, _tvout_ops);
 }
 
-static const struct of_device_id tvout_of_match[] = {
-   { .compatible = "st,stih407-tvout", },
-   { /* end node */ }
-};
-MODULE_DEVICE_TABLE(of, tvout_of_match);
-
 struct platform_driver sti_tvout_driver = {
.driver = {
.name = "sti-tvout",
-- 
2.34.1



[PATCH 06/14] drm/sti: remove VTG_SYNC_ID_HDMI from sti_vtg.h

2023-07-27 Thread Alain Volmat
Since the synchro signal used for hdmi output and coming from the
VTG differs between the stih407 and stih418 platforms, we cannot
rely anymore on hardcoded value and involve drivers use compatible
to figure out the value.
The macro VTG_SYNC_ID_HDMI can thus be removed.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_vtg.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/sti/sti_vtg.h b/drivers/gpu/drm/sti/sti_vtg.h
index 46faf141b2d9..bd0437bd1c8d 100644
--- a/drivers/gpu/drm/sti/sti_vtg.h
+++ b/drivers/gpu/drm/sti/sti_vtg.h
@@ -10,7 +10,6 @@
 #define VTG_TOP_FIELD_EVENT 1
 #define VTG_BOTTOM_FIELD_EVENT  2
 
-#define VTG_SYNC_ID_HDMI1
 #define VTG_SYNC_ID_HDDCS   2
 #define VTG_SYNC_ID_HDF 3
 #define VTG_SYNC_ID_DVO 4
-- 
2.34.1



[PATCH 00/14] drm/sti: add display support on stih418 family

2023-07-27 Thread Alain Volmat
This serie adds support for graphic display features on the stih418 soc.

Major differences compare to the already supported stih407 are
  - a new HDMI PHY to support 4K resolutions
  - updated mixer to support the higher number of planes available
on the stih418
  - updated GDP (graphic planes), called here gdpplus

Alain Volmat (14):
  drm/sti: add hdmi tx6g0c28 phy for STi platform
  dt-bindings: display: add st,stih418-vtg compatible for sti vtg
  drm/sti: add support for VTG on the stih418 platform
  drm/sti: add STih418 platform support in sti mixer
  drm/sti: add support for stih418 in tvout
  drm/sti: remove VTG_SYNC_ID_HDMI from sti_vtg.h
  drm/sti: add more possible GDP / VID planes entries in sti_plane
  drm/sti: add more planes supports in sti_mixer
  drm/sti: add support for GDPPLUS / stih418 GDPs
  drm/sti: add compositor support for stih418 platform
  ARM: dts: sti: move vtg_main / vtg_aux into stih407/stih410 dtsi
  ARM: dts: sti: addition of display nodes for stih418 platform
  ARM: dts: sti: add the gpu node for the MALI-400 on stih418.dtsi
  ARM: dts: sti: enable basic display on stih418-b2264 board

 .../bindings/display/st,stih4xx.txt   |   2 +-
 arch/arm/boot/dts/st/stih407-family.dtsi  |  13 -
 arch/arm/boot/dts/st/stih407.dtsi |  12 +
 arch/arm/boot/dts/st/stih410.dtsi |  12 +
 arch/arm/boot/dts/st/stih418-b2264.dts|  34 ++
 arch/arm/boot/dts/st/stih418-clock.dtsi   |   2 +-
 arch/arm/boot/dts/st/stih418.dtsi | 188 +++
 drivers/gpu/drm/sti/Makefile  |   1 +
 drivers/gpu/drm/sti/sti_compositor.c  |  30 ++
 drivers/gpu/drm/sti/sti_compositor.h  |   3 +
 drivers/gpu/drm/sti/sti_crtc.c|  11 +
 drivers/gpu/drm/sti/sti_gdp.c | 250 +--
 drivers/gpu/drm/sti/sti_gdp.h |   8 +-
 drivers/gpu/drm/sti/sti_hdmi.c|   4 +
 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c| 292 ++
 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h|  13 +
 drivers/gpu/drm/sti/sti_mixer.c   | 133 ++--
 drivers/gpu/drm/sti/sti_mixer.h   |   3 +-
 drivers/gpu/drm/sti/sti_plane.c   |   8 +
 drivers/gpu/drm/sti/sti_plane.h   |   8 +-
 drivers/gpu/drm/sti/sti_tvout.c   |  35 ++-
 drivers/gpu/drm/sti/sti_vtg.c |  62 +++-
 drivers/gpu/drm/sti/sti_vtg.h |   1 -
 23 files changed, 967 insertions(+), 158 deletions(-)
 create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c
 create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h

-- 
2.34.1



[PATCH 09/14] drm/sti: add support for GDPPLUS / stih418 GDPs

2023-07-27 Thread Alain Volmat
The STiH418 platform embeds two kinds of graphical planes (GDP),
so called GDPPLUS which has additional (yet unimplemented)
features compared to the GDP, and also the GDP.
Register map of GDPPLUS slightly differ from the GDP even if,
for common functionalities registers name and behavior are the
same (but not at same addresses).  For that purpose, this commit
rework the way of addressing the GDP(PLUS) registers.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_compositor.c |   4 +
 drivers/gpu/drm/sti/sti_compositor.h |   1 +
 drivers/gpu/drm/sti/sti_gdp.c| 250 ---
 drivers/gpu/drm/sti/sti_gdp.h|   8 +-
 4 files changed, 163 insertions(+), 100 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_compositor.c 
b/drivers/gpu/drm/sti/sti_compositor.c
index 33487a1fed8f..4bd7e305ab75 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -87,6 +87,7 @@ static int sti_compositor_bind(struct device *dev,
 compo->regs + desc[i].offset);
break;
case STI_GPD_SUBDEV:
+   case STI_GPDPLUS_SUBDEV:
case STI_CURSOR_SUBDEV:
/* Nothing to do, wait for the second round */
break;
@@ -120,7 +121,10 @@ static int sti_compositor_bind(struct device *dev,
}
break;
case STI_GPD_SUBDEV:
+   case STI_GPDPLUS_SUBDEV:
primary = sti_gdp_create(drm_dev, compo->dev,
+desc[i].type == STI_GPD_SUBDEV 
?
+STI_GDP_TYPE_GDP : 
STI_GDP_TYPE_GDPPLUS,
 desc[i].id,
 compo->regs + desc[i].offset,
 (1 << mixer_id) - 1,
diff --git a/drivers/gpu/drm/sti/sti_compositor.h 
b/drivers/gpu/drm/sti/sti_compositor.h
index 25bb01bdd013..62545210b96d 100644
--- a/drivers/gpu/drm/sti/sti_compositor.h
+++ b/drivers/gpu/drm/sti/sti_compositor.h
@@ -24,6 +24,7 @@ enum sti_compositor_subdev_type {
STI_MIXER_MAIN_SUBDEV,
STI_MIXER_AUX_SUBDEV,
STI_GPD_SUBDEV,
+   STI_GPDPLUS_SUBDEV,
STI_VID_SUBDEV,
STI_CURSOR_SUBDEV,
 };
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index 43c72c2604a0..1f4064d64f15 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -55,6 +55,7 @@ static struct gdp_format_to_str {
GDP2STR(ARGB)
};
 
+/* GDP register offsets */
 #define GAM_GDP_CTL_OFFSET  0x00
 #define GAM_GDP_AGC_OFFSET  0x04
 #define GAM_GDP_VPO_OFFSET  0x0C
@@ -67,8 +68,45 @@ static struct gdp_format_to_str {
 #define GAM_GDP_KEY2_OFFSET 0x2C
 #define GAM_GDP_PPT_OFFSET  0x34
 #define GAM_GDP_CML_OFFSET  0x3C
+#define GAM_GDP_NODE_SIZE  0x40
 #define GAM_GDP_MST_OFFSET  0x68
 
+/* GDPPLUS register offsets */
+#defineGAM_GDPPLUS_CTL_OFFSET  0x00
+#defineGAM_GDPPLUS_AGC_OFFSET  0x04
+#defineGAM_GDPPLUS_VPO_OFFSET  0x08
+#defineGAM_GDPPLUS_VPS_OFFSET  0x0C
+#defineGAM_GDPPLUS_PML_OFFSET  0x10
+#defineGAM_GDPPLUS_PMP_OFFSET  0x14
+#defineGAM_GDPPLUS_SIZE_OFFSET 0x18
+#defineGAM_GDPPLUS_NVN_OFFSET  0x1C
+#defineGAM_GDPPLUS_KEY1_OFFSET 0x20
+#defineGAM_GDPPLUS_KEY2_OFFSET 0x24
+#defineGAM_GDPPLUS_HFP_OFFSET  0x28
+#defineGAM_GDPPLUS_PPT_OFFSET  0x2C
+#defineGAM_GDPPLUS_VFP_OFFSET  0x30
+#defineGAM_GDPPLUS_CML_OFFSET  0x34
+#defineGAM_GDPPLUS_CROP_OFFSET 0x38
+#defineGAM_GDPPLUS_BT0_OFFSET  0x3C
+#defineGAM_GDPPLUS_BT1_OFFSET  0x40
+#defineGAM_GDPPLUS_BT2_OFFSET  0x44
+#defineGAM_GDPPLUS_BT3_OFFSET  0x48
+#defineGAM_GDPPLUS_BT4_OFFSET  0x4C
+#defineGAM_GDPPLUS_HSRC_OFFSET 0x50
+#defineGAM_GDPPLUS_HIP_OFFSET  0x54
+#defineGAM_GDPPLUS_HP1_OFFSET  0x58
+#defineGAM_GDPPLUS_HP2_OFFSET  0x5C
+#defineGAM_GDPPLUS_VSRC_OFFSET 0x60
+#defineGAM_GDPPLUS_VIP_OFFSET  0x64
+#defineGAM_GDPPLUS_VP1_OFFSET  0x68
+#defineGAM_GDPPLUS_VP2_OFFSET  0x6C
+#define GAM_GDPPLUS_NODE_SIZE  0x500
+
+/* Accessor for common registers */
+#define GAM_OFFSET(reg, type)  ((type) == STI_GDP_TYPE_GDP ? GAM_GDP_ ## reg 
## _OFFSET :\
+GAM_GDPPLUS_ ## reg ## _OFFSET)
+#define GAM_OFFSET_U32(reg, type)  (GAM_OFFSET(reg, type) >> 2)
+
 #define GAM_GDP_ALPHARANGE_255  BIT(5)
 #define GAM_GDP_AGC_FULL_RANGE  0x00808080
 #define GAM_GDP_PPT_IGNORE  (BIT(1) | BIT(0))
@@ -79,29 +117,10 @@ static struct gdp_format_to_str {
 #define GDP_NODE_NB_BANK2
 #define GDP_NODE_PER_FIELD  2
 

[PATCH 01/14] drm/sti: add hdmi tx6g0c28 phy for STi platform

2023-07-27 Thread Alain Volmat
Addition of the HDMI TX PHY driver for use in the STiH418
SoC platform and more especially the 4KOpen (B2264) board.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/Makefile   |   1 +
 drivers/gpu/drm/sti/sti_hdmi.c |   4 +
 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c | 292 +
 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h |  13 +
 4 files changed, 310 insertions(+)
 create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c
 create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h

diff --git a/drivers/gpu/drm/sti/Makefile b/drivers/gpu/drm/sti/Makefile
index f203ac5514ae..bf52edb7dba5 100644
--- a/drivers/gpu/drm/sti/Makefile
+++ b/drivers/gpu/drm/sti/Makefile
@@ -11,6 +11,7 @@ sti-drm-y := \
sti_plane.o \
sti_hdmi.o \
sti_hdmi_tx3g4c28phy.o \
+   sti_hdmi_tx6g0c28phy.o \
sti_dvo.o \
sti_awg_utils.o \
sti_vtg.o \
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index 500936d5743c..988a5de0fcd2 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -27,6 +27,7 @@
 
 #include "sti_hdmi.h"
 #include "sti_hdmi_tx3g4c28phy.h"
+#include "sti_hdmi_tx6g0c28phy.h"
 #include "sti_vtg.h"
 
 #define HDMI_CFG0x
@@ -1363,6 +1364,9 @@ static const struct of_device_id hdmi_of_match[] = {
{
.compatible = "st,stih407-hdmi",
.data = _ops,
+   }, {
+   .compatible = "st,stih418-hdmi",
+   .data = _ops,
}, {
/* end node */
}
diff --git a/drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c 
b/drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c
new file mode 100644
index ..7bd260429044
--- /dev/null
+++ b/drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c
@@ -0,0 +1,292 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Author: Alain Volmat 
+ *
+ * This driver is highly inspired from sti_hdmi_tx3g4c28phy.c copyright by ST 
Microelectronics
+ * with IP behavior understood by looking at the display package from 
4kopen.com
+ * 
https://bitbucket.org/4kopen/display/src/master/display/ip/hdmi/stmhdmitx6g0_c28_phy.cpp
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include "sti_hdmi_tx6g0c28phy.h"
+
+#define HDMI_SRZ_CFG   0x504
+#define HDMI_SRZ_PWR_CFG   0x508
+#define HDMI_SRZ_PLL_CFG   0x510
+#define HDMI_SRZ_STR_1 0x518
+#define HDMI_SRZ_STR_2 0x51C
+#define HDMI_SRZ_CALCODE_EXT   0x530
+#define HDMI_SRZ_TX_RSVR_BITS  0x560
+
+/* *** */
+/* register : HDMI_SRZ_CFG */
+/* *** */
+#define HDMI_SRZ_CFG_ENBIT(0)
+#define HDMI_SRZ_CFG_EN_PE_C0_MASK GENMASK(6, 4)
+#define HDMI_SRZ_CFG_EN_PE_C1_MASK GENMASK(10, 8)
+#define HDMI_SRZ_CFG_EN_PE_C2_MASK GENMASK(14, 12)
+
+#define HDMI_SRZ_CFG_EXTERNAL_DATA BIT(16)
+#define HDMI_SRZ_CFG_RBIAS_EXT BIT(17)
+#define HDMI_SRZ_CFG_EN_SINK_TERM_DETECTIONBIT(18)
+#define HDMI_SRZ_CFG_ISNKCTRL_MASK GENMASK(21, 20)
+
+#define HDMI_SRZ_CFG_EN_SRC_TERM_SHIFT(24)
+#define HDMI_SRZ_CFG_EN_SRC_TERM_VAL_0_165MHZ (0x0)
+#define HDMI_SRZ_CFG_EN_SRC_TERM_VAL_165_340MHZ  (0x2)
+#define HDMI_SRZ_CFG_EN_SRC_TERM_VAL_ABV_340MHZ (0x3)
+
+#define HDMI_SRZ_CFG_CKCH_LOWSW_EN_SHIFT  (29)
+#define HDMI_SRZ_CFG_CKCH_LOWSW_EN_VAL_500MV  (0x0) /* for below or equal 
3.4 Gbps */
+#define HDMI_SRZ_CFG_CKCH_LOWSW_EN_VAL_300MV  (0x1) /* for above 3.4 Gbps 
*/
+
+#define HDMI_SRZ_CFG_CKBY10_OR_40_SHIFT (30)
+#define HDMI_SRZ_CFG_CKBY10_OR_40_VAL_DIV_BY_10 (0x0) /* for below or 
equal 3.4 Gbps */
+#define HDMI_SRZ_CFG_CKBY10_OR_40_VAL_DIV_BY_40 (0x1) /* for above 3.4 
Gbps */
+
+#define HDMI_SRZ_CFG_DATA20BIT10BIT_SHIFT   (31)
+#define HDMI_SRZ_CFG_DATA20BIT10BIT_VAL_10_BPC  (0x0)
+#define HDMI_SRZ_CFG_DATA20BIT10BIT_VAL_20_BPC  (0x1)
+
+/* *** */
+/* register : HDMI_SRZ_PLL_CFG */
+/* *** */
+#define HDMI_PLL_CFG_ENBIT(0)
+#define HDMI_PLL_CFG_NDIV_SHIFT (8)
+#define HDMI_PLL_CFG_IDF_SHIFT  (16)
+#define HDMI_PLL_CFG_ODF_SHIFT  (24)
+
+#define ODF_DIV_1  (0)
+#define ODF_DIV_2  (1)
+#define ODF_DIV_4  (2)
+#define ODF_DIV_8  (3)
+#define ODF_DIV_16 (4)
+
+/* *** */
+/* register : HDMI_SRZ_STR_1   */
+/* *** */
+#define HDMI_SRZ_STR1_MSK_PEXC0   GENMASK(11, 0)
+#define HDMI_SRZ_STR1_MSK_PEXC1   GENMASK(27, 16)
+
+/* *** */
+/* register : HDMI_SRZ_STR_2   */
+/* *** */
+#define HDMI_SRZ_STR2_PEXC2   (0)
+#define HDMI_SRZ_STR2_MSK_PEXC2   (0xFFF <<

[PATCH 03/14] drm/sti: add support for VTG on the stih418 platform

2023-07-27 Thread Alain Volmat
VTG integrated into the STiH418 differ in the number of outputs
available and allocation of each output.  Indeed on STiH418, there
are 6 outputs (4 on the STiH407/STiH410) and HDMI is connected to
the 5th output in case of STiH418 while it is on the 1st output
in case of STiH407/STiH410.

A new compatible st,stih418-vtg is added to differentiate that.

Signed-off-by: Alain Volmat 
---
 drivers/gpu/drm/sti/sti_vtg.c | 62 +--
 1 file changed, 52 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c
index 5e5f82b6a5d9..b0cab72ea502 100644
--- a/drivers/gpu/drm/sti/sti_vtg.c
+++ b/drivers/gpu/drm/sti/sti_vtg.c
@@ -60,6 +60,18 @@
 #define VTG_TOP_V_HD_4  0x012c
 #define VTG_BOT_V_HD_4  0x0130
 
+#define VTG_H_HD_5  0x0140
+#define VTG_TOP_V_VD_5  0x0144
+#define VTG_BOT_V_VD_5  0x0148
+#define VTG_TOP_V_HD_5  0x014c
+#define VTG_BOT_V_HD_5  0x0150
+
+#define VTG_H_HD_6  0x0160
+#define VTG_TOP_V_VD_6  0x0164
+#define VTG_BOT_V_VD_6  0x0168
+#define VTG_TOP_V_HD_6  0x016c
+#define VTG_BOT_V_HD_6  0x0170
+
 #define VTG_IRQ_BOTTOM  BIT(0)
 #define VTG_IRQ_TOP BIT(1)
 #define VTG_IRQ_MASK(VTG_IRQ_TOP | VTG_IRQ_BOTTOM)
@@ -92,7 +104,12 @@ struct sti_vtg_regs_offs {
u32 bot_v_hd;
 };
 
-#define VTG_MAX_SYNC_OUTPUT 4
+struct sti_vtg_data {
+   unsigned int nb_sync_output;
+   unsigned int hdmi_sync_id;
+};
+
+#define VTG_MAX_SYNC_OUTPUT 6
 static const struct sti_vtg_regs_offs vtg_regs_offs[VTG_MAX_SYNC_OUTPUT] = {
{ VTG_H_HD_1,
  VTG_TOP_V_VD_1, VTG_BOT_V_VD_1, VTG_TOP_V_HD_1, VTG_BOT_V_HD_1 },
@@ -101,7 +118,11 @@ static const struct sti_vtg_regs_offs 
vtg_regs_offs[VTG_MAX_SYNC_OUTPUT] = {
{ VTG_H_HD_3,
  VTG_TOP_V_VD_3, VTG_BOT_V_VD_3, VTG_TOP_V_HD_3, VTG_BOT_V_HD_3 },
{ VTG_H_HD_4,
- VTG_TOP_V_VD_4, VTG_BOT_V_VD_4, VTG_TOP_V_HD_4, VTG_BOT_V_HD_4 }
+ VTG_TOP_V_VD_4, VTG_BOT_V_VD_4, VTG_TOP_V_HD_4, VTG_BOT_V_HD_4 },
+   { VTG_H_HD_5,
+ VTG_TOP_V_VD_5, VTG_BOT_V_VD_5, VTG_TOP_V_HD_5, VTG_BOT_V_HD_5 },
+   { VTG_H_HD_6,
+ VTG_TOP_V_VD_6, VTG_BOT_V_VD_6, VTG_TOP_V_HD_6, VTG_BOT_V_HD_6 }
 };
 
 /*
@@ -138,6 +159,7 @@ struct sti_vtg {
u32 irq_status;
struct raw_notifier_head notifier_list;
struct drm_crtc *crtc;
+   struct sti_vtg_data data;
 };
 
 struct sti_vtg *of_vtg_find(struct device_node *np)
@@ -252,7 +274,7 @@ static void vtg_set_mode(struct sti_vtg *vtg,
vtg_set_output_window(vtg->regs, mode);
 
/* Set hsync and vsync position for HDMI */
-   vtg_set_hsync_vsync_pos([VTG_SYNC_ID_HDMI - 1], HDMI_DELAY, mode);
+   vtg_set_hsync_vsync_pos([vtg->data.hdmi_sync_id - 1], HDMI_DELAY, 
mode);
 
/* Set hsync and vsync position for HD DCS */
vtg_set_hsync_vsync_pos([VTG_SYNC_ID_HDDCS - 1], 0, mode);
@@ -264,7 +286,7 @@ static void vtg_set_mode(struct sti_vtg *vtg,
vtg_set_hsync_vsync_pos([VTG_SYNC_ID_DVO - 1], DVO_DELAY, mode);
 
/* Progam the syncs outputs */
-   for (i = 0; i < VTG_MAX_SYNC_OUTPUT ; i++) {
+   for (i = 0; i < vtg->data.nb_sync_output ; i++) {
writel(sync[i].hsync,
   vtg->regs + vtg_regs_offs[i].h_hd);
writel(sync[i].vsync_line_top,
@@ -376,9 +398,27 @@ static irqreturn_t vtg_irq(int irq, void *arg)
return IRQ_WAKE_THREAD;
 }
 
+static const struct sti_vtg_data stih407_vtg_data = {
+   .nb_sync_output = 4,
+   .hdmi_sync_id = 1,
+};
+
+static const struct sti_vtg_data stih418_vtg_data = {
+   .nb_sync_output = 6,
+   .hdmi_sync_id = 5,
+};
+
+static const struct of_device_id vtg_of_match[] = {
+   { .compatible = "st,vtg", .data = _vtg_data, },
+   { .compatible = "st,stih418-vtg", .data = _vtg_data, },
+   { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, vtg_of_match);
+
 static int vtg_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
+   struct device_node *np = dev->of_node;
struct sti_vtg *vtg;
struct resource *res;
int ret;
@@ -387,6 +427,14 @@ static int vtg_probe(struct platform_device *pdev)
if (!vtg)
return -ENOMEM;
 
+   memcpy(>data, of_match_node(vtg_of_match, np)->data,
+  sizeof(struct sti_vtg_data));
+
+   if (vtg->data.nb_sync_output > VTG_MAX_SYNC_OUTPUT) {
+   dev_err(dev, "Invalid number of VTG sync output\n");
+   return -EINVAL;
+   }
+
/* Get Memory ressources */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
@@ -422,12 +470,6 @@ static int vtg_probe(struct platform_device *pdev)
return 0;
 }
 
-static const struct of_device_id vtg_of_match[] = {
-   { .compatible = "st,vtg", },
-   { /* sentine

Re: [PATCH RESEND] drm/sti: Avoid full proxy f_ops for sti debug attributes

2023-06-10 Thread Alain Volmat
Hi Deepak,

thank you for the patch and sorry for the delay.

Acked-by: Alain Volmat 

Alain

On Thu, Mar 02, 2023 at 01:28:20AM +0530, Deepak R Varma wrote:
> Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file()
> function adds the overhead of introducing a proxy file operation
> functions to wrap the original read/write inside file removal protection
> functions. This adds significant overhead in terms of introducing and
> managing the proxy factory file operations structure and function
> wrapping at runtime.
> As a replacement, a combination of DEFINE_DEBUGFS_ATTRIBUTE macro paired
> with debugfs_create_file_unsafe() is suggested to be used instead.  The
> DEFINE_DEBUGFS_ATTRIBUTE utilises debugfs_file_get() and
> debugfs_file_put() wrappers to protect the original read and write
> function calls for the debug attributes. There is no need for any
> runtime proxy file operations to be managed by the debugfs core.
> Following coccicheck make command helped identify this change:
> 
> make coccicheck M=drivers/gpu/drm/i915/ MODE=patch 
> COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
> 
> Signed-off-by: Deepak R Varma 
> ---
> Note: Change cross compile tested using stm32_defconfig for arm
>   Resending patch for review and feedback. Initially sent on Jan 11 2023
> 
> 
> 
>  drivers/gpu/drm/sti/sti_drv.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
> index ef6a4e63198f..c9be82043638 100644
> --- a/drivers/gpu/drm/sti/sti_drv.c
> +++ b/drivers/gpu/drm/sti/sti_drv.c
> @@ -67,8 +67,8 @@ static int sti_drm_fps_set(void *data, u64 val)
>   return 0;
>  }
>  
> -DEFINE_SIMPLE_ATTRIBUTE(sti_drm_fps_fops,
> - sti_drm_fps_get, sti_drm_fps_set, "%llu\n");
> +DEFINE_DEBUGFS_ATTRIBUTE(sti_drm_fps_fops,
> +  sti_drm_fps_get, sti_drm_fps_set, "%llu\n");
>  
>  static int sti_drm_fps_dbg_show(struct seq_file *s, void *data)
>  {
> @@ -97,8 +97,8 @@ static void sti_drm_dbg_init(struct drm_minor *minor)
>ARRAY_SIZE(sti_drm_dbg_list),
>minor->debugfs_root, minor);
>  
> - debugfs_create_file("fps_show", S_IRUGO | S_IWUSR, minor->debugfs_root,
> - minor->dev, _drm_fps_fops);
> + debugfs_create_file_unsafe("fps_show", S_IRUGO | S_IWUSR, 
> minor->debugfs_root,
> +minor->dev, _drm_fps_fops);
>  
>   DRM_INFO("%s: debugfs installed\n", DRIVER_NAME);
>  }
> -- 
> 2.34.1
> 
> 
> 


Re: [PATCH 41/53] drm/sti: Convert to platform remove callback returning void

2023-05-09 Thread Alain Volmat
Hi,

Acked-by: Alain Volmat 

Regards,
Alain

On Sun, May 07, 2023 at 06:26:04PM +0200, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is (mostly) ignored
> and this typically results in resource leaks. To improve here there is a
> quest to make the remove callback return void. In the first step of this
> quest all drivers are converted to .remove_new() which already returns
> void.
> 
> Trivially convert the sti drm drivers from always returning zero in the
> remove callback to the void returning variant.
> 
> Signed-off-by: Uwe Kleine-König 
> ---
>  drivers/gpu/drm/sti/sti_compositor.c | 5 ++---
>  drivers/gpu/drm/sti/sti_drv.c| 6 ++
>  drivers/gpu/drm/sti/sti_dvo.c| 5 ++---
>  drivers/gpu/drm/sti/sti_hda.c| 5 ++---
>  drivers/gpu/drm/sti/sti_hdmi.c   | 6 ++
>  drivers/gpu/drm/sti/sti_hqvdp.c  | 5 ++---
>  drivers/gpu/drm/sti/sti_tvout.c  | 5 ++---
>  7 files changed, 14 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_compositor.c 
> b/drivers/gpu/drm/sti/sti_compositor.c
> index 142a8e1b4436..33487a1fed8f 100644
> --- a/drivers/gpu/drm/sti/sti_compositor.c
> +++ b/drivers/gpu/drm/sti/sti_compositor.c
> @@ -258,10 +258,9 @@ static int sti_compositor_probe(struct platform_device 
> *pdev)
>   return component_add(>dev, _compositor_ops);
>  }
>  
> -static int sti_compositor_remove(struct platform_device *pdev)
> +static void sti_compositor_remove(struct platform_device *pdev)
>  {
>   component_del(>dev, _compositor_ops);
> - return 0;
>  }
>  
>  struct platform_driver sti_compositor_driver = {
> @@ -270,7 +269,7 @@ struct platform_driver sti_compositor_driver = {
>   .of_match_table = compositor_of_match,
>   },
>   .probe = sti_compositor_probe,
> - .remove = sti_compositor_remove,
> + .remove_new = sti_compositor_remove,
>  };
>  
>  MODULE_AUTHOR("Benjamin Gaignard ");
> diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
> index ef6a4e63198f..451480041130 100644
> --- a/drivers/gpu/drm/sti/sti_drv.c
> +++ b/drivers/gpu/drm/sti/sti_drv.c
> @@ -246,11 +246,9 @@ static int sti_platform_probe(struct platform_device 
> *pdev)
>   return component_master_add_with_match(dev, _ops, match);
>  }
>  
> -static int sti_platform_remove(struct platform_device *pdev)
> +static void sti_platform_remove(struct platform_device *pdev)
>  {
>   component_master_del(>dev, _ops);
> -
> - return 0;
>  }
>  
>  static const struct of_device_id sti_dt_ids[] = {
> @@ -261,7 +259,7 @@ MODULE_DEVICE_TABLE(of, sti_dt_ids);
>  
>  static struct platform_driver sti_platform_driver = {
>   .probe = sti_platform_probe,
> - .remove = sti_platform_remove,
> + .remove_new = sti_platform_remove,
>   .driver = {
>   .name = DRIVER_NAME,
>   .of_match_table = sti_dt_ids,
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 577c477b5f46..0dca0048dd25 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -567,10 +567,9 @@ static int sti_dvo_probe(struct platform_device *pdev)
>   return component_add(>dev, _dvo_ops);
>  }
>  
> -static int sti_dvo_remove(struct platform_device *pdev)
> +static void sti_dvo_remove(struct platform_device *pdev)
>  {
>   component_del(>dev, _dvo_ops);
> - return 0;
>  }
>  
>  static const struct of_device_id dvo_of_match[] = {
> @@ -586,7 +585,7 @@ struct platform_driver sti_dvo_driver = {
>   .of_match_table = dvo_of_match,
>   },
>   .probe = sti_dvo_probe,
> - .remove = sti_dvo_remove,
> + .remove_new = sti_dvo_remove,
>  };
>  
>  MODULE_AUTHOR("Benjamin Gaignard ");
> diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
> index 15097ac67931..6ee35612a14e 100644
> --- a/drivers/gpu/drm/sti/sti_hda.c
> +++ b/drivers/gpu/drm/sti/sti_hda.c
> @@ -792,10 +792,9 @@ static int sti_hda_probe(struct platform_device *pdev)
>   return component_add(>dev, _hda_ops);
>  }
>  
> -static int sti_hda_remove(struct platform_device *pdev)
> +static void sti_hda_remove(struct platform_device *pdev)
>  {
>   component_del(>dev, _hda_ops);
> - return 0;
>  }
>  
>  static const struct of_device_id hda_of_match[] = {
> @@ -812,7 +811,7 @@ struct platform_driver sti_hda_driver = {
>   .of_match_table = hda_of_match,

Re: [PATCH 4/5] drm/sti: Drop of_gpio header

2023-04-23 Thread Alain Volmat
Hi Maira,

thanks for the patch.

On Fri, Aug 12, 2022 at 05:57:45PM -0300, Maíra Canal wrote:
> This driver includes the deprecated OF GPIO header 
> yet fail to use symbols from it, so drop this include.
> 
> Cc: Alain Volmat 
> Signed-off-by: Maíra Canal 
> ---
>  drivers/gpu/drm/sti/sti_dvo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index b6ee8a82e656..0fc7710b054a 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -8,7 +8,7 @@
>  #include 
>  #include 
>  #include 
> -#include 
> +#include 
>  #include 
>  
>  #include 
> -- 

Acked-by: Alain Volmat 

> 2.37.1
> 


Re: [PATCH 7/9] drm/sti/sti_hdmi: convert to using is_hdmi from display info

2023-04-23 Thread Alain Volmat
Hi Jani,

On Thu, Sep 01, 2022 at 03:47:09PM +0300, Jani Nikula wrote:
> Prefer the parsed results for is_hdmi in display info over calling
> drm_detect_hdmi_monitor(). Remove the now redundant hdmi_monitor member
> from struct sti_hdmi.
> 
> Cc: Alain Volmat 
> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/sti/sti_hdmi.c | 11 ++-
>  drivers/gpu/drm/sti/sti_hdmi.h |  2 --
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
> index cb82622877d2..7e6d47c1c43b 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.c
> +++ b/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -266,6 +266,7 @@ static void hdmi_active_area(struct sti_hdmi *hdmi)
>   */
>  static void hdmi_config(struct sti_hdmi *hdmi)
>  {
> + struct drm_connector *connector = hdmi->drm_connector;
>   u32 conf;
>  
>   DRM_DEBUG_DRIVER("\n");
> @@ -275,7 +276,7 @@ static void hdmi_config(struct sti_hdmi *hdmi)
>  
>   /* Select encryption type and the framing mode */
>   conf |= HDMI_CFG_ESS_NOT_OESS;
> - if (hdmi->hdmi_monitor)
> + if (connector->display_info.is_hdmi)
>   conf |= HDMI_CFG_HDMI_NOT_DVI;
>  
>   /* Set Hsync polarity */
> @@ -985,15 +986,15 @@ static int sti_hdmi_connector_get_modes(struct 
> drm_connector *connector)
>   if (!edid)
>   goto fail;
>  
> - hdmi->hdmi_monitor = drm_detect_hdmi_monitor(edid);
> - DRM_DEBUG_KMS("%s : %dx%d cm\n",
> -   (hdmi->hdmi_monitor ? "hdmi monitor" : "dvi monitor"),
> -   edid->width_cm, edid->height_cm);
>   cec_notifier_set_phys_addr_from_edid(hdmi->notifier, edid);
>  
>   count = drm_add_edid_modes(connector, edid);
>   drm_connector_update_edid_property(connector, edid);
>  
> + DRM_DEBUG_KMS("%s : %dx%d cm\n",
> +   (connector->display_info.is_hdmi ? "hdmi monitor" : "dvi 
> monitor"),
> +   edid->width_cm, edid->height_cm);
> +
>   kfree(edid);
>   return count;
>  
> diff --git a/drivers/gpu/drm/sti/sti_hdmi.h b/drivers/gpu/drm/sti/sti_hdmi.h
> index 05b2f3d0d48d..6d4c3f57bc46 100644
> --- a/drivers/gpu/drm/sti/sti_hdmi.h
> +++ b/drivers/gpu/drm/sti/sti_hdmi.h
> @@ -57,7 +57,6 @@ struct hdmi_audio_params {
>   * @reset: reset control of the hdmi phy
>   * @ddc_adapt: i2c ddc adapter
>   * @colorspace: current colorspace selected
> - * @hdmi_monitor: true if HDMI monitor detected else DVI monitor assumed
>   * @audio_pdev: ASoC hdmi-codec platform device
>   * @audio: hdmi audio parameters.
>   * @drm_connector: hdmi connector
> @@ -83,7 +82,6 @@ struct sti_hdmi {
>   struct reset_control *reset;
>   struct i2c_adapter *ddc_adapt;
>   enum hdmi_colorspace colorspace;
> - bool hdmi_monitor;
>   struct platform_device *audio_pdev;
>   struct hdmi_audio_params audio;
>   struct drm_connector *drm_connector;
> -- 

Acked-by: Alain Volmat 

Thanks.

> 2.34.1
> 


[PATCH] MAINTAINERS: Update Alain Volmat's email address for drm/sti

2023-04-17 Thread Alain Volmat
Update my email address for maintainer of the STi DRM driver.

Signed-off-by: Alain Volmat 
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 0e64787aace8..3cec7ad72389 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6952,7 +6952,7 @@ F:
Documentation/devicetree/bindings/display/rockchip/
 F: drivers/gpu/drm/rockchip/
 
 DRM DRIVERS FOR STI
-M: Alain Volmat 
+M: Alain Volmat 
 L: dri-devel@lists.freedesktop.org
 S: Maintained
 T: git git://anongit.freedesktop.org/drm/drm-misc
-- 
2.34.1



Re: [PATCH][next] drm/sti: Fix spelling mistake "top_cmd_offest" -> "top_cmd_offset"

2023-02-13 Thread Alain Volmat
Hi,

thanks for the patch.


On Mon, Feb 13, 2023 at 10:05:22AM +, Colin Ian King wrote:
> There is a spelling mistake in a variable name. Fix it.
> 
> Signed-off-by: Colin Ian King 
> ---
>  drivers/gpu/drm/sti/sti_hqvdp.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 02b77279f6e4..711a6e333afc 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -797,7 +797,7 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp)
>  static int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, 
> void *data)
>  {
>   struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb);
> - int btm_cmd_offset, top_cmd_offest;
> + int btm_cmd_offset, top_cmd_offset;
>   struct sti_hqvdp_cmd *btm_cmd, *top_cmd;
>  
>   if ((evt != VTG_TOP_FIELD_EVENT) && (evt != VTG_BOTTOM_FIELD_EVENT)) {
> @@ -816,14 +816,14 @@ static int sti_hqvdp_vtg_cb(struct notifier_block *nb, 
> unsigned long evt, void *
>   if (hqvdp->btm_field_pending) {
>   /* Create the btm field command from the current one */
>   btm_cmd_offset = sti_hqvdp_get_free_cmd(hqvdp);
> - top_cmd_offest = sti_hqvdp_get_curr_cmd(hqvdp);
> - if ((btm_cmd_offset == -1) || (top_cmd_offest == -1)) {
> + top_cmd_offset = sti_hqvdp_get_curr_cmd(hqvdp);
> + if ((btm_cmd_offset == -1) || (top_cmd_offset == -1)) {
>   DRM_DEBUG_DRIVER("Warning: no cmd, will skip field\n");
>   return -EBUSY;
>   }
>  
>   btm_cmd = hqvdp->hqvdp_cmd + btm_cmd_offset;
> - top_cmd = hqvdp->hqvdp_cmd + top_cmd_offest;
> +     top_cmd = hqvdp->hqvdp_cmd + top_cmd_offset;
>  
>   memcpy(btm_cmd, top_cmd, sizeof(*btm_cmd));
>  
> -- 

Acked-by: Alain Volmat 

Alain

> 2.30.2
> 


Re: [PATCH] drm: sti: don't use kernel-doc markers

2022-03-28 Thread Alain Volmat
Hi Randy,

thanks for the patch.

Acked-by: Alain Volmat 

Alain

On Sat, Mar 26, 2022 at 04:51:32PM -0700, Randy Dunlap wrote:
> Don't mark static functions as kernel-doc.
> 
> Prevents multiple kernel-doc build warnings:
> 
> drivers/gpu/drm/sti/sti_hdmi.c:187: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * HDMI interrupt handler threaded
> drivers/gpu/drm/sti/sti_hdmi.c:219: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * HDMI interrupt handler
> drivers/gpu/drm/sti/sti_hdmi.c:241: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Set hdmi active area depending on the drm display mode selected
> drivers/gpu/drm/sti/sti_hdmi.c:262: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Overall hdmi configuration
> drivers/gpu/drm/sti/sti_hdmi.c:340: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Helper to concatenate infoframe in 32 bits word
> drivers/gpu/drm/sti/sti_hdmi.c:357: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Helper to write info frame
> drivers/gpu/drm/sti/sti_hdmi.c:427: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Prepare and configure the AVI infoframe
> drivers/gpu/drm/sti/sti_hdmi.c:470: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Prepare and configure the AUDIO infoframe
> drivers/gpu/drm/sti/sti_hdmi.c:555: warning: This comment starts with '/**', 
> but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>  * Software reset of the hdmi subsystem
> 
> Fixes: 5402626c83a2 ("drm: sti: add HDMI driver")
> Signed-off-by: Randy Dunlap 
> Cc: Aditya Srivastava 
> Cc: Benjamin Gaignard 
> Cc: Alain Volmat 
> Cc: David Airlie 
> Cc: Daniel Vetter 
> ---
>  drivers/gpu/drm/sti/sti_hdmi.c |   20 ++--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> --- linux-next-20220325.orig/drivers/gpu/drm/sti/sti_hdmi.c
> +++ linux-next-20220325/drivers/gpu/drm/sti/sti_hdmi.c
> @@ -183,7 +183,7 @@ void hdmi_write(struct sti_hdmi *hdmi, u
>   writel(val, hdmi->regs + offset);
>  }
>  
> -/**
> +/*
>   * HDMI interrupt handler threaded
>   *
>   * @irq: irq number
> @@ -215,7 +215,7 @@ static irqreturn_t hdmi_irq_thread(int i
>   return IRQ_HANDLED;
>  }
>  
> -/**
> +/*
>   * HDMI interrupt handler
>   *
>   * @irq: irq number
> @@ -237,7 +237,7 @@ static irqreturn_t hdmi_irq(int irq, voi
>   return IRQ_WAKE_THREAD;
>  }
>  
> -/**
> +/*
>   * Set hdmi active area depending on the drm display mode selected
>   *
>   * @hdmi: pointer on the hdmi internal structure
> @@ -258,7 +258,7 @@ static void hdmi_active_area(struct sti_
>   hdmi_write(hdmi, ymax, HDMI_ACTIVE_VID_YMAX);
>  }
>  
> -/**
> +/*
>   * Overall hdmi configuration
>   *
>   * @hdmi: pointer on the hdmi internal structure
> @@ -336,7 +336,7 @@ static void hdmi_infoframe_reset(struct
>   hdmi_write(hdmi, 0x0, pack_offset + i);
>  }
>  
> -/**
> +/*
>   * Helper to concatenate infoframe in 32 bits word
>   *
>   * @ptr: pointer on the hdmi internal structure
> @@ -353,7 +353,7 @@ static inline unsigned int hdmi_infofram
>   return value;
>  }
>  
> -/**
> +/*
>   * Helper to write info frame
>   *
>   * @hdmi: pointer on the hdmi internal structure
> @@ -423,7 +423,7 @@ static void hdmi_infoframe_write_infopac
>   hdmi_write(hdmi, val, HDMI_SW_DI_CFG);
>  }
>  
> -/**
> +/*
>   * Prepare and configure the AVI infoframe
>   *
>   * AVI infoframe are transmitted at least once per two video field and
> @@ -466,7 +466,7 @@ static int hdmi_avi_infoframe_config(str
>   return 0;
>  }
>  
> -/**
> +/*
>   * Prepare and configure the AUDIO infoframe
>   *
>   * AUDIO infoframe are transmitted once per frame and
> @@ -551,7 +551,7 @@ static int hdmi_vendor_infoframe_config(
>  
>  #define HDMI_TIMEOUT_SWRESET  100   /*milliseconds */
>  
> -/**
> +/*
>   * Software reset of the hdmi subsystem
>   *
>   * @hdmi: pointer on the hdmi internal structure
> @@ -785,7 +785,7 @@ static void sti_hdmi_disable(struct drm_
>   cec_notifier_set_phys_addr(hdmi->notifier, CEC_PHYS_ADDR_INVALID);
>  }
>  
> -/**
> +/*
>   * sti_hdmi_audio_get_non_coherent_n() - get N parameter for non-coherent
>   * clocks. None-coherent clocks means that audio and TMDS clocks have not the
>   * same source (drifts between clocks). In this case assumption is that CTS 
> is


Re: [PATCH 16/30] drm/sti: fix typos in comments

2022-03-14 Thread Alain Volmat
Hi Julia

thanks for the patch.

Reviewed-by: Alain Volmat 

Alain

On Mon, Mar 14, 2022 at 12:53:40PM +0100, Julia Lawall wrote:
> Various spelling mistakes in comments.
> Detected with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall 
> 
> ---
>  drivers/gpu/drm/sti/sti_gdp.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
> index 3db3768a3241..b58415f2e4d8 100644
> --- a/drivers/gpu/drm/sti/sti_gdp.c
> +++ b/drivers/gpu/drm/sti/sti_gdp.c
> @@ -406,7 +406,7 @@ static struct sti_gdp_node_list 
> *sti_gdp_get_free_nodes(struct sti_gdp *gdp)
>   (hw_nvn != gdp->node_list[i].top_field_paddr))
>   return >node_list[i];
>  
> - /* in hazardious cases restart with the first node */
> + /* in hazardous cases restart with the first node */
>   DRM_ERROR("inconsistent NVN for %s: 0x%08X\n",
>   sti_plane_to_str(>plane), hw_nvn);
>  
> 


Re: [PATCH 17/23] drm/sti: plane: Remove redundant zpos initialisation

2022-02-10 Thread Alain Volmat
Hi,

thanks for the patch.

Reviewed-by: Alain Volmat 

Alain

On Mon, Feb 07, 2022 at 05:35:09PM +0100, Maxime Ripard wrote:
> The sti KMS driver will call drm_plane_create_zpos_property() with an
> init value depending on the plane type.
> 
> Since the initial value wasn't carried over in the state, the driver had
> to set it again in sti_plane_reset() and rcar_du_vsp_plane_reset().
> However, the helpers have been adjusted to set it properly at reset, so
> this is not needed anymore.
> 
> Cc: Alain Volmat 
> Signed-off-by: Maxime Ripard 
> ---
>  drivers/gpu/drm/sti/sti_cursor.c | 2 +-
>  drivers/gpu/drm/sti/sti_gdp.c| 2 +-
>  drivers/gpu/drm/sti/sti_hqvdp.c  | 2 +-
>  drivers/gpu/drm/sti/sti_plane.c  | 6 --
>  drivers/gpu/drm/sti/sti_plane.h  | 1 -
>  5 files changed, 3 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sti/sti_cursor.c 
> b/drivers/gpu/drm/sti/sti_cursor.c
> index 1d6051b4f6fe..414c9973aa6d 100644
> --- a/drivers/gpu/drm/sti/sti_cursor.c
> +++ b/drivers/gpu/drm/sti/sti_cursor.c
> @@ -351,7 +351,7 @@ static const struct drm_plane_funcs 
> sti_cursor_plane_helpers_funcs = {
>   .update_plane = drm_atomic_helper_update_plane,
>   .disable_plane = drm_atomic_helper_disable_plane,
>   .destroy = drm_plane_cleanup,
> - .reset = sti_plane_reset,
> + .reset = drm_atomic_helper_plane_reset,
>   .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   .late_register = sti_cursor_late_register,
> diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
> index d1a35d97bc45..3db3768a3241 100644
> --- a/drivers/gpu/drm/sti/sti_gdp.c
> +++ b/drivers/gpu/drm/sti/sti_gdp.c
> @@ -905,7 +905,7 @@ static const struct drm_plane_funcs 
> sti_gdp_plane_helpers_funcs = {
>   .update_plane = drm_atomic_helper_update_plane,
>   .disable_plane = drm_atomic_helper_disable_plane,
>   .destroy = drm_plane_cleanup,
> - .reset = sti_plane_reset,
> + .reset = drm_atomic_helper_plane_reset,
>   .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   .late_register = sti_gdp_late_register,
> diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
> index 3c61ba8b43e0..2201a50353eb 100644
> --- a/drivers/gpu/drm/sti/sti_hqvdp.c
> +++ b/drivers/gpu/drm/sti/sti_hqvdp.c
> @@ -1283,7 +1283,7 @@ static const struct drm_plane_funcs 
> sti_hqvdp_plane_helpers_funcs = {
>   .update_plane = drm_atomic_helper_update_plane,
>   .disable_plane = drm_atomic_helper_disable_plane,
>   .destroy = drm_plane_cleanup,
> - .reset = sti_plane_reset,
> + .reset = drm_atomic_helper_plane_reset,
>   .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
>   .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
>   .late_register = sti_hqvdp_late_register,
> diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c
> index 3da4a46df2f2..173409cdb99e 100644
> --- a/drivers/gpu/drm/sti/sti_plane.c
> +++ b/drivers/gpu/drm/sti/sti_plane.c
> @@ -112,12 +112,6 @@ static int sti_plane_get_default_zpos(enum 
> drm_plane_type type)
>   return 0;
>  }
>  
> -void sti_plane_reset(struct drm_plane *plane)
> -{
> - drm_atomic_helper_plane_reset(plane);
> - plane->state->zpos = sti_plane_get_default_zpos(plane->type);
> -}
> -
>  static void sti_plane_attach_zorder_property(struct drm_plane *drm_plane,
>enum drm_plane_type type)
>  {
> diff --git a/drivers/gpu/drm/sti/sti_plane.h b/drivers/gpu/drm/sti/sti_plane.h
> index 065bfb4a..8e33e629d9b0 100644
> --- a/drivers/gpu/drm/sti/sti_plane.h
> +++ b/drivers/gpu/drm/sti/sti_plane.h
> @@ -81,5 +81,4 @@ void sti_plane_update_fps(struct sti_plane *plane,
>  
>  void sti_plane_init_property(struct sti_plane *plane,
>enum drm_plane_type type);
> -void sti_plane_reset(struct drm_plane *plane);
>  #endif
> -- 
> 2.34.1
> 


Re: [PATCH 2/2] MAINTAINERS: update drm/stm drm/sti and cec/sti maintainers

2022-01-17 Thread Alain Volmat
Hi Philippe,

thanks for the patch.

Reviewed-by: Alain Volmat 

Alain

On Thu, Jan 13, 2022 at 06:19:21PM +0100, Philippe Cornu wrote:
> Add Alain as sti maintainer for both drm/sti & cec/sti.
> Add Raphaël as stm maintainer for drm/stm.
> 
> Signed-off-by: Philippe Cornu 
> ---
>  MAINTAINERS | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 6bea080d0159..708f8c86e4c9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6423,6 +6423,7 @@ F:  
> Documentation/devicetree/bindings/display/rockchip/
>  F:   drivers/gpu/drm/rockchip/
>  
>  DRM DRIVERS FOR STI
> +M:   Alain Volmat 
>  L:   dri-devel@lists.freedesktop.org
>  S:   Maintained
>  T:   git git://anongit.freedesktop.org/drm/drm-misc
> @@ -6431,6 +6432,7 @@ F:  drivers/gpu/drm/sti
>  
>  DRM DRIVERS FOR STM
>  M:   Yannick Fertre 
> +M:   Raphael Gallais-Pou 
>  M:   Philippe Cornu 
>  L:   dri-devel@lists.freedesktop.org
>  S:   Maintained
> @@ -18152,6 +18154,7 @@ F:
> Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
>  F:   sound/soc/sti/
>  
>  STI CEC DRIVER
> +M:   Alain Volmat 
>  S:   Maintained
>  F:   Documentation/devicetree/bindings/media/stih-cec.txt
>  F:   drivers/media/cec/platform/sti/
> -- 
> 2.17.1
>