mirror of
https://github.com/torvalds/linux.git
synced 2026-10-28 17:55:02 +01:00
drm/tidss: remove dependency on DRM simple helpers
The simple KMS helpers are deprecated because they only add an intermediate layer between drivers and atomic modesetting. Open-code drm_simple_encoder_init() by calling drm_encoder_init() directly and providing driver-local drm_encoder_funcs. Signed-off-by: Diogo Silva <diogompaissilva@gmail.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20260720-drm_simple_encoder_init-v2-7-5020b630668a@gmail.com
This commit is contained in:
parent
457a6eeb48
commit
4684137c3d
|
|
@ -9,11 +9,11 @@
|
|||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_bridge.h>
|
||||
#include <drm/drm_bridge_connector.h>
|
||||
#include <drm/drm_encoder.h>
|
||||
#include <drm/drm_crtc.h>
|
||||
#include <drm/drm_modeset_helper_vtables.h>
|
||||
#include <drm/drm_panel.h>
|
||||
#include <drm/drm_of.h>
|
||||
#include <drm/drm_simple_kms_helper.h>
|
||||
|
||||
#include "tidss_crtc.h"
|
||||
#include "tidss_drv.h"
|
||||
|
|
@ -81,6 +81,10 @@ static const struct drm_bridge_funcs tidss_bridge_funcs = {
|
|||
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
|
||||
};
|
||||
|
||||
static const struct drm_encoder_funcs tidss_encoder_funcs = {
|
||||
.destroy = drm_encoder_cleanup,
|
||||
};
|
||||
|
||||
int tidss_encoder_create(struct tidss_device *tidss,
|
||||
struct drm_bridge *next_bridge,
|
||||
u32 encoder_type, u32 possible_crtcs)
|
||||
|
|
@ -95,8 +99,8 @@ int tidss_encoder_create(struct tidss_device *tidss,
|
|||
if (IS_ERR(t_enc))
|
||||
return PTR_ERR(t_enc);
|
||||
|
||||
ret = drm_simple_encoder_init(&tidss->ddev, &t_enc->encoder,
|
||||
encoder_type);
|
||||
ret = drm_encoder_init(&tidss->ddev, &t_enc->encoder,
|
||||
&tidss_encoder_funcs, encoder_type, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user