diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-11-23 18:02:35 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-07 19:22:42 -0500 |
commit | 4143e919ea999c9356ae4f71b5a3a80e075290d5 (patch) | |
tree | a73412bd65201398aa364146f70b35e1ea6b43bb /drivers/gpu/drm/radeon | |
parent | 6a93cb250a60af1bb7b4070949f8546a2fdc52ef (diff) |
drm/radeon/kms: store sink type in atom dig connector
This will be used laster when the encoder and transmitters
are set up.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_dp.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_mode.h | 4 |
3 files changed, 17 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index fc5a2df4544b..e761fefaacb1 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c | |||
@@ -78,8 +78,8 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, u8 *req_bytes, | |||
78 | return true; | 78 | return true; |
79 | } | 79 | } |
80 | 80 | ||
81 | int radeon_dp_encoder_service(struct radeon_device *rdev, int action, int dp_clock, | 81 | static u8 radeon_dp_encoder_service(struct radeon_device *rdev, int action, int dp_clock, |
82 | uint8_t ucconfig, uint8_t lane_num) | 82 | uint8_t ucconfig, uint8_t lane_num) |
83 | { | 83 | { |
84 | DP_ENCODER_SERVICE_PARAMETERS args; | 84 | DP_ENCODER_SERVICE_PARAMETERS args; |
85 | int index = GetIndexIntoMasterTable(COMMAND, DPEncoderService); | 85 | int index = GetIndexIntoMasterTable(COMMAND, DPEncoderService); |
@@ -95,7 +95,7 @@ int radeon_dp_encoder_service(struct radeon_device *rdev, int action, int dp_clo | |||
95 | return args.ucStatus; | 95 | return args.ucStatus; |
96 | } | 96 | } |
97 | 97 | ||
98 | int radeon_dp_getsinktype(struct radeon_connector *radeon_connector) | 98 | u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector) |
99 | { | 99 | { |
100 | struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; | 100 | struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; |
101 | struct drm_device *dev = radeon_connector->base.dev; | 101 | struct drm_device *dev = radeon_connector->base.dev; |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 98634ce5ba10..b51e38386cc0 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -908,13 +908,9 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
908 | static enum drm_connector_status radeon_dp_detect(struct drm_connector *connector) | 908 | static enum drm_connector_status radeon_dp_detect(struct drm_connector *connector) |
909 | { | 909 | { |
910 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | 910 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
911 | struct drm_encoder *encoder = NULL; | ||
912 | struct drm_encoder_helper_funcs *encoder_funcs; | ||
913 | struct drm_mode_object *obj; | ||
914 | int i; | ||
915 | enum drm_connector_status ret = connector_status_disconnected; | 911 | enum drm_connector_status ret = connector_status_disconnected; |
916 | int sink_type; | 912 | struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; |
917 | bool dret; | 913 | u8 sink_type; |
918 | 914 | ||
919 | if (radeon_connector->edid) { | 915 | if (radeon_connector->edid) { |
920 | kfree(radeon_connector->edid); | 916 | kfree(radeon_connector->edid); |
@@ -924,8 +920,17 @@ static enum drm_connector_status radeon_dp_detect(struct drm_connector *connecto | |||
924 | sink_type = radeon_dp_getsinktype(radeon_connector); | 920 | sink_type = radeon_dp_getsinktype(radeon_connector); |
925 | if (sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { | 921 | if (sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { |
926 | radeon_dp_getdpcd(radeon_connector); | 922 | radeon_dp_getdpcd(radeon_connector); |
923 | radeon_dig_connector->dp_sink_type = sink_type; | ||
927 | ret = connector_status_connected; | 924 | ret = connector_status_connected; |
925 | } else { | ||
926 | radeon_i2c_do_lock(radeon_connector->ddc_bus, 1); | ||
927 | if (radeon_ddc_probe(radeon_connector)) { | ||
928 | radeon_dig_connector->dp_sink_type = sink_type; | ||
929 | ret = connector_status_connected; | ||
930 | } | ||
931 | radeon_i2c_do_lock(radeon_connector->ddc_bus, 0); | ||
928 | } | 932 | } |
933 | |||
929 | return ret; | 934 | return ret; |
930 | } | 935 | } |
931 | 936 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 1964afb94dbc..338d0af18510 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -339,8 +339,10 @@ struct radeon_encoder { | |||
339 | struct radeon_connector_atom_dig { | 339 | struct radeon_connector_atom_dig { |
340 | uint32_t igp_lane_info; | 340 | uint32_t igp_lane_info; |
341 | bool linkb; | 341 | bool linkb; |
342 | /* displayport */ | ||
342 | struct radeon_i2c_chan *dp_i2c_bus; | 343 | struct radeon_i2c_chan *dp_i2c_bus; |
343 | u8 dpcd[8]; | 344 | u8 dpcd[8]; |
345 | u8 dp_sink_type; | ||
344 | }; | 346 | }; |
345 | 347 | ||
346 | struct radeon_connector { | 348 | struct radeon_connector { |
@@ -364,7 +366,7 @@ struct radeon_framebuffer { | |||
364 | struct drm_gem_object *obj; | 366 | struct drm_gem_object *obj; |
365 | }; | 367 | }; |
366 | 368 | ||
367 | extern int radeon_dp_getsinktype(struct radeon_connector *radeon_connector); | 369 | extern u8 radeon_dp_getsinktype(struct radeon_connector *radeon_connector); |
368 | extern void radeon_dp_getdpcd(struct radeon_connector *radeon_connector); | 370 | extern void radeon_dp_getdpcd(struct radeon_connector *radeon_connector); |
369 | extern int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, | 371 | extern int radeon_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, |
370 | uint8_t write_byte, uint8_t *read_byte); | 372 | uint8_t write_byte, uint8_t *read_byte); |