Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
drm_crtc_helper.c File Reference
#include <linux/export.h>
#include <linux/moduleparam.h>
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_crtc_helper.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_edid.h>

Go to the source code of this file.

Macros

#define DRM_OUTPUT_POLL_PERIOD   (10*HZ)
 

Functions

 module_param_named (poll, drm_kms_helper_poll, bool, 0600)
 
int drm_helper_probe_single_connector_modes (struct drm_connector *connector, uint32_t maxX, uint32_t maxY)
 
 EXPORT_SYMBOL (drm_helper_probe_single_connector_modes)
 
bool drm_helper_encoder_in_use (struct drm_encoder *encoder)
 
 EXPORT_SYMBOL (drm_helper_encoder_in_use)
 
bool drm_helper_crtc_in_use (struct drm_crtc *crtc)
 
 EXPORT_SYMBOL (drm_helper_crtc_in_use)
 
void drm_helper_disable_unused_functions (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_helper_disable_unused_functions)
 
bool drm_crtc_helper_set_mode (struct drm_crtc *crtc, struct drm_display_mode *mode, int x, int y, struct drm_framebuffer *old_fb)
 
 EXPORT_SYMBOL (drm_crtc_helper_set_mode)
 
int drm_crtc_helper_set_config (struct drm_mode_set *set)
 
 EXPORT_SYMBOL (drm_crtc_helper_set_config)
 
void drm_helper_connector_dpms (struct drm_connector *connector, int mode)
 
 EXPORT_SYMBOL (drm_helper_connector_dpms)
 
int drm_helper_mode_fill_fb_struct (struct drm_framebuffer *fb, struct drm_mode_fb_cmd2 *mode_cmd)
 
 EXPORT_SYMBOL (drm_helper_mode_fill_fb_struct)
 
int drm_helper_resume_force_mode (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_helper_resume_force_mode)
 
void drm_kms_helper_poll_disable (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_kms_helper_poll_disable)
 
void drm_kms_helper_poll_enable (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_kms_helper_poll_enable)
 
void drm_kms_helper_poll_init (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_kms_helper_poll_init)
 
void drm_kms_helper_poll_fini (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_kms_helper_poll_fini)
 
void drm_helper_hpd_irq_event (struct drm_device *dev)
 
 EXPORT_SYMBOL (drm_helper_hpd_irq_event)
 

Macro Definition Documentation

#define DRM_OUTPUT_POLL_PERIOD   (10*HZ)

Definition at line 921 of file drm_crtc_helper.c.

Function Documentation

int drm_crtc_helper_set_config ( struct drm_mode_set set)

drm_crtc_helper_set_config - set a new config from userspace : CRTC to setup : user provided configuration : new mode to set : set of connectors for the new config : new framebuffer

LOCKING: Caller must hold mode config lock.

Setup a new configuration, provided by the user in , and enable it.

RETURNS: Zero. (FIXME)

Definition at line 509 of file drm_crtc_helper.c.

bool drm_crtc_helper_set_mode ( struct drm_crtc crtc,
struct drm_display_mode mode,
int  x,
int  y,
struct drm_framebuffer old_fb 
)

drm_crtc_set_mode - set a mode : CRTC to program : mode to use : width of mode : height of mode

LOCKING: Caller must hold mode config lock.

Try to set on . Give and its associated connectors a chance to fixup or reject the mode prior to trying to set it.

RETURNS: True if the mode was set successfully, or false otherwise.

Definition at line 343 of file drm_crtc_helper.c.

void drm_helper_connector_dpms ( struct drm_connector connector,
int  mode 
)

drm_helper_connector_dpms affected connector DPMS mode

Calls the low-level connector DPMS function, then calls appropriate encoder and crtc DPMS functions as well

Definition at line 810 of file drm_crtc_helper.c.

bool drm_helper_crtc_in_use ( struct drm_crtc crtc)

drm_helper_crtc_in_use - check if a given CRTC is in a mode_config : CRTC to check

LOCKING: Caller must hold mode config lock.

Walk 's DRM device's mode_config and see if it's in use.

RETURNS: True if is part of the mode_config, false otherwise.

Definition at line 207 of file drm_crtc_helper.c.

void drm_helper_disable_unused_functions ( struct drm_device dev)

drm_helper_disable_unused_functions - disable unused objects : DRM device

LOCKING: Caller must hold mode config lock.

If an connector or CRTC isn't part of 's mode_config, it can be disabled by calling its dpms function, which should power it off.

Definition at line 240 of file drm_crtc_helper.c.

bool drm_helper_encoder_in_use ( struct drm_encoder encoder)

drm_helper_encoder_in_use - check if a given encoder is in use : encoder to check

LOCKING: Caller must hold mode config lock.

Walk 's DRM device's mode_config and see if it's in use.

RETURNS: True if is part of the mode_config, false otherwise.

Definition at line 184 of file drm_crtc_helper.c.

void drm_helper_hpd_irq_event ( struct drm_device dev)

Definition at line 1015 of file drm_crtc_helper.c.

int drm_helper_mode_fill_fb_struct ( struct drm_framebuffer fb,
struct drm_mode_fb_cmd2 mode_cmd 
)

Definition at line 858 of file drm_crtc_helper.c.

int drm_helper_probe_single_connector_modes ( struct drm_connector connector,
uint32_t  maxX,
uint32_t  maxY 
)

drm_helper_probe_single_connector_modes - get complete set of display modes : DRM device : max width for modes : max height for modes

LOCKING: Caller must hold mode config lock.

Based on 's mode_config layout, scan all the connectors and try to detect modes on them. Modes will first be added to the connector's probed_modes list, then culled (based on validity and the , parameters) and put into the normal modes list.

Intended to be used either at bootup time or when major configuration changes have occurred.

FIXME: take into account monitor limits

RETURNS: Number of modes found on .

Definition at line 87 of file drm_crtc_helper.c.

int drm_helper_resume_force_mode ( struct drm_device dev)

Definition at line 877 of file drm_crtc_helper.c.

void drm_kms_helper_poll_disable ( struct drm_device dev)

Definition at line 974 of file drm_crtc_helper.c.

void drm_kms_helper_poll_enable ( struct drm_device dev)

Definition at line 982 of file drm_crtc_helper.c.

void drm_kms_helper_poll_fini ( struct drm_device dev)

Definition at line 1009 of file drm_crtc_helper.c.

void drm_kms_helper_poll_init ( struct drm_device dev)

Definition at line 1000 of file drm_crtc_helper.c.

EXPORT_SYMBOL ( drm_helper_encoder_in_use  )
EXPORT_SYMBOL ( drm_helper_crtc_in_use  )
EXPORT_SYMBOL ( drm_crtc_helper_set_mode  )
EXPORT_SYMBOL ( drm_crtc_helper_set_config  )
EXPORT_SYMBOL ( drm_helper_connector_dpms  )
EXPORT_SYMBOL ( drm_helper_mode_fill_fb_struct  )
EXPORT_SYMBOL ( drm_helper_resume_force_mode  )
EXPORT_SYMBOL ( drm_kms_helper_poll_disable  )
EXPORT_SYMBOL ( drm_kms_helper_poll_enable  )
EXPORT_SYMBOL ( drm_kms_helper_poll_init  )
EXPORT_SYMBOL ( drm_kms_helper_poll_fini  )
EXPORT_SYMBOL ( drm_helper_hpd_irq_event  )
module_param_named ( poll  ,
drm_kms_helper_poll  ,
bool  ,
0600   
)