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: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240325200855.21150-4-tzimmermann@suse.de
This commit is contained in:
parent
d66cdb638a
commit
c0af492c87
@ -158,26 +158,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);
|
||||
}
|
||||
|
||||
struct ast_bmc_connector {
|
||||
struct drm_connector base;
|
||||
struct drm_connector *physical_connector;
|
||||
@ -220,11 +200,11 @@ struct ast_device {
|
||||
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;
|
||||
|
@ -1385,10 +1385,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;
|
||||
|
||||
@ -1419,8 +1417,7 @@ static int ast_vga_output_init(struct ast_device *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);
|
||||
@ -1428,7 +1425,7 @@ static int ast_vga_output_init(struct ast_device *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;
|
||||
|
||||
@ -1485,10 +1482,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;
|
||||
|
||||
@ -1519,8 +1514,7 @@ static int ast_sil164_output_init(struct ast_device *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);
|
||||
@ -1528,7 +1522,7 @@ static int ast_sil164_output_init(struct ast_device *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;
|
||||
|
||||
@ -1940,13 +1934,13 @@ int ast_mode_config_init(struct ast_device *ast)
|
||||
ret = ast_vga_output_init(ast);
|
||||
if (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) {
|
||||
ret = ast_sil164_output_init(ast);
|
||||
if (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) {
|
||||
ret = ast_dp501_output_init(ast);
|
||||
|
Loading…
x
Reference in New Issue
Block a user