Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
drm/i915: fix up error path leak in i915_cmdbuffer
drm/i915: fix unpaired i915 device mutex on entervt failure.
drm/i915: add support for G41 chipset
drm/i915: Enable ASLE if present
drm/i915: Unregister ACPI video driver when exiting
drm/i915: Register ACPI video even when not modesetting
drm/i915: fix transition to I915_TILING_NONE
drm/i915: Don't let an oops get triggered from irq_emit without dma init.
drm/i915: allow tiled front buffers on 965+

+34 -13
+2 -1
drivers/acpi/video.c
··· 2296 2296 return acpi_video_register(); 2297 2297 } 2298 2298 2299 - static void __exit acpi_video_exit(void) 2299 + void __exit acpi_video_exit(void) 2300 2300 { 2301 2301 2302 2302 acpi_bus_unregister_driver(&acpi_video_bus); ··· 2305 2305 2306 2306 return; 2307 2307 } 2308 + EXPORT_SYMBOL(acpi_video_exit); 2308 2309 2309 2310 module_init(acpi_video_init); 2310 2311 module_exit(acpi_video_exit);
+4 -4
drivers/gpu/drm/i915/i915_dma.c
··· 713 713 mutex_unlock(&dev->struct_mutex); 714 714 if (ret) { 715 715 DRM_ERROR("i915_dispatch_cmdbuffer failed\n"); 716 - goto fail_batch_free; 716 + goto fail_clip_free; 717 717 } 718 718 719 719 if (sarea_priv) 720 720 sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); 721 721 722 - fail_batch_free: 723 - drm_free(batch_data, cmdbuf->sz, DRM_MEM_DRIVER); 724 722 fail_clip_free: 725 723 drm_free(cliprects, 726 724 cmdbuf->num_cliprects * sizeof(struct drm_clip_rect), 727 725 DRM_MEM_DRIVER); 726 + fail_batch_free: 727 + drm_free(batch_data, cmdbuf->sz, DRM_MEM_DRIVER); 728 728 729 729 return ret; 730 730 } ··· 1232 1232 if (dev_priv->regs != NULL) 1233 1233 iounmap(dev_priv->regs); 1234 1234 1235 - intel_opregion_free(dev); 1235 + intel_opregion_free(dev, 0); 1236 1236 1237 1237 if (drm_core_check_feature(dev, DRIVER_MODESET)) { 1238 1238 intel_modeset_cleanup(dev);
+1 -1
drivers/gpu/drm/i915/i915_drv.c
··· 77 77 drm_irq_uninstall(dev); 78 78 } 79 79 80 - intel_opregion_free(dev); 80 + intel_opregion_free(dev, 1); 81 81 82 82 if (state.event == PM_EVENT_SUSPEND) { 83 83 /* Shut down the device */
+5 -3
drivers/gpu/drm/i915/i915_drv.h
··· 674 674 #ifdef CONFIG_ACPI 675 675 /* i915_opregion.c */ 676 676 extern int intel_opregion_init(struct drm_device *dev, int resume); 677 - extern void intel_opregion_free(struct drm_device *dev); 677 + extern void intel_opregion_free(struct drm_device *dev, int suspend); 678 678 extern void opregion_asle_intr(struct drm_device *dev); 679 679 extern void opregion_enable_asle(struct drm_device *dev); 680 680 #else 681 681 static inline int intel_opregion_init(struct drm_device *dev, int resume) { return 0; } 682 - static inline void intel_opregion_free(struct drm_device *dev) { return; } 682 + static inline void intel_opregion_free(struct drm_device *dev, int suspend) { return; } 683 683 static inline void opregion_asle_intr(struct drm_device *dev) { return; } 684 684 static inline void opregion_enable_asle(struct drm_device *dev) { return; } 685 685 #endif ··· 787 787 (dev)->pci_device == 0x2A42 || \ 788 788 (dev)->pci_device == 0x2E02 || \ 789 789 (dev)->pci_device == 0x2E12 || \ 790 - (dev)->pci_device == 0x2E22) 790 + (dev)->pci_device == 0x2E22 || \ 791 + (dev)->pci_device == 0x2E32) 791 792 792 793 #define IS_I965GM(dev) ((dev)->pci_device == 0x2A02) 793 794 ··· 797 796 #define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \ 798 797 (dev)->pci_device == 0x2E12 || \ 799 798 (dev)->pci_device == 0x2E22 || \ 799 + (dev)->pci_device == 0x2E32 || \ 800 800 IS_GM45(dev)) 801 801 802 802 #define IS_IGDG(dev) ((dev)->pci_device == 0xa001)
+3 -1
drivers/gpu/drm/i915/i915_gem.c
··· 4087 4087 dev_priv->mm.suspended = 0; 4088 4088 4089 4089 ret = i915_gem_init_ringbuffer(dev); 4090 - if (ret != 0) 4090 + if (ret != 0) { 4091 + mutex_unlock(&dev->struct_mutex); 4091 4092 return ret; 4093 + } 4092 4094 4093 4095 spin_lock(&dev_priv->mm.active_list_lock); 4094 4096 BUG_ON(!list_empty(&dev_priv->mm.active_list));
-1
drivers/gpu/drm/i915/i915_gem_tiling.c
··· 283 283 mutex_lock(&dev->struct_mutex); 284 284 285 285 if (args->tiling_mode == I915_TILING_NONE) { 286 - obj_priv->tiling_mode = I915_TILING_NONE; 287 286 args->swizzle_mode = I915_BIT_6_SWIZZLE_NONE; 288 287 } else { 289 288 if (args->tiling_mode == I915_TILING_X)
+1 -1
drivers/gpu/drm/i915/i915_irq.c
··· 406 406 drm_i915_irq_emit_t *emit = data; 407 407 int result; 408 408 409 - if (!dev_priv) { 409 + if (!dev_priv || !dev_priv->ring.virtual_start) { 410 410 DRM_ERROR("called with no initialization\n"); 411 411 return -EINVAL; 412 412 }
+5 -1
drivers/gpu/drm/i915/i915_opregion.c
··· 386 386 if (mboxes & MBOX_ASLE) { 387 387 DRM_DEBUG("ASLE supported\n"); 388 388 opregion->asle = base + OPREGION_ASLE_OFFSET; 389 + opregion_enable_asle(dev); 389 390 } 390 391 391 392 if (!resume) ··· 410 409 return err; 411 410 } 412 411 413 - void intel_opregion_free(struct drm_device *dev) 412 + void intel_opregion_free(struct drm_device *dev, int suspend) 414 413 { 415 414 struct drm_i915_private *dev_priv = dev->dev_private; 416 415 struct intel_opregion *opregion = &dev_priv->opregion; 417 416 418 417 if (!opregion->enabled) 419 418 return; 419 + 420 + if (!suspend) 421 + acpi_video_exit(); 420 422 421 423 opregion->acpi->drdy = 0; 422 424
+1
drivers/gpu/drm/i915/i915_reg.h
··· 1446 1446 #define DISPPLANE_NO_LINE_DOUBLE 0 1447 1447 #define DISPPLANE_STEREO_POLARITY_FIRST 0 1448 1448 #define DISPPLANE_STEREO_POLARITY_SECOND (1<<18) 1449 + #define DISPPLANE_TILED (1<<10) 1449 1450 #define DSPAADDR 0x70184 1450 1451 #define DSPASTRIDE 0x70188 1451 1452 #define DSPAPOS 0x7018C /* reserved */
+9
drivers/gpu/drm/i915/intel_display.c
··· 657 657 int dspbase = (pipe == 0 ? DSPAADDR : DSPBADDR); 658 658 int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF); 659 659 int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE; 660 + int dsptileoff = (pipe == 0 ? DSPATILEOFF : DSPBTILEOFF); 660 661 int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR; 661 662 u32 dspcntr, alignment; 662 663 int ret; ··· 734 733 mutex_unlock(&dev->struct_mutex); 735 734 return -EINVAL; 736 735 } 736 + if (IS_I965G(dev)) { 737 + if (obj_priv->tiling_mode != I915_TILING_NONE) 738 + dspcntr |= DISPPLANE_TILED; 739 + else 740 + dspcntr &= ~DISPPLANE_TILED; 741 + } 742 + 737 743 I915_WRITE(dspcntr_reg, dspcntr); 738 744 739 745 Start = obj_priv->gtt_offset; ··· 753 745 I915_READ(dspbase); 754 746 I915_WRITE(dspsurf, Start); 755 747 I915_READ(dspsurf); 748 + I915_WRITE(dsptileoff, (y << 16) | x); 756 749 } else { 757 750 I915_WRITE(dspbase, Start + Offset); 758 751 I915_READ(dspbase);
+2
include/acpi/video.h
··· 3 3 4 4 #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) 5 5 extern int acpi_video_register(void); 6 + extern int acpi_video_exit(void); 6 7 #else 7 8 static inline int acpi_video_register(void) { return 0; } 9 + static inline void acpi_video_exit(void) { return; } 8 10 #endif 9 11 10 12 #endif
+1
include/drm/drm_pciids.h
··· 532 532 {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 533 533 {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 534 534 {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 535 + {0x8086, 0x2e32, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 535 536 {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 536 537 {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ 537 538 {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \