[PATCH r128] Update bitmasks for DDC
Connor Behan
connor.behan at gmail.com
Mon Mar 23 19:22:23 PDT 2015
On 22/03/15 07:05 AM, Reverend Homer wrote:
> 20.03.2015 20:27, Connor Behan ?8H5B:
>> A RAGE128TR chipset with a VGA port uses different i2c clock bits than
>> the VGA cards previously tested. It seems reasonable to assume that
>> other Pro2 cards are set up this way as well. In case this is incorrect,
>> a newly added xf86I2CProbeAddress() should still allow a monitor to be
>> detected.
>>
>> Signed-off-by: Connor Behan <connor.behan at gmail.com>
>> ---
>> src/r128_output.c | 15 +++++++++++++--
>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/r128_output.c b/src/r128_output.c
>> index 0160880..bd418ba 100644
>> --- a/src/r128_output.c
>> +++ b/src/r128_output.c
>> @@ -239,6 +239,9 @@ static R128MonitorType
>> R128DisplayDDCConnected(xf86OutputPtr output)
>> if (r128_output->type == OUTPUT_LVDS) {
>> return MT_LCD;
>> + } else if (r128_output->type == OUTPUT_VGA && info->isPro2) {
>> + mask1 = R128_GPIO_MONID_MASK_1 | R128_GPIO_MONID_MASK_2;
>> + mask2 = R128_GPIO_MONID_A_1 | R128_GPIO_MONID_A_2;
>> } else if (r128_output->type == OUTPUT_VGA) {
>> mask1 = R128_GPIO_MONID_MASK_1 | R128_GPIO_MONID_MASK_3;
>> mask2 = R128_GPIO_MONID_A_1 | R128_GPIO_MONID_A_3;
> Actually, I'm not a xorg-driver-ati developer, but I'm interested.
> Maybe this part would be clearer, if we will write it this way:
>
> } else if (r128_output->type == OUTPUT_VGA) {
> mask1 = R128_GPIO_MONID_MASK_1 | (info->isPro2 ?
> R128_GPIO_MONID_MASK_2 : R128_GPIO_MONID_MASK_3);
> mask2 = R128_GPIO_MONID_A_1 | (info->isPro2 ?
> R128_GPIO_MONID_A_2 : R128_GPIO_MONID_A_3);
>
> What would you say?
>
True enough. I just committed the patch with this change. Thanks!
>> @@ -268,6 +271,9 @@ static R128MonitorType
>> R128DisplayDDCConnected(xf86OutputPtr output)
>> else
>> MonType = MT_CRT;
>> }
>> + } else if (xf86I2CProbeAddress(r128_output->pI2CBus, 0x0060)) {
>> + /* Just in case. */
>> + MonType = MT_CRT;
>> }
>> return MonType;
>> @@ -454,8 +460,13 @@ Bool R128SetupConnectors(ScrnInfoPtr pScrn)
>> if (otypes[i] != OUTPUT_LVDS && info->DDC) {
>> i2c.ddc_reg = R128_GPIO_MONID;
>> - i2c.put_clk_mask = R128_GPIO_MONID_EN_3;
>> - i2c.get_clk_mask = R128_GPIO_MONID_Y_3;
>> + if (otypes[i] == OUTPUT_VGA && info->isPro2) {
>> + i2c.put_clk_mask = R128_GPIO_MONID_EN_2;
>> + i2c.get_clk_mask = R128_GPIO_MONID_Y_2;
>> + } else {
>> + i2c.put_clk_mask = R128_GPIO_MONID_EN_3;
>> + i2c.get_clk_mask = R128_GPIO_MONID_Y_3;
>> + }
>> if (otypes[i] == OUTPUT_VGA) {
>> i2c.put_data_mask = R128_GPIO_MONID_EN_1;
>> i2c.get_data_mask = R128_GPIO_MONID_Y_1;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg-driver-ati/attachments/20150323/35ddff67/attachment.sig>
More information about the xorg-driver-ati
mailing list