Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5b6345be
Commit
5b6345be
authored
Jun 24, 2009
by
Dave Airlie
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'origin/drm-intel-next' of ../drm-intel into drm-fixes
parents
176f613e
b5aa8a0f
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
2327 additions
and
261 deletions
+2327
-261
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Kconfig
+1
-0
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/Makefile
+2
-0
drivers/gpu/drm/i915/dvo.h
drivers/gpu/drm/i915/dvo.h
+2
-2
drivers/gpu/drm/i915/dvo_ch7017.c
drivers/gpu/drm/i915/dvo_ch7017.c
+11
-9
drivers/gpu/drm/i915/dvo_ch7xxx.c
drivers/gpu/drm/i915/dvo_ch7xxx.c
+13
-12
drivers/gpu/drm/i915/dvo_ivch.c
drivers/gpu/drm/i915/dvo_ivch.c
+11
-10
drivers/gpu/drm/i915/dvo_sil164.c
drivers/gpu/drm/i915/dvo_sil164.c
+13
-12
drivers/gpu/drm/i915/dvo_tfp410.c
drivers/gpu/drm/i915/dvo_tfp410.c
+13
-12
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.c
+2
-2
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_drv.h
+12
-0
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem.c
+16
-3
drivers/gpu/drm/i915/i915_gem_debug.c
drivers/gpu/drm/i915/i915_gem_debug.c
+3
-3
drivers/gpu/drm/i915/i915_gem_tiling.c
drivers/gpu/drm/i915/i915_gem_tiling.c
+2
-0
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_irq.c
+11
-1
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/i915_reg.h
+29
-0
drivers/gpu/drm/i915/i915_suspend.c
drivers/gpu/drm/i915/i915_suspend.c
+33
-1
drivers/gpu/drm/i915/intel_bios.c
drivers/gpu/drm/i915/intel_bios.c
+11
-1
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_display.c
+145
-54
drivers/gpu/drm/i915/intel_dp.c
drivers/gpu/drm/i915/intel_dp.c
+1153
-0
drivers/gpu/drm/i915/intel_dp.h
drivers/gpu/drm/i915/intel_dp.h
+144
-0
drivers/gpu/drm/i915/intel_dp_i2c.c
drivers/gpu/drm/i915/intel_dp_i2c.c
+272
-0
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_drv.h
+11
-6
drivers/gpu/drm/i915/intel_dvo.c
drivers/gpu/drm/i915/intel_dvo.c
+6
-10
drivers/gpu/drm/i915/intel_hdmi.c
drivers/gpu/drm/i915/intel_hdmi.c
+18
-17
drivers/gpu/drm/i915/intel_i2c.c
drivers/gpu/drm/i915/intel_i2c.c
+11
-5
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/i915/intel_lvds.c
+321
-23
drivers/gpu/drm/i915/intel_modes.c
drivers/gpu/drm/i915/intel_modes.c
+6
-8
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/i915/intel_sdvo.c
+30
-42
drivers/gpu/drm/i915/intel_tv.c
drivers/gpu/drm/i915/intel_tv.c
+25
-28
No files found.
drivers/gpu/drm/Kconfig
View file @
5b6345be
...
@@ -81,6 +81,7 @@ config DRM_I830
...
@@ -81,6 +81,7 @@ config DRM_I830
config DRM_I915
config DRM_I915
tristate "i915 driver"
tristate "i915 driver"
depends on AGP_INTEL
select FB_CFB_FILLRECT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
select FB_CFB_IMAGEBLIT
...
...
drivers/gpu/drm/i915/Makefile
View file @
5b6345be
...
@@ -13,6 +13,8 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o i915_mem.o \
...
@@ -13,6 +13,8 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o i915_mem.o \
intel_crt.o
\
intel_crt.o
\
intel_lvds.o
\
intel_lvds.o
\
intel_bios.o
\
intel_bios.o
\
intel_dp.o
\
intel_dp_i2c.o
\
intel_hdmi.o
\
intel_hdmi.o
\
intel_sdvo.o
\
intel_sdvo.o
\
intel_modes.o
\
intel_modes.o
\
...
...
drivers/gpu/drm/i915/dvo.h
View file @
5b6345be
...
@@ -37,7 +37,7 @@ struct intel_dvo_device {
...
@@ -37,7 +37,7 @@ struct intel_dvo_device {
/* GPIO register used for i2c bus to control this device */
/* GPIO register used for i2c bus to control this device */
u32
gpio
;
u32
gpio
;
int
slave_addr
;
int
slave_addr
;
struct
i
ntel_i2c_chan
*
i2c_bus
;
struct
i
2c_adapter
*
i2c_bus
;
const
struct
intel_dvo_dev_ops
*
dev_ops
;
const
struct
intel_dvo_dev_ops
*
dev_ops
;
void
*
dev_priv
;
void
*
dev_priv
;
...
@@ -52,7 +52,7 @@ struct intel_dvo_dev_ops {
...
@@ -52,7 +52,7 @@ struct intel_dvo_dev_ops {
* Returns NULL if the device does not exist.
* Returns NULL if the device does not exist.
*/
*/
bool
(
*
init
)(
struct
intel_dvo_device
*
dvo
,
bool
(
*
init
)(
struct
intel_dvo_device
*
dvo
,
struct
i
ntel_i2c_chan
*
i2cbus
);
struct
i
2c_adapter
*
i2cbus
);
/*
/*
* Called to allow the output a chance to create properties after the
* Called to allow the output a chance to create properties after the
...
...
drivers/gpu/drm/i915/dvo_ch7017.c
View file @
5b6345be
...
@@ -176,19 +176,20 @@ static void ch7017_dpms(struct intel_dvo_device *dvo, int mode);
...
@@ -176,19 +176,20 @@ static void ch7017_dpms(struct intel_dvo_device *dvo, int mode);
static
bool
ch7017_read
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
val
)
static
bool
ch7017_read
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
val
)
{
{
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
u8
out_buf
[
2
];
u8
out_buf
[
2
];
u8
in_buf
[
2
];
u8
in_buf
[
2
];
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
},
},
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
I2C_M_RD
,
.
flags
=
I2C_M_RD
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
in_buf
,
.
buf
=
in_buf
,
...
@@ -208,10 +209,11 @@ static bool ch7017_read(struct intel_dvo_device *dvo, int addr, uint8_t *val)
...
@@ -208,10 +209,11 @@ static bool ch7017_read(struct intel_dvo_device *dvo, int addr, uint8_t *val)
static
bool
ch7017_write
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
val
)
static
bool
ch7017_write
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
val
)
{
{
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
uint8_t
out_buf
[
2
];
uint8_t
out_buf
[
2
];
struct
i2c_msg
msg
=
{
struct
i2c_msg
msg
=
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
2
,
.
len
=
2
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
...
@@ -228,8 +230,9 @@ static bool ch7017_write(struct intel_dvo_device *dvo, int addr, uint8_t val)
...
@@ -228,8 +230,9 @@ static bool ch7017_write(struct intel_dvo_device *dvo, int addr, uint8_t val)
/** Probes for a CH7017 on the given bus and slave address. */
/** Probes for a CH7017 on the given bus and slave address. */
static
bool
ch7017_init
(
struct
intel_dvo_device
*
dvo
,
static
bool
ch7017_init
(
struct
intel_dvo_device
*
dvo
,
struct
i
ntel_i2c_chan
*
i2cbus
)
struct
i
2c_adapter
*
adapter
)
{
{
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
struct
ch7017_priv
*
priv
;
struct
ch7017_priv
*
priv
;
uint8_t
val
;
uint8_t
val
;
...
@@ -237,8 +240,7 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
...
@@ -237,8 +240,7 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
if
(
priv
==
NULL
)
if
(
priv
==
NULL
)
return
false
;
return
false
;
dvo
->
i2c_bus
=
i2cbus
;
dvo
->
i2c_bus
=
adapter
;
dvo
->
i2c_bus
->
slave_addr
=
dvo
->
slave_addr
;
dvo
->
dev_priv
=
priv
;
dvo
->
dev_priv
=
priv
;
if
(
!
ch7017_read
(
dvo
,
CH7017_DEVICE_ID
,
&
val
))
if
(
!
ch7017_read
(
dvo
,
CH7017_DEVICE_ID
,
&
val
))
...
@@ -248,7 +250,7 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
...
@@ -248,7 +250,7 @@ static bool ch7017_init(struct intel_dvo_device *dvo,
val
!=
CH7018_DEVICE_ID_VALUE
&&
val
!=
CH7018_DEVICE_ID_VALUE
&&
val
!=
CH7019_DEVICE_ID_VALUE
)
{
val
!=
CH7019_DEVICE_ID_VALUE
)
{
DRM_DEBUG
(
"ch701x not detected, got %d: from %s Slave %d.
\n
"
,
DRM_DEBUG
(
"ch701x not detected, got %d: from %s Slave %d.
\n
"
,
val
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
val
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
goto
fail
;
goto
fail
;
}
}
...
...
drivers/gpu/drm/i915/dvo_ch7xxx.c
View file @
5b6345be
...
@@ -123,19 +123,20 @@ static char *ch7xxx_get_id(uint8_t vid)
...
@@ -123,19 +123,20 @@ static char *ch7xxx_get_id(uint8_t vid)
static
bool
ch7xxx_readb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
ch
)
static
bool
ch7xxx_readb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
ch
)
{
{
struct
ch7xxx_priv
*
ch7xxx
=
dvo
->
dev_priv
;
struct
ch7xxx_priv
*
ch7xxx
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
u8
out_buf
[
2
];
u8
out_buf
[
2
];
u8
in_buf
[
2
];
u8
in_buf
[
2
];
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
},
},
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
I2C_M_RD
,
.
flags
=
I2C_M_RD
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
in_buf
,
.
buf
=
in_buf
,
...
@@ -152,7 +153,7 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
...
@@ -152,7 +153,7 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
if
(
!
ch7xxx
->
quiet
)
{
if
(
!
ch7xxx
->
quiet
)
{
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
}
}
...
@@ -161,10 +162,11 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
...
@@ -161,10 +162,11 @@ static bool ch7xxx_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
static
bool
ch7xxx_writeb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
ch
)
static
bool
ch7xxx_writeb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
ch
)
{
{
struct
ch7xxx_priv
*
ch7xxx
=
dvo
->
dev_priv
;
struct
ch7xxx_priv
*
ch7xxx
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
uint8_t
out_buf
[
2
];
uint8_t
out_buf
[
2
];
struct
i2c_msg
msg
=
{
struct
i2c_msg
msg
=
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
2
,
.
len
=
2
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
...
@@ -178,14 +180,14 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
...
@@ -178,14 +180,14 @@ static bool ch7xxx_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
if
(
!
ch7xxx
->
quiet
)
{
if
(
!
ch7xxx
->
quiet
)
{
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
}
}
static
bool
ch7xxx_init
(
struct
intel_dvo_device
*
dvo
,
static
bool
ch7xxx_init
(
struct
intel_dvo_device
*
dvo
,
struct
i
ntel_i2c_chan
*
i2cbus
)
struct
i
2c_adapter
*
adapter
)
{
{
/* this will detect the CH7xxx chip on the specified i2c bus */
/* this will detect the CH7xxx chip on the specified i2c bus */
struct
ch7xxx_priv
*
ch7xxx
;
struct
ch7xxx_priv
*
ch7xxx
;
...
@@ -196,8 +198,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
...
@@ -196,8 +198,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
if
(
ch7xxx
==
NULL
)
if
(
ch7xxx
==
NULL
)
return
false
;
return
false
;
dvo
->
i2c_bus
=
i2cbus
;
dvo
->
i2c_bus
=
adapter
;
dvo
->
i2c_bus
->
slave_addr
=
dvo
->
slave_addr
;
dvo
->
dev_priv
=
ch7xxx
;
dvo
->
dev_priv
=
ch7xxx
;
ch7xxx
->
quiet
=
true
;
ch7xxx
->
quiet
=
true
;
...
@@ -207,7 +208,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
...
@@ -207,7 +208,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
name
=
ch7xxx_get_id
(
vendor
);
name
=
ch7xxx_get_id
(
vendor
);
if
(
!
name
)
{
if
(
!
name
)
{
DRM_DEBUG
(
"ch7xxx not detected; got 0x%02x from %s slave %d.
\n
"
,
DRM_DEBUG
(
"ch7xxx not detected; got 0x%02x from %s slave %d.
\n
"
,
vendor
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
vendor
,
adapter
->
name
,
dvo
->
slave_addr
);
goto
out
;
goto
out
;
}
}
...
@@ -217,7 +218,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
...
@@ -217,7 +218,7 @@ static bool ch7xxx_init(struct intel_dvo_device *dvo,
if
(
device
!=
CH7xxx_DID
)
{
if
(
device
!=
CH7xxx_DID
)
{
DRM_DEBUG
(
"ch7xxx not detected; got 0x%02x from %s slave %d.
\n
"
,
DRM_DEBUG
(
"ch7xxx not detected; got 0x%02x from %s slave %d.
\n
"
,
vendor
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
vendor
,
adapter
->
name
,
dvo
->
slave_addr
);
goto
out
;
goto
out
;
}
}
...
...
drivers/gpu/drm/i915/dvo_ivch.c
View file @
5b6345be
...
@@ -169,13 +169,14 @@ static void ivch_dump_regs(struct intel_dvo_device *dvo);
...
@@ -169,13 +169,14 @@ static void ivch_dump_regs(struct intel_dvo_device *dvo);
static
bool
ivch_read
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint16_t
*
data
)
static
bool
ivch_read
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint16_t
*
data
)
{
{
struct
ivch_priv
*
priv
=
dvo
->
dev_priv
;
struct
ivch_priv
*
priv
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
u8
out_buf
[
1
];
u8
out_buf
[
1
];
u8
in_buf
[
2
];
u8
in_buf
[
2
];
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
I2C_M_RD
,
.
flags
=
I2C_M_RD
,
.
len
=
0
,
.
len
=
0
,
},
},
...
@@ -186,7 +187,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data)
...
@@ -186,7 +187,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data)
.
buf
=
out_buf
,
.
buf
=
out_buf
,
},
},
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
I2C_M_RD
|
I2C_M_NOSTART
,
.
flags
=
I2C_M_RD
|
I2C_M_NOSTART
,
.
len
=
2
,
.
len
=
2
,
.
buf
=
in_buf
,
.
buf
=
in_buf
,
...
@@ -202,7 +203,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data)
...
@@ -202,7 +203,7 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data)
if
(
!
priv
->
quiet
)
{
if
(
!
priv
->
quiet
)
{
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
}
}
...
@@ -211,10 +212,11 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data)
...
@@ -211,10 +212,11 @@ static bool ivch_read(struct intel_dvo_device *dvo, int addr, uint16_t *data)
static
bool
ivch_write
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint16_t
data
)
static
bool
ivch_write
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint16_t
data
)
{
{
struct
ivch_priv
*
priv
=
dvo
->
dev_priv
;
struct
ivch_priv
*
priv
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
u8
out_buf
[
3
];
u8
out_buf
[
3
];
struct
i2c_msg
msg
=
{
struct
i2c_msg
msg
=
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
3
,
.
len
=
3
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
...
@@ -229,7 +231,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, uint16_t data)
...
@@ -229,7 +231,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, uint16_t data)
if
(
!
priv
->
quiet
)
{
if
(
!
priv
->
quiet
)
{
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
...
@@ -237,7 +239,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, uint16_t data)
...
@@ -237,7 +239,7 @@ static bool ivch_write(struct intel_dvo_device *dvo, int addr, uint16_t data)
/** Probes the given bus and slave address for an ivch */
/** Probes the given bus and slave address for an ivch */
static
bool
ivch_init
(
struct
intel_dvo_device
*
dvo
,
static
bool
ivch_init
(
struct
intel_dvo_device
*
dvo
,
struct
i
ntel_i2c_chan
*
i2cbus
)
struct
i
2c_adapter
*
adapter
)
{
{
struct
ivch_priv
*
priv
;
struct
ivch_priv
*
priv
;
uint16_t
temp
;
uint16_t
temp
;
...
@@ -246,8 +248,7 @@ static bool ivch_init(struct intel_dvo_device *dvo,
...
@@ -246,8 +248,7 @@ static bool ivch_init(struct intel_dvo_device *dvo,
if
(
priv
==
NULL
)
if
(
priv
==
NULL
)
return
false
;
return
false
;
dvo
->
i2c_bus
=
i2cbus
;
dvo
->
i2c_bus
=
adapter
;
dvo
->
i2c_bus
->
slave_addr
=
dvo
->
slave_addr
;
dvo
->
dev_priv
=
priv
;
dvo
->
dev_priv
=
priv
;
priv
->
quiet
=
true
;
priv
->
quiet
=
true
;
...
...
drivers/gpu/drm/i915/dvo_sil164.c
View file @
5b6345be
...
@@ -76,19 +76,20 @@ struct sil164_priv {
...
@@ -76,19 +76,20 @@ struct sil164_priv {
static
bool
sil164_readb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
ch
)
static
bool
sil164_readb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
ch
)
{
{
struct
sil164_priv
*
sil
=
dvo
->
dev_priv
;
struct
sil164_priv
*
sil
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
u8
out_buf
[
2
];
u8
out_buf
[
2
];
u8
in_buf
[
2
];
u8
in_buf
[
2
];
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
},
},
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
I2C_M_RD
,
.
flags
=
I2C_M_RD
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
in_buf
,
.
buf
=
in_buf
,
...
@@ -105,7 +106,7 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
...
@@ -105,7 +106,7 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
if
(
!
sil
->
quiet
)
{
if
(
!
sil
->
quiet
)
{
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
}
}
...
@@ -113,10 +114,11 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
...
@@ -113,10 +114,11 @@ static bool sil164_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
static
bool
sil164_writeb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
ch
)
static
bool
sil164_writeb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
ch
)
{
{
struct
sil164_priv
*
sil
=
dvo
->
dev_priv
;
struct
sil164_priv
*
sil
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
uint8_t
out_buf
[
2
];
uint8_t
out_buf
[
2
];
struct
i2c_msg
msg
=
{
struct
i2c_msg
msg
=
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
2
,
.
len
=
2
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
...
@@ -130,7 +132,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
...
@@ -130,7 +132,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
if
(
!
sil
->
quiet
)
{
if
(
!
sil
->
quiet
)
{
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
...
@@ -138,7 +140,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
...
@@ -138,7 +140,7 @@ static bool sil164_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
/* Silicon Image 164 driver for chip on i2c bus */
/* Silicon Image 164 driver for chip on i2c bus */
static
bool
sil164_init
(
struct
intel_dvo_device
*
dvo
,
static
bool
sil164_init
(
struct
intel_dvo_device
*
dvo
,
struct
i
ntel_i2c_chan
*
i2cbus
)
struct
i
2c_adapter
*
adapter
)
{
{
/* this will detect the SIL164 chip on the specified i2c bus */
/* this will detect the SIL164 chip on the specified i2c bus */
struct
sil164_priv
*
sil
;
struct
sil164_priv
*
sil
;
...
@@ -148,8 +150,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
...
@@ -148,8 +150,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
if
(
sil
==
NULL
)
if
(
sil
==
NULL
)
return
false
;
return
false
;
dvo
->
i2c_bus
=
i2cbus
;
dvo
->
i2c_bus
=
adapter
;
dvo
->
i2c_bus
->
slave_addr
=
dvo
->
slave_addr
;
dvo
->
dev_priv
=
sil
;
dvo
->
dev_priv
=
sil
;
sil
->
quiet
=
true
;
sil
->
quiet
=
true
;
...
@@ -158,7 +159,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
...
@@ -158,7 +159,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
if
(
ch
!=
(
SIL164_VID
&
0xff
))
{
if
(
ch
!=
(
SIL164_VID
&
0xff
))
{
DRM_DEBUG
(
"sil164 not detected got %d: from %s Slave %d.
\n
"
,
DRM_DEBUG
(
"sil164 not detected got %d: from %s Slave %d.
\n
"
,
ch
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
ch
,
adapter
->
name
,
dvo
->
slave_addr
);
goto
out
;
goto
out
;
}
}
...
@@ -167,7 +168,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
...
@@ -167,7 +168,7 @@ static bool sil164_init(struct intel_dvo_device *dvo,
if
(
ch
!=
(
SIL164_DID
&
0xff
))
{
if
(
ch
!=
(
SIL164_DID
&
0xff
))
{
DRM_DEBUG
(
"sil164 not detected got %d: from %s Slave %d.
\n
"
,
DRM_DEBUG
(
"sil164 not detected got %d: from %s Slave %d.
\n
"
,
ch
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
ch
,
adapter
->
name
,
dvo
->
slave_addr
);
goto
out
;
goto
out
;
}
}
sil
->
quiet
=
false
;
sil
->
quiet
=
false
;
...
...
drivers/gpu/drm/i915/dvo_tfp410.c
View file @
5b6345be
...
@@ -101,19 +101,20 @@ struct tfp410_priv {
...
@@ -101,19 +101,20 @@ struct tfp410_priv {
static
bool
tfp410_readb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
ch
)
static
bool
tfp410_readb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
*
ch
)
{
{
struct
tfp410_priv
*
tfp
=
dvo
->
dev_priv
;
struct
tfp410_priv
*
tfp
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
u8
out_buf
[
2
];
u8
out_buf
[
2
];
u8
in_buf
[
2
];
u8
in_buf
[
2
];
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
},
},
{
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
I2C_M_RD
,
.
flags
=
I2C_M_RD
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
in_buf
,
.
buf
=
in_buf
,
...
@@ -130,7 +131,7 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
...
@@ -130,7 +131,7 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
if
(
!
tfp
->
quiet
)
{
if
(
!
tfp
->
quiet
)
{
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
DRM_DEBUG
(
"Unable to read register 0x%02x from %s:%02x.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
}
}
...
@@ -138,10 +139,11 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
...
@@ -138,10 +139,11 @@ static bool tfp410_readb(struct intel_dvo_device *dvo, int addr, uint8_t *ch)
static
bool
tfp410_writeb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
ch
)
static
bool
tfp410_writeb
(
struct
intel_dvo_device
*
dvo
,
int
addr
,
uint8_t
ch
)
{
{
struct
tfp410_priv
*
tfp
=
dvo
->
dev_priv
;
struct
tfp410_priv
*
tfp
=
dvo
->
dev_priv
;
struct
intel_i2c_chan
*
i2cbus
=
dvo
->
i2c_bus
;
struct
i2c_adapter
*
adapter
=
dvo
->
i2c_bus
;
struct
intel_i2c_chan
*
i2cbus
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
uint8_t
out_buf
[
2
];
uint8_t
out_buf
[
2
];
struct
i2c_msg
msg
=
{
struct
i2c_msg
msg
=
{
.
addr
=
i2cbus
->
slave_addr
,
.
addr
=
dvo
->
slave_addr
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
2
,
.
len
=
2
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
...
@@ -155,7 +157,7 @@ static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
...
@@ -155,7 +157,7 @@ static bool tfp410_writeb(struct intel_dvo_device *dvo, int addr, uint8_t ch)
if
(
!
tfp
->
quiet
)
{
if
(
!
tfp
->
quiet
)
{
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
DRM_DEBUG
(
"Unable to write register 0x%02x to %s:%d.
\n
"
,
addr
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
addr
,
i2cbus
->
adapter
.
name
,
dvo
->
slave_addr
);
}
}
return
false
;
return
false
;
...
@@ -174,7 +176,7 @@ static int tfp410_getid(struct intel_dvo_device *dvo, int addr)
...
@@ -174,7 +176,7 @@ static int tfp410_getid(struct intel_dvo_device *dvo, int addr)
/* Ti TFP410 driver for chip on i2c bus */
/* Ti TFP410 driver for chip on i2c bus */
static
bool
tfp410_init
(
struct
intel_dvo_device
*
dvo
,
static
bool
tfp410_init
(
struct
intel_dvo_device
*
dvo
,
struct
i
ntel_i2c_chan
*
i2cbus
)
struct
i
2c_adapter
*
adapter
)
{
{
/* this will detect the tfp410 chip on the specified i2c bus */
/* this will detect the tfp410 chip on the specified i2c bus */
struct
tfp410_priv
*
tfp
;
struct
tfp410_priv
*
tfp
;
...
@@ -184,20 +186,19 @@ static bool tfp410_init(struct intel_dvo_device *dvo,
...
@@ -184,20 +186,19 @@ static bool tfp410_init(struct intel_dvo_device *dvo,
if
(
tfp
==
NULL
)
if
(
tfp
==
NULL
)
return
false
;
return
false
;
dvo
->
i2c_bus
=
i2cbus
;
dvo
->
i2c_bus
=
adapter
;
dvo
->
i2c_bus
->
slave_addr
=
dvo
->
slave_addr
;
dvo
->
dev_priv
=
tfp
;
dvo
->
dev_priv
=
tfp
;
tfp
->
quiet
=
true
;
tfp
->
quiet
=
true
;
if
((
id
=
tfp410_getid
(
dvo
,
TFP410_VID_LO
))
!=
TFP410_VID
)
{
if
((
id
=
tfp410_getid
(
dvo
,
TFP410_VID_LO
))
!=
TFP410_VID
)
{
DRM_DEBUG
(
"tfp410 not detected got VID %X: from %s Slave %d.
\n
"
,
DRM_DEBUG
(
"tfp410 not detected got VID %X: from %s Slave %d.
\n
"
,
id
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
id
,
adapter
->
name
,
dvo
->
slave_addr
);
goto
out
;
goto
out
;
}
}
if
((
id
=
tfp410_getid
(
dvo
,
TFP410_DID_LO
))
!=
TFP410_DID
)
{
if
((
id
=
tfp410_getid
(
dvo
,
TFP410_DID_LO
))
!=
TFP410_DID
)
{
DRM_DEBUG
(
"tfp410 not detected got DID %X: from %s Slave %d.
\n
"
,
DRM_DEBUG
(
"tfp410 not detected got DID %X: from %s Slave %d.
\n
"
,
id
,
i2cbus
->
adapter
.
name
,
i2cbus
->
slave_addr
);
id
,
adapter
->
name
,
dvo
->
slave_addr
);
goto
out
;
goto
out
;
}
}
tfp
->
quiet
=
false
;
tfp
->
quiet
=
false
;
...
...
drivers/gpu/drm/i915/i915_drv.c
View file @
5b6345be
...
@@ -67,8 +67,6 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
...
@@ -67,8 +67,6 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
pci_save_state
(
dev
->
pdev
);
pci_save_state
(
dev
->
pdev
);
i915_save_state
(
dev
);
/* If KMS is active, we do the leavevt stuff here */
/* If KMS is active, we do the leavevt stuff here */
if
(
drm_core_check_feature
(
dev
,
DRIVER_MODESET
))
{
if
(
drm_core_check_feature
(
dev
,
DRIVER_MODESET
))
{
if
(
i915_gem_idle
(
dev
))
if
(
i915_gem_idle
(
dev
))
...
@@ -77,6 +75,8 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
...
@@ -77,6 +75,8 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
drm_irq_uninstall
(
dev
);
drm_irq_uninstall
(
dev
);
}
}
i915_save_state
(
dev
);
intel_opregion_free
(
dev
,
1
);
intel_opregion_free
(
dev
,
1
);
if
(
state
.
event
==
PM_EVENT_SUSPEND
)
{
if
(
state
.
event
==
PM_EVENT_SUSPEND
)
{
...
...
drivers/gpu/drm/i915/i915_drv.h
View file @
5b6345be
...
@@ -306,6 +306,17 @@ typedef struct drm_i915_private {
...
@@ -306,6 +306,17 @@ typedef struct drm_i915_private {
u32
saveCURBPOS
;
u32
saveCURBPOS
;
u32
saveCURBBASE
;
u32
saveCURBBASE
;
u32
saveCURSIZE
;
u32
saveCURSIZE
;
u32
saveDP_B
;
u32
saveDP_C
;
u32
saveDP_D
;
u32
savePIPEA_GMCH_DATA_M
;
u32
savePIPEB_GMCH_DATA_M
;
u32
savePIPEA_GMCH_DATA_N
;
u32
savePIPEB_GMCH_DATA_N
;
u32
savePIPEA_DP_LINK_M
;
u32
savePIPEB_DP_LINK_M
;
u32
savePIPEA_DP_LINK_N
;
u32
savePIPEB_DP_LINK_N
;
struct
{
struct
{
struct
drm_mm
gtt_space
;
struct
drm_mm
gtt_space
;
...
@@ -857,6 +868,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
...
@@ -857,6 +868,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
#define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \
#define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \
IS_I915GM(dev)))
IS_I915GM(dev)))
#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IGDNG(dev))
#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IGDNG(dev))
#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IGDNG(dev))
#define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev))
#define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev))
#define PRIMARY_RINGBUFFER_SIZE (128*1024)
#define PRIMARY_RINGBUFFER_SIZE (128*1024)
...
...
drivers/gpu/drm/i915/i915_gem.c
View file @
5b6345be
...
@@ -1006,7 +1006,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
...
@@ -1006,7 +1006,7 @@ i915_gem_set_domain_ioctl(struct drm_device *dev, void *data,
mutex_lock
(
&
dev
->
struct_mutex
);
mutex_lock
(
&
dev
->
struct_mutex
);
#if WATCH_BUF
#if WATCH_BUF
DRM_INFO
(
"set_domain_ioctl %p(%d), %08x %08x
\n
"
,
DRM_INFO
(
"set_domain_ioctl %p(%
z
d), %08x %08x
\n
"
,
obj
,
obj
->
size
,
read_domains
,
write_domain
);
obj
,
obj
->
size
,
read_domains
,
write_domain
);
#endif
#endif
if
(
read_domains
&
I915_GEM_DOMAIN_GTT
)
{
if
(
read_domains
&
I915_GEM_DOMAIN_GTT
)
{
...
@@ -1050,7 +1050,7 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
...
@@ -1050,7 +1050,7 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
}
}
#if WATCH_BUF
#if WATCH_BUF
DRM_INFO
(
"%s: sw_finish %d (%p %d)
\n
"
,
DRM_INFO
(
"%s: sw_finish %d (%p %
z
d)
\n
"
,
__func__
,
args
->
handle
,
obj
,
obj
->
size
);
__func__
,
args
->
handle
,
obj
,
obj
->
size
);
#endif
#endif
obj_priv
=
obj
->
driver_private
;
obj_priv
=
obj
->
driver_private
;
...
@@ -2423,7 +2423,7 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
...
@@ -2423,7 +2423,7 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, unsigned alignment)
}
}
#if WATCH_BUF
#if WATCH_BUF
DRM_INFO
(
"Binding object of size %d at 0x%08x
\n
"
,
DRM_INFO
(
"Binding object of size %
z
d at 0x%08x
\n
"
,
obj
->
size
,
obj_priv
->
gtt_offset
);
obj
->
size
,
obj_priv
->
gtt_offset
);
#endif
#endif
ret
=
i915_gem_object_get_pages
(
obj
);
ret
=
i915_gem_object_get_pages
(
obj
);
...
@@ -4227,6 +4227,7 @@ i915_gem_lastclose(struct drm_device *dev)
...
@@ -4227,6 +4227,7 @@ i915_gem_lastclose(struct drm_device *dev)
void
void
i915_gem_load
(
struct
drm_device
*
dev
)
i915_gem_load
(
struct
drm_device
*
dev
)
{
{
int
i
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
spin_lock_init
(
&
dev_priv
->
mm
.
active_list_lock
);
spin_lock_init
(
&
dev_priv
->
mm
.
active_list_lock
);
...
@@ -4246,6 +4247,18 @@ i915_gem_load(struct drm_device *dev)
...
@@ -4246,6 +4247,18 @@ i915_gem_load(struct drm_device *dev)
else
else
dev_priv
->
num_fence_regs
=
8
;
dev_priv
->
num_fence_regs
=
8
;
/* Initialize fence registers to zero */
if
(
IS_I965G
(
dev
))
{
for
(
i
=
0
;
i
<
16
;
i
++
)
I915_WRITE64
(
FENCE_REG_965_0
+
(
i
*
8
),
0
);
}
else
{
for
(
i
=
0
;
i
<
8
;
i
++
)
I915_WRITE
(
FENCE_REG_830_0
+
(
i
*
4
),
0
);
if
(
IS_I945G
(
dev
)
||
IS_I945GM
(
dev
)
||
IS_G33
(
dev
))
for
(
i
=
0
;
i
<
8
;
i
++
)
I915_WRITE
(
FENCE_REG_945_8
+
(
i
*
4
),
0
);
}
i915_gem_detect_bit_6_swizzle
(
dev
);
i915_gem_detect_bit_6_swizzle
(
dev
);
}
}
...
...
drivers/gpu/drm/i915/i915_gem_debug.c
View file @
5b6345be
...
@@ -87,7 +87,7 @@ i915_gem_dump_object(struct drm_gem_object *obj, int len,
...
@@ -87,7 +87,7 @@ i915_gem_dump_object(struct drm_gem_object *obj, int len,
chunk_len
=
page_len
-
chunk
;
chunk_len
=
page_len
-
chunk
;
if
(
chunk_len
>
128
)
if
(
chunk_len
>
128
)
chunk_len
=
128
;
chunk_len
=
128
;
i915_gem_dump_page
(
obj_priv
->
page
_list
[
page
],
i915_gem_dump_page
(
obj_priv
->
page
s
[
page
],
chunk
,
chunk
+
chunk_len
,
chunk
,
chunk
+
chunk_len
,
obj_priv
->
gtt_offset
+
obj_priv
->
gtt_offset
+
page
*
PAGE_SIZE
,
page
*
PAGE_SIZE
,
...
@@ -143,7 +143,7 @@ i915_gem_object_check_coherency(struct drm_gem_object *obj, int handle)
...
@@ -143,7 +143,7 @@ i915_gem_object_check_coherency(struct drm_gem_object *obj, int handle)
uint32_t
*
backing_map
=
NULL
;
uint32_t
*
backing_map
=
NULL
;
int
bad_count
=
0
;
int
bad_count
=
0
;
DRM_INFO
(
"%s: checking coherency of object %p@0x%08x (%d, %dkb):
\n
"
,
DRM_INFO
(
"%s: checking coherency of object %p@0x%08x (%d, %
z
dkb):
\n
"
,
__func__
,
obj
,
obj_priv
->
gtt_offset
,
handle
,
__func__
,
obj
,
obj_priv
->
gtt_offset
,
handle
,
obj
->
size
/
1024
);
obj
->
size
/
1024
);
...
@@ -157,7 +157,7 @@ i915_gem_object_check_coherency(struct drm_gem_object *obj, int handle)
...
@@ -157,7 +157,7 @@ i915_gem_object_check_coherency(struct drm_gem_object *obj, int handle)
for
(
page
=
0
;
page
<
obj
->
size
/
PAGE_SIZE
;
page
++
)
{
for
(
page
=
0
;
page
<
obj
->
size
/
PAGE_SIZE
;
page
++
)
{
int
i
;
int
i
;
backing_map
=
kmap_atomic
(
obj_priv
->
page
_list
[
page
],
KM_USER0
);
backing_map
=
kmap_atomic
(
obj_priv
->
page
s
[
page
],
KM_USER0
);
if
(
backing_map
==
NULL
)
{
if
(
backing_map
==
NULL
)
{
DRM_ERROR
(
"failed to map backing page
\n
"
);
DRM_ERROR
(
"failed to map backing page
\n
"
);
...
...
drivers/gpu/drm/i915/i915_gem_tiling.c
View file @
5b6345be
...
@@ -114,11 +114,13 @@ intel_alloc_mchbar_resource(struct drm_device *dev)
...
@@ -114,11 +114,13 @@ intel_alloc_mchbar_resource(struct drm_device *dev)
mchbar_addr
=
((
u64
)
temp_hi
<<
32
)
|
temp_lo
;
mchbar_addr
=
((
u64
)
temp_hi
<<
32
)
|
temp_lo
;
/* If ACPI doesn't have it, assume we need to allocate it ourselves */
/* If ACPI doesn't have it, assume we need to allocate it ourselves */
#ifdef CONFIG_PNP
if
(
mchbar_addr
&&
if
(
mchbar_addr
&&
pnp_range_reserved
(
mchbar_addr
,
mchbar_addr
+
MCHBAR_SIZE
))
{
pnp_range_reserved
(
mchbar_addr
,
mchbar_addr
+
MCHBAR_SIZE
))
{
ret
=
0
;
ret
=
0
;
goto
out_put
;
goto
out_put
;
}
}
#endif
/* Get some space for it */
/* Get some space for it */
ret
=
pci_bus_alloc_resource
(
bridge_dev
->
bus
,
&
dev_priv
->
mch_res
,
ret
=
pci_bus_alloc_resource
(
bridge_dev
->
bus
,
&
dev_priv
->
mch_res
,
...
...
drivers/gpu/drm/i915/i915_irq.c
View file @
5b6345be
...
@@ -232,7 +232,17 @@ static void i915_hotplug_work_func(struct work_struct *work)
...
@@ -232,7 +232,17 @@ static void i915_hotplug_work_func(struct work_struct *work)
drm_i915_private_t
*
dev_priv
=
container_of
(
work
,
drm_i915_private_t
,
drm_i915_private_t
*
dev_priv
=
container_of
(
work
,
drm_i915_private_t
,
hotplug_work
);
hotplug_work
);
struct
drm_device
*
dev
=
dev_priv
->
dev
;
struct
drm_device
*
dev
=
dev_priv
->
dev
;
struct
drm_mode_config
*
mode_config
=
&
dev
->
mode_config
;
struct
drm_connector
*
connector
;
if
(
mode_config
->
num_connector
)
{
list_for_each_entry
(
connector
,
&
mode_config
->
connector_list
,
head
)
{
struct
intel_output
*
intel_output
=
to_intel_output
(
connector
);
if
(
intel_output
->
hot_plug
)
(
*
intel_output
->
hot_plug
)
(
intel_output
);
}
}
/* Just fire off a uevent and let userspace tell us what to do */
/* Just fire off a uevent and let userspace tell us what to do */
drm_sysfs_hotplug_event
(
dev
);
drm_sysfs_hotplug_event
(
dev
);
}
}
...
...
drivers/gpu/drm/i915/i915_reg.h
View file @
5b6345be
...
@@ -569,6 +569,19 @@
...
@@ -569,6 +569,19 @@
#define C0DRB3 0x10206
#define C0DRB3 0x10206
#define C1DRB3 0x10606
#define C1DRB3 0x10606
/* Clocking configuration register */
#define CLKCFG 0x10c00
#define CLKCFG_FSB_400 (0 << 0)
/* hrawclk 100 */
#define CLKCFG_FSB_533 (1 << 0)
/* hrawclk 133 */
#define CLKCFG_FSB_667 (3 << 0)
/* hrawclk 166 */
#define CLKCFG_FSB_800 (2 << 0)
/* hrawclk 200 */
#define CLKCFG_FSB_1067 (6 << 0)
/* hrawclk 266 */
#define CLKCFG_FSB_1333 (7 << 0)
/* hrawclk 333 */
/* this is a guess, could be 5 as well */
#define CLKCFG_FSB_1600 (4 << 0)
/* hrawclk 400 */
#define CLKCFG_FSB_1600_ALT (5 << 0)
/* hrawclk 400 */
#define CLKCFG_FSB_MASK (7 << 0)
/** GM965 GM45 render standby register */
/** GM965 GM45 render standby register */
#define MCHBAR_RENDER_STANDBY 0x111B8
#define MCHBAR_RENDER_STANDBY 0x111B8
...
@@ -834,9 +847,25 @@
...
@@ -834,9 +847,25 @@
#define HORIZ_INTERP_MASK (3 << 6)
#define HORIZ_INTERP_MASK (3 << 6)
#define HORIZ_AUTO_SCALE (1 << 5)
#define HORIZ_AUTO_SCALE (1 << 5)
#define PANEL_8TO6_DITHER_ENABLE (1 << 3)
#define PANEL_8TO6_DITHER_ENABLE (1 << 3)
#define PFIT_FILTER_FUZZY (0 << 24)
#define PFIT_SCALING_AUTO (0 << 26)
#define PFIT_SCALING_PROGRAMMED (1 << 26)
#define PFIT_SCALING_PILLAR (2 << 26)
#define PFIT_SCALING_LETTER (3 << 26)
#define PFIT_PGM_RATIOS 0x61234
#define PFIT_PGM_RATIOS 0x61234
#define PFIT_VERT_SCALE_MASK 0xfff00000
#define PFIT_VERT_SCALE_MASK 0xfff00000
#define PFIT_HORIZ_SCALE_MASK 0x0000fff0
#define PFIT_HORIZ_SCALE_MASK 0x0000fff0
/* Pre-965 */
#define PFIT_VERT_SCALE_SHIFT 20
#define PFIT_VERT_SCALE_MASK 0xfff00000
#define PFIT_HORIZ_SCALE_SHIFT 4
#define PFIT_HORIZ_SCALE_MASK 0x0000fff0
/* 965+ */
#define PFIT_VERT_SCALE_SHIFT_965 16
#define PFIT_VERT_SCALE_MASK_965 0x1fff0000
#define PFIT_HORIZ_SCALE_SHIFT_965 0
#define PFIT_HORIZ_SCALE_MASK_965 0x00001fff
#define PFIT_AUTO_RATIOS 0x61238
#define PFIT_AUTO_RATIOS 0x61238
/* Backlight control */
/* Backlight control */
...
...
drivers/gpu/drm/i915/i915_suspend.c
View file @
5b6345be
...
@@ -322,6 +322,20 @@ int i915_save_state(struct drm_device *dev)
...
@@ -322,6 +322,20 @@ int i915_save_state(struct drm_device *dev)
dev_priv
->
savePP_OFF_DELAYS
=
I915_READ
(
PP_OFF_DELAYS
);
dev_priv
->
savePP_OFF_DELAYS
=
I915_READ
(
PP_OFF_DELAYS
);
dev_priv
->
savePP_DIVISOR
=
I915_READ
(
PP_DIVISOR
);
dev_priv
->
savePP_DIVISOR
=
I915_READ
(
PP_DIVISOR
);
/* Display Port state */
if
(
SUPPORTS_INTEGRATED_DP
(
dev
))
{
dev_priv
->
saveDP_B
=
I915_READ
(
DP_B
);
dev_priv
->
saveDP_C
=
I915_READ
(
DP_C
);
dev_priv
->
saveDP_D
=
I915_READ
(
DP_D
);
dev_priv
->
savePIPEA_GMCH_DATA_M
=
I915_READ
(
PIPEA_GMCH_DATA_M
);
dev_priv
->
savePIPEB_GMCH_DATA_M
=
I915_READ
(
PIPEB_GMCH_DATA_M
);
dev_priv
->
savePIPEA_GMCH_DATA_N
=
I915_READ
(
PIPEA_GMCH_DATA_N
);
dev_priv
->
savePIPEB_GMCH_DATA_N
=
I915_READ
(
PIPEB_GMCH_DATA_N
);
dev_priv
->
savePIPEA_DP_LINK_M
=
I915_READ
(
PIPEA_DP_LINK_M
);
dev_priv
->
savePIPEB_DP_LINK_M
=
I915_READ
(
PIPEB_DP_LINK_M
);
dev_priv
->
savePIPEA_DP_LINK_N
=
I915_READ
(
PIPEA_DP_LINK_N
);
dev_priv
->
savePIPEB_DP_LINK_N
=
I915_READ
(
PIPEB_DP_LINK_N
);
}
/* FIXME: save TV & SDVO state */
/* FIXME: save TV & SDVO state */
/* FBC state */
/* FBC state */
...
@@ -404,7 +418,19 @@ int i915_restore_state(struct drm_device *dev)
...
@@ -404,7 +418,19 @@ int i915_restore_state(struct drm_device *dev)
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
I915_WRITE
(
FENCE_REG_945_8
+
(
i
*
4
),
dev_priv
->
saveFENCE
[
i
+
8
]);
I915_WRITE
(
FENCE_REG_945_8
+
(
i
*
4
),
dev_priv
->
saveFENCE
[
i
+
8
]);
}
}
/* Display port ratios (must be done before clock is set) */
if
(
SUPPORTS_INTEGRATED_DP
(
dev
))
{
I915_WRITE
(
PIPEA_GMCH_DATA_M
,
dev_priv
->
savePIPEA_GMCH_DATA_M
);
I915_WRITE
(
PIPEB_GMCH_DATA_M
,
dev_priv
->
savePIPEB_GMCH_DATA_M
);
I915_WRITE
(
PIPEA_GMCH_DATA_N
,
dev_priv
->
savePIPEA_GMCH_DATA_N
);
I915_WRITE
(
PIPEB_GMCH_DATA_N
,
dev_priv
->
savePIPEB_GMCH_DATA_N
);
I915_WRITE
(
PIPEA_DP_LINK_M
,
dev_priv
->
savePIPEA_DP_LINK_M
);
I915_WRITE
(
PIPEB_DP_LINK_M
,
dev_priv
->
savePIPEB_DP_LINK_M
);
I915_WRITE
(
PIPEA_DP_LINK_N
,
dev_priv
->
savePIPEA_DP_LINK_N
);
I915_WRITE
(
PIPEB_DP_LINK_N
,
dev_priv
->
savePIPEB_DP_LINK_N
);
}
/* Pipe & plane A info */
/* Pipe & plane A info */
/* Prime the clock */
/* Prime the clock */
if
(
dev_priv
->
saveDPLL_A
&
DPLL_VCO_ENABLE
)
{
if
(
dev_priv
->
saveDPLL_A
&
DPLL_VCO_ENABLE
)
{
...
@@ -518,6 +544,12 @@ int i915_restore_state(struct drm_device *dev)
...
@@ -518,6 +544,12 @@ int i915_restore_state(struct drm_device *dev)
I915_WRITE
(
PP_DIVISOR
,
dev_priv
->
savePP_DIVISOR
);
I915_WRITE
(
PP_DIVISOR
,
dev_priv
->
savePP_DIVISOR
);
I915_WRITE
(
PP_CONTROL
,
dev_priv
->
savePP_CONTROL
);
I915_WRITE
(
PP_CONTROL
,
dev_priv
->
savePP_CONTROL
);
/* Display Port state */
if
(
SUPPORTS_INTEGRATED_DP
(
dev
))
{
I915_WRITE
(
DP_B
,
dev_priv
->
saveDP_B
);
I915_WRITE
(
DP_C
,
dev_priv
->
saveDP_C
);
I915_WRITE
(
DP_D
,
dev_priv
->
saveDP_D
);
}
/* FIXME: restore TV & SDVO state */
/* FIXME: restore TV & SDVO state */
/* FBC info */
/* FBC info */
...
...
drivers/gpu/drm/i915/intel_bios.c
View file @
5b6345be
...
@@ -99,9 +99,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
...
@@ -99,9 +99,11 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
{
{
struct
bdb_lvds_options
*
lvds_options
;
struct
bdb_lvds_options
*
lvds_options
;
struct
bdb_lvds_lfp_data
*
lvds_lfp_data
;
struct
bdb_lvds_lfp_data
*
lvds_lfp_data
;
struct
bdb_lvds_lfp_data_ptrs
*
lvds_lfp_data_ptrs
;
struct
bdb_lvds_lfp_data_entry
*
entry
;
struct
bdb_lvds_lfp_data_entry
*
entry
;
struct
lvds_dvo_timing
*
dvo_timing
;
struct
lvds_dvo_timing
*
dvo_timing
;
struct
drm_display_mode
*
panel_fixed_mode
;
struct
drm_display_mode
*
panel_fixed_mode
;
int
lfp_data_size
;
/* Defaults if we can't find VBT info */
/* Defaults if we can't find VBT info */
dev_priv
->
lvds_dither
=
0
;
dev_priv
->
lvds_dither
=
0
;
...
@@ -119,9 +121,17 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
...
@@ -119,9 +121,17 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
if
(
!
lvds_lfp_data
)
if
(
!
lvds_lfp_data
)
return
;
return
;
lvds_lfp_data_ptrs
=
find_section
(
bdb
,
BDB_LVDS_LFP_DATA_PTRS
);
if
(
!
lvds_lfp_data_ptrs
)
return
;
dev_priv
->
lvds_vbt
=
1
;
dev_priv
->
lvds_vbt
=
1
;
entry
=
&
lvds_lfp_data
->
data
[
lvds_options
->
panel_type
];
lfp_data_size
=
lvds_lfp_data_ptrs
->
ptr
[
1
].
dvo_timing_offset
-
lvds_lfp_data_ptrs
->
ptr
[
0
].
dvo_timing_offset
;
entry
=
(
struct
bdb_lvds_lfp_data_entry
*
)
((
uint8_t
*
)
lvds_lfp_data
->
data
+
(
lfp_data_size
*
lvds_options
->
panel_type
));
dvo_timing
=
&
entry
->
dvo_timing
;
dvo_timing
=
&
entry
->
dvo_timing
;
panel_fixed_mode
=
kzalloc
(
sizeof
(
*
panel_fixed_mode
),
GFP_KERNEL
);
panel_fixed_mode
=
kzalloc
(
sizeof
(
*
panel_fixed_mode
),
GFP_KERNEL
);
...
...
drivers/gpu/drm/i915/intel_display.c
View file @
5b6345be
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/i915/intel_dp.c
0 → 100644
View file @
5b6345be
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/i915/intel_dp.h
0 → 100644
View file @
5b6345be
/*
* Copyright © 2008 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting documentation, and
* that the name of the copyright holders not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no representations
* about the suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#ifndef _INTEL_DP_H_
#define _INTEL_DP_H_
/* From the VESA DisplayPort spec */
#define AUX_NATIVE_WRITE 0x8
#define AUX_NATIVE_READ 0x9
#define AUX_I2C_WRITE 0x0
#define AUX_I2C_READ 0x1
#define AUX_I2C_STATUS 0x2
#define AUX_I2C_MOT 0x4
#define AUX_NATIVE_REPLY_ACK (0x0 << 4)
#define AUX_NATIVE_REPLY_NACK (0x1 << 4)
#define AUX_NATIVE_REPLY_DEFER (0x2 << 4)
#define AUX_NATIVE_REPLY_MASK (0x3 << 4)
#define AUX_I2C_REPLY_ACK (0x0 << 6)
#define AUX_I2C_REPLY_NACK (0x1 << 6)
#define AUX_I2C_REPLY_DEFER (0x2 << 6)
#define AUX_I2C_REPLY_MASK (0x3 << 6)
/* AUX CH addresses */
#define DP_LINK_BW_SET 0x100
# define DP_LINK_BW_1_62 0x06
# define DP_LINK_BW_2_7 0x0a
#define DP_LANE_COUNT_SET 0x101
# define DP_LANE_COUNT_MASK 0x0f
# define DP_LANE_COUNT_ENHANCED_FRAME_EN (1 << 7)
#define DP_TRAINING_PATTERN_SET 0x102
# define DP_TRAINING_PATTERN_DISABLE 0
# define DP_TRAINING_PATTERN_1 1
# define DP_TRAINING_PATTERN_2 2
# define DP_TRAINING_PATTERN_MASK 0x3
# define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2)
# define DP_LINK_QUAL_PATTERN_D10_2 (1 << 2)
# define DP_LINK_QUAL_PATTERN_ERROR_RATE (2 << 2)
# define DP_LINK_QUAL_PATTERN_PRBS7 (3 << 2)
# define DP_LINK_QUAL_PATTERN_MASK (3 << 2)
# define DP_RECOVERED_CLOCK_OUT_EN (1 << 4)
# define DP_LINK_SCRAMBLING_DISABLE (1 << 5)
# define DP_SYMBOL_ERROR_COUNT_BOTH (0 << 6)
# define DP_SYMBOL_ERROR_COUNT_DISPARITY (1 << 6)
# define DP_SYMBOL_ERROR_COUNT_SYMBOL (2 << 6)
# define DP_SYMBOL_ERROR_COUNT_MASK (3 << 6)
#define DP_TRAINING_LANE0_SET 0x103
#define DP_TRAINING_LANE1_SET 0x104
#define DP_TRAINING_LANE2_SET 0x105
#define DP_TRAINING_LANE3_SET 0x106
# define DP_TRAIN_VOLTAGE_SWING_MASK 0x3
# define DP_TRAIN_VOLTAGE_SWING_SHIFT 0
# define DP_TRAIN_MAX_SWING_REACHED (1 << 2)
# define DP_TRAIN_VOLTAGE_SWING_400 (0 << 0)
# define DP_TRAIN_VOLTAGE_SWING_600 (1 << 0)
# define DP_TRAIN_VOLTAGE_SWING_800 (2 << 0)
# define DP_TRAIN_VOLTAGE_SWING_1200 (3 << 0)
# define DP_TRAIN_PRE_EMPHASIS_MASK (3 << 3)
# define DP_TRAIN_PRE_EMPHASIS_0 (0 << 3)
# define DP_TRAIN_PRE_EMPHASIS_3_5 (1 << 3)
# define DP_TRAIN_PRE_EMPHASIS_6 (2 << 3)
# define DP_TRAIN_PRE_EMPHASIS_9_5 (3 << 3)
# define DP_TRAIN_PRE_EMPHASIS_SHIFT 3
# define DP_TRAIN_MAX_PRE_EMPHASIS_REACHED (1 << 5)
#define DP_DOWNSPREAD_CTRL 0x107
# define DP_SPREAD_AMP_0_5 (1 << 4)
#define DP_MAIN_LINK_CHANNEL_CODING_SET 0x108
# define DP_SET_ANSI_8B10B (1 << 0)
#define DP_LANE0_1_STATUS 0x202
#define DP_LANE2_3_STATUS 0x203
# define DP_LANE_CR_DONE (1 << 0)
# define DP_LANE_CHANNEL_EQ_DONE (1 << 1)
# define DP_LANE_SYMBOL_LOCKED (1 << 2)
#define DP_LANE_ALIGN_STATUS_UPDATED 0x204
#define DP_INTERLANE_ALIGN_DONE (1 << 0)
#define DP_DOWNSTREAM_PORT_STATUS_CHANGED (1 << 6)
#define DP_LINK_STATUS_UPDATED (1 << 7)
#define DP_SINK_STATUS 0x205
#define DP_RECEIVE_PORT_0_STATUS (1 << 0)
#define DP_RECEIVE_PORT_1_STATUS (1 << 1)
#define DP_ADJUST_REQUEST_LANE0_1 0x206
#define DP_ADJUST_REQUEST_LANE2_3 0x207
#define DP_ADJUST_VOLTAGE_SWING_LANE0_MASK 0x03
#define DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT 0
#define DP_ADJUST_PRE_EMPHASIS_LANE0_MASK 0x0c
#define DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT 2
#define DP_ADJUST_VOLTAGE_SWING_LANE1_MASK 0x30
#define DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT 4
#define DP_ADJUST_PRE_EMPHASIS_LANE1_MASK 0xc0
#define DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT 6
struct
i2c_algo_dp_aux_data
{
bool
running
;
u16
address
;
int
(
*
aux_ch
)
(
struct
i2c_adapter
*
adapter
,
uint8_t
*
send
,
int
send_bytes
,
uint8_t
*
recv
,
int
recv_bytes
);
};
int
i2c_dp_aux_add_bus
(
struct
i2c_adapter
*
adapter
);
#endif
/* _INTEL_DP_H_ */
drivers/gpu/drm/i915/intel_dp_i2c.c
0 → 100644
View file @
5b6345be
/*
* Copyright © 2009 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting documentation, and
* that the name of the copyright holders not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no representations
* about the suitability of this software for any purpose. It is provided "as
* is" without express or implied warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/i2c.h>
#include "intel_dp.h"
/* Run a single AUX_CH I2C transaction, writing/reading data as necessary */
#define MODE_I2C_START 1
#define MODE_I2C_WRITE 2
#define MODE_I2C_READ 4
#define MODE_I2C_STOP 8
static
int
i2c_algo_dp_aux_transaction
(
struct
i2c_adapter
*
adapter
,
int
mode
,
uint8_t
write_byte
,
uint8_t
*
read_byte
)
{
struct
i2c_algo_dp_aux_data
*
algo_data
=
adapter
->
algo_data
;
uint16_t
address
=
algo_data
->
address
;
uint8_t
msg
[
5
];
uint8_t
reply
[
2
];
int
msg_bytes
;
int
reply_bytes
;
int
ret
;
/* Set up the command byte */
if
(
mode
&
MODE_I2C_READ
)
msg
[
0
]
=
AUX_I2C_READ
<<
4
;
else
msg
[
0
]
=
AUX_I2C_WRITE
<<
4
;
if
(
!
(
mode
&
MODE_I2C_STOP
))
msg
[
0
]
|=
AUX_I2C_MOT
<<
4
;
msg
[
1
]
=
address
>>
8
;
msg
[
2
]
=
address
;
switch
(
mode
)
{
case
MODE_I2C_WRITE
:
msg
[
3
]
=
0
;
msg
[
4
]
=
write_byte
;
msg_bytes
=
5
;
reply_bytes
=
1
;
break
;
case
MODE_I2C_READ
:
msg
[
3
]
=
0
;
msg_bytes
=
4
;
reply_bytes
=
2
;
break
;
default:
msg_bytes
=
3
;
reply_bytes
=
1
;
break
;
}
for
(;;)
{
ret
=
(
*
algo_data
->
aux_ch
)(
adapter
,
msg
,
msg_bytes
,
reply
,
reply_bytes
);
if
(
ret
<
0
)
{
printk
(
KERN_ERR
"aux_ch failed %d
\n
"
,
ret
);
return
ret
;
}
switch
(
reply
[
0
]
&
AUX_I2C_REPLY_MASK
)
{
case
AUX_I2C_REPLY_ACK
:
if
(
mode
==
MODE_I2C_READ
)
{
*
read_byte
=
reply
[
1
];
}
return
reply_bytes
-
1
;
case
AUX_I2C_REPLY_NACK
:
printk
(
KERN_ERR
"aux_ch nack
\n
"
);
return
-
EREMOTEIO
;
case
AUX_I2C_REPLY_DEFER
:
printk
(
KERN_ERR
"aux_ch defer
\n
"
);
udelay
(
100
);
break
;
default:
printk
(
KERN_ERR
"aux_ch invalid reply 0x%02x
\n
"
,
reply
[
0
]);
return
-
EREMOTEIO
;
}
}
}
/*
* I2C over AUX CH
*/
/*
* Send the address. If the I2C link is running, this 'restarts'
* the connection with the new address, this is used for doing
* a write followed by a read (as needed for DDC)
*/
static
int
i2c_algo_dp_aux_address
(
struct
i2c_adapter
*
adapter
,
u16
address
,
bool
reading
)
{
struct
i2c_algo_dp_aux_data
*
algo_data
=
adapter
->
algo_data
;
int
mode
=
MODE_I2C_START
;
int
ret
;
if
(
reading
)
mode
|=
MODE_I2C_READ
;
else
mode
|=
MODE_I2C_WRITE
;
algo_data
->
address
=
address
;
algo_data
->
running
=
true
;
ret
=
i2c_algo_dp_aux_transaction
(
adapter
,
mode
,
0
,
NULL
);
return
ret
;
}
/*
* Stop the I2C transaction. This closes out the link, sending
* a bare address packet with the MOT bit turned off
*/
static
void
i2c_algo_dp_aux_stop
(
struct
i2c_adapter
*
adapter
,
bool
reading
)
{
struct
i2c_algo_dp_aux_data
*
algo_data
=
adapter
->
algo_data
;
int
mode
=
MODE_I2C_STOP
;
if
(
reading
)
mode
|=
MODE_I2C_READ
;
else
mode
|=
MODE_I2C_WRITE
;
if
(
algo_data
->
running
)
{
(
void
)
i2c_algo_dp_aux_transaction
(
adapter
,
mode
,
0
,
NULL
);
algo_data
->
running
=
false
;
}
}
/*
* Write a single byte to the current I2C address, the
* the I2C link must be running or this returns -EIO
*/
static
int
i2c_algo_dp_aux_put_byte
(
struct
i2c_adapter
*
adapter
,
u8
byte
)
{
struct
i2c_algo_dp_aux_data
*
algo_data
=
adapter
->
algo_data
;
int
ret
;
if
(
!
algo_data
->
running
)
return
-
EIO
;
ret
=
i2c_algo_dp_aux_transaction
(
adapter
,
MODE_I2C_WRITE
,
byte
,
NULL
);
return
ret
;
}
/*
* Read a single byte from the current I2C address, the
* I2C link must be running or this returns -EIO
*/
static
int
i2c_algo_dp_aux_get_byte
(
struct
i2c_adapter
*
adapter
,
u8
*
byte_ret
)
{
struct
i2c_algo_dp_aux_data
*
algo_data
=
adapter
->
algo_data
;
int
ret
;
if
(
!
algo_data
->
running
)
return
-
EIO
;
ret
=
i2c_algo_dp_aux_transaction
(
adapter
,
MODE_I2C_READ
,
0
,
byte_ret
);
return
ret
;
}
static
int
i2c_algo_dp_aux_xfer
(
struct
i2c_adapter
*
adapter
,
struct
i2c_msg
*
msgs
,
int
num
)
{
int
ret
=
0
;
bool
reading
=
false
;
int
m
;
int
b
;
for
(
m
=
0
;
m
<
num
;
m
++
)
{
u16
len
=
msgs
[
m
].
len
;
u8
*
buf
=
msgs
[
m
].
buf
;
reading
=
(
msgs
[
m
].
flags
&
I2C_M_RD
)
!=
0
;
ret
=
i2c_algo_dp_aux_address
(
adapter
,
msgs
[
m
].
addr
,
reading
);
if
(
ret
<
0
)
break
;
if
(
reading
)
{
for
(
b
=
0
;
b
<
len
;
b
++
)
{
ret
=
i2c_algo_dp_aux_get_byte
(
adapter
,
&
buf
[
b
]);
if
(
ret
<
0
)
break
;
}
}
else
{
for
(
b
=
0
;
b
<
len
;
b
++
)
{
ret
=
i2c_algo_dp_aux_put_byte
(
adapter
,
buf
[
b
]);
if
(
ret
<
0
)
break
;
}
}
if
(
ret
<
0
)
break
;
}
if
(
ret
>=
0
)
ret
=
num
;
i2c_algo_dp_aux_stop
(
adapter
,
reading
);
printk
(
KERN_ERR
"dp_aux_xfer return %d
\n
"
,
ret
);
return
ret
;
}
static
u32
i2c_algo_dp_aux_functionality
(
struct
i2c_adapter
*
adapter
)
{
return
I2C_FUNC_I2C
|
I2C_FUNC_SMBUS_EMUL
|
I2C_FUNC_SMBUS_READ_BLOCK_DATA
|
I2C_FUNC_SMBUS_BLOCK_PROC_CALL
|
I2C_FUNC_10BIT_ADDR
;
}
static
const
struct
i2c_algorithm
i2c_dp_aux_algo
=
{
.
master_xfer
=
i2c_algo_dp_aux_xfer
,
.
functionality
=
i2c_algo_dp_aux_functionality
,
};
static
void
i2c_dp_aux_reset_bus
(
struct
i2c_adapter
*
adapter
)
{
(
void
)
i2c_algo_dp_aux_address
(
adapter
,
0
,
false
);
(
void
)
i2c_algo_dp_aux_stop
(
adapter
,
false
);
}
static
int
i2c_dp_aux_prepare_bus
(
struct
i2c_adapter
*
adapter
)
{
adapter
->
algo
=
&
i2c_dp_aux_algo
;
adapter
->
retries
=
3
;
i2c_dp_aux_reset_bus
(
adapter
);
return
0
;
}
int
i2c_dp_aux_add_bus
(
struct
i2c_adapter
*
adapter
)
{
int
error
;
error
=
i2c_dp_aux_prepare_bus
(
adapter
);
if
(
error
)
return
error
;
error
=
i2c_add_adapter
(
adapter
);
return
error
;
}
EXPORT_SYMBOL
(
i2c_dp_aux_add_bus
);
drivers/gpu/drm/i915/intel_drv.h
View file @
5b6345be
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
#define INTEL_OUTPUT_LVDS 4
#define INTEL_OUTPUT_LVDS 4
#define INTEL_OUTPUT_TVOUT 5
#define INTEL_OUTPUT_TVOUT 5
#define INTEL_OUTPUT_HDMI 6
#define INTEL_OUTPUT_HDMI 6
#define INTEL_OUTPUT_DISPLAYPORT 7
#define INTEL_DVO_CHIP_NONE 0
#define INTEL_DVO_CHIP_NONE 0
#define INTEL_DVO_CHIP_LVDS 1
#define INTEL_DVO_CHIP_LVDS 1
...
@@ -65,7 +66,6 @@ struct intel_i2c_chan {
...
@@ -65,7 +66,6 @@ struct intel_i2c_chan {
u32
reg
;
/* GPIO reg */
u32
reg
;
/* GPIO reg */
struct
i2c_adapter
adapter
;
struct
i2c_adapter
adapter
;
struct
i2c_algo_bit_data
algo
;
struct
i2c_algo_bit_data
algo
;
u8
slave_addr
;
};
};
struct
intel_framebuffer
{
struct
intel_framebuffer
{
...
@@ -79,11 +79,12 @@ struct intel_output {
...
@@ -79,11 +79,12 @@ struct intel_output {
struct
drm_encoder
enc
;
struct
drm_encoder
enc
;
int
type
;
int
type
;
struct
i
ntel_i2c_chan
*
i2c_bus
;
/* for control functions */
struct
i
2c_adapter
*
i2c_bus
;
struct
i
ntel_i2c_chan
*
ddc_bus
;
/* for DDC only stuff */
struct
i
2c_adapter
*
ddc_bus
;
bool
load_detect_temp
;
bool
load_detect_temp
;
bool
needs_tv_clock
;
bool
needs_tv_clock
;
void
*
dev_priv
;
void
*
dev_priv
;
void
(
*
hot_plug
)(
struct
intel_output
*
);
};
};
struct
intel_crtc
{
struct
intel_crtc
{
...
@@ -104,9 +105,9 @@ struct intel_crtc {
...
@@ -104,9 +105,9 @@ struct intel_crtc {
#define enc_to_intel_output(x) container_of(x, struct intel_output, enc)
#define enc_to_intel_output(x) container_of(x, struct intel_output, enc)
#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
struct
i
ntel_i2c_chan
*
intel_i2c_create
(
struct
drm_device
*
dev
,
const
u32
reg
,
struct
i
2c_adapter
*
intel_i2c_create
(
struct
drm_device
*
dev
,
const
u32
reg
,
const
char
*
name
);
const
char
*
name
);
void
intel_i2c_destroy
(
struct
i
ntel_i2c_chan
*
chan
);
void
intel_i2c_destroy
(
struct
i
2c_adapter
*
adapter
);
int
intel_ddc_get_modes
(
struct
intel_output
*
intel_output
);
int
intel_ddc_get_modes
(
struct
intel_output
*
intel_output
);
extern
bool
intel_ddc_probe
(
struct
intel_output
*
intel_output
);
extern
bool
intel_ddc_probe
(
struct
intel_output
*
intel_output
);
void
intel_i2c_quirk_set
(
struct
drm_device
*
dev
,
bool
enable
);
void
intel_i2c_quirk_set
(
struct
drm_device
*
dev
,
bool
enable
);
...
@@ -116,6 +117,10 @@ extern bool intel_sdvo_init(struct drm_device *dev, int output_device);
...
@@ -116,6 +117,10 @@ extern bool intel_sdvo_init(struct drm_device *dev, int output_device);
extern
void
intel_dvo_init
(
struct
drm_device
*
dev
);
extern
void
intel_dvo_init
(
struct
drm_device
*
dev
);
extern
void
intel_tv_init
(
struct
drm_device
*
dev
);
extern
void
intel_tv_init
(
struct
drm_device
*
dev
);
extern
void
intel_lvds_init
(
struct
drm_device
*
dev
);
extern
void
intel_lvds_init
(
struct
drm_device
*
dev
);
extern
void
intel_dp_init
(
struct
drm_device
*
dev
,
int
dp_reg
);
void
intel_dp_set_m_n
(
struct
drm_crtc
*
crtc
,
struct
drm_display_mode
*
mode
,
struct
drm_display_mode
*
adjusted_mode
);
extern
void
intel_crtc_load_lut
(
struct
drm_crtc
*
crtc
);
extern
void
intel_crtc_load_lut
(
struct
drm_crtc
*
crtc
);
extern
void
intel_encoder_prepare
(
struct
drm_encoder
*
encoder
);
extern
void
intel_encoder_prepare
(
struct
drm_encoder
*
encoder
);
...
...
drivers/gpu/drm/i915/intel_dvo.c
View file @
5b6345be
...
@@ -384,10 +384,9 @@ void intel_dvo_init(struct drm_device *dev)
...
@@ -384,10 +384,9 @@ void intel_dvo_init(struct drm_device *dev)
{
{
struct
intel_output
*
intel_output
;
struct
intel_output
*
intel_output
;
struct
intel_dvo_device
*
dvo
;
struct
intel_dvo_device
*
dvo
;
struct
i
ntel_i2c_chan
*
i2cbus
=
NULL
;
struct
i
2c_adapter
*
i2cbus
=
NULL
;
int
ret
=
0
;
int
ret
=
0
;
int
i
;
int
i
;
int
gpio_inited
=
0
;
int
encoder_type
=
DRM_MODE_ENCODER_NONE
;
int
encoder_type
=
DRM_MODE_ENCODER_NONE
;
intel_output
=
kzalloc
(
sizeof
(
struct
intel_output
),
GFP_KERNEL
);
intel_output
=
kzalloc
(
sizeof
(
struct
intel_output
),
GFP_KERNEL
);
if
(
!
intel_output
)
if
(
!
intel_output
)
...
@@ -420,14 +419,11 @@ void intel_dvo_init(struct drm_device *dev)
...
@@ -420,14 +419,11 @@ void intel_dvo_init(struct drm_device *dev)
* It appears that everything is on GPIOE except for panels
* It appears that everything is on GPIOE except for panels
* on i830 laptops, which are on GPIOB (DVOA).
* on i830 laptops, which are on GPIOB (DVOA).
*/
*/
if
(
gpio_inited
!=
gpio
)
{
if
(
i2cbus
!=
NULL
)
if
(
i2cbus
!=
NULL
)
intel_i2c_destroy
(
i2cbus
);
intel_i2c_destroy
(
i2cbus
);
if
(
!
(
i2cbus
=
intel_i2c_create
(
dev
,
gpio
,
if
(
!
(
i2cbus
=
intel_i2c_create
(
dev
,
gpio
,
gpio
==
GPIOB
?
"DVOI2C_B"
:
"DVOI2C_E"
)))
{
gpio
==
GPIOB
?
"DVOI2C_B"
:
"DVOI2C_E"
)))
{
continue
;
continue
;
}
gpio_inited
=
gpio
;
}
}
if
(
dvo
->
dev_ops
!=
NULL
)
if
(
dvo
->
dev_ops
!=
NULL
)
...
...
drivers/gpu/drm/i915/intel_hdmi.c
View file @
5b6345be
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "drmP.h"
#include "drmP.h"
#include "drm.h"
#include "drm.h"
#include "drm_crtc.h"
#include "drm_crtc.h"
#include "drm_edid.h"
#include "intel_drv.h"
#include "intel_drv.h"
#include "i915_drm.h"
#include "i915_drm.h"
#include "i915_drv.h"
#include "i915_drv.h"
...
@@ -56,8 +57,7 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
...
@@ -56,8 +57,7 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
sdvox
=
SDVO_ENCODING_HDMI
|
sdvox
=
SDVO_ENCODING_HDMI
|
SDVO_BORDER_ENABLE
|
SDVO_BORDER_ENABLE
|
SDVO_VSYNC_ACTIVE_HIGH
|
SDVO_VSYNC_ACTIVE_HIGH
|
SDVO_HSYNC_ACTIVE_HIGH
|
SDVO_HSYNC_ACTIVE_HIGH
;
SDVO_NULL_PACKETS_DURING_VSYNC
;
if
(
hdmi_priv
->
has_hdmi_sink
)
if
(
hdmi_priv
->
has_hdmi_sink
)
sdvox
|=
SDVO_AUDIO_ENABLE
;
sdvox
|=
SDVO_AUDIO_ENABLE
;
...
@@ -129,20 +129,26 @@ static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
...
@@ -129,20 +129,26 @@ static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
return
true
;
return
true
;
}
}
static
void
static
enum
drm_connector_status
intel_hdmi_
sink
_detect
(
struct
drm_connector
*
connector
)
intel_hdmi_
edid
_detect
(
struct
drm_connector
*
connector
)
{
{
struct
intel_output
*
intel_output
=
to_intel_output
(
connector
);
struct
intel_output
*
intel_output
=
to_intel_output
(
connector
);
struct
intel_hdmi_priv
*
hdmi_priv
=
intel_output
->
dev_priv
;
struct
intel_hdmi_priv
*
hdmi_priv
=
intel_output
->
dev_priv
;
struct
edid
*
edid
=
NULL
;
struct
edid
*
edid
=
NULL
;
enum
drm_connector_status
status
=
connector_status_disconnected
;
edid
=
drm_get_edid
(
&
intel_output
->
base
,
edid
=
drm_get_edid
(
&
intel_output
->
base
,
&
intel_output
->
ddc_bus
->
adapter
);
intel_output
->
ddc_bus
);
if
(
edid
!=
NULL
)
{
hdmi_priv
->
has_hdmi_sink
=
false
;
hdmi_priv
->
has_hdmi_sink
=
drm_detect_hdmi_monitor
(
edid
);
if
(
edid
)
{
kfree
(
edid
);
if
(
edid
->
input
&
DRM_EDID_INPUT_DIGITAL
)
{
status
=
connector_status_connected
;
hdmi_priv
->
has_hdmi_sink
=
drm_detect_hdmi_monitor
(
edid
);
}
intel_output
->
base
.
display_info
.
raw_edid
=
NULL
;
intel_output
->
base
.
display_info
.
raw_edid
=
NULL
;
kfree
(
edid
);
}
}
return
status
;
}
}
static
enum
drm_connector_status
static
enum
drm_connector_status
...
@@ -154,11 +160,7 @@ igdng_hdmi_detect(struct drm_connector *connector)
...
@@ -154,11 +160,7 @@ igdng_hdmi_detect(struct drm_connector *connector)
/* FIXME hotplug detect */
/* FIXME hotplug detect */
hdmi_priv
->
has_hdmi_sink
=
false
;
hdmi_priv
->
has_hdmi_sink
=
false
;
intel_hdmi_sink_detect
(
connector
);
return
intel_hdmi_edid_detect
(
connector
);
if
(
hdmi_priv
->
has_hdmi_sink
)
return
connector_status_connected
;
else
return
connector_status_disconnected
;
}
}
static
enum
drm_connector_status
static
enum
drm_connector_status
...
@@ -201,10 +203,9 @@ intel_hdmi_detect(struct drm_connector *connector)
...
@@ -201,10 +203,9 @@ intel_hdmi_detect(struct drm_connector *connector)
return
connector_status_unknown
;
return
connector_status_unknown
;
}
}
if
((
I915_READ
(
PORT_HOTPLUG_STAT
)
&
bit
)
!=
0
)
{
if
((
I915_READ
(
PORT_HOTPLUG_STAT
)
&
bit
)
!=
0
)
intel_hdmi_sink_detect
(
connector
);
return
intel_hdmi_edid_detect
(
connector
);
return
connector_status_connected
;
else
}
else
return
connector_status_disconnected
;
return
connector_status_disconnected
;
}
}
...
...
drivers/gpu/drm/i915/intel_i2c.c
View file @
5b6345be
...
@@ -124,6 +124,7 @@ static void set_data(void *data, int state_high)
...
@@ -124,6 +124,7 @@ static void set_data(void *data, int state_high)
* @output: driver specific output device
* @output: driver specific output device
* @reg: GPIO reg to use
* @reg: GPIO reg to use
* @name: name for this bus
* @name: name for this bus
* @slave_addr: slave address (if fixed)
*
*
* Creates and registers a new i2c bus with the Linux i2c layer, for use
* Creates and registers a new i2c bus with the Linux i2c layer, for use
* in output probing and control (e.g. DDC or SDVO control functions).
* in output probing and control (e.g. DDC or SDVO control functions).
...
@@ -139,8 +140,8 @@ static void set_data(void *data, int state_high)
...
@@ -139,8 +140,8 @@ static void set_data(void *data, int state_high)
* %GPIOH
* %GPIOH
* see PRM for details on how these different busses are used.
* see PRM for details on how these different busses are used.
*/
*/
struct
i
ntel_i2c_chan
*
intel_i2c_create
(
struct
drm_device
*
dev
,
const
u32
reg
,
struct
i
2c_adapter
*
intel_i2c_create
(
struct
drm_device
*
dev
,
const
u32
reg
,
const
char
*
name
)
const
char
*
name
)
{
{
struct
intel_i2c_chan
*
chan
;
struct
intel_i2c_chan
*
chan
;
...
@@ -174,7 +175,7 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
...
@@ -174,7 +175,7 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
intel_i2c_quirk_set
(
dev
,
false
);
intel_i2c_quirk_set
(
dev
,
false
);
udelay
(
20
);
udelay
(
20
);
return
chan
;
return
&
chan
->
adapter
;
out_free:
out_free:
kfree
(
chan
);
kfree
(
chan
);
...
@@ -187,11 +188,16 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
...
@@ -187,11 +188,16 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
*
*
* Unregister the adapter from the i2c layer, then free the structure.
* Unregister the adapter from the i2c layer, then free the structure.
*/
*/
void
intel_i2c_destroy
(
struct
i
ntel_i2c_chan
*
chan
)
void
intel_i2c_destroy
(
struct
i
2c_adapter
*
adapter
)
{
{
if
(
!
chan
)
struct
intel_i2c_chan
*
chan
;
if
(
!
adapter
)
return
;
return
;
chan
=
container_of
(
adapter
,
struct
intel_i2c_chan
,
adapter
);
i2c_del_adapter
(
&
chan
->
adapter
);
i2c_del_adapter
(
&
chan
->
adapter
);
kfree
(
chan
);
kfree
(
chan
);
}
}
drivers/gpu/drm/i915/intel_lvds.c
View file @
5b6345be
This diff is collapsed.
Click to expand it.
drivers/gpu/drm/i915/intel_modes.c
View file @
5b6345be
...
@@ -53,10 +53,9 @@ bool intel_ddc_probe(struct intel_output *intel_output)
...
@@ -53,10 +53,9 @@ bool intel_ddc_probe(struct intel_output *intel_output)
}
}
};
};
intel_i2c_quirk_set
(
intel_output
->
ddc_bus
->
drm_dev
,
true
);
intel_i2c_quirk_set
(
intel_output
->
base
.
dev
,
true
);
ret
=
i2c_transfer
(
&
intel_output
->
ddc_bus
->
adapter
,
msgs
,
2
);
ret
=
i2c_transfer
(
intel_output
->
ddc_bus
,
msgs
,
2
);
intel_i2c_quirk_set
(
intel_output
->
ddc_bus
->
drm_dev
,
false
);
intel_i2c_quirk_set
(
intel_output
->
base
.
dev
,
false
);
if
(
ret
==
2
)
if
(
ret
==
2
)
return
true
;
return
true
;
...
@@ -74,10 +73,9 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
...
@@ -74,10 +73,9 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
struct
edid
*
edid
;
struct
edid
*
edid
;
int
ret
=
0
;
int
ret
=
0
;
intel_i2c_quirk_set
(
intel_output
->
ddc_bus
->
drm_dev
,
true
);
intel_i2c_quirk_set
(
intel_output
->
base
.
dev
,
true
);
edid
=
drm_get_edid
(
&
intel_output
->
base
,
edid
=
drm_get_edid
(
&
intel_output
->
base
,
intel_output
->
ddc_bus
);
&
intel_output
->
ddc_bus
->
adapter
);
intel_i2c_quirk_set
(
intel_output
->
base
.
dev
,
false
);
intel_i2c_quirk_set
(
intel_output
->
ddc_bus
->
drm_dev
,
false
);
if
(
edid
)
{
if
(
edid
)
{
drm_mode_connector_update_edid_property
(
&
intel_output
->
base
,
drm_mode_connector_update_edid_property
(
&
intel_output
->
base
,
edid
);
edid
);
...
...
drivers/gpu/drm/i915/intel_sdvo.c
View file @
5b6345be
...
@@ -38,8 +38,7 @@
...
@@ -38,8 +38,7 @@
#undef SDVO_DEBUG
#undef SDVO_DEBUG
#define I915_SDVO "i915_sdvo"
#define I915_SDVO "i915_sdvo"
struct
intel_sdvo_priv
{
struct
intel_sdvo_priv
{
struct
intel_i2c_chan
*
i2c_bus
;
u8
slave_addr
;
int
slaveaddr
;
/* Register for the SDVO device: SDVOB or SDVOC */
/* Register for the SDVO device: SDVOB or SDVOC */
int
output_device
;
int
output_device
;
...
@@ -146,13 +145,13 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
...
@@ -146,13 +145,13 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
sdvo_priv
->
i2c_bus
->
slave_addr
,
.
addr
=
sdvo_priv
->
slave_addr
>>
1
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
},
},
{
{
.
addr
=
sdvo_priv
->
i2c_bus
->
slave_addr
,
.
addr
=
sdvo_priv
->
slave_addr
>>
1
,
.
flags
=
I2C_M_RD
,
.
flags
=
I2C_M_RD
,
.
len
=
1
,
.
len
=
1
,
.
buf
=
buf
,
.
buf
=
buf
,
...
@@ -162,7 +161,7 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
...
@@ -162,7 +161,7 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
out_buf
[
0
]
=
addr
;
out_buf
[
0
]
=
addr
;
out_buf
[
1
]
=
0
;
out_buf
[
1
]
=
0
;
if
((
ret
=
i2c_transfer
(
&
sdvo_priv
->
i2c_bus
->
adapter
,
msgs
,
2
))
==
2
)
if
((
ret
=
i2c_transfer
(
intel_output
->
i2c_bus
,
msgs
,
2
))
==
2
)
{
{
*
ch
=
buf
[
0
];
*
ch
=
buf
[
0
];
return
true
;
return
true
;
...
@@ -175,10 +174,11 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
...
@@ -175,10 +174,11 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr,
static
bool
intel_sdvo_write_byte
(
struct
intel_output
*
intel_output
,
int
addr
,
static
bool
intel_sdvo_write_byte
(
struct
intel_output
*
intel_output
,
int
addr
,
u8
ch
)
u8
ch
)
{
{
struct
intel_sdvo_priv
*
sdvo_priv
=
intel_output
->
dev_priv
;
u8
out_buf
[
2
];
u8
out_buf
[
2
];
struct
i2c_msg
msgs
[]
=
{
struct
i2c_msg
msgs
[]
=
{
{
{
.
addr
=
intel_output
->
i2c_bus
->
slave_addr
,
.
addr
=
sdvo_priv
->
slave_addr
>>
1
,
.
flags
=
0
,
.
flags
=
0
,
.
len
=
2
,
.
len
=
2
,
.
buf
=
out_buf
,
.
buf
=
out_buf
,
...
@@ -188,7 +188,7 @@ static bool intel_sdvo_write_byte(struct intel_output *intel_output, int addr,
...
@@ -188,7 +188,7 @@ static bool intel_sdvo_write_byte(struct intel_output *intel_output, int addr,
out_buf
[
0
]
=
addr
;
out_buf
[
0
]
=
addr
;
out_buf
[
1
]
=
ch
;
out_buf
[
1
]
=
ch
;
if
(
i2c_transfer
(
&
intel_output
->
i2c_bus
->
adapter
,
msgs
,
1
)
==
1
)
if
(
i2c_transfer
(
intel_output
->
i2c_bus
,
msgs
,
1
)
==
1
)
{
{
return
true
;
return
true
;
}
}
...
@@ -1369,9 +1369,8 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
...
@@ -1369,9 +1369,8 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
struct
intel_sdvo_priv
*
sdvo_priv
=
intel_output
->
dev_priv
;
struct
intel_sdvo_priv
*
sdvo_priv
=
intel_output
->
dev_priv
;
struct
edid
*
edid
=
NULL
;
struct
edid
*
edid
=
NULL
;
intel_sdvo_set_control_bus_switch
(
intel_output
,
sdvo_priv
->
ddc_bus
);
edid
=
drm_get_edid
(
&
intel_output
->
base
,
edid
=
drm_get_edid
(
&
intel_output
->
base
,
&
intel_output
->
ddc_bus
->
adapter
);
intel_output
->
ddc_bus
);
if
(
edid
!=
NULL
)
{
if
(
edid
!=
NULL
)
{
sdvo_priv
->
is_hdmi
=
drm_detect_hdmi_monitor
(
edid
);
sdvo_priv
->
is_hdmi
=
drm_detect_hdmi_monitor
(
edid
);
kfree
(
edid
);
kfree
(
edid
);
...
@@ -1549,7 +1548,6 @@ static void intel_sdvo_get_tv_modes(struct drm_connector *connector)
...
@@ -1549,7 +1548,6 @@ static void intel_sdvo_get_tv_modes(struct drm_connector *connector)
static
void
intel_sdvo_get_lvds_modes
(
struct
drm_connector
*
connector
)
static
void
intel_sdvo_get_lvds_modes
(
struct
drm_connector
*
connector
)
{
{
struct
intel_output
*
intel_output
=
to_intel_output
(
connector
);
struct
intel_output
*
intel_output
=
to_intel_output
(
connector
);
struct
intel_sdvo_priv
*
sdvo_priv
=
intel_output
->
dev_priv
;
struct
drm_i915_private
*
dev_priv
=
connector
->
dev
->
dev_private
;
struct
drm_i915_private
*
dev_priv
=
connector
->
dev
->
dev_private
;
/*
/*
...
@@ -1557,8 +1555,6 @@ static void intel_sdvo_get_lvds_modes(struct drm_connector *connector)
...
@@ -1557,8 +1555,6 @@ static void intel_sdvo_get_lvds_modes(struct drm_connector *connector)
* Assume that the preferred modes are
* Assume that the preferred modes are
* arranged in priority order.
* arranged in priority order.
*/
*/
/* set the bus switch and get the modes */
intel_sdvo_set_control_bus_switch
(
intel_output
,
sdvo_priv
->
ddc_bus
);
intel_ddc_get_modes
(
intel_output
);
intel_ddc_get_modes
(
intel_output
);
if
(
list_empty
(
&
connector
->
probed_modes
)
==
false
)
if
(
list_empty
(
&
connector
->
probed_modes
)
==
false
)
return
;
return
;
...
@@ -1709,7 +1705,7 @@ intel_sdvo_chan_to_intel_output(struct intel_i2c_chan *chan)
...
@@ -1709,7 +1705,7 @@ intel_sdvo_chan_to_intel_output(struct intel_i2c_chan *chan)
list_for_each_entry
(
connector
,
list_for_each_entry
(
connector
,
&
dev
->
mode_config
.
connector_list
,
head
)
{
&
dev
->
mode_config
.
connector_list
,
head
)
{
if
(
to_intel_output
(
connector
)
->
ddc_bus
==
chan
)
{
if
(
to_intel_output
(
connector
)
->
ddc_bus
==
&
chan
->
adapter
)
{
intel_output
=
to_intel_output
(
connector
);
intel_output
=
to_intel_output
(
connector
);
break
;
break
;
}
}
...
@@ -1723,7 +1719,7 @@ static int intel_sdvo_master_xfer(struct i2c_adapter *i2c_adap,
...
@@ -1723,7 +1719,7 @@ static int intel_sdvo_master_xfer(struct i2c_adapter *i2c_adap,
struct
intel_output
*
intel_output
;
struct
intel_output
*
intel_output
;
struct
intel_sdvo_priv
*
sdvo_priv
;
struct
intel_sdvo_priv
*
sdvo_priv
;
struct
i2c_algo_bit_data
*
algo_data
;
struct
i2c_algo_bit_data
*
algo_data
;
struct
i2c_algorithm
*
algo
;
const
struct
i2c_algorithm
*
algo
;
algo_data
=
(
struct
i2c_algo_bit_data
*
)
i2c_adap
->
algo_data
;
algo_data
=
(
struct
i2c_algo_bit_data
*
)
i2c_adap
->
algo_data
;
intel_output
=
intel_output
=
...
@@ -1733,7 +1729,7 @@ static int intel_sdvo_master_xfer(struct i2c_adapter *i2c_adap,
...
@@ -1733,7 +1729,7 @@ static int intel_sdvo_master_xfer(struct i2c_adapter *i2c_adap,
return
-
EINVAL
;
return
-
EINVAL
;
sdvo_priv
=
intel_output
->
dev_priv
;
sdvo_priv
=
intel_output
->
dev_priv
;
algo
=
(
struct
i2c_algorithm
*
)
intel_output
->
i2c_bus
->
adapter
.
algo
;
algo
=
intel_output
->
i2c_bus
->
algo
;
intel_sdvo_set_control_bus_switch
(
intel_output
,
sdvo_priv
->
ddc_bus
);
intel_sdvo_set_control_bus_switch
(
intel_output
,
sdvo_priv
->
ddc_bus
);
return
algo
->
master_xfer
(
i2c_adap
,
msgs
,
num
);
return
algo
->
master_xfer
(
i2c_adap
,
msgs
,
num
);
...
@@ -1785,13 +1781,11 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
...
@@ -1785,13 +1781,11 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
struct
drm_connector
*
connector
;
struct
drm_connector
*
connector
;
struct
intel_output
*
intel_output
;
struct
intel_output
*
intel_output
;
struct
intel_sdvo_priv
*
sdvo_priv
;
struct
intel_sdvo_priv
*
sdvo_priv
;
struct
intel_i2c_chan
*
i2cbus
=
NULL
;
struct
intel_i2c_chan
*
ddcbus
=
NULL
;
int
connector_type
;
int
connector_type
;
u8
ch
[
0x40
];
u8
ch
[
0x40
];
int
i
;
int
i
;
int
encoder_type
,
output_id
;
int
encoder_type
;
u8
slave_addr
;
intel_output
=
kcalloc
(
sizeof
(
struct
intel_output
)
+
sizeof
(
struct
intel_sdvo_priv
),
1
,
GFP_KERNEL
);
intel_output
=
kcalloc
(
sizeof
(
struct
intel_output
)
+
sizeof
(
struct
intel_sdvo_priv
),
1
,
GFP_KERNEL
);
if
(
!
intel_output
)
{
if
(
!
intel_output
)
{
...
@@ -1799,29 +1793,24 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
...
@@ -1799,29 +1793,24 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
}
}
sdvo_priv
=
(
struct
intel_sdvo_priv
*
)(
intel_output
+
1
);
sdvo_priv
=
(
struct
intel_sdvo_priv
*
)(
intel_output
+
1
);
sdvo_priv
->
output_device
=
output_device
;
intel_output
->
dev_priv
=
sdvo_priv
;
intel_output
->
type
=
INTEL_OUTPUT_SDVO
;
intel_output
->
type
=
INTEL_OUTPUT_SDVO
;
/* setup the DDC bus. */
/* setup the DDC bus. */
if
(
output_device
==
SDVOB
)
if
(
output_device
==
SDVOB
)
i
2c
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOCTRL_E for SDVOB"
);
i
ntel_output
->
i2c_
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOCTRL_E for SDVOB"
);
else
else
i
2c
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOCTRL_E for SDVOC"
);
i
ntel_output
->
i2c_
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOCTRL_E for SDVOC"
);
if
(
!
i
2c
bus
)
if
(
!
i
ntel_output
->
i2c_
bus
)
goto
err_inteloutput
;
goto
err_inteloutput
;
slave_addr
=
intel_sdvo_get_slave_addr
(
dev
,
output_device
);
sdvo_priv
->
slave_addr
=
intel_sdvo_get_slave_addr
(
dev
,
output_device
);
sdvo_priv
->
i2c_bus
=
i2cbus
;
if
(
output_device
==
SDVOB
)
{
/* Save the bit-banging i2c functionality for use by the DDC wrapper */
output_id
=
1
;
intel_sdvo_i2c_bit_algo
.
functionality
=
intel_output
->
i2c_bus
->
algo
->
functionality
;
}
else
{
output_id
=
2
;
}
sdvo_priv
->
i2c_bus
->
slave_addr
=
slave_addr
>>
1
;
sdvo_priv
->
output_device
=
output_device
;
intel_output
->
i2c_bus
=
i2cbus
;
intel_output
->
dev_priv
=
sdvo_priv
;
/* Read the regs to test if we can talk to the device */
/* Read the regs to test if we can talk to the device */
for
(
i
=
0
;
i
<
0x40
;
i
++
)
{
for
(
i
=
0
;
i
<
0x40
;
i
++
)
{
...
@@ -1835,17 +1824,15 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
...
@@ -1835,17 +1824,15 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
/* setup the DDC bus. */
/* setup the DDC bus. */
if
(
output_device
==
SDVOB
)
if
(
output_device
==
SDVOB
)
ddc
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOB DDC BUS"
);
intel_output
->
ddc_
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOB DDC BUS"
);
else
else
ddc
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOC DDC BUS"
);
intel_output
->
ddc_
bus
=
intel_i2c_create
(
dev
,
GPIOE
,
"SDVOC DDC BUS"
);
if
(
ddc
bus
==
NULL
)
if
(
intel_output
->
ddc_
bus
==
NULL
)
goto
err_i2c
;
goto
err_i2c
;
intel_sdvo_i2c_bit_algo
.
functionality
=
/* Wrap with our custom algo which switches to DDC mode */
intel_output
->
i2c_bus
->
adapter
.
algo
->
functionality
;
intel_output
->
ddc_bus
->
algo
=
&
intel_sdvo_i2c_bit_algo
;
ddcbus
->
adapter
.
algo
=
&
intel_sdvo_i2c_bit_algo
;
intel_output
->
ddc_bus
=
ddcbus
;
/* In defaut case sdvo lvds is false */
/* In defaut case sdvo lvds is false */
sdvo_priv
->
is_lvds
=
false
;
sdvo_priv
->
is_lvds
=
false
;
...
@@ -1965,9 +1952,10 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
...
@@ -1965,9 +1952,10 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
return
true
;
return
true
;
err_i2c:
err_i2c:
if
(
ddc
bus
!=
NULL
)
if
(
intel_output
->
ddc_
bus
!=
NULL
)
intel_i2c_destroy
(
intel_output
->
ddc_bus
);
intel_i2c_destroy
(
intel_output
->
ddc_bus
);
intel_i2c_destroy
(
intel_output
->
i2c_bus
);
if
(
intel_output
->
i2c_bus
!=
NULL
)
intel_i2c_destroy
(
intel_output
->
i2c_bus
);
err_inteloutput:
err_inteloutput:
kfree
(
intel_output
);
kfree
(
intel_output
);
...
...
drivers/gpu/drm/i915/intel_tv.c
View file @
5b6345be
...
@@ -1383,34 +1383,31 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_output *intel_output)
...
@@ -1383,34 +1383,31 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_output *intel_output)
/*
/*
* Detect TV by polling)
* Detect TV by polling)
*/
*/
if
(
intel_output
->
load_detect_temp
)
{
save_tv_dac
=
tv_dac
;
/* TV not currently running, prod it with destructive detect */
tv_ctl
=
I915_READ
(
TV_CTL
);
save_tv_dac
=
tv_dac
;
save_tv_ctl
=
tv_ctl
;
tv_ctl
=
I915_READ
(
TV_CTL
);
tv_ctl
&=
~
TV_ENC_ENABLE
;
save_tv_ctl
=
tv_ctl
;
tv_ctl
&=
~
TV_TEST_MODE_MASK
;
tv_ctl
&=
~
TV_ENC_ENABLE
;
tv_ctl
|=
TV_TEST_MODE_MONITOR_DETECT
;
tv_ctl
&=
~
TV_TEST_MODE_MASK
;
tv_dac
&=
~
TVDAC_SENSE_MASK
;
tv_ctl
|=
TV_TEST_MODE_MONITOR_DETECT
;
tv_dac
&=
~
DAC_A_MASK
;
tv_dac
&=
~
TVDAC_SENSE_MASK
;
tv_dac
&=
~
DAC_B_MASK
;
tv_dac
&=
~
DAC_A_MASK
;
tv_dac
&=
~
DAC_C_MASK
;
tv_dac
&=
~
DAC_B_MASK
;
tv_dac
|=
(
TVDAC_STATE_CHG_EN
|
tv_dac
&=
~
DAC_C_MASK
;
TVDAC_A_SENSE_CTL
|
tv_dac
|=
(
TVDAC_STATE_CHG_EN
|
TVDAC_B_SENSE_CTL
|
TVDAC_A_SENSE_CTL
|
TVDAC_C_SENSE_CTL
|
TVDAC_B_SENSE_CTL
|
DAC_CTL_OVERRIDE
|
TVDAC_C_SENSE_CTL
|
DAC_A_0_7_V
|
DAC_CTL_OVERRIDE
|
DAC_B_0_7_V
|
DAC_A_0_7_V
|
DAC_C_0_7_V
);
DAC_B_0_7_V
|
I915_WRITE
(
TV_CTL
,
tv_ctl
);
DAC_C_0_7_V
);
I915_WRITE
(
TV_DAC
,
tv_dac
);
I915_WRITE
(
TV_CTL
,
tv_ctl
);
intel_wait_for_vblank
(
dev
);
I915_WRITE
(
TV_DAC
,
tv_dac
);
tv_dac
=
I915_READ
(
TV_DAC
);
intel_wait_for_vblank
(
dev
);
I915_WRITE
(
TV_DAC
,
save_tv_dac
);
tv_dac
=
I915_READ
(
TV_DAC
);
I915_WRITE
(
TV_CTL
,
save_tv_ctl
);
I915_WRITE
(
TV_DAC
,
save_tv_dac
);
intel_wait_for_vblank
(
dev
);
I915_WRITE
(
TV_CTL
,
save_tv_ctl
);
intel_wait_for_vblank
(
dev
);
}
/*
/*
* A B C
* A B C
* 0 1 1 Composite
* 0 1 1 Composite
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment