[PATCH][drm-fixes?] drm/radeon: enable HDMI on DCE5 (AKA NI excluding Aruba)
Christian König
deathsimple at vodafone.de
Sun Jun 10 14:39:11 PDT 2012
On 10.06.2012 21:22, Alex Deucher wrote:
> On Sun, Jun 10, 2012 at 11:59 AM, Rafał Miłecki<zajec5 at gmail.com> 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>
>> ---
>> Dave: I know it's common to accept patches adding IDs even while merge
>> window's closed. Is this OK for you to take this patch as it only
>> enables existing code for more hardware?
>> DCE5 has same HDMI engine/code as DCE4.
>>
>> This was tested for regressions on R6xx and Evergreen. It makes audio
>> work on my NI Caicos card.
> Reviewed-by: Alex Deucher<alexander.deucher at amd.com>
>
> Thanks for all of your hard work on this Rafał!
Yeah indeed, keep sticking with it! We really need more people working
on the driver.
Unfortunately testing it with my Cayman based card shows that it plays
with the correct speed, audio registers seems to be ok, but
unfortunately I don't hear any sound at all :(
Going to dig into it tomorrow,
Christian.
>
> Alex
>
>> ---
>> drivers/gpu/drm/radeon/atombios_encoders.c | 4 +++-
>> drivers/gpu/drm/radeon/evergreen_hdmi.c | 3 ---
>> drivers/gpu/drm/radeon/r600_audio.c | 2 +-
>> drivers/gpu/drm/radeon/r600_hdmi.c | 7 ++-----
>> 4 files changed, 6 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/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 */
>> --
>> 1.7.7
>>
More information about the dri-devel
mailing list