mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
drm/ast: Inline drm_simple_encoder_init()
The function drm_simple_encoder_init() is a trivial helper and deprecated. Replace it with the regular call to drm_encoder_init(). Resolves the dependency on drm_simple_kms_helper.h. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240625131815.14514-1-tzimmermann@suse.de
This commit is contained in:
parent
baf272bac6
commit
04aaa4dc97
|
|
@ -45,7 +45,6 @@
|
|||
#include <drm/drm_managed.h>
|
||||
#include <drm/drm_panic.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
#include <drm/drm_simple_kms_helper.h>
|
||||
|
||||
#include "ast_ddc.h"
|
||||
#include "ast_drv.h"
|
||||
|
|
@ -1358,6 +1357,14 @@ static int ast_crtc_init(struct drm_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* VGA Encoder
|
||||
*/
|
||||
|
||||
static const struct drm_encoder_funcs ast_vga_encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
};
|
||||
|
||||
/*
|
||||
* VGA Connector
|
||||
*/
|
||||
|
|
@ -1411,7 +1418,8 @@ static int ast_vga_output_init(struct ast_device *ast)
|
|||
struct drm_connector *connector = &ast->output.vga.connector;
|
||||
int ret;
|
||||
|
||||
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC);
|
||||
ret = drm_encoder_init(dev, encoder, &ast_vga_encoder_funcs,
|
||||
DRM_MODE_ENCODER_DAC, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
encoder->possible_crtcs = drm_crtc_mask(crtc);
|
||||
|
|
@ -1427,6 +1435,14 @@ static int ast_vga_output_init(struct ast_device *ast)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* SIL164 Encoder
|
||||
*/
|
||||
|
||||
static const struct drm_encoder_funcs ast_sil164_encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
};
|
||||
|
||||
/*
|
||||
* SIL164 Connector
|
||||
*/
|
||||
|
|
@ -1480,7 +1496,8 @@ static int ast_sil164_output_init(struct ast_device *ast)
|
|||
struct drm_connector *connector = &ast->output.sil164.connector;
|
||||
int ret;
|
||||
|
||||
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS);
|
||||
ret = drm_encoder_init(dev, encoder, &ast_sil164_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
encoder->possible_crtcs = drm_crtc_mask(crtc);
|
||||
|
|
@ -1496,6 +1513,14 @@ static int ast_sil164_output_init(struct ast_device *ast)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* DP501 Encoder
|
||||
*/
|
||||
|
||||
static const struct drm_encoder_funcs ast_dp501_encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
};
|
||||
|
||||
/*
|
||||
* DP501 Connector
|
||||
*/
|
||||
|
|
@ -1578,7 +1603,8 @@ static int ast_dp501_output_init(struct ast_device *ast)
|
|||
struct drm_connector *connector = &ast->output.dp501.connector;
|
||||
int ret;
|
||||
|
||||
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS);
|
||||
ret = drm_encoder_init(dev, encoder, &ast_dp501_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
encoder->possible_crtcs = drm_crtc_mask(crtc);
|
||||
|
|
@ -1594,6 +1620,14 @@ static int ast_dp501_output_init(struct ast_device *ast)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* ASPEED Display-Port Encoder
|
||||
*/
|
||||
|
||||
static const struct drm_encoder_funcs ast_astdp_encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
};
|
||||
|
||||
/*
|
||||
* ASPEED Display-Port Connector
|
||||
*/
|
||||
|
|
@ -1688,7 +1722,8 @@ static int ast_astdp_output_init(struct ast_device *ast)
|
|||
struct drm_connector *connector = &ast->output.astdp.connector;
|
||||
int ret;
|
||||
|
||||
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_TMDS);
|
||||
ret = drm_encoder_init(dev, encoder, &ast_astdp_encoder_funcs,
|
||||
DRM_MODE_ENCODER_TMDS, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
encoder->possible_crtcs = drm_crtc_mask(crtc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user