[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] intel IGD driver intel_detect_pch() failure



On Fri, Dec 14, 2012 at 8:59 PM, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
> On Fri, 14 Dec 2012, G.R. wrote:
>> I did another experiment to change the header type to 0x80.
>> The devices now shows up as an ISA bridge.
>
> Great! Could you please resend the patch with your change to xen-devel?
>
Sure, do I need to start a separate thread? Or simply send a follow up?
>
>> But as long as the PIIX3 bridge cannot be overridden, I need another
>> hack in intel driver to make it work.
>>
>> This is the local hack I made, based on kernel 3.2.31.
>> But the function does not change in new version, other than new chip support.
>> Not sure if this change is acceptable to upstream...
>
> I am not the maintainer of the i915 driver, but my feeling is that it is
> acceptable.
> However when making changes to Linux, you need to make them against the
> the latest release or one of the latest RCs of Linus' git tree
> (git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git),
> for example v3.7. You also need to generate the patch with git diff.
>

Adding Intel guys to To list.
Could you check the change I made to the IGD driver.
If you think that's okay, I can create a patch against the latest 3.7 kernel.

>
>> --- i915_drv.c.orig    2012-10-10 10:31:37.000000000 +0800
>> +++ i915_drv.c    2012-12-14 19:10:32.000000000 +0800
>> @@ -303,6 +303,7 @@
>>  {
>>      struct drm_i915_private *dev_priv = dev->dev_private;
>>      struct pci_dev *pch;
>> +    unsigned found = 0;
>
> You don't need to introduce found: I would just use "continue" in the
> while loop if there isn't a match and "break" at the first good match.
>
That was part of the debugging log I added several days ago to root
cause the issue.
I'll have a clean version if upstream is okay with this 'while' change.

>>
>>      /*
>>       * The reason to probe ISA bridge instead of Dev31:Fun0 is to
>> @@ -311,11 +312,13 @@
>>       * underneath. This is a requirement from virtualization team.
>>       */
>>      pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL);
>> -    if (pch) {
>> +    while (pch) {
>>          if (pch->vendor == PCI_VENDOR_ID_INTEL) {
>>              int id;
>>              id = pch->device & INTEL_PCH_DEVICE_ID_MASK;
>>
>> +            found = pch->device;
>> +
>>              if (id == INTEL_PCH_IBX_DEVICE_ID_TYPE) {
>>                  dev_priv->pch_type = PCH_IBX;
>>                  DRM_DEBUG_KMS("Found Ibex Peak PCH\n");
>> @@ -326,9 +329,21 @@
>>                  /* PantherPoint is CPT compatible */
>>                  dev_priv->pch_type = PCH_CPT;
>>                  DRM_DEBUG_KMS("Found PatherPoint PCH\n");
>> +            } else {
>> +                found = 0;
>>              }
>> +                }
>> +                if (found) {
>> +            pci_dev_put(pch);
>> +            break;
>> +        } else {
>> +            struct pci_dev *curr = pch;
>> +            pch = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, curr);
>> +            pci_dev_put(curr);
>>          }
>> -        pci_dev_put(pch);
>> +    }
>> +    if (!found) {
>> +        DRM_DEBUG_KMS("intel PCH detect failed, nothing found\n");
>>      }
>>  }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.