[Intel-gfx] [PATCH] i830_driver.c:detect and initialize SDVOB and SDVOC at the same time.
Fu Michael
michael_fu at linux.intel.com
Mon Feb 16 07:05:55 CET 2009
Zhenyu Wang wrote:
> On 2009.02.16 09:30:25 +0800, Ma Ling wrote:
>
>> Hi all,
>> I re-update the patch based on Eric's comment.
>> SDVO chipset has one i2c pin pare from GMCH, usually pin 4. So we should initialize SDVOC
>> at the same time when SDVOB detection is successful. However there are 2 pin pairs for GMCH:
>> HDMI/DPB is on pin 4 and HDMI/DPC is on pin3, so we should detect them respectively.
>>
>>
>
> oh, sorry, I'm just awared that when I merged my SDVO branch into master,
> my version for fixing SDVO initialization also went in...That should be identical
> to your logic. Please have a look. Sorry about that.
>
>
>
you need to initialize Bool found=FALSE...
>> ---
>> src/i830_driver.c | 23 ++++++++++++-----------
>> 1 files changed, 12 insertions(+), 11 deletions(-)
>>
>> diff --git a/src/i830_driver.c b/src/i830_driver.c
>> index 4c40d40..66ef55e 100644
>> --- a/src/i830_driver.c
>> +++ b/src/i830_driver.c
>> @@ -912,21 +912,22 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
>> i830_lvds_init(pScrn);
>>
>> if (IS_I9XX(pI830)) {
>> - if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
>> - Bool found = i830_sdvo_init(pScrn, SDVOB);
>> + Bool foundb = FALSE;
>> + Bool foundc = FALSE;
>>
>> - if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
>> - i830_hdmi_init(pScrn, SDVOB);
>> + if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
>> + foundb = i830_sdvo_init(pScrn, SDVOB);
>> + foundc = i830_sdvo_init(pScrn, SDVOC);
>> }
>>
>> - if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
>> - /* SDVOC detect bit is reserved on 965G/965GM */
>> - (IS_I965G(pI830) && !IS_G4X(pI830))) {
>> - Bool found = i830_sdvo_init(pScrn, SDVOC);
>> + if (!foundb && (INREG(SDVOB) & SDVO_DETECTED) &&
>> + SUPPORTS_INTEGRATED_HDMI(pI830))
>> + i830_hdmi_init(pScrn, SDVOB);
>> +
>> + if (!foundc && (INREG(SDVOC) & SDVO_DETECTED) &&
>> + SUPPORTS_INTEGRATED_HDMI(pI830))
>> + i830_hdmi_init(pScrn, SDVOC);
>>
>> - if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
>> - i830_hdmi_init(pScrn, SDVOC);
>> - }
>> } else {
>> i830_dvo_init(pScrn);
>> }
>> --
>> 1.5.4.4
>>
>>
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
More information about the Intel-gfx
mailing list