tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: HEAD and lost console with Intel GM45
actually, i have a new patch for this that should fix up the
problem properly.
if people can test this that would be great. it works for me
on radeon.
.mrg.
Index: bsd-core/drm_drv.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/drm/dist/bsd-core/drm_drv.c,v
retrieving revision 1.15
diff -p -r1.15 drm_drv.c
*** bsd-core/drm_drv.c 23 Aug 2009 08:55:16 -0000 1.15
--- bsd-core/drm_drv.c 23 Aug 2009 23:42:44 -0000
*************** drm_probe(struct pci_attach_args *pa, dr
*** 334,347 ****
void
drm_attach(device_t kdev, struct pci_attach_args *pa, drm_pci_id_list_t
*idlist)
{
struct drm_device *dev;
! int unit;
unit = device_unit(kdev);
if (unit < 0 || unit >= DRM_MAXUNITS)
! panic("drm_attach: device unit %d invalid", unit);
if (drm_units[unit] != NULL)
! panic("drm_attach: unit %d already attached", unit);
dev = device_private(kdev);
dev->device = kdev;
--- 334,360 ----
void
drm_attach(device_t kdev, struct pci_attach_args *pa, drm_pci_id_list_t
*idlist)
{
+ device_t parent_dev;
struct drm_device *dev;
! int unit, parent_unit;
unit = device_unit(kdev);
if (unit < 0 || unit >= DRM_MAXUNITS)
! panic("drm_attach: device unit %d invalid", unit);
if (drm_units[unit] != NULL)
! panic("drm_attach: unit %d already attached", unit);
!
! /*
! * this is kind of ugly but we fake up the pci "domain" by using
! * our pci unit number, so, find our parent pci device's unit...
! */
! parent_dev = kdev;
! do {
! parent_dev = device_parent(parent_dev);
! } while (parent_dev && !device_is_a(parent_dev, "pci"));
! parent_unit = device_unit(parent_dev);
! if (parent_unit < 0)
! panic("drm_attach: device parent_unit %d invalid", parent_unit);
dev = device_private(kdev);
dev->device = kdev;
*************** drm_attach(device_t kdev, struct pci_att
*** 389,396 ****
memcpy(&dev->pa, pa, sizeof(dev->pa));
dev->irq = pa->pa_intrline;
! /* XXX this needs to be deal with for other platforms, e.g. alpha */
! dev->pci_domain = 0;
dev->pci_bus = pa->pa_bus;
dev->pci_slot = pa->pa_device;
dev->pci_func = pa->pa_function;
--- 402,408 ----
memcpy(&dev->pa, pa, sizeof(dev->pa));
dev->irq = pa->pa_intrline;
! dev->pci_domain = parent_unit;
dev->pci_bus = pa->pa_bus;
dev->pci_slot = pa->pa_device;
dev->pci_func = pa->pa_function;
Home |
Main Index |
Thread Index |
Old Index