mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
Deprecate simple-encoder and simple-display-pipe helpers in favor of regular atomic helpers. Remove the related documentation. Add TODO item for converting the remaining drivers. These helpers have been deprecated for years and many drivers have been updated to not use them. Still there are a few left and we occasionally receive new drivers build upon them. Marking them as deprecated will hopefully resolve these problems. The TODO items should be easy enough for getting new voluteers started on DRM driver development. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: David Lechner <david@lechnology.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260319160110.109610-17-tzimmermann@suse.de
84 lines
3.1 KiB
C
84 lines
3.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2016 Noralf Trønnes
|
|
*/
|
|
|
|
/*
|
|
* Simple KMS helpers are deprected in favor of regular atomic helpers. Do not
|
|
* use the min new code.
|
|
*/
|
|
|
|
#ifndef __LINUX_DRM_SIMPLE_KMS_HELPER_H
|
|
#define __LINUX_DRM_SIMPLE_KMS_HELPER_H
|
|
|
|
#include <drm/drm_crtc.h>
|
|
#include <drm/drm_encoder.h>
|
|
#include <drm/drm_plane.h>
|
|
|
|
struct drm_simple_display_pipe;
|
|
|
|
struct drm_simple_display_pipe_funcs {
|
|
enum drm_mode_status (*mode_valid)(struct drm_simple_display_pipe *pipe,
|
|
const struct drm_display_mode *mode);
|
|
void (*enable)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_crtc_state *crtc_state,
|
|
struct drm_plane_state *plane_state);
|
|
void (*disable)(struct drm_simple_display_pipe *pipe);
|
|
int (*check)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *plane_state,
|
|
struct drm_crtc_state *crtc_state);
|
|
void (*update)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *old_plane_state);
|
|
int (*prepare_fb)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *plane_state);
|
|
void (*cleanup_fb)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *plane_state);
|
|
int (*begin_fb_access)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *new_plane_state);
|
|
void (*end_fb_access)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *plane_state);
|
|
int (*enable_vblank)(struct drm_simple_display_pipe *pipe);
|
|
void (*disable_vblank)(struct drm_simple_display_pipe *pipe);
|
|
void (*reset_crtc)(struct drm_simple_display_pipe *pipe);
|
|
struct drm_crtc_state * (*duplicate_crtc_state)(struct drm_simple_display_pipe *pipe);
|
|
void (*destroy_crtc_state)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_crtc_state *crtc_state);
|
|
void (*reset_plane)(struct drm_simple_display_pipe *pipe);
|
|
struct drm_plane_state * (*duplicate_plane_state)(struct drm_simple_display_pipe *pipe);
|
|
void (*destroy_plane_state)(struct drm_simple_display_pipe *pipe,
|
|
struct drm_plane_state *plane_state);
|
|
};
|
|
|
|
struct drm_simple_display_pipe {
|
|
struct drm_crtc crtc;
|
|
struct drm_plane plane;
|
|
struct drm_encoder encoder;
|
|
struct drm_connector *connector;
|
|
|
|
const struct drm_simple_display_pipe_funcs *funcs;
|
|
};
|
|
|
|
int drm_simple_display_pipe_attach_bridge(struct drm_simple_display_pipe *pipe,
|
|
struct drm_bridge *bridge);
|
|
|
|
int drm_simple_display_pipe_init(struct drm_device *dev,
|
|
struct drm_simple_display_pipe *pipe,
|
|
const struct drm_simple_display_pipe_funcs *funcs,
|
|
const uint32_t *formats, unsigned int format_count,
|
|
const uint64_t *format_modifiers,
|
|
struct drm_connector *connector);
|
|
|
|
int drm_simple_encoder_init(struct drm_device *dev,
|
|
struct drm_encoder *encoder,
|
|
int encoder_type);
|
|
|
|
void *__drmm_simple_encoder_alloc(struct drm_device *dev, size_t size,
|
|
size_t offset, int encoder_type);
|
|
|
|
#define drmm_simple_encoder_alloc(dev, type, member, encoder_type) \
|
|
((type *)__drmm_simple_encoder_alloc(dev, sizeof(type), \
|
|
offsetof(type, member), \
|
|
encoder_type))
|
|
|
|
#endif /* __LINUX_DRM_SIMPLE_KMS_HELPER_H */
|