Ilia Mirkin
2014-Feb-13 08:39 UTC
[Nouveau] [PATCH 1/2] drm/nouveau: make hdmi device finding failure prints debug level
The hdmi device is required for runtime pm. However it is not available on many esp older devices, which were all seeing these error messages. Take this opportunity to also convert to nv_debug instead of the DRM_* messages, like the rest of nouveau does. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- drivers/gpu/drm/nouveau/nouveau_drm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 89c484d..1c7c8a7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -300,22 +300,21 @@ static int nouveau_drm_probe(struct pci_dev *pdev, #define PCI_CLASS_MULTIMEDIA_HD_AUDIO 0x0403 static void -nouveau_get_hdmi_dev(struct drm_device *dev) +nouveau_get_hdmi_dev(struct nouveau_drm *drm) { - struct nouveau_drm *drm = dev->dev_private; - struct pci_dev *pdev = dev->pdev; + struct pci_dev *pdev = drm->dev->pdev; /* subfunction one is a hdmi audio device? */ drm->hdmi_device = pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(PCI_SLOT(pdev->devfn), 1)); if (!drm->hdmi_device) { - DRM_INFO("hdmi device not found %d %d %d\n", pdev->bus->number, PCI_SLOT(pdev->devfn), 1); + nv_debug(drm, "hdmi device not found %d %d %d\n", pdev->bus->number, PCI_SLOT(pdev->devfn), 1); return; } if ((drm->hdmi_device->class >> 8) != PCI_CLASS_MULTIMEDIA_HD_AUDIO) { - DRM_INFO("possible hdmi device not audio %d\n", drm->hdmi_device->class); + nv_debug(drm, "possible hdmi device not audio %d\n", drm->hdmi_device->class); pci_dev_put(drm->hdmi_device); drm->hdmi_device = NULL; return; @@ -340,7 +339,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) INIT_LIST_HEAD(&drm->clients); spin_lock_init(&drm->tile.lock); - nouveau_get_hdmi_dev(dev); + nouveau_get_hdmi_dev(drm); /* make sure AGP controller is in a consistent state before we * (possibly) execute vbios init tables (see nouveau_agp.h) -- 1.8.3.2
Ilia Mirkin
2014-Feb-13 08:39 UTC
[Nouveau] [PATCH 2/2] drm/nouveau: use nv_debug for NV_DEBUG
It's really confusing for NV_DEBUG's printing to be controlled via drm.debug while everything else is controlled via nouveau.debug. These messages can be turned on with nouveau.debug=CLIENT=debug. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- It's a bit annoying that the DRM messages are conflated with the various clients. Perhaps we should add some code to make the DRM messages use "DRM" instead? drivers/gpu/drm/nouveau/nouveau_drm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h b/drivers/gpu/drm/nouveau/nouveau_drm.h index 23ca7a5..7efbafa 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.h +++ b/drivers/gpu/drm/nouveau/nouveau_drm.h @@ -161,10 +161,7 @@ int nouveau_pmops_resume(struct device *); #define NV_ERROR(cli, fmt, args...) nv_error((cli), fmt, ##args) #define NV_WARN(cli, fmt, args...) nv_warn((cli), fmt, ##args) #define NV_INFO(cli, fmt, args...) nv_info((cli), fmt, ##args) -#define NV_DEBUG(cli, fmt, args...) do { \ - if (drm_debug & DRM_UT_DRIVER) \ - nv_info((cli), fmt, ##args); \ -} while (0) +#define NV_DEBUG(cli, fmt, args...) nv_debug((cli), fmt, ##args) extern int nouveau_modeset; -- 1.8.3.2
Possibly Parallel Threads
- [PATCH] [RFC] drm/nouveau: bring back hdmi audio device after switcheroo power down
- [PATCH] [RFC] drm/nouveau: bring back hdmi audio device after switcheroo power down
- [PATCH] drm: silence unimportant HDMI status message
- [PATCH v2] drm/nouveau: use nv_debug for NV_DEBUG, make DRM a separate subflag
- [PATCH 10/30] drm/nouveau: deprecate pci_get_bus_and_slot()