Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
psb_intel_sdvo.c File Reference
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include "psb_intel_drv.h"
#include <drm/gma_drm.h>
#include "psb_drv.h"
#include "psb_intel_sdvo_regs.h"
#include "psb_intel_reg.h"

Go to the source code of this file.

Data Structures

struct  psb_intel_sdvo
 
struct  psb_intel_sdvo_connector
 
struct  _sdvo_cmd_name
 

Macros

#define SDVO_TMDS_MASK   (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)
 
#define SDVO_RGB_MASK   (SDVO_OUTPUT_RGB0 | SDVO_OUTPUT_RGB1)
 
#define SDVO_LVDS_MASK   (SDVO_OUTPUT_LVDS0 | SDVO_OUTPUT_LVDS1)
 
#define SDVO_TV_MASK   (SDVO_OUTPUT_CVBS0 | SDVO_OUTPUT_SVID0)
 
#define SDVO_OUTPUT_MASK
 
#define IS_TV(c)   (c->output_flag & SDVO_TV_MASK)
 
#define IS_TMDS(c)   (c->output_flag & SDVO_TMDS_MASK)
 
#define IS_LVDS(c)   (c->output_flag & SDVO_LVDS_MASK)
 
#define IS_TV_OR_LVDS(c)   (c->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))
 
#define TV_FORMAT_NUM   (sizeof(tv_format_names) / sizeof(*tv_format_names))
 
#define SDVO_CMD_NAME_ENTRY(cmd)   {cmd, #cmd}
 
#define IS_SDVOB(reg)   (reg == SDVOB)
 
#define SDVO_NAME(svdo)   (IS_SDVOB((svdo)->sdvo_reg) ? "SDVOB" : "SDVOC")
 
#define CHECK_PROPERTY(name, NAME)
 
#define ENHANCEMENT(name, NAME)
 

Functions

bool psb_intel_sdvo_init (struct drm_device *dev, int sdvo_reg)
 

Macro Definition Documentation

#define CHECK_PROPERTY (   name,
  NAME 
)
Value:
if (psb_intel_sdvo_connector->cur_##name == temp_value) return 0; \
if (psb_intel_sdvo_connector->max_##name < temp_value) return -EINVAL; \
cmd = SDVO_CMD_SET_##NAME; \
psb_intel_sdvo_connector->cur_##name = temp_value; \
goto set_value; \
}
#define ENHANCEMENT (   name,
  NAME 
)
Value:
do { \
if (enhancements.name) { \
if (!psb_intel_sdvo_get_value(psb_intel_sdvo, SDVO_CMD_GET_MAX_##NAME, &data_value, 4) || \
!psb_intel_sdvo_get_value(psb_intel_sdvo, SDVO_CMD_GET_##NAME, &response, 2)) \
return false; \
psb_intel_sdvo_connector->max_##name = data_value[0]; \
drm_property_create_range(dev, 0, #name, 0, data_value[0]); \
psb_intel_sdvo_connector->cur_##name); \
DRM_DEBUG_KMS(#name ": max %d, default %d, current %d\n", \
data_value[0], data_value[1], response); \
} \
} while(0)

Definition at line 2295 of file psb_intel_sdvo.c.

#define IS_LVDS (   c)    (c->output_flag & SDVO_LVDS_MASK)

Definition at line 51 of file psb_intel_sdvo.c.

#define IS_SDVOB (   reg)    (reg == SDVOB)

Definition at line 393 of file psb_intel_sdvo.c.

#define IS_TMDS (   c)    (c->output_flag & SDVO_TMDS_MASK)

Definition at line 50 of file psb_intel_sdvo.c.

#define IS_TV (   c)    (c->output_flag & SDVO_TV_MASK)

Definition at line 49 of file psb_intel_sdvo.c.

#define IS_TV_OR_LVDS (   c)    (c->output_flag & (SDVO_TV_MASK | SDVO_LVDS_MASK))

Definition at line 52 of file psb_intel_sdvo.c.

#define SDVO_CMD_NAME_ENTRY (   cmd)    {cmd, #cmd}

Definition at line 274 of file psb_intel_sdvo.c.

#define SDVO_LVDS_MASK   (SDVO_OUTPUT_LVDS0 | SDVO_OUTPUT_LVDS1)

Definition at line 43 of file psb_intel_sdvo.c.

#define SDVO_NAME (   svdo)    (IS_SDVOB((svdo)->sdvo_reg) ? "SDVOB" : "SDVOC")

Definition at line 394 of file psb_intel_sdvo.c.

#define SDVO_OUTPUT_MASK
Value:

Definition at line 46 of file psb_intel_sdvo.c.

#define SDVO_RGB_MASK   (SDVO_OUTPUT_RGB0 | SDVO_OUTPUT_RGB1)

Definition at line 42 of file psb_intel_sdvo.c.

#define SDVO_TMDS_MASK   (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)

Definition at line 41 of file psb_intel_sdvo.c.

#define SDVO_TV_MASK   (SDVO_OUTPUT_CVBS0 | SDVO_OUTPUT_SVID0)

Definition at line 44 of file psb_intel_sdvo.c.

#define TV_FORMAT_NUM   (sizeof(tv_format_names) / sizeof(*tv_format_names))

Definition at line 65 of file psb_intel_sdvo.c.

Function Documentation

bool psb_intel_sdvo_init ( struct drm_device dev,
int  sdvo_reg 
)

Definition at line 2507 of file psb_intel_sdvo.c.