[PATCH V2][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
Christian König
deathsimple at vodafone.de
Mon Jun 11 05:11:00 PDT 2012
On 11.06.2012 12:34, Rafał Miłecki wrote:
> After recent changes HDMI code is ready to be enabled on DCE5. This
> patch just changes conditions to execute already present code on DCE5.
>
> Signed-off-by: Rafał Miłecki<zajec5 at gmail.com>
> Reviewed-by: Alex Deucher<alexander.deucher at amd.com>
Tested-by: Christian König <christian.koenig at amd.com>
> ---
> V2: enable audio engine on Cayman (it uses different startup function).
> ---
> drivers/gpu/drm/radeon/atombios_encoders.c | 4 +++-
> drivers/gpu/drm/radeon/evergreen_hdmi.c | 3 ---
> drivers/gpu/drm/radeon/ni.c | 5 +++++
> drivers/gpu/drm/radeon/r600_audio.c | 2 +-
> drivers/gpu/drm/radeon/r600_hdmi.c | 7 ++-----
> 5 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
> index e7b1ec5..486ccdf 100644
> --- a/drivers/gpu/drm/radeon/atombios_encoders.c
> +++ b/drivers/gpu/drm/radeon/atombios_encoders.c
> @@ -1926,7 +1926,9 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder,
>
> if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) {
> r600_hdmi_enable(encoder);
> - if (ASIC_IS_DCE4(rdev))
> + if (ASIC_IS_DCE6(rdev))
> + ; /* TODO (use pointers instead of if-s?) */
> + else if (ASIC_IS_DCE4(rdev))
> evergreen_hdmi_setmode(encoder, adjusted_mode);
> else
> r600_hdmi_setmode(encoder, adjusted_mode);
> diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c
> index a51f880..65c5416 100644
> --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c
> +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c
> @@ -156,9 +156,6 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode
> struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
> uint32_t offset;
>
> - if (ASIC_IS_DCE5(rdev))
> - return;
> -
> /* Silent, r600_hdmi_enable will raise WARN for us */
> if (!dig->afmt->enabled)
> return;
> diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
> index 3df4efa..b65fcae 100644
> --- a/drivers/gpu/drm/radeon/ni.c
> +++ b/drivers/gpu/drm/radeon/ni.c
> @@ -1290,6 +1290,10 @@ static int cayman_startup(struct radeon_device *rdev)
> if (r)
> return r;
>
> + r = r600_audio_init(rdev);
> + if (r)
> + return r;
> +
> return 0;
> }
>
> @@ -1316,6 +1320,7 @@ int cayman_resume(struct radeon_device *rdev)
>
> int cayman_suspend(struct radeon_device *rdev)
> {
> + r600_audio_fini(rdev);
> /* FIXME: we should wait for ring to be empty */
> radeon_ib_pool_suspend(rdev);
> radeon_vm_manager_suspend(rdev);
> diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c
> index 7479a5c..79b5591 100644
> --- a/drivers/gpu/drm/radeon/r600_audio.c
> +++ b/drivers/gpu/drm/radeon/r600_audio.c
> @@ -57,7 +57,7 @@ static bool radeon_dig_encoder(struct drm_encoder *encoder)
> */
> static int r600_audio_chipset_supported(struct radeon_device *rdev)
> {
> - return (rdev->family>= CHIP_R600&& !ASIC_IS_DCE5(rdev))
> + return (rdev->family>= CHIP_R600&& !ASIC_IS_DCE6(rdev))
> || rdev->family == CHIP_RS600
> || rdev->family == CHIP_RS690
> || rdev->family == CHIP_RS740;
> diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
> index 969c275..82a0a4c 100644
> --- a/drivers/gpu/drm/radeon/r600_hdmi.c
> +++ b/drivers/gpu/drm/radeon/r600_hdmi.c
> @@ -322,9 +322,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod
> struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
> uint32_t offset;
>
> - if (ASIC_IS_DCE5(rdev))
> - return;
> -
> /* Silent, r600_hdmi_enable will raise WARN for us */
> if (!dig->afmt->enabled)
> return;
> @@ -483,7 +480,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder)
> uint32_t offset;
> u32 hdmi;
>
> - if (ASIC_IS_DCE5(rdev))
> + if (ASIC_IS_DCE6(rdev))
> return;
>
> /* Silent, r600_hdmi_enable will raise WARN for us */
> @@ -543,7 +540,7 @@ void r600_hdmi_disable(struct drm_encoder *encoder)
> struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
> uint32_t offset;
>
> - if (ASIC_IS_DCE5(rdev))
> + if (ASIC_IS_DCE6(rdev))
> return;
>
> /* Called for ATOM_ENCODER_MODE_HDMI only */
More information about the dri-devel
mailing list