dfp.c (58f7553fa424fd0fd74e8b796d50c66014cebebe) dfp.c (4c0d42f7ba7f27054f6e21636850c70d624f3cd2)
1/*
2 * Copyright 2003 NVIDIA, Corporation
3 * Copyright 2006 Dave Airlie
4 * Copyright 2007 Maarten Maathuis
5 * Copyright 2007-2009 Stuart Bennett
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),

--- 474 unchanged lines hidden (view full) ---

483 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
484}
485
486static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode)
487{
488#ifdef __powerpc__
489 struct drm_device *dev = encoder->dev;
490 struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
1/*
2 * Copyright 2003 NVIDIA, Corporation
3 * Copyright 2006 Dave Airlie
4 * Copyright 2007 Maarten Maathuis
5 * Copyright 2007-2009 Stuart Bennett
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),

--- 474 unchanged lines hidden (view full) ---

483 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or));
484}
485
486static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode)
487{
488#ifdef __powerpc__
489 struct drm_device *dev = encoder->dev;
490 struct nvif_object *device = &nouveau_drm(dev)->client.device.object;
491 struct pci_dev *pdev = to_pci_dev(dev->dev);
491
492 /* BIOS scripts usually take care of the backlight, thanks
493 * Apple for your consistency.
494 */
492
493 /* BIOS scripts usually take care of the backlight, thanks
494 * Apple for your consistency.
495 */
495 if (dev->pdev->device == 0x0174 || dev->pdev->device == 0x0179 ||
496 dev->pdev->device == 0x0189 || dev->pdev->device == 0x0329) {
496 if (pdev->device == 0x0174 || pdev->device == 0x0179 ||
497 pdev->device == 0x0189 || pdev->device == 0x0329) {
497 if (mode == DRM_MODE_DPMS_ON) {
498 nvif_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 1 << 31, 1 << 31);
499 nvif_mask(device, NV_PCRTC_GPIO_EXT, 3, 1);
500 } else {
501 nvif_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 1 << 31, 0);
502 nvif_mask(device, NV_PCRTC_GPIO_EXT, 3, 0);
503 }
504 }

--- 218 unchanged lines hidden ---
498 if (mode == DRM_MODE_DPMS_ON) {
499 nvif_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 1 << 31, 1 << 31);
500 nvif_mask(device, NV_PCRTC_GPIO_EXT, 3, 1);
501 } else {
502 nvif_mask(device, NV_PBUS_DEBUG_DUALHEAD_CTL, 1 << 31, 0);
503 nvif_mask(device, NV_PCRTC_GPIO_EXT, 3, 0);
504 }
505 }

--- 218 unchanged lines hidden ---