24#ifndef __DRM_PANEL_H__
25#define __DRM_PANEL_H__
33struct backlight_device;
318#define devm_drm_panel_alloc(dev, type, member, funcs, connector_type) \
319 ((type *)__devm_drm_panel_alloc(dev, sizeof(type), \
320 offsetof(type, member), funcs, \
338#if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL)
339struct drm_panel *of_drm_find_panel(
const struct device_node *np);
340int of_drm_get_panel_orientation(
const struct device_node *np,
343static inline struct drm_panel *of_drm_find_panel(
const struct device_node *np)
348static inline int of_drm_get_panel_orientation(
const struct device_node *np,
355#if defined(CONFIG_DRM_PANEL)
356bool drm_is_panel_follower(
struct device *
dev);
357int drm_panel_add_follower(
struct device *follower_dev,
360int devm_drm_panel_add_follower(
struct device *follower_dev,
363static inline bool drm_is_panel_follower(
struct device *
dev)
368static inline int drm_panel_add_follower(
struct device *follower_dev,
375static inline int devm_drm_panel_add_follower(
struct device *follower_dev,
382#if IS_ENABLED(CONFIG_DRM_PANEL) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \
383 (IS_MODULE(CONFIG_DRM) && IS_MODULE(CONFIG_BACKLIGHT_CLASS_DEVICE)))
384int drm_panel_of_backlight(
struct drm_panel *panel);
386static inline int drm_panel_of_backlight(
struct drm_panel *panel)
#define ENODEV
Definition acclib.h:197
size_t size
Definition drm_bridge.h:1299
size_t size_t const struct drm_bridge_funcs * funcs
Definition drm_bridge.h:1300
size_t size_t offset
Definition drm_bridge.h:1299
drm_panel_orientation
Definition drm_connector.h:374
struct drm_panel * drm_panel_get(struct drm_panel *panel)
void drm_panel_put(struct drm_panel *panel)
void drm_panel_remove(struct drm_panel *panel)
void * __devm_drm_panel_alloc(struct device *dev, size_t size, size_t offset, const struct drm_panel_funcs *funcs, int connector_type)
void drm_panel_add(struct drm_panel *panel)
void drm_panel_unprepare(struct drm_panel *panel)
int drm_panel_get_modes(struct drm_panel *panel, struct drm_connector *connector)
void drm_panel_enable(struct drm_panel *panel)
void drm_panel_prepare(struct drm_panel *panel)
void drm_panel_disable(struct drm_panel *panel)
int devm_drm_panel_add(struct device *dev, struct drm_panel *panel)
const struct device * dev
Definition drm_print.h:519
#define ERR_PTR(err)
Definition err.h:51
Definition display_timing.h:63
Definition drm_connector.h:1998
Definition drm_panel.h:149
int(* panel_unpreparing)(struct drm_panel_follower *follower)
Definition drm_panel.h:162
int(* panel_disabling)(struct drm_panel_follower *follower)
Definition drm_panel.h:176
int(* panel_prepared)(struct drm_panel_follower *follower)
Definition drm_panel.h:155
int(* panel_enabled)(struct drm_panel_follower *follower)
Definition drm_panel.h:169
Definition drm_panel.h:179
const struct drm_panel_follower_funcs * funcs
Definition drm_panel.h:185
struct list_head list
Definition drm_panel.h:192
struct drm_panel * panel
Definition drm_panel.h:199
Definition drm_panel.h:73
int(* prepare)(struct drm_panel *panel)
Definition drm_panel.h:81
int(* disable)(struct drm_panel *panel)
Definition drm_panel.h:99
enum drm_panel_orientation(* get_orientation)(struct drm_panel *panel)
Definition drm_panel.h:128
int(* get_timings)(struct drm_panel *panel, unsigned int num_timings, struct display_timing *timings)
Definition drm_panel.h:138
void(* debugfs_init)(struct drm_panel *panel, struct dentry *root)
Definition drm_panel.h:146
int(* enable)(struct drm_panel *panel)
Definition drm_panel.h:90
int(* get_modes)(struct drm_panel *panel, struct drm_connector *connector)
Definition drm_panel.h:118
int(* unprepare)(struct drm_panel *panel)
Definition drm_panel.h:108
Definition drm_panel.h:205
const struct drm_panel_funcs * funcs
Definition drm_panel.h:229
struct list_head list
Definition drm_panel.h:245
struct mutex follower_lock
Definition drm_panel.h:259
struct list_head followers
Definition drm_panel.h:252
bool prepare_prev_first
Definition drm_panel.h:269
bool prepared
Definition drm_panel.h:276
int connector_type
Definition drm_panel.h:238
void * container
Definition drm_panel.h:289
bool enabled
Definition drm_panel.h:283
struct kref refcount
Definition drm_panel.h:294
struct backlight_device * backlight
Definition drm_panel.h:222
struct device * dev
Definition drm_panel.h:211
TTY * root
Definition tty.cpp:47