Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Side by Side Diff: drivers/gpu/drm/i915/i915_dma.c

Issue 2830015: Implement direct pineview backlight control. (Closed) Base URL: ssh://git@chromiumos-git/kernel.git
Patch Set: Move config file changes to another patch for upstreamability, as per msb. Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « drivers/gpu/drm/i915/i915_backlight.c ('k') | drivers/gpu/drm/i915/i915_drv.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- 1 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*-
2 */ 2 */
3 /* 3 /*
4 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 4 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
5 * All Rights Reserved. 5 * All Rights Reserved.
6 * 6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a 7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the 8 * copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including 9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish, 10 * without limitation the rights to use, copy, modify, merge, publish,
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 DRM_ERROR("failed to init modeset\n"); 1497 DRM_ERROR("failed to init modeset\n");
1498 goto out_workqueue_free; 1498 goto out_workqueue_free;
1499 } 1499 }
1500 } 1500 }
1501 1501
1502 /* Must be done after probing outputs */ 1502 /* Must be done after probing outputs */
1503 intel_opregion_init(dev, 0); 1503 intel_opregion_init(dev, 0);
1504 1504
1505 setup_timer(&dev_priv->hangcheck_timer, i915_hangcheck_elapsed, 1505 setup_timer(&dev_priv->hangcheck_timer, i915_hangcheck_elapsed,
1506 (unsigned long) dev); 1506 (unsigned long) dev);
1507
1508 i915_backlight_init(dev);
1509
1507 return 0; 1510 return 0;
1508 1511
1509 out_workqueue_free: 1512 out_workqueue_free:
1510 destroy_workqueue(dev_priv->wq); 1513 destroy_workqueue(dev_priv->wq);
1511 out_iomapfree: 1514 out_iomapfree:
1512 io_mapping_free(dev_priv->mm.gtt_mapping); 1515 io_mapping_free(dev_priv->mm.gtt_mapping);
1513 out_rmmap: 1516 out_rmmap:
1514 iounmap(dev_priv->regs); 1517 iounmap(dev_priv->regs);
1515 put_bridge: 1518 put_bridge:
1516 pci_dev_put(dev_priv->bridge_dev); 1519 pci_dev_put(dev_priv->bridge_dev);
1517 free_priv: 1520 free_priv:
1518 kfree(dev_priv); 1521 kfree(dev_priv);
1519 return ret; 1522 return ret;
1520 } 1523 }
1521 1524
1522 int i915_driver_unload(struct drm_device *dev) 1525 int i915_driver_unload(struct drm_device *dev)
1523 { 1526 {
1524 struct drm_i915_private *dev_priv = dev->dev_private; 1527 struct drm_i915_private *dev_priv = dev->dev_private;
1525 1528
1529 i915_backlight_exit(dev);
1530
1526 destroy_workqueue(dev_priv->wq); 1531 destroy_workqueue(dev_priv->wq);
1527 del_timer_sync(&dev_priv->hangcheck_timer); 1532 del_timer_sync(&dev_priv->hangcheck_timer);
1528 1533
1529 io_mapping_free(dev_priv->mm.gtt_mapping); 1534 io_mapping_free(dev_priv->mm.gtt_mapping);
1530 if (dev_priv->mm.gtt_mtrr >= 0) { 1535 if (dev_priv->mm.gtt_mtrr >= 0) {
1531 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base, 1536 mtrr_del(dev_priv->mm.gtt_mtrr, dev->agp->base,
1532 dev->agp->agp_info.aper_size * 1024 * 1024); 1537 dev->agp->agp_info.aper_size * 1024 * 1024);
1533 dev_priv->mm.gtt_mtrr = -1; 1538 dev_priv->mm.gtt_mtrr = -1;
1534 } 1539 }
1535 1540
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 * 1695 *
1691 * \param dev The device to be tested. 1696 * \param dev The device to be tested.
1692 * 1697 *
1693 * \returns 1698 * \returns
1694 * A value of 1 is always retured to indictate every i9x5 is AGP. 1699 * A value of 1 is always retured to indictate every i9x5 is AGP.
1695 */ 1700 */
1696 int i915_driver_device_is_agp(struct drm_device * dev) 1701 int i915_driver_device_is_agp(struct drm_device * dev)
1697 { 1702 {
1698 return 1; 1703 return 1;
1699 } 1704 }
OLDNEW
« no previous file with comments | « drivers/gpu/drm/i915/i915_backlight.c ('k') | drivers/gpu/drm/i915/i915_drv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698