W dniu 6 marca 2010 17:26 użytkownik Christian König
<deathsim...@vodafone.de> napisał:
> Am Samstag, den 06.03.2010, 14:03 +0100 schrieb Rafał Miłecki:
>> +     struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
>>       int base_rate = 48000;
>>
>> +     if (!dig) {
>> +             dev_err(rdev->dev, "Setting audio clock on non-dig encoder\n");
>> +             return;
>> +     }
>> +
> ...
>> -     switch (r600_audio_tmds_index(encoder)) {
>> +     switch (dig->dig_encoder) {
>>       case 0:
>>               WREG32(R600_AUDIO_PLL1_MUL, base_rate*50);
>>               WREG32(R600_AUDIO_PLL1_DIV, clock*100);
> ....
>>               WREG32(R600_AUDIO_PLL2_DIV, clock*100);
>>               WREG32(R600_AUDIO_CLK_SRCSEL, 1);
>>               break;
>> +     default:
>> +             dev_err(rdev->dev, "Unsupported DIG on encoder 0x%02X\n",
>> +                       radeon_encoder->encoder_id);
>> +             return;
> I know that I made the suggestion to code it like this, but now I'm
> thinking that we should make it depend on the hdmi_offset instead of the
> dig_encoder number. First I'm not sure that radeon_encoder->enc_priv
> will always point to a radeon_encoder_atom_dig structure, and second I
> think the possibility of rerouting the signals on pre DCE3 makes this
> decision depend on the wrong index.

Not sure about dig pointer... I think it should be always available.
But indeed it can be wrong for pre-DCE3. Thanks for pointing.

-- 
Rafał

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to