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
Kirill Smelkov
linux
Commits
9d1a903d
Commit
9d1a903d
authored
Sep 14, 2010
by
Chris Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/i915/sdvo: Tidy intel_sdvo_hdmi_sink_detect
Signed-off-by:
Chris Wilson
<
chris@chris-wilson.co.uk
>
parent
2b6efaa4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
31 deletions
+24
-31
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/i915/intel_sdvo.c
+24
-31
No files found.
drivers/gpu/drm/i915/intel_sdvo.c
View file @
9d1a903d
...
...
@@ -1417,60 +1417,53 @@ enum drm_connector_status
intel_sdvo_hdmi_sink_detect
(
struct
drm_connector
*
connector
)
{
struct
intel_sdvo
*
intel_sdvo
=
intel_attached_sdvo
(
connector
);
struct
intel_sdvo_connector
*
intel_sdvo_connector
=
to_intel_sdvo_connector
(
connector
);
enum
drm_connector_status
status
=
connector_status_connected
;
struct
edid
*
edid
=
NULL
;
enum
drm_connector_status
status
;
struct
edid
*
edid
;
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
base
.
ddc_bus
);
/* This is only applied to SDVO cards with multiple outputs */
if
(
edid
==
NULL
&&
intel_sdvo_multifunc_encoder
(
intel_sdvo
))
{
uint8_t
saved_ddc
,
temp_ddc
;
saved_ddc
=
intel_sdvo
->
ddc_bus
;
temp_ddc
=
intel_sdvo
->
ddc_bus
>>
1
;
u8
saved_ddc
=
intel_sdvo
->
ddc_bus
,
ddc
;
/*
* Don't use the 1 as the argument of DDC bus switch to get
* the EDID. It is used for SDVO SPD ROM.
*/
while
(
temp_ddc
>
1
)
{
intel_sdvo
->
ddc_bus
=
temp_
ddc
;
for
(
ddc
=
intel_sdvo
->
ddc_bus
>>
1
;
ddc
>
1
;
ddc
>>=
1
)
{
intel_sdvo
->
ddc_bus
=
ddc
;
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
base
.
ddc_bus
);
if
(
edid
)
{
/*
* When we can get the EDID, maybe it is the
* correct DDC bus. Update it.
*/
intel_sdvo
->
ddc_bus
=
temp_ddc
;
if
(
edid
)
break
;
}
temp_ddc
>>=
1
;
}
/*
* If we found the EDID on the other bus, maybe that is the
* correct DDC bus.
*/
if
(
edid
==
NULL
)
intel_sdvo
->
ddc_bus
=
saved_ddc
;
}
/* when there is no edid and no monitor is connected with VGA
* port, try to use the CRT ddc to read the EDID for DVI-connector
/*
* When there is no edid and no monitor is connected with VGA
* port, try to use the CRT ddc to read the EDID for DVI-connector.
*/
if
(
edid
==
NULL
&&
intel_sdvo
->
analog_ddc_bus
&&
if
(
edid
==
NULL
&&
intel_sdvo
->
analog_ddc_bus
&&
!
intel_analog_is_connected
(
connector
->
dev
))
edid
=
drm_get_edid
(
connector
,
intel_sdvo
->
analog_ddc_bus
);
status
=
connector_status_disconnected
;
if
(
edid
!=
NULL
)
{
bool
is_digital
=
!!
(
edid
->
input
&
DRM_EDID_INPUT_DIGITAL
);
bool
need_digital
=
!!
(
intel_sdvo_connector
->
output_flag
&
SDVO_TMDS_MASK
);
/* DDC bus is shared, match EDID to connector type */
if
(
is_digital
&&
need_digital
)
if
(
edid
->
input
&
DRM_EDID_INPUT_DIGITAL
)
{
status
=
connector_status_connected
;
intel_sdvo
->
is_hdmi
=
drm_detect_hdmi_monitor
(
edid
);
else
if
(
is_digital
!=
need_digital
)
status
=
connector_status_disconnected
;
}
connector
->
display_info
.
raw_edid
=
NULL
;
}
else
status
=
connector_status_disconnected
;
kfree
(
edid
);
}
kfree
(
edid
);
return
status
;
}
...
...
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