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
270eea0f
Commit
270eea0f
authored
Sep 24, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915/lvds: Use the GMBUS pin if specified in VBT
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
e6c3a2a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/i915/intel_lvds.c
+13
-8
No files found.
drivers/gpu/drm/i915/intel_lvds.c
View file @
270eea0f
...
@@ -771,7 +771,8 @@ static void intel_find_lvds_downclock(struct drm_device *dev,
...
@@ -771,7 +771,8 @@ static void intel_find_lvds_downclock(struct drm_device *dev,
* If it is not present, return false.
* If it is not present, return false.
* If no child dev is parsed from VBT, it assumes that the LVDS is present.
* If no child dev is parsed from VBT, it assumes that the LVDS is present.
*/
*/
static
bool
lvds_is_present_in_vbt
(
struct
drm_device
*
dev
)
static
bool
lvds_is_present_in_vbt
(
struct
drm_device
*
dev
,
u8
*
i2c_pin
)
{
{
struct
drm_i915_private
*
dev_priv
=
dev
->
dev_private
;
struct
drm_i915_private
*
dev_priv
=
dev
->
dev_private
;
int
i
;
int
i
;
...
@@ -790,6 +791,9 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
...
@@ -790,6 +791,9 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
child
->
device_type
!=
DEVICE_TYPE_LFP
)
child
->
device_type
!=
DEVICE_TYPE_LFP
)
continue
;
continue
;
if
(
child
->
i2c_pin
)
*
i2c_pin
=
child
->
i2c_pin
;
/* However, we cannot trust the BIOS writers to populate
/* However, we cannot trust the BIOS writers to populate
* the VBT correctly. Since LVDS requires additional
* the VBT correctly. Since LVDS requires additional
* information from AIM blocks, a non-zero addin offset is
* information from AIM blocks, a non-zero addin offset is
...
@@ -810,7 +814,7 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
...
@@ -810,7 +814,7 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev)
return
false
;
return
false
;
}
}
static
bool
intel_lvds_ddc_probe
(
struct
drm_device
*
dev
)
static
bool
intel_lvds_ddc_probe
(
struct
drm_device
*
dev
,
u8
pin
)
{
{
struct
drm_i915_private
*
dev_priv
=
dev
->
dev_private
;
struct
drm_i915_private
*
dev_priv
=
dev
->
dev_private
;
u8
buf
=
0
;
u8
buf
=
0
;
...
@@ -822,7 +826,7 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev)
...
@@ -822,7 +826,7 @@ static bool intel_lvds_ddc_probe(struct drm_device *dev)
.
buf
=
&
buf
,
.
buf
=
&
buf
,
},
},
};
};
struct
i2c_adapter
*
i2c
=
&
dev_priv
->
gmbus
[
GMBUS_PORT_PANEL
].
adapter
;
struct
i2c_adapter
*
i2c
=
&
dev_priv
->
gmbus
[
pin
].
adapter
;
return
i2c_transfer
(
i2c
,
msgs
,
1
)
==
1
;
return
i2c_transfer
(
i2c
,
msgs
,
1
)
==
1
;
}
}
...
@@ -844,13 +848,15 @@ void intel_lvds_init(struct drm_device *dev)
...
@@ -844,13 +848,15 @@ void intel_lvds_init(struct drm_device *dev)
struct
drm_display_mode
*
scan
;
/* *modes, *bios_mode; */
struct
drm_display_mode
*
scan
;
/* *modes, *bios_mode; */
struct
drm_crtc
*
crtc
;
struct
drm_crtc
*
crtc
;
u32
lvds
;
u32
lvds
;
int
pipe
,
gpio
=
GPIOC
;
int
pipe
;
u8
pin
;
/* Skip init on machines we know falsely report LVDS */
/* Skip init on machines we know falsely report LVDS */
if
(
dmi_check_system
(
intel_no_lvds
))
if
(
dmi_check_system
(
intel_no_lvds
))
return
;
return
;
if
(
!
lvds_is_present_in_vbt
(
dev
))
{
pin
=
GMBUS_PORT_PANEL
;
if
(
!
lvds_is_present_in_vbt
(
dev
,
&
pin
))
{
DRM_DEBUG_KMS
(
"LVDS is not present in VBT
\n
"
);
DRM_DEBUG_KMS
(
"LVDS is not present in VBT
\n
"
);
return
;
return
;
}
}
...
@@ -862,10 +868,9 @@ void intel_lvds_init(struct drm_device *dev)
...
@@ -862,10 +868,9 @@ void intel_lvds_init(struct drm_device *dev)
DRM_DEBUG_KMS
(
"disable LVDS for eDP support
\n
"
);
DRM_DEBUG_KMS
(
"disable LVDS for eDP support
\n
"
);
return
;
return
;
}
}
gpio
=
PCH_GPIOC
;
}
}
if
(
!
intel_lvds_ddc_probe
(
dev
))
{
if
(
!
intel_lvds_ddc_probe
(
dev
,
pin
))
{
DRM_DEBUG_KMS
(
"LVDS did not respond to DDC probe
\n
"
);
DRM_DEBUG_KMS
(
"LVDS did not respond to DDC probe
\n
"
);
return
;
return
;
}
}
...
@@ -930,7 +935,7 @@ void intel_lvds_init(struct drm_device *dev)
...
@@ -930,7 +935,7 @@ void intel_lvds_init(struct drm_device *dev)
* preferred mode is the right one.
* preferred mode is the right one.
*/
*/
intel_lvds
->
edid
=
drm_get_edid
(
connector
,
intel_lvds
->
edid
=
drm_get_edid
(
connector
,
&
dev_priv
->
gmbus
[
GMBUS_PORT_PANEL
].
adapter
);
&
dev_priv
->
gmbus
[
pin
].
adapter
);
if
(
!
intel_lvds
->
edid
)
{
if
(
!
intel_lvds
->
edid
)
{
/* Didn't get an EDID, so
/* Didn't get an EDID, so
...
...
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