Re: [PATCH v2 5/5] drm/ast: Remove struct ast_{vga,sil164}_connector

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
>
> Both, struct ast_vga_connector and struct ast_sil164_connector, are
> now wrappers around struct drm_connector. Remove them.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>


> ---
>  drivers/gpu/drm/ast/ast_drv.h  | 24 ++----------------------
>  drivers/gpu/drm/ast/ast_mode.c | 18 ++++++------------
>  2 files changed, 8 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
> index 2a55fc7303b9..d456f6bc4b2c 100644
> --- a/drivers/gpu/drm/ast/ast_drv.h
> +++ b/drivers/gpu/drm/ast/ast_drv.h
> @@ -130,26 +130,6 @@ struct ast_i2c_chan {
>         struct i2c_algo_bit_data bit;
>  };
>
> -struct ast_vga_connector {
> -       struct drm_connector base;
> -};
> -
> -static inline struct ast_vga_connector *
> -to_ast_vga_connector(struct drm_connector *connector)
> -{
> -       return container_of(connector, struct ast_vga_connector, base);
> -}
> -
> -struct ast_sil164_connector {
> -       struct drm_connector base;
> -};
> -
> -static inline struct ast_sil164_connector *
> -to_ast_sil164_connector(struct drm_connector *connector)
> -{
> -       return container_of(connector, struct ast_sil164_connector, base);
> -}
> -
>  /*
>   * Device
>   */
> @@ -174,11 +154,11 @@ struct ast_private {
>         struct {
>                 struct {
>                         struct drm_encoder encoder;
> -                       struct ast_vga_connector vga_connector;
> +                       struct drm_connector connector;
>                 } vga;
>                 struct {
>                         struct drm_encoder encoder;
> -                       struct ast_sil164_connector sil164_connector;
> +                       struct drm_connector connector;
>                 } sil164;
>                 struct {
>                         struct drm_encoder encoder;
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index 5f273b5dd769..326f29dae844 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -1330,10 +1330,8 @@ static const struct drm_connector_funcs ast_vga_connector_funcs = {
>         .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
>  };
>
> -static int ast_vga_connector_init(struct drm_device *dev,
> -                                 struct ast_vga_connector *ast_vga_connector)
> +static int ast_vga_connector_init(struct drm_device *dev, struct drm_connector *connector)
>  {
> -       struct drm_connector *connector = &ast_vga_connector->base;
>         struct ast_i2c_chan *i2c;
>         int ret;
>
> @@ -1364,8 +1362,7 @@ static int ast_vga_output_init(struct ast_private *ast)
>         struct drm_device *dev = &ast->base;
>         struct drm_crtc *crtc = &ast->crtc;
>         struct drm_encoder *encoder = &ast->output.vga.encoder;
> -       struct ast_vga_connector *ast_vga_connector = &ast->output.vga.vga_connector;
> -       struct drm_connector *connector = &ast_vga_connector->base;
> +       struct drm_connector *connector = &ast->output.vga.connector;
>         int ret;
>
>         ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC);
> @@ -1373,7 +1370,7 @@ static int ast_vga_output_init(struct ast_private *ast)
>                 return ret;
>         encoder->possible_crtcs = drm_crtc_mask(crtc);
>
> -       ret = ast_vga_connector_init(dev, ast_vga_connector);
> +       ret = ast_vga_connector_init(dev, connector);
>         if (ret)
>                 return ret;
>
> @@ -1401,10 +1398,8 @@ static const struct drm_connector_funcs ast_sil164_connector_funcs = {
>         .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
>  };
>
> -static int ast_sil164_connector_init(struct drm_device *dev,
> -                                    struct ast_sil164_connector *ast_sil164_connector)
> +static int ast_sil164_connector_init(struct drm_device *dev, struct drm_connector *connector)
>  {
> -       struct drm_connector *connector = &ast_sil164_connector->base;
>         struct ast_i2c_chan *i2c;
>         int ret;
>
> @@ -1435,8 +1430,7 @@ static int ast_sil164_output_init(struct ast_private *ast)
>         struct drm_device *dev = &ast->base;
>         struct drm_crtc *crtc = &ast->crtc;
>         struct drm_encoder *encoder = &ast->output.sil164.encoder;
> -       struct ast_sil164_connector *ast_sil164_connector = &ast->output.sil164.sil164_connector;
> -       struct drm_connector *connector = &ast_sil164_connector->base;
> +       struct drm_connector *connector = &ast->output.sil164.connector;
>         int ret;
>
>         ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS);
> @@ -1444,7 +1438,7 @@ static int ast_sil164_output_init(struct ast_private *ast)
>                 return ret;
>         encoder->possible_crtcs = drm_crtc_mask(crtc);
>
> -       ret = ast_sil164_connector_init(dev, ast_sil164_connector);
> +       ret = ast_sil164_connector_init(dev, connector);
>         if (ret)
>                 return ret;
>
> --
> 2.36.1
>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux