Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
drm_crtc.h File Reference
#include <linux/i2c.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/idr.h>
#include <linux/fb.h>
#include <drm/drm_mode.h>
#include <drm/drm_fourcc.h>

Go to the source code of this file.

Data Structures

struct  drm_mode_object
 
struct  drm_object_properties
 
struct  drm_display_mode
 
struct  drm_display_info
 
struct  drm_framebuffer_funcs
 
struct  drm_framebuffer
 
struct  drm_property_blob
 
struct  drm_property_enum
 
struct  drm_property
 
struct  drm_crtc_funcs
 
struct  drm_crtc
 
struct  drm_connector_funcs
 
struct  drm_encoder_funcs
 
struct  drm_encoder
 
struct  drm_connector
 
struct  drm_plane_funcs
 
struct  drm_plane
 
struct  drm_mode_set
 
struct  drm_mode_config_funcs
 
struct  drm_mode_group
 
struct  drm_mode_config
 
struct  drm_prop_enum_list
 

Macros

#define DRM_MODE_OBJECT_CRTC   0xcccccccc
 
#define DRM_MODE_OBJECT_CONNECTOR   0xc0c0c0c0
 
#define DRM_MODE_OBJECT_ENCODER   0xe0e0e0e0
 
#define DRM_MODE_OBJECT_MODE   0xdededede
 
#define DRM_MODE_OBJECT_PROPERTY   0xb0b0b0b0
 
#define DRM_MODE_OBJECT_FB   0xfbfbfbfb
 
#define DRM_MODE_OBJECT_BLOB   0xbbbbbbbb
 
#define DRM_MODE_OBJECT_PLANE   0xeeeeeeee
 
#define DRM_OBJECT_MAX_PROPERTY   24
 
#define DRM_MODE_TYPE_CLOCK_CRTC_C
 
#define DRM_MODE(nm, t, c, hd, hss, hse, ht, hsk, vd, vss, vse, vt, vs, f)
 
#define CRTC_INTERLACE_HALVE_V   0x1 /* halve V values for interlacing */
 
#define DRM_COLOR_FORMAT_RGB444   (1<<0)
 
#define DRM_COLOR_FORMAT_YCRCB444   (1<<1)
 
#define DRM_COLOR_FORMAT_YCRCB422   (1<<2)
 
#define DRM_CONNECTOR_MAX_UMODES   16
 
#define DRM_CONNECTOR_LEN   32
 
#define DRM_CONNECTOR_MAX_ENCODER   3
 
#define DRM_CONNECTOR_POLL_HPD   (1 << 0)
 
#define DRM_CONNECTOR_POLL_CONNECT   (1 << 1)
 
#define DRM_CONNECTOR_POLL_DISCONNECT   (1 << 2)
 
#define MAX_ELD_BYTES   128
 
#define obj_to_crtc(x)   container_of(x, struct drm_crtc, base)
 
#define obj_to_connector(x)   container_of(x, struct drm_connector, base)
 
#define obj_to_encoder(x)   container_of(x, struct drm_encoder, base)
 
#define obj_to_mode(x)   container_of(x, struct drm_display_mode, base)
 
#define obj_to_fb(x)   container_of(x, struct drm_framebuffer, base)
 
#define obj_to_property(x)   container_of(x, struct drm_property, base)
 
#define obj_to_blob(x)   container_of(x, struct drm_property_blob, base)
 
#define obj_to_plane(x)   container_of(x, struct drm_plane, base)
 

Enumerations

enum  drm_mode_status {
  MODE_OK = 0, MODE_HSYNC, MODE_VSYNC, MODE_H_ILLEGAL,
  MODE_V_ILLEGAL, MODE_BAD_WIDTH, MODE_NOMODE, MODE_NO_INTERLACE,
  MODE_NO_DBLESCAN, MODE_NO_VSCAN, MODE_MEM, MODE_VIRTUAL_X,
  MODE_VIRTUAL_Y, MODE_MEM_VIRT, MODE_NOCLOCK, MODE_CLOCK_HIGH,
  MODE_CLOCK_LOW, MODE_CLOCK_RANGE, MODE_BAD_HVALUE, MODE_BAD_VVALUE,
  MODE_BAD_VSCAN, MODE_HSYNC_NARROW, MODE_HSYNC_WIDE, MODE_HBLANK_NARROW,
  MODE_HBLANK_WIDE, MODE_VSYNC_NARROW, MODE_VSYNC_WIDE, MODE_VBLANK_NARROW,
  MODE_VBLANK_WIDE, MODE_PANEL, MODE_INTERLACE_WIDTH, MODE_ONE_WIDTH,
  MODE_ONE_HEIGHT, MODE_ONE_SIZE, MODE_NO_REDUCED, MODE_UNVERIFIED = -3,
  MODE_BAD = -2, MODE_ERROR = -1
}
 
enum  drm_connector_status { connector_status_connected = 1, connector_status_disconnected = 2, connector_status_unknown = 3 }
 
enum  subpixel_order {
  SubPixelUnknown = 0, SubPixelHorizontalRGB, SubPixelHorizontalBGR, SubPixelVerticalRGB,
  SubPixelVerticalBGR, SubPixelNone
}
 
enum  drm_connector_force { DRM_FORCE_UNSPECIFIED, DRM_FORCE_OFF, DRM_FORCE_ON, DRM_FORCE_ON_DIGITAL }
 

Functions

int drm_crtc_init (struct drm_device *dev, struct drm_crtc *crtc, const struct drm_crtc_funcs *funcs)
 
void drm_crtc_cleanup (struct drm_crtc *crtc)
 
int drm_connector_init (struct drm_device *dev, struct drm_connector *connector, const struct drm_connector_funcs *funcs, int connector_type)
 
void drm_connector_cleanup (struct drm_connector *connector)
 
void drm_connector_unplug_all (struct drm_device *dev)
 
int drm_encoder_init (struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type)
 
int drm_plane_init (struct drm_device *dev, struct drm_plane *plane, unsigned long possible_crtcs, const struct drm_plane_funcs *funcs, const uint32_t *formats, uint32_t format_count, bool priv)
 
void drm_plane_cleanup (struct drm_plane *plane)
 
void drm_encoder_cleanup (struct drm_encoder *encoder)
 
chardrm_get_connector_name (struct drm_connector *connector)
 
chardrm_get_dpms_name (int val)
 
chardrm_get_dvi_i_subconnector_name (int val)
 
chardrm_get_dvi_i_select_name (int val)
 
chardrm_get_tv_subconnector_name (int val)
 
chardrm_get_tv_select_name (int val)
 
void drm_fb_release (struct drm_file *file_priv)
 
int drm_mode_group_init_legacy_group (struct drm_device *dev, struct drm_mode_group *group)
 
bool drm_probe_ddc (struct i2c_adapter *adapter)
 
struct ediddrm_get_edid (struct drm_connector *connector, struct i2c_adapter *adapter)
 
int drm_add_edid_modes (struct drm_connector *connector, struct edid *edid)
 
void drm_mode_probed_add (struct drm_connector *connector, struct drm_display_mode *mode)
 
void drm_mode_remove (struct drm_connector *connector, struct drm_display_mode *mode)
 
void drm_mode_copy (struct drm_display_mode *dst, const struct drm_display_mode *src)
 
struct drm_display_modedrm_mode_duplicate (struct drm_device *dev, const struct drm_display_mode *mode)
 
void drm_mode_debug_printmodeline (struct drm_display_mode *mode)
 
void drm_mode_config_init (struct drm_device *dev)
 
void drm_mode_config_reset (struct drm_device *dev)
 
void drm_mode_config_cleanup (struct drm_device *dev)
 
void drm_mode_set_name (struct drm_display_mode *mode)
 
bool drm_mode_equal (struct drm_display_mode *mode1, struct drm_display_mode *mode2)
 
int drm_mode_width (struct drm_display_mode *mode)
 
int drm_mode_height (struct drm_display_mode *mode)
 
int drm_mode_attachmode_crtc (struct drm_device *dev, struct drm_crtc *crtc, const struct drm_display_mode *mode)
 
int drm_mode_detachmode_crtc (struct drm_device *dev, struct drm_display_mode *mode)
 
struct drm_display_modedrm_mode_create (struct drm_device *dev)
 
void drm_mode_destroy (struct drm_device *dev, struct drm_display_mode *mode)
 
void drm_mode_list_concat (struct list_head *head, struct list_head *new)
 
void drm_mode_validate_size (struct drm_device *dev, struct list_head *mode_list, int maxX, int maxY, int maxPitch)
 
void drm_mode_prune_invalid (struct drm_device *dev, struct list_head *mode_list, bool verbose)
 
void drm_mode_sort (struct list_head *mode_list)
 
int drm_mode_hsync (const struct drm_display_mode *mode)
 
int drm_mode_vrefresh (const struct drm_display_mode *mode)
 
void drm_mode_set_crtcinfo (struct drm_display_mode *p, int adjust_flags)
 
void drm_mode_connector_list_update (struct drm_connector *connector)
 
int drm_mode_connector_update_edid_property (struct drm_connector *connector, struct edid *edid)
 
int drm_connector_property_set_value (struct drm_connector *connector, struct drm_property *property, uint64_t value)
 
int drm_connector_property_get_value (struct drm_connector *connector, struct drm_property *property, uint64_t *value)
 
int drm_object_property_set_value (struct drm_mode_object *obj, struct drm_property *property, uint64_t val)
 
int drm_object_property_get_value (struct drm_mode_object *obj, struct drm_property *property, uint64_t *value)
 
struct drm_display_modedrm_crtc_mode_create (struct drm_device *dev)
 
void drm_framebuffer_set_object (struct drm_device *dev, unsigned long handle)
 
int drm_framebuffer_init (struct drm_device *dev, struct drm_framebuffer *fb, const struct drm_framebuffer_funcs *funcs)
 
void drm_framebuffer_unreference (struct drm_framebuffer *fb)
 
void drm_framebuffer_reference (struct drm_framebuffer *fb)
 
void drm_framebuffer_remove (struct drm_framebuffer *fb)
 
void drm_framebuffer_cleanup (struct drm_framebuffer *fb)
 
int drmfb_probe (struct drm_device *dev, struct drm_crtc *crtc)
 
int drmfb_remove (struct drm_device *dev, struct drm_framebuffer *fb)
 
void drm_crtc_probe_connector_modes (struct drm_device *dev, int maxX, int maxY)
 
bool drm_crtc_in_use (struct drm_crtc *crtc)
 
void drm_connector_attach_property (struct drm_connector *connector, struct drm_property *property, uint64_t init_val)
 
void drm_object_attach_property (struct drm_mode_object *obj, struct drm_property *property, uint64_t init_val)
 
struct drm_propertydrm_property_create (struct drm_device *dev, int flags, const char *name, int num_values)
 
struct drm_propertydrm_property_create_enum (struct drm_device *dev, int flags, const char *name, const struct drm_prop_enum_list *props, int num_values)
 
struct drm_propertydrm_property_create_bitmask (struct drm_device *dev, int flags, const char *name, const struct drm_prop_enum_list *props, int num_values)
 
struct drm_propertydrm_property_create_range (struct drm_device *dev, int flags, const char *name, uint64_t min, uint64_t max)
 
void drm_property_destroy (struct drm_device *dev, struct drm_property *property)
 
int drm_property_add_enum (struct drm_property *property, int index, uint64_t value, const char *name)
 
int drm_mode_create_dvi_i_properties (struct drm_device *dev)
 
int drm_mode_create_tv_properties (struct drm_device *dev, int num_formats, char *formats[])
 
int drm_mode_create_scaling_mode_property (struct drm_device *dev)
 
int drm_mode_create_dithering_property (struct drm_device *dev)
 
int drm_mode_create_dirty_info_property (struct drm_device *dev)
 
chardrm_get_encoder_name (struct drm_encoder *encoder)
 
int drm_mode_connector_attach_encoder (struct drm_connector *connector, struct drm_encoder *encoder)
 
void drm_mode_connector_detach_encoder (struct drm_connector *connector, struct drm_encoder *encoder)
 
int drm_mode_crtc_set_gamma_size (struct drm_crtc *crtc, int gamma_size)
 
struct drm_mode_objectdrm_mode_object_find (struct drm_device *dev, uint32_t id, uint32_t type)
 
int drm_mode_getresources (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getplane_res (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getcrtc (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getconnector (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_setcrtc (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getplane (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_setplane (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_cursor_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_addfb (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_addfb2 (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
uint32_t drm_mode_legacy_fb_format (uint32_t bpp, uint32_t depth)
 
int drm_mode_rmfb (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getfb (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_dirtyfb_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_addmode_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_rmmode_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_attachmode_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_detachmode_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getproperty_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getblob_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_connector_property_set_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_hotplug_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_replacefb (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_getencoder (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_gamma_get_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_gamma_set_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
u8drm_find_cea_extension (struct edid *edid)
 
bool drm_detect_hdmi_monitor (struct edid *edid)
 
bool drm_detect_monitor_audio (struct edid *edid)
 
int drm_mode_page_flip_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
struct drm_display_modedrm_cvt_mode (struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh, bool reduced, bool interlaced, bool margins)
 
struct drm_display_modedrm_gtf_mode (struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh, bool interlaced, int margins)
 
struct drm_display_modedrm_gtf_mode_complex (struct drm_device *dev, int hdisplay, int vdisplay, int vrefresh, bool interlaced, int margins, int GTF_M, int GTF_2C, int GTF_K, int GTF_2J)
 
int drm_add_modes_noedid (struct drm_connector *connector, int hdisplay, int vdisplay)
 
int drm_edid_header_is_valid (const u8 *raw_edid)
 
bool drm_edid_block_valid (u8 *raw_edid, int block, bool print_bad_edid)
 
bool drm_edid_is_valid (struct edid *edid)
 
struct drm_display_modedrm_mode_find_dmt (struct drm_device *dev, int hsize, int vsize, int fresh, bool rb)
 
int drm_mode_create_dumb_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_mmap_dumb_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_destroy_dumb_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_obj_get_properties_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int drm_mode_obj_set_property_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
void drm_fb_get_bpp_depth (uint32_t format, unsigned int *depth, int *bpp)
 
int drm_format_num_planes (uint32_t format)
 
int drm_format_plane_cpp (uint32_t format, int plane)
 
int drm_format_horz_chroma_subsampling (uint32_t format)
 
int drm_format_vert_chroma_subsampling (uint32_t format)
 

Macro Definition Documentation

#define CRTC_INTERLACE_HALVE_V   0x1 /* halve V values for interlacing */

Definition at line 125 of file drm_crtc.h.

#define DRM_COLOR_FORMAT_RGB444   (1<<0)

Definition at line 196 of file drm_crtc.h.

#define DRM_COLOR_FORMAT_YCRCB422   (1<<2)

Definition at line 198 of file drm_crtc.h.

#define DRM_COLOR_FORMAT_YCRCB444   (1<<1)

Definition at line 197 of file drm_crtc.h.

#define DRM_CONNECTOR_LEN   32

Definition at line 477 of file drm_crtc.h.

#define DRM_CONNECTOR_MAX_ENCODER   3

Definition at line 478 of file drm_crtc.h.

#define DRM_CONNECTOR_MAX_UMODES   16

Definition at line 476 of file drm_crtc.h.

#define DRM_CONNECTOR_POLL_CONNECT   (1 << 1)

Definition at line 520 of file drm_crtc.h.

#define DRM_CONNECTOR_POLL_DISCONNECT   (1 << 2)

Definition at line 523 of file drm_crtc.h.

#define DRM_CONNECTOR_POLL_HPD   (1 << 0)

Definition at line 518 of file drm_crtc.h.

#define DRM_MODE (   nm,
  t,
  c,
  hd,
  hss,
  hse,
  ht,
  hsk,
  vd,
  vss,
  vse,
  vt,
  vs,
  f 
)
Value:
.name = nm, .status = 0, .type = (t), .clock = (c), \
.hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
.htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
.vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
.vscan = (vs), .flags = (f), .vrefresh = 0, \

Definition at line 117 of file drm_crtc.h.

#define DRM_MODE_OBJECT_BLOB   0xbbbbbbbb

Definition at line 49 of file drm_crtc.h.

#define DRM_MODE_OBJECT_CONNECTOR   0xc0c0c0c0

Definition at line 44 of file drm_crtc.h.

#define DRM_MODE_OBJECT_CRTC   0xcccccccc

Definition at line 43 of file drm_crtc.h.

#define DRM_MODE_OBJECT_ENCODER   0xe0e0e0e0

Definition at line 45 of file drm_crtc.h.

#define DRM_MODE_OBJECT_FB   0xfbfbfbfb

Definition at line 48 of file drm_crtc.h.

#define DRM_MODE_OBJECT_MODE   0xdededede

Definition at line 46 of file drm_crtc.h.

#define DRM_MODE_OBJECT_PLANE   0xeeeeeeee

Definition at line 50 of file drm_crtc.h.

#define DRM_MODE_OBJECT_PROPERTY   0xb0b0b0b0

Definition at line 47 of file drm_crtc.h.

#define DRM_MODE_TYPE_CLOCK_CRTC_C
Value:
DRM_MODE_TYPE_CRTC_C)

Definition at line 114 of file drm_crtc.h.

#define DRM_OBJECT_MAX_PROPERTY   24

Definition at line 58 of file drm_crtc.h.

#define MAX_ELD_BYTES   128

Definition at line 525 of file drm_crtc.h.

#define obj_to_blob (   x)    container_of(x, struct drm_property_blob, base)

Definition at line 836 of file drm_crtc.h.

#define obj_to_connector (   x)    container_of(x, struct drm_connector, base)

Definition at line 831 of file drm_crtc.h.

#define obj_to_crtc (   x)    container_of(x, struct drm_crtc, base)

Definition at line 830 of file drm_crtc.h.

#define obj_to_encoder (   x)    container_of(x, struct drm_encoder, base)

Definition at line 832 of file drm_crtc.h.

#define obj_to_fb (   x)    container_of(x, struct drm_framebuffer, base)

Definition at line 834 of file drm_crtc.h.

#define obj_to_mode (   x)    container_of(x, struct drm_display_mode, base)

Definition at line 833 of file drm_crtc.h.

#define obj_to_plane (   x)    container_of(x, struct drm_plane, base)

Definition at line 837 of file drm_crtc.h.

#define obj_to_property (   x)    container_of(x, struct drm_property, base)

Definition at line 835 of file drm_crtc.h.

Enumeration Type Documentation

Enumerator:
DRM_FORCE_UNSPECIFIED 
DRM_FORCE_OFF 
DRM_FORCE_ON 
DRM_FORCE_ON_DIGITAL 

Definition at line 509 of file drm_crtc.h.

Enumerator:
connector_status_connected 
connector_status_disconnected 
connector_status_unknown 

Definition at line 181 of file drm_crtc.h.

Enumerator:
MODE_OK 
MODE_HSYNC 
MODE_VSYNC 
MODE_H_ILLEGAL 
MODE_V_ILLEGAL 
MODE_BAD_WIDTH 
MODE_NOMODE 
MODE_NO_INTERLACE 
MODE_NO_DBLESCAN 
MODE_NO_VSCAN 
MODE_MEM 
MODE_VIRTUAL_X 
MODE_VIRTUAL_Y 
MODE_MEM_VIRT 
MODE_NOCLOCK 
MODE_CLOCK_HIGH 
MODE_CLOCK_LOW 
MODE_CLOCK_RANGE 
MODE_BAD_HVALUE 
MODE_BAD_VVALUE 
MODE_BAD_VSCAN 
MODE_HSYNC_NARROW 
MODE_HSYNC_WIDE 
MODE_HBLANK_NARROW 
MODE_HBLANK_WIDE 
MODE_VSYNC_NARROW 
MODE_VSYNC_WIDE 
MODE_VBLANK_NARROW 
MODE_VBLANK_WIDE 
MODE_PANEL 
MODE_INTERLACE_WIDTH 
MODE_ONE_WIDTH 
MODE_ONE_HEIGHT 
MODE_ONE_SIZE 
MODE_NO_REDUCED 
MODE_UNVERIFIED 
MODE_BAD 
MODE_ERROR 

Definition at line 73 of file drm_crtc.h.

Enumerator:
SubPixelUnknown 
SubPixelHorizontalRGB 
SubPixelHorizontalBGR 
SubPixelVerticalRGB 
SubPixelVerticalBGR 
SubPixelNone 

Definition at line 187 of file drm_crtc.h.

Function Documentation

int drm_add_edid_modes ( struct drm_connector connector,
struct edid edid 
)

drm_add_edid_modes - add modes from EDID data, if available : connector we're probing : edid data

Add the specified modes to the connector's mode list.

Return number of modes added or 0 if we couldn't find any.

Definition at line 1972 of file drm_edid.c.

int drm_add_modes_noedid ( struct drm_connector connector,
int  hdisplay,
int  vdisplay 
)

drm_add_modes_noedid - add modes for the connectors without EDID : connector we're probing : the horizontal display limit : the vertical display limit

Add the specified modes to the connector's mode list. Only when the hdisplay/vdisplay is not beyond the given limit, it will be added.

Return number of modes added or 0 if we couldn't find any.

Definition at line 2029 of file drm_edid.c.

void drm_connector_attach_property ( struct drm_connector connector,
struct drm_property property,
uint64_t  init_val 
)

Definition at line 2919 of file drm_crtc.c.

void drm_connector_cleanup ( struct drm_connector connector)

drm_connector_cleanup - cleans up an initialised connector : connector to cleanup

LOCKING: Takes mode config lock.

Cleans up the connector but doesn't free the object.

Definition at line 586 of file drm_crtc.c.

int drm_connector_init ( struct drm_device dev,
struct drm_connector connector,
const struct drm_connector_funcs funcs,
int  connector_type 
)

Definition at line 535 of file drm_crtc.c.

int drm_connector_property_get_value ( struct drm_connector connector,
struct drm_property property,
uint64_t value 
)

Definition at line 2933 of file drm_crtc.c.

int drm_connector_property_set_value ( struct drm_connector connector,
struct drm_property property,
uint64_t  value 
)

Definition at line 2926 of file drm_crtc.c.

void drm_connector_unplug_all ( struct drm_device dev)

Definition at line 608 of file drm_crtc.c.

void drm_crtc_cleanup ( struct drm_crtc crtc)

drm_crtc_cleanup - Cleans up the core crtc usage. : CRTC to cleanup

LOCKING: Caller must hold mode config lock.

Cleanup . Removes from drm modesetting space does NOT free object, caller does that.

Definition at line 469 of file drm_crtc.c.

bool drm_crtc_in_use ( struct drm_crtc crtc)
int drm_crtc_init ( struct drm_device dev,
struct drm_crtc crtc,
const struct drm_crtc_funcs funcs 
)

drm_crtc_init - Initialise a new CRTC object : DRM device : CRTC object to init : callbacks for the new CRTC

LOCKING: Takes mode_config lock.

Inits a new object created as base part of an driver crtc object.

RETURNS: Zero on success, error code on failure.

Definition at line 432 of file drm_crtc.c.

struct drm_display_mode* drm_crtc_mode_create ( struct drm_device dev)
read
void drm_crtc_probe_connector_modes ( struct drm_device dev,
int  maxX,
int  maxY 
)
struct drm_display_mode* drm_cvt_mode ( struct drm_device dev,
int  hdisplay,
int  vdisplay,
int  vrefresh,
bool  reduced,
bool  interlaced,
bool  margins 
)
read

Definition at line 85 of file drm_modes.c.

bool drm_detect_hdmi_monitor ( struct edid edid)

drm_detect_hdmi_monitor - detect whether monitor is hdmi. : monitor EDID information

Parse the CEA extension according to CEA-861-B. Return true if HDMI, false if not or unknown.

Definition at line 1816 of file drm_edid.c.

bool drm_detect_monitor_audio ( struct edid edid)

drm_detect_monitor_audio - check monitor audio capability

Monitor should have CEA extension block. If monitor has 'basic audio', but no CEA audio blocks, it's 'basic audio' only. If there is any audio extension block and supported audio format, assume at least 'basic audio' support, even if 'basic audio' is not defined in EDID.

Definition at line 1852 of file drm_edid.c.

bool drm_edid_block_valid ( u8 raw_edid,
int  block,
bool  print_bad_edid 
)

Definition at line 164 of file drm_edid.c.

int drm_edid_header_is_valid ( const u8 raw_edid)

Definition at line 143 of file drm_edid.c.

bool drm_edid_is_valid ( struct edid edid)

drm_edid_is_valid - sanity check EDID data : EDID data

Sanity-check an entire EDID record (including extensions)

Definition at line 230 of file drm_edid.c.

void drm_encoder_cleanup ( struct drm_encoder encoder)

Definition at line 646 of file drm_crtc.c.

int drm_encoder_init ( struct drm_device dev,
struct drm_encoder encoder,
const struct drm_encoder_funcs funcs,
int  encoder_type 
)

Definition at line 619 of file drm_crtc.c.

void drm_fb_get_bpp_depth ( uint32_t  format,
unsigned int depth,
int bpp 
)

Definition at line 3702 of file drm_crtc.c.

void drm_fb_release ( struct drm_file *  priv)

drm_fb_release - remove and free the FBs on this file : file * from the ioctl

LOCKING: Takes mode config lock.

Destroy all the FBs associated with .

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2550 of file drm_crtc.c.

u8* drm_find_cea_extension ( struct edid edid)

Search EDID for CEA extension block.

Definition at line 1496 of file drm_edid.c.

int drm_format_horz_chroma_subsampling ( uint32_t  format)

drm_format_horz_chroma_subsampling - get the horizontal chroma subsampling factor : pixel format (DRM_FORMAT_*)

RETURNS: The horizontal chroma subsampling factor for the specified pixel format.

Definition at line 3855 of file drm_crtc.c.

int drm_format_num_planes ( uint32_t  format)

drm_format_num_planes - get the number of planes for format : pixel format (DRM_FORMAT_*)

RETURNS: The number of planes used by the specified pixel format.

Definition at line 3773 of file drm_crtc.c.

int drm_format_plane_cpp ( uint32_t  format,
int  plane 
)

drm_format_plane_cpp - determine the bytes per pixel value : pixel format (DRM_FORMAT_*) : plane index

RETURNS: The bytes per pixel value for the specified plane.

Definition at line 3808 of file drm_crtc.c.

int drm_format_vert_chroma_subsampling ( uint32_t  format)

drm_format_vert_chroma_subsampling - get the vertical chroma subsampling factor : pixel format (DRM_FORMAT_*)

RETURNS: The vertical chroma subsampling factor for the specified pixel format.

Definition at line 3890 of file drm_crtc.c.

void drm_framebuffer_cleanup ( struct drm_framebuffer fb)

drm_framebuffer_cleanup - remove a framebuffer object : framebuffer to remove

LOCKING: Caller must hold mode config lock.

Scans all the CRTCs in 's mode_config. If they're using , removes it, setting it to NULL.

Definition at line 353 of file drm_crtc.c.

int drm_framebuffer_init ( struct drm_device dev,
struct drm_framebuffer fb,
const struct drm_framebuffer_funcs funcs 
)

drm_framebuffer_init - initialize a framebuffer : DRM device

LOCKING: Caller must hold mode config lock.

Allocates an ID for the framebuffer's parent mode object, sets its mode functions & device file and adds it to the master fd list.

RETURNS: Zero on success, error code on failure.

Definition at line 291 of file drm_crtc.c.

void drm_framebuffer_reference ( struct drm_framebuffer fb)

drm_framebuffer_reference - incr the fb refcnt

Definition at line 336 of file drm_crtc.c.

void drm_framebuffer_remove ( struct drm_framebuffer fb)

drm_framebuffer_remove - remove and unreference a framebuffer object : framebuffer to remove

LOCKING: Caller must hold mode config lock.

Scans all the CRTCs and planes in 's mode_config. If they're using , removes it, setting it to NULL.

Definition at line 379 of file drm_crtc.c.

void drm_framebuffer_set_object ( struct drm_device dev,
unsigned long  handle 
)
void drm_framebuffer_unreference ( struct drm_framebuffer fb)

drm_framebuffer_unreference - unref a framebuffer

LOCKING: Caller must hold mode config lock.

Definition at line 324 of file drm_crtc.c.

char* drm_get_connector_name ( struct drm_connector connector)

Definition at line 184 of file drm_crtc.c.

char* drm_get_dpms_name ( int  val)
char* drm_get_dvi_i_select_name ( int  val)
char* drm_get_dvi_i_subconnector_name ( int  val)
struct edid* drm_get_edid ( struct drm_connector connector,
struct i2c_adapter adapter 
)
read

drm_get_edid - get EDID data, if available : connector we're probing : i2c adapter to use for DDC

Poke the given i2c channel to grab EDID data if possible. If found, attach it to the connector.

Return edid data or NULL if we couldn't find any.

Definition at line 417 of file drm_edid.c.

char* drm_get_encoder_name ( struct drm_encoder encoder)

Definition at line 173 of file drm_crtc.c.

char* drm_get_tv_select_name ( int  val)
char* drm_get_tv_subconnector_name ( int  val)
struct drm_display_mode* drm_gtf_mode ( struct drm_device dev,
int  hdisplay,
int  vdisplay,
int  vrefresh,
bool  lace,
int  margins 
)
read

drm_gtf_mode - create the modeline based on GTF algorithm

:drm device :hdisplay size :vdisplay size :vrefresh rate. :whether the interlace is supported :whether the margin is supported

LOCKING. none.

return the modeline based on GTF algorithm

This function is to create the modeline based on the GTF algorithm. Generalized Timing Formula is derived from: GTF Spreadsheet by Andy Morrish (1/5/97) available at http://www.vesa.org

And it is copied from the file of xserver/hw/xfree86/modes/xf86gtf.c. What I have done is to translate it by using integer calculation. I also refer to the function of fb_get_mode in the file of drivers/video/fbmon.c

Standard GTF parameters: M = 600 C = 40 K = 128 J = 20

Definition at line 499 of file drm_modes.c.

struct drm_display_mode* drm_gtf_mode_complex ( struct drm_device dev,
int  hdisplay,
int  vdisplay,
int  vrefresh,
bool  interlaced,
int  margins,
int  GTF_M,
int  GTF_2C,
int  GTF_K,
int  GTF_2J 
)
read

drm_gtf_mode_complex - create the modeline based on full GTF algorithm

:drm device :hdisplay size :vdisplay size :vrefresh rate. :whether the interlace is supported :desired margin size [MCKJ] :extended GTF formula parameters

LOCKING. none.

return the modeline based on full GTF algorithm.

GTF feature blocks specify C and J in multiples of 0.5, so we pass them in here multiplied by two. For a C of 40, pass in 80.

Definition at line 301 of file drm_modes.c.

int drm_mode_addfb ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_addfb - add an FB to the graphics configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Add a new FB to the specified CRTC, given a user request.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2139 of file drm_crtc.c.

int drm_mode_addfb2 ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_addfb2 - add an FB to the graphics configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Add a new FB to the specified CRTC, given a user request with format.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2315 of file drm_crtc.c.

int drm_mode_addmode_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)
int drm_mode_attachmode_crtc ( struct drm_device dev,
struct drm_crtc crtc,
const struct drm_display_mode mode 
)

Definition at line 2577 of file drm_crtc.c.

int drm_mode_attachmode_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_fb_attachmode - Attach a user mode to an connector : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

This attaches a user specified mode to an connector. Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2662 of file drm_crtc.c.

void drm_mode_config_cleanup ( struct drm_device dev)

drm_mode_config_cleanup - free up DRM mode_config info : DRM device

LOCKING: Caller must hold mode config lock.

Free up all the connectors and CRTCs associated with this DRM device, then free up the framebuffers and associated buffer objects.

FIXME: cleanup any dangling user buffer objects too

Definition at line 1069 of file drm_crtc.c.

void drm_mode_config_init ( struct drm_device dev)

drm_mode_config_init - initialize DRM mode_configuration structure : DRM device

LOCKING: None, should happen single threaded at init time.

Initialize 's mode_config structure, used for tracking the graphics configuration of .

Definition at line 988 of file drm_crtc.c.

void drm_mode_config_reset ( struct drm_device dev)

Definition at line 3645 of file drm_crtc.c.

int drm_mode_connector_attach_encoder ( struct drm_connector connector,
struct drm_encoder encoder 
)

Definition at line 3393 of file drm_crtc.c.

void drm_mode_connector_detach_encoder ( struct drm_connector connector,
struct drm_encoder encoder 
)

Definition at line 3408 of file drm_crtc.c.

void drm_mode_connector_list_update ( struct drm_connector connector)

drm_mode_connector_list_update - update the mode list for the connector : the connector to update

LOCKING: Caller must hold a lock protecting .

This moves the modes from the probed_modes list to the actual mode list. It compares the probed mode against the current list and only adds different modes. All modes unverified after this point will be removed by the prune invalid modes.

Definition at line 961 of file drm_modes.c.

int drm_mode_connector_property_set_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3216 of file drm_crtc.c.

int drm_mode_connector_update_edid_property ( struct drm_connector connector,
struct edid edid 
)

Definition at line 3164 of file drm_crtc.c.

void drm_mode_copy ( struct drm_display_mode dst,
const struct drm_display_mode src 
)

drm_mode_copy - copy the mode : mode to overwrite : mode to copy

LOCKING: None.

Copy an existing mode into another mode, preserving the object id of the destination mode.

Definition at line 723 of file drm_modes.c.

struct drm_display_mode* drm_mode_create ( struct drm_device dev)
read

drm_mode_create - create a new display mode : DRM device

LOCKING: Caller must hold DRM mode_config lock.

Create a new drm_display_mode, give it an ID, and return it.

RETURNS: Pointer to new mode on success, NULL on error.

Definition at line 733 of file drm_crtc.c.

int drm_mode_create_dirty_info_property ( struct drm_device dev)

drm_mode_create_dirty_property - create dirty property : DRM device

Called by a driver the first time it's needed, must be attached to desired connectors.

Definition at line 960 of file drm_crtc.c.

int drm_mode_create_dithering_property ( struct drm_device dev)

drm_mode_create_dithering_property - create dithering property : DRM device

Called by a driver the first time it's needed, must be attached to desired connectors.

Definition at line 936 of file drm_crtc.c.

int drm_mode_create_dumb_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3665 of file drm_crtc.c.

int drm_mode_create_dvi_i_properties ( struct drm_device dev)

drm_mode_create_dvi_i_properties - create DVI-I specific connector properties : DRM device

Called by a driver the first time a DVI-I connector is made.

Definition at line 798 of file drm_crtc.c.

int drm_mode_create_scaling_mode_property ( struct drm_device dev)

drm_mode_create_scaling_mode_property - create scaling mode property : DRM device

Called by a driver the first time it's needed, must be attached to desired connectors.

Definition at line 911 of file drm_crtc.c.

int drm_mode_create_tv_properties ( struct drm_device dev,
int  num_modes,
char modes[] 
)

drm_create_tv_properties - create TV specific connector properties : DRM device : number of different TV formats (modes) supported : array of pointers to strings containing name of each format

Called by a driver's TV initialization routine, this function creates the TV specific connector properties for a given device. Caller is responsible for allocating a list of format names and passing them to this routine.

Definition at line 834 of file drm_crtc.c.

int drm_mode_crtc_set_gamma_size ( struct drm_crtc crtc,
int  gamma_size 
)

Definition at line 3423 of file drm_crtc.c.

int drm_mode_cursor_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 2040 of file drm_crtc.c.

void drm_mode_debug_printmodeline ( struct drm_display_mode mode)

drm_mode_debug_printmodeline - debug print a mode : DRM device : mode to print

LOCKING: None.

Describe using DRM_DEBUG.

Definition at line 49 of file drm_modes.c.

void drm_mode_destroy ( struct drm_device dev,
struct drm_display_mode mode 
)

drm_mode_destroy - remove a mode : DRM device : mode to remove

LOCKING: Caller must hold mode config lock.

Free 's unique identifier, then free it.

Definition at line 760 of file drm_crtc.c.

int drm_mode_destroy_dumb_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3687 of file drm_crtc.c.

int drm_mode_detachmode_crtc ( struct drm_device dev,
struct drm_display_mode mode 
)

Definition at line 2638 of file drm_crtc.c.

int drm_mode_detachmode_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_fb_detachmode - Detach a user specified mode from an connector : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2716 of file drm_crtc.c.

int drm_mode_dirtyfb_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 2462 of file drm_crtc.c.

struct drm_display_mode* drm_mode_duplicate ( struct drm_device dev,
const struct drm_display_mode mode 
)
read

drm_mode_duplicate - allocate and duplicate an existing mode : mode to duplicate

LOCKING: None.

Just allocate a new mode, copy the existing mode into it, and return a pointer to it. Used to create new instances of established modes.

Definition at line 743 of file drm_modes.c.

bool drm_mode_equal ( struct drm_display_mode mode1,
struct drm_display_mode mode2 
)

drm_mode_equal - test modes for equality : first mode : second mode

LOCKING: None.

Check to see if and are equivalent.

RETURNS: True if the modes are equal, false otherwise.

Definition at line 771 of file drm_modes.c.

struct drm_display_mode* drm_mode_find_dmt ( struct drm_device dev,
int  hsize,
int  vsize,
int  fresh,
bool  rb 
)
read

Definition at line 541 of file drm_edid.c.

int drm_mode_gamma_get_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3497 of file drm_crtc.c.

int drm_mode_gamma_set_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3438 of file drm_crtc.c.

int drm_mode_getblob_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3130 of file drm_crtc.c.

int drm_mode_getconnector ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_getconnector - get connector configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Construct a connector configuration structure to return to the user.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 1455 of file drm_crtc.c.

int drm_mode_getcrtc ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_getcrtc - get CRTC configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Construct a CRTC configuration structure to return to the user.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 1395 of file drm_crtc.c.

int drm_mode_getencoder ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 1582 of file drm_crtc.c.

int drm_mode_getfb ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_getfb - get FB info : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Lookup the FB given its ID and return info about it.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2431 of file drm_crtc.c.

int drm_mode_getplane ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_getplane - get plane info : DRM device : ioctl data : DRM file info

LOCKING: Takes mode config lock.

Return plane info, including formats supported, gamma size, any current fb, etc.

Definition at line 1677 of file drm_crtc.c.

int drm_mode_getplane_res ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_getplane_res - get plane info : DRM device : ioctl data : DRM file info

LOCKING: Takes mode config lock.

Return an plane count and set of IDs.

Definition at line 1627 of file drm_crtc.c.

int drm_mode_getproperty_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 2992 of file drm_crtc.c.

int drm_mode_getresources ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_getresources - get graphics configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Construct a set of configuration description structures and return them to the user, including CRTC, connector and framebuffer configuration.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 1208 of file drm_crtc.c.

int drm_mode_group_init_legacy_group ( struct drm_device dev,
struct drm_mode_group group 
)

Definition at line 1031 of file drm_crtc.c.

int drm_mode_height ( struct drm_display_mode mode)

drm_mode_height - get the height of a mode : mode

LOCKING: None.

Return 's height (vdisplay) value.

FIXME: is this needed?

RETURNS: ->vdisplay

Definition at line 582 of file drm_modes.c.

int drm_mode_hotplug_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)
int drm_mode_hsync ( const struct drm_display_mode mode)

drm_mode_hsync - get the hsync of a mode : mode

LOCKING: None.

Return 's hsync rate in kHz, rounded to the nearest int.

Definition at line 596 of file drm_modes.c.

uint32_t drm_mode_legacy_fb_format ( uint32_t  bpp,
uint32_t  depth 
)

Definition at line 2087 of file drm_crtc.c.

void drm_mode_list_concat ( struct list_head head,
struct list_head new 
)

drm_mode_list_concat - move modes from one list to another : source list : dst list

LOCKING: Caller must ensure both lists are locked.

Move all the modes from to .

Definition at line 536 of file drm_modes.c.

int drm_mode_mmap_dumb_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3675 of file drm_crtc.c.

int drm_mode_obj_get_properties_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3282 of file drm_crtc.c.

int drm_mode_obj_set_property_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3338 of file drm_crtc.c.

struct drm_mode_object* drm_mode_object_find ( struct drm_device dev,
uint32_t  id,
uint32_t  type 
)
read

Definition at line 263 of file drm_crtc.c.

int drm_mode_page_flip_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 3547 of file drm_crtc.c.

void drm_mode_probed_add ( struct drm_connector connector,
struct drm_display_mode mode 
)

drm_mode_probed_add - add a mode to a connector's probed mode list : connector the new mode : mode data

LOCKING: Caller must hold mode config lock.

Add to 's mode list for later use.

Definition at line 494 of file drm_crtc.c.

void drm_mode_prune_invalid ( struct drm_device dev,
struct list_head mode_list,
bool  verbose 
)

drm_mode_prune_invalid - remove invalid modes from mode list : DRM device : list of modes to check : be verbose about it

LOCKING: Caller must hold a lock protecting .

Once mode list generation is complete, a caller can use this routine to remove invalid modes from a mode list. If any of the modes have a status other than MODE_OK, they are removed from and freed.

Definition at line 882 of file drm_modes.c.

void drm_mode_remove ( struct drm_connector connector,
struct drm_display_mode mode 
)

drm_mode_remove - remove and free a mode : connector list to modify : mode to remove

LOCKING: Caller must hold mode config lock.

Remove from 's mode list, then free it.

Definition at line 511 of file drm_crtc.c.

int drm_mode_replacefb ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)
int drm_mode_rmfb ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_rmfb - remove an FB from the configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Remove the FB specified by the user.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 2376 of file drm_crtc.c.

int drm_mode_rmmode_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)
void drm_mode_set_crtcinfo ( struct drm_display_mode p,
int  adjust_flags 
)

drm_mode_set_crtcinfo - set CRTC modesetting parameters : mode : unused? (FIXME)

LOCKING: None.

Setup the CRTC modesetting parameters for , adjusting if necessary.

Definition at line 666 of file drm_modes.c.

void drm_mode_set_name ( struct drm_display_mode mode)

drm_mode_set_name - set the name on a mode : name will be set in this mode

LOCKING: None.

Set the name of to a standard format.

Definition at line 516 of file drm_modes.c.

int drm_mode_setcrtc ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_setcrtc - set CRTC configuration : inode from the ioctl : file * from the ioctl : cmd from ioctl

  • : arg from ioctl

LOCKING: Takes mode config lock.

Build a new CRTC configuration based on user request.

Called by the user via ioctl.

RETURNS: Zero on success, errno on failure.

Definition at line 1881 of file drm_crtc.c.

int drm_mode_setplane ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

drm_mode_setplane - set up or tear down an plane : DRM device : ioctl data* : DRM file info

LOCKING: Takes mode config lock.

Set plane info, including placement, fb, scaling, and other factors. Or pass a NULL fb to disable.

Definition at line 1745 of file drm_crtc.c.

void drm_mode_sort ( struct list_head mode_list)

drm_mode_sort - sort mode list : list to sort

LOCKING: Caller must hold a lock protecting .

Sort by favorability, putting good modes first.

Definition at line 943 of file drm_modes.c.

void drm_mode_validate_size ( struct drm_device dev,
struct list_head mode_list,
int  maxX,
int  maxY,
int  maxPitch 
)

drm_mode_validate_size - make sure modes adhere to size constraints : DRM device : list of modes to check : maximum width : maximum height : max pitch

LOCKING: Caller must hold a lock protecting .

The DRM device () has size and pitch limits. Here we validate the modes we probed for against those limits and set their status as necessary.

Definition at line 813 of file drm_modes.c.

int drm_mode_vrefresh ( const struct drm_display_mode mode)

drm_mode_vrefresh - get the vrefresh of a mode : mode

LOCKING: None.

Return 's vrefresh rate in Hz or calculate it if necessary.

FIXME: why is this needed? shouldn't vrefresh be set already?

RETURNS: Vertical refresh rate. It will be the result of actual value plus 0.5. If it is 70.288, it will return 70Hz. If it is 59.6, it will return 60Hz.

Definition at line 630 of file drm_modes.c.

int drm_mode_width ( struct drm_display_mode mode)

drm_mode_width - get the width of a mode : mode

LOCKING: None.

Return 's width (hdisplay) value.

FIXME: is this needed?

RETURNS: ->hdisplay

Definition at line 561 of file drm_modes.c.

void drm_object_attach_property ( struct drm_mode_object obj,
struct drm_property property,
uint64_t  init_val 
)

Definition at line 2940 of file drm_crtc.c.

int drm_object_property_get_value ( struct drm_mode_object obj,
struct drm_property property,
uint64_t value 
)

Definition at line 2976 of file drm_crtc.c.

int drm_object_property_set_value ( struct drm_mode_object obj,
struct drm_property property,
uint64_t  val 
)

Definition at line 2960 of file drm_crtc.c.

void drm_plane_cleanup ( struct drm_plane plane)

Definition at line 705 of file drm_crtc.c.

int drm_plane_init ( struct drm_device dev,
struct drm_plane plane,
unsigned long  possible_crtcs,
const struct drm_plane_funcs funcs,
const uint32_t formats,
uint32_t  format_count,
bool  priv 
)

Definition at line 657 of file drm_crtc.c.

bool drm_probe_ddc ( struct i2c_adapter adapter)

Probe DDC presence.

Parameters
adapter: i2c device adaptor
Returns
1 on success

Definition at line 399 of file drm_edid.c.

int drm_property_add_enum ( struct drm_property property,
int  index,
uint64_t  value,
const char name 
)

Definition at line 2863 of file drm_crtc.c.

struct drm_property* drm_property_create ( struct drm_device dev,
int  flags,
const char name,
int  num_values 
)
read

Definition at line 2750 of file drm_crtc.c.

struct drm_property* drm_property_create_bitmask ( struct drm_device dev,
int  flags,
const char name,
const struct drm_prop_enum_list props,
int  num_values 
)
read

Definition at line 2816 of file drm_crtc.c.

struct drm_property* drm_property_create_enum ( struct drm_device dev,
int  flags,
const char name,
const struct drm_prop_enum_list props,
int  num_values 
)
read

Definition at line 2788 of file drm_crtc.c.

struct drm_property* drm_property_create_range ( struct drm_device dev,
int  flags,
const char name,
uint64_t  min,
uint64_t  max 
)
read

Definition at line 2844 of file drm_crtc.c.

void drm_property_destroy ( struct drm_device dev,
struct drm_property property 
)

Definition at line 2902 of file drm_crtc.c.

int drmfb_probe ( struct drm_device dev,
struct drm_crtc crtc 
)
int drmfb_remove ( struct drm_device dev,
struct drm_framebuffer fb 
)