aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_connector.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2011-03-22 19:30:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-22 20:43:59 -0400
commit7eae3efa13c5d1c8e7d8dd0504ad524963b8add1 (patch)
tree3e8326d5a377b55916ffd48c179821148881f4f1 /drivers/gpu/drm/nouveau/nouveau_connector.c
parent63ec0119d3720034dfd626c9785aefa5a6f972ca (diff)
nouveau: change the backlight parent device to the connector, not the PCI dev
We may eventually end up with per-connector backlights, especially with ddcci devices. Make sure that the parent node for the backlight device is the connector rather than the PCI device. Signed-off-by: Matthew Garrett <mjg@redhat.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexdeucher@gmail.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_connector.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_connector.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 390d82c3c4b0..7ae151109a66 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -116,6 +116,10 @@ nouveau_connector_destroy(struct drm_connector *connector)
116 nouveau_connector_hotplug, connector); 116 nouveau_connector_hotplug, connector);
117 } 117 }
118 118
119 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
120 connector->connector_type == DRM_MODE_CONNECTOR_eDP)
121 nouveau_backlight_exit(connector);
122
119 kfree(nv_connector->edid); 123 kfree(nv_connector->edid);
120 drm_sysfs_connector_remove(connector); 124 drm_sysfs_connector_remove(connector);
121 drm_connector_cleanup(connector); 125 drm_connector_cleanup(connector);
@@ -894,6 +898,11 @@ nouveau_connector_create(struct drm_device *dev, int index)
894 } 898 }
895 899
896 drm_sysfs_connector_add(connector); 900 drm_sysfs_connector_add(connector);
901
902 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
903 connector->connector_type == DRM_MODE_CONNECTOR_eDP)
904 nouveau_backlight_init(connector);
905
897 dcb->drm = connector; 906 dcb->drm = connector;
898 return dcb->drm; 907 return dcb->drm;
899 908