Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
intel_sdvo.c File Reference
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/export.h>
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include "intel_drv.h"
#include <drm/i915_drm.h>
#include "i915_drv.h"
#include "intel_sdvo_regs.h"

Go to the source code of this file.

Data Structures

struct  intel_sdvo
 
struct  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 | SDVO_OUTPUT_YPRPB0)
 
#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 IS_DIGITAL(c)   (c->output_flag & (SDVO_TMDS_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 SDVO_NAME(svdo)   ((svdo)->is_sdvob ? "SDVOB" : "SDVOC")
 
#define CHECK_PROPERTY(name, NAME)
 
#define ENHANCEMENT(name, NAME)
 

Functions

bool intel_sdvo_init (struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
 

Macro Definition Documentation

#define CHECK_PROPERTY (   name,
  NAME 
)
Value:
if (intel_sdvo_connector->name == property) { \
if (intel_sdvo_connector->cur_##name == temp_value) return 0; \
if (intel_sdvo_connector->max_##name < temp_value) return -EINVAL; \
cmd = SDVO_CMD_SET_##NAME; \
intel_sdvo_connector->cur_##name = temp_value; \
goto set_value; \
}
#define ENHANCEMENT (   name,
  NAME 
)
Value:
do { \
if (enhancements.name) { \
if (!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_MAX_##NAME, &data_value, 4) || \
!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_##NAME, &response, 2)) \
return false; \
intel_sdvo_connector->max_##name = data_value[0]; \
drm_property_create_range(dev, 0, #name, 0, data_value[0]); \
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 2436 of file intel_sdvo.c.

#define IS_DIGITAL (   c)    (c->output_flag & (SDVO_TMDS_MASK | SDVO_LVDS_MASK))

Definition at line 52 of file intel_sdvo.c.

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

Definition at line 50 of file intel_sdvo.c.

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

Definition at line 49 of file intel_sdvo.c.

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

Definition at line 48 of file intel_sdvo.c.

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

Definition at line 51 of file intel_sdvo.c.

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

Definition at line 291 of file intel_sdvo.c.

#define SDVO_LVDS_MASK   (SDVO_OUTPUT_LVDS0 | SDVO_OUTPUT_LVDS1)

Definition at line 42 of file intel_sdvo.c.

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

Definition at line 410 of file intel_sdvo.c.

#define SDVO_OUTPUT_MASK
Value:

Definition at line 45 of file intel_sdvo.c.

#define SDVO_RGB_MASK   (SDVO_OUTPUT_RGB0 | SDVO_OUTPUT_RGB1)

Definition at line 41 of file intel_sdvo.c.

#define SDVO_TMDS_MASK   (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)

Definition at line 40 of file intel_sdvo.c.

#define SDVO_TV_MASK   (SDVO_OUTPUT_CVBS0 | SDVO_OUTPUT_SVID0 | SDVO_OUTPUT_YPRPB0)

Definition at line 43 of file intel_sdvo.c.

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

Definition at line 65 of file intel_sdvo.c.

Function Documentation

bool intel_sdvo_init ( struct drm_device dev,
uint32_t  sdvo_reg,
bool  is_sdvob 
)

Definition at line 2650 of file intel_sdvo.c.