[PATCH 3/6] drm/radeon: add some HDMI comments

Paul Menzel paulepanter at users.sourceforge.net
Sun Apr 14 03:37:01 PDT 2013


Am Sonntag, den 14.04.2013, 01:26 +0200 schrieb Rafał Miłecki:

Maybe for a more descriptive summary:

drm/radeon: Add some HDMI (audio) comments about fglrx’ reg reads

> Signed-off-by: Rafał Miłecki <zajec5 at gmail.com>
> ---
>  drivers/gpu/drm/radeon/evergreen_hdmi.c |   14 ++++++++++++++
>  drivers/gpu/drm/radeon/radeon_display.c |    5 +++++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
> index 4fdecc2..8b64bf1 100644
> --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
> +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
> @@ -143,6 +143,13 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
>  
>  	WREG32(HDMI_GC + offset, 0); /* unset HDMI_GC_AVMUTE */
>  
> +	/*
> +	 * At this point fglrx reads following regs:
> +	 * DCE41: 0x49c
> +	 * DCE5: 0x480 0x484 0x488
> +	 * Is that something audio related?
> +	 */
> +
>  	err = drm_hdmi_avi_infoframe_from_display_mode(&frame, mode);
>  	if (err < 0) {
>  		DRM_ERROR("failed to setup AVI infoframe: %zd\n", err);
> @@ -158,6 +165,13 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
>  	evergreen_hdmi_update_avi_infoframe(encoder, buffer, sizeof(buffer));
>  	evergreen_hdmi_update_ACR(encoder, mode->clock);
>  
> +	/*
> +	 * At this point fglrx changes following regs:
> +	 * DCE41: 0x7a70
> +	 * DCE5: 0x7a70 and 0x64ec
> +	 * Is that something audio related?
> +	 */
> +
>  	/* it's unknown what these bits do excatly, but it's indeed quite useful for debugging */
>  	WREG32(AFMT_RAMP_CONTROL0 + offset, 0x00FFFFFF);
>  	WREG32(AFMT_RAMP_CONTROL1 + offset, 0x007FFFFF);
> diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
> index e38fd55..a83c272 100644
> --- a/drivers/gpu/drm/radeon/radeon_display.c
> +++ b/drivers/gpu/drm/radeon/radeon_display.c
> @@ -1261,6 +1261,11 @@ static void radeon_afmt_init(struct radeon_device *rdev)
>  			rdev->mode_info.afmt[1]->offset = EVERGREEN_CRTC1_REGISTER_OFFSET;
>  			rdev->mode_info.afmt[1]->id = 1;
>  		}

Add an empty line?

> +		/*
> +		 * According to the commens above we should use !DCE41 || DCE5,

commen*t*s

> +		 * condition, however there isn't any DCE5 that is DCE41, so
> +		 * DCE5 check is not needed.
> +		 */
>  		if (!ASIC_IS_DCE41(rdev)) {
>  			rdev->mode_info.afmt[2] = kzalloc(sizeof(struct radeon_afmt), GFP_KERNEL);
>  			if (rdev->mode_info.afmt[2]) {


Thanks,

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130414/b1b79a8f/attachment.pgp>


More information about the dri-devel mailing list