Re: [PATCH] drm/radeon: fix dig encoder selection on DCE61

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mit, 2012-08-29 at 20:02 -0400, alexdeucher@xxxxxxxxx wrote: 
> From: Alex Deucher <alexander.deucher@xxxxxxx>
> 
> Was using the DCE41 code which was wrong. Fixes
> blank displays on a number of Trinity systems.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> ---
>  drivers/gpu/drm/radeon/atombios_encoders.c |   31 +++++++++++++++++++++++----
>  1 files changed, 26 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
> index 4a7f95e..6e8803a 100644
> --- a/drivers/gpu/drm/radeon/atombios_encoders.c
> +++ b/drivers/gpu/drm/radeon/atombios_encoders.c
> @@ -1769,13 +1769,34 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder)
>  	struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
>  	struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
>  	struct drm_encoder *test_encoder;
> -	struct radeon_encoder_atom_dig *dig;
> +	struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
>  	uint32_t dig_enc_in_use = 0;
>  
> -	/* DCE4/5 */
> -	if (ASIC_IS_DCE4(rdev)) {
> -		dig = radeon_encoder->enc_priv;
> -		if (ASIC_IS_DCE41(rdev)) {
> +	if (ASIC_IS_DCE6(rdev)) {
> +		/* DCE6 */
> +		switch (radeon_encoder->encoder_id) {
> +		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
> +			if (dig->linkb)
> +				return 1;
> +			else
> +				return 0;
> +			break;
> +		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
> +			if (dig->linkb)
> +				return 3;
> +			else
> +				return 2;
> +			break;
> +		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
> +			if (dig->linkb)
> +				return 5;
> +			else
> +				return 4;
> +			break;
> +		}
> +	} else if (ASIC_IS_DCE4(rdev)) {
> +		/* DCE4/5 */
> +		if (ASIC_IS_DCE41(rdev) && !ASIC_IS_DCE61(rdev)) {

The !ASIC_IS_DCE61(rdev) seems redundant here. Either way though,

Reviewed-by: Michel Dänzer <michel.daenzer@xxxxxxx>


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux