[PATCH v2] drm/sti: remove stih415-416 platform support

2016-09-20 Thread Benjamin Gaignard
Acked-by: Benjamin Gaignard 

2016-09-20 11:25 GMT+02:00 Vincent Abriou :
> stih415 and stih416 platform are obsolete and no more supported.
> Only stih407 and stih410 platform are maintained.
>
> Signed-off-by: Vincent Abriou 
> ---
>  drivers/gpu/drm/sti/Kconfig|   6 +-
>  drivers/gpu/drm/sti/Makefile   |   1 -
>  drivers/gpu/drm/sti/sti_compositor.c   |  19 --
>  drivers/gpu/drm/sti/sti_hda.c  |  39 +---
>  drivers/gpu/drm/sti/sti_hdmi.c |  20 --
>  drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c | 336 
> -
>  drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h |  14 --
>  drivers/gpu/drm/sti/sti_mixer.c|  19 --
>  drivers/gpu/drm/sti/sti_tvout.c|  40 +---
>  9 files changed, 14 insertions(+), 480 deletions(-)
>  delete mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c
>  delete mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h
>
> diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
> index 494ab25..acd7286 100644
> --- a/drivers/gpu/drm/sti/Kconfig
> +++ b/drivers/gpu/drm/sti/Kconfig
> @@ -1,6 +1,6 @@
>  config DRM_STI
> -   tristate "DRM Support for STMicroelectronics SoC stiH41x Series"
> -   depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM)
> +   tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
> +   depends on DRM && (ARCH_STI || ARCH_MULTIPLATFORM)
> select RESET_CONTROLLER
> select DRM_KMS_HELPER
> select DRM_GEM_CMA_HELPER
> @@ -9,4 +9,4 @@ config DRM_STI
> select FW_LOADER
> select SND_SOC_HDMI_CODEC if SND_SOC
> help
> - Choose this option to enable DRM on STM stiH41x chipset
> + Choose this option to enable DRM on STM stiH4xx chipset
> diff --git a/drivers/gpu/drm/sti/Makefile b/drivers/gpu/drm/sti/Makefile
> index b805762..d20f7c0 100644
> --- a/drivers/gpu/drm/sti/Makefile
> +++ b/drivers/gpu/drm/sti/Makefile
> @@ -9,7 +9,6 @@ sti-drm-y := \
> sti_crtc.o \
> sti_plane.o \
> sti_hdmi.o \
> -   sti_hdmi_tx3g0c55phy.o \
> sti_hdmi_tx3g4c28phy.o \
> sti_dvo.o \
> sti_awg_utils.o \
> diff --git a/drivers/gpu/drm/sti/sti_compositor.c 
> b/drivers/gpu/drm/sti/sti_compositor.c
> index a6f391b..f62041f 100644
> --- a/drivers/gpu/drm/sti/sti_compositor.c
> +++ b/drivers/gpu/drm/sti/sti_compositor.c
> @@ -39,22 +39,6 @@ static const struct sti_compositor_data 
> stih407_compositor_data = {
> },
>  };
>
> -/*
> - * stiH416 compositor properties
> - * Note:
> - * on stih416 MIXER_AUX has a different base address from MIXER_MAIN
> - * Moreover, GDPx is different for Main and Aux Mixer. So this subdev map 
> does
> - * not fit for stiH416 if we want to enable the MIXER_AUX.
> - */
> -static const struct sti_compositor_data stih416_compositor_data = {
> -   .nb_subdev = 3,
> -   .subdev_desc = {
> -   {STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100},
> -   {STI_GPD_SUBDEV, (int)STI_GDP_1, 0x200},
> -   {STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0xC00}
> -   },
> -};
> -
>  int sti_compositor_debugfs_init(struct sti_compositor *compo,
> struct drm_minor *minor)
>  {
> @@ -179,9 +163,6 @@ static const struct component_ops sti_compositor_ops = {
>
>  static const struct of_device_id compositor_of_match[] = {
> {
> -   .compatible = "st,stih416-compositor",
> -   .data = _compositor_data,
> -   }, {
> .compatible = "st,stih407-compositor",
> .data = _compositor_data,
> }, {
> diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
> index a225c4d..e7c243f 100644
> --- a/drivers/gpu/drm/sti/sti_hda.c
> +++ b/drivers/gpu/drm/sti/sti_hda.c
> @@ -62,14 +62,8 @@
>  #define SCALE_CTRL_CR_DFLT  0x00DB0249
>
>  /* Video DACs control */
> -#define VIDEO_DACS_CONTROL_MASK 0x0FFF
> -#define VIDEO_DACS_CONTROL_SYSCFG2535   0x085C /* for stih416 */
> -#define DAC_CFG_HD_OFF_SHIFT5
> -#define DAC_CFG_HD_OFF_MASK (0x7 << DAC_CFG_HD_OFF_SHIFT)
> -#define VIDEO_DACS_CONTROL_SYSCFG5072   0x0120 /* for stih407 */
>  #define DAC_CFG_HD_HZUVW_OFF_MASK   BIT(1)
>
> -
>  /* Upsampler values for the alternative 2X Filter */
>  #define SAMPLER_COEF_NB 8
>  #define HDA_ANA_SRC_Y_CFG_ALT_2X0x0113
> @@ -300,28 +294,14 @@ static bool hda_get_mode_idx(struct drm_display_mode 
> mode, int *idx)
>   */
>  static void hda_enable_hd_dacs(struct sti_hda *hda, bool enable)
>  {
> -   u32 mask;
> -
> if (hda->video_dacs_ctrl) {
> u32 val;
>
> -   switch ((u32)hda->video_dacs_ctrl & VIDEO_DACS_CONTROL_MASK) {
> -   case VIDEO_DACS_CONTROL_SYSCFG2535:
> -   mask = DAC_CFG_HD_OFF_MASK;
> -   break;
> -   

[STLinux Kernel] [PATCH v2] drm/sti: remove stih415-416 platform support

2016-09-20 Thread Peter Griffin
Hi Vincent,

On Tue, 20 Sep 2016, Vincent Abriou wrote:

> stih415 and stih416 platform are obsolete and no more supported.
> Only stih407 and stih410 platform are maintained.
> 
> Signed-off-by: Vincent Abriou 

Subject should have a v2, but apart from that: -

Acked-by: Peter Griffin 

Peter.


[PATCH v2] drm/sti: remove stih415-416 platform support

2016-09-20 Thread Vincent Abriou
stih415 and stih416 platform are obsolete and no more supported.
Only stih407 and stih410 platform are maintained.

Signed-off-by: Vincent Abriou 
---
 drivers/gpu/drm/sti/Kconfig|   6 +-
 drivers/gpu/drm/sti/Makefile   |   1 -
 drivers/gpu/drm/sti/sti_compositor.c   |  19 --
 drivers/gpu/drm/sti/sti_hda.c  |  39 +---
 drivers/gpu/drm/sti/sti_hdmi.c |  20 --
 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c | 336 -
 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h |  14 --
 drivers/gpu/drm/sti/sti_mixer.c|  19 --
 drivers/gpu/drm/sti/sti_tvout.c|  40 +---
 9 files changed, 14 insertions(+), 480 deletions(-)
 delete mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c
 delete mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h

diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
index 494ab25..acd7286 100644
--- a/drivers/gpu/drm/sti/Kconfig
+++ b/drivers/gpu/drm/sti/Kconfig
@@ -1,6 +1,6 @@
 config DRM_STI
-   tristate "DRM Support for STMicroelectronics SoC stiH41x Series"
-   depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM)
+   tristate "DRM Support for STMicroelectronics SoC stiH4xx Series"
+   depends on DRM && (ARCH_STI || ARCH_MULTIPLATFORM)
select RESET_CONTROLLER
select DRM_KMS_HELPER
select DRM_GEM_CMA_HELPER
@@ -9,4 +9,4 @@ config DRM_STI
select FW_LOADER
select SND_SOC_HDMI_CODEC if SND_SOC
help
- Choose this option to enable DRM on STM stiH41x chipset
+ Choose this option to enable DRM on STM stiH4xx chipset
diff --git a/drivers/gpu/drm/sti/Makefile b/drivers/gpu/drm/sti/Makefile
index b805762..d20f7c0 100644
--- a/drivers/gpu/drm/sti/Makefile
+++ b/drivers/gpu/drm/sti/Makefile
@@ -9,7 +9,6 @@ sti-drm-y := \
sti_crtc.o \
sti_plane.o \
sti_hdmi.o \
-   sti_hdmi_tx3g0c55phy.o \
sti_hdmi_tx3g4c28phy.o \
sti_dvo.o \
sti_awg_utils.o \
diff --git a/drivers/gpu/drm/sti/sti_compositor.c 
b/drivers/gpu/drm/sti/sti_compositor.c
index a6f391b..f62041f 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -39,22 +39,6 @@ static const struct sti_compositor_data 
stih407_compositor_data = {
},
 };

-/*
- * stiH416 compositor properties
- * Note:
- * on stih416 MIXER_AUX has a different base address from MIXER_MAIN
- * Moreover, GDPx is different for Main and Aux Mixer. So this subdev map does
- * not fit for stiH416 if we want to enable the MIXER_AUX.
- */
-static const struct sti_compositor_data stih416_compositor_data = {
-   .nb_subdev = 3,
-   .subdev_desc = {
-   {STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100},
-   {STI_GPD_SUBDEV, (int)STI_GDP_1, 0x200},
-   {STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0xC00}
-   },
-};
-
 int sti_compositor_debugfs_init(struct sti_compositor *compo,
struct drm_minor *minor)
 {
@@ -179,9 +163,6 @@ static const struct component_ops sti_compositor_ops = {

 static const struct of_device_id compositor_of_match[] = {
{
-   .compatible = "st,stih416-compositor",
-   .data = _compositor_data,
-   }, {
.compatible = "st,stih407-compositor",
.data = _compositor_data,
}, {
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
index a225c4d..e7c243f 100644
--- a/drivers/gpu/drm/sti/sti_hda.c
+++ b/drivers/gpu/drm/sti/sti_hda.c
@@ -62,14 +62,8 @@
 #define SCALE_CTRL_CR_DFLT  0x00DB0249

 /* Video DACs control */
-#define VIDEO_DACS_CONTROL_MASK 0x0FFF
-#define VIDEO_DACS_CONTROL_SYSCFG2535   0x085C /* for stih416 */
-#define DAC_CFG_HD_OFF_SHIFT5
-#define DAC_CFG_HD_OFF_MASK (0x7 << DAC_CFG_HD_OFF_SHIFT)
-#define VIDEO_DACS_CONTROL_SYSCFG5072   0x0120 /* for stih407 */
 #define DAC_CFG_HD_HZUVW_OFF_MASK   BIT(1)

-
 /* Upsampler values for the alternative 2X Filter */
 #define SAMPLER_COEF_NB 8
 #define HDA_ANA_SRC_Y_CFG_ALT_2X0x0113
@@ -300,28 +294,14 @@ static bool hda_get_mode_idx(struct drm_display_mode 
mode, int *idx)
  */
 static void hda_enable_hd_dacs(struct sti_hda *hda, bool enable)
 {
-   u32 mask;
-
if (hda->video_dacs_ctrl) {
u32 val;

-   switch ((u32)hda->video_dacs_ctrl & VIDEO_DACS_CONTROL_MASK) {
-   case VIDEO_DACS_CONTROL_SYSCFG2535:
-   mask = DAC_CFG_HD_OFF_MASK;
-   break;
-   case VIDEO_DACS_CONTROL_SYSCFG5072:
-   mask = DAC_CFG_HD_HZUVW_OFF_MASK;
-   break;
-   default:
-   DRM_INFO("Video DACS control register not supported\n");
-   return;
-   }
-
val =