mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 13:43:55 +08:00
drm/radeon/kms: don't disable shared encoders on pre-DCE3 display blocks
The A/B links aren't independantly useable on these blocks so when we disable the encoders, make sure to only disable the encoder when there is no connector using it. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=18564 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
fce7d61be0
commit
a0ae5864d4
@ -1547,6 +1547,23 @@ static void radeon_atom_encoder_disable(struct drm_encoder *encoder)
|
||||
struct radeon_device *rdev = dev->dev_private;
|
||||
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
|
||||
struct radeon_encoder_atom_dig *dig;
|
||||
|
||||
/* check for pre-DCE3 cards with shared encoders;
|
||||
* can't really use the links individually, so don't disable
|
||||
* the encoder if it's in use by another connector
|
||||
*/
|
||||
if (!ASIC_IS_DCE3(rdev)) {
|
||||
struct drm_encoder *other_encoder;
|
||||
struct radeon_encoder *other_radeon_encoder;
|
||||
|
||||
list_for_each_entry(other_encoder, &dev->mode_config.encoder_list, head) {
|
||||
other_radeon_encoder = to_radeon_encoder(other_encoder);
|
||||
if ((radeon_encoder->encoder_id == other_radeon_encoder->encoder_id) &&
|
||||
drm_helper_encoder_in_use(other_encoder))
|
||||
goto disable_done;
|
||||
}
|
||||
}
|
||||
|
||||
radeon_atom_encoder_dpms(encoder, DRM_MODE_DPMS_OFF);
|
||||
|
||||
switch (radeon_encoder->encoder_id) {
|
||||
@ -1586,6 +1603,7 @@ static void radeon_atom_encoder_disable(struct drm_encoder *encoder)
|
||||
break;
|
||||
}
|
||||
|
||||
disable_done:
|
||||
if (radeon_encoder_is_digital(encoder)) {
|
||||
if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI)
|
||||
r600_hdmi_disable(encoder);
|
||||
|
Loading…
Reference in New Issue
Block a user