Commit c0af492c authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/ast: Remove struct ast_{vga,sil165}_connector

Both, struct ast_vga_connector and struct ast_sil164_connector, are
now wrappers around struct drm_connector. Remove them.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240325200855.21150-4-tzimmermann@suse.de
parent d66cdb63
...@@ -158,26 +158,6 @@ struct ast_i2c_chan { ...@@ -158,26 +158,6 @@ struct ast_i2c_chan {
struct i2c_algo_bit_data bit; 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);
}
struct ast_bmc_connector { struct ast_bmc_connector {
struct drm_connector base; struct drm_connector base;
struct drm_connector *physical_connector; struct drm_connector *physical_connector;
...@@ -220,11 +200,11 @@ struct ast_device { ...@@ -220,11 +200,11 @@ struct ast_device {
struct { struct {
struct { struct {
struct drm_encoder encoder; struct drm_encoder encoder;
struct ast_vga_connector vga_connector; struct drm_connector connector;
} vga; } vga;
struct { struct {
struct drm_encoder encoder; struct drm_encoder encoder;
struct ast_sil164_connector sil164_connector; struct drm_connector connector;
} sil164; } sil164;
struct { struct {
struct drm_encoder encoder; struct drm_encoder encoder;
......
...@@ -1385,10 +1385,8 @@ static const struct drm_connector_funcs ast_vga_connector_funcs = { ...@@ -1385,10 +1385,8 @@ static const struct drm_connector_funcs ast_vga_connector_funcs = {
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
}; };
static int ast_vga_connector_init(struct drm_device *dev, static int ast_vga_connector_init(struct drm_device *dev, struct drm_connector *connector)
struct ast_vga_connector *ast_vga_connector)
{ {
struct drm_connector *connector = &ast_vga_connector->base;
struct ast_i2c_chan *i2c; struct ast_i2c_chan *i2c;
int ret; int ret;
...@@ -1419,8 +1417,7 @@ static int ast_vga_output_init(struct ast_device *ast) ...@@ -1419,8 +1417,7 @@ static int ast_vga_output_init(struct ast_device *ast)
struct drm_device *dev = &ast->base; struct drm_device *dev = &ast->base;
struct drm_crtc *crtc = &ast->crtc; struct drm_crtc *crtc = &ast->crtc;
struct drm_encoder *encoder = &ast->output.vga.encoder; 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->output.vga.connector;
struct drm_connector *connector = &ast_vga_connector->base;
int ret; int ret;
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC); ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC);
...@@ -1428,7 +1425,7 @@ static int ast_vga_output_init(struct ast_device *ast) ...@@ -1428,7 +1425,7 @@ static int ast_vga_output_init(struct ast_device *ast)
return ret; return ret;
encoder->possible_crtcs = drm_crtc_mask(crtc); 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) if (ret)
return ret; return ret;
...@@ -1485,10 +1482,8 @@ static const struct drm_connector_funcs ast_sil164_connector_funcs = { ...@@ -1485,10 +1482,8 @@ static const struct drm_connector_funcs ast_sil164_connector_funcs = {
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
}; };
static int ast_sil164_connector_init(struct drm_device *dev, static int ast_sil164_connector_init(struct drm_device *dev, struct drm_connector *connector)
struct ast_sil164_connector *ast_sil164_connector)
{ {
struct drm_connector *connector = &ast_sil164_connector->base;
struct ast_i2c_chan *i2c; struct ast_i2c_chan *i2c;
int ret; int ret;
...@@ -1519,8 +1514,7 @@ static int ast_sil164_output_init(struct ast_device *ast) ...@@ -1519,8 +1514,7 @@ static int ast_sil164_output_init(struct ast_device *ast)
struct drm_device *dev = &ast->base; struct drm_device *dev = &ast->base;
struct drm_crtc *crtc = &ast->crtc; struct drm_crtc *crtc = &ast->crtc;
struct drm_encoder *encoder = &ast->output.sil164.encoder; 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->output.sil164.connector;
struct drm_connector *connector = &ast_sil164_connector->base;
int ret; int ret;
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS); ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS);
...@@ -1528,7 +1522,7 @@ static int ast_sil164_output_init(struct ast_device *ast) ...@@ -1528,7 +1522,7 @@ static int ast_sil164_output_init(struct ast_device *ast)
return ret; return ret;
encoder->possible_crtcs = drm_crtc_mask(crtc); 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) if (ret)
return ret; return ret;
...@@ -1940,13 +1934,13 @@ int ast_mode_config_init(struct ast_device *ast) ...@@ -1940,13 +1934,13 @@ int ast_mode_config_init(struct ast_device *ast)
ret = ast_vga_output_init(ast); ret = ast_vga_output_init(ast);
if (ret) if (ret)
return ret; return ret;
physical_connector = &ast->output.vga.vga_connector.base; physical_connector = &ast->output.vga.connector;
} }
if (ast->tx_chip_types & AST_TX_SIL164_BIT) { if (ast->tx_chip_types & AST_TX_SIL164_BIT) {
ret = ast_sil164_output_init(ast); ret = ast_sil164_output_init(ast);
if (ret) if (ret)
return ret; return ret;
physical_connector = &ast->output.sil164.sil164_connector.base; physical_connector = &ast->output.sil164.connector;
} }
if (ast->tx_chip_types & AST_TX_DP501_BIT) { if (ast->tx_chip_types & AST_TX_DP501_BIT) {
ret = ast_dp501_output_init(ast); ret = ast_dp501_output_init(ast);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment