aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_reg.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-07-20 18:44:45 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-18 10:46:19 -0400
commitf899fc64cda8569d0529452aafc0da31c042df2e (patch)
tree61b6d32abe3524b83abc9d8b9382e3f82225cd64 /drivers/gpu/drm/i915/i915_reg.h
parent373a3cf744c774478f44921c50011b896ab08f9d (diff)
drm/i915: use GMBUS to manage i2c links
Use the GMBUS interface rather than direct bit banging to grab the EDID over DDC (and for other forms of auxiliary communication with external display controllers). The hope is that this method will be much faster and more reliable than bit banging for fetching EDIDs from buggy monitors or through switches, though we still preserve the bit banging as a fallback in case GMBUS fails. Based on an original patch by Jesse Barnes. Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h51
1 files changed, 45 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index fd229abe0d86..18e3749fbd11 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -583,12 +583,51 @@
583# define GPIO_DATA_VAL_IN (1 << 12) 583# define GPIO_DATA_VAL_IN (1 << 12)
584# define GPIO_DATA_PULLUP_DISABLE (1 << 13) 584# define GPIO_DATA_PULLUP_DISABLE (1 << 13)
585 585
586#define GMBUS0 0x5100 586#define GMBUS0 0x5100 /* clock/port select */
587#define GMBUS1 0x5104 587#define GMBUS_RATE_100KHZ (0<<8)
588#define GMBUS2 0x5108 588#define GMBUS_RATE_50KHZ (1<<8)
589#define GMBUS3 0x510c 589#define GMBUS_RATE_400KHZ (2<<8) /* reserved on Pineview */
590#define GMBUS4 0x5110 590#define GMBUS_RATE_1MHZ (3<<8) /* reserved on Pineview */
591#define GMBUS5 0x5120 591#define GMBUS_HOLD_EXT (1<<7) /* 300ns hold time, rsvd on Pineview */
592#define GMBUS_PORT_DISABLED 0
593#define GMBUS_PORT_SSC 1
594#define GMBUS_PORT_VGADDC 2
595#define GMBUS_PORT_PANEL 3
596#define GMBUS_PORT_DPC 4 /* HDMIC */
597#define GMBUS_PORT_DPB 5 /* SDVO, HDMIB */
598 /* 6 reserved */
599#define GMBUS_PORT_DPD 7 /* HDMID */
600#define GMBUS_NUM_PORTS 8
601#define GMBUS1 0x5104 /* command/status */
602#define GMBUS_SW_CLR_INT (1<<31)
603#define GMBUS_SW_RDY (1<<30)
604#define GMBUS_ENT (1<<29) /* enable timeout */
605#define GMBUS_CYCLE_NONE (0<<25)
606#define GMBUS_CYCLE_WAIT (1<<25)
607#define GMBUS_CYCLE_INDEX (2<<25)
608#define GMBUS_CYCLE_STOP (4<<25)
609#define GMBUS_BYTE_COUNT_SHIFT 16
610#define GMBUS_SLAVE_INDEX_SHIFT 8
611#define GMBUS_SLAVE_ADDR_SHIFT 1
612#define GMBUS_SLAVE_READ (1<<0)
613#define GMBUS_SLAVE_WRITE (0<<0)
614#define GMBUS2 0x5108 /* status */
615#define GMBUS_INUSE (1<<15)
616#define GMBUS_HW_WAIT_PHASE (1<<14)
617#define GMBUS_STALL_TIMEOUT (1<<13)
618#define GMBUS_INT (1<<12)
619#define GMBUS_HW_RDY (1<<11)
620#define GMBUS_SATOER (1<<10)
621#define GMBUS_ACTIVE (1<<9)
622#define GMBUS3 0x510c /* data buffer bytes 3-0 */
623#define GMBUS4 0x5110 /* interrupt mask (Pineview+) */
624#define GMBUS_SLAVE_TIMEOUT_EN (1<<4)
625#define GMBUS_NAK_EN (1<<3)
626#define GMBUS_IDLE_EN (1<<2)
627#define GMBUS_HW_WAIT_EN (1<<1)
628#define GMBUS_HW_RDY_EN (1<<0)
629#define GMBUS5 0x5120 /* byte index */
630#define GMBUS_2BYTE_INDEX_EN (1<<31)
592 631
593/* 632/*
594 * Clock control & power management 633 * Clock control & power management