|
7 | 7 | #include <drm/drm_atomic_helper.h>
|
8 | 8 | #include <drm/drm_blend.h>
|
9 | 9 | #include <drm/drm_fourcc.h>
|
| 10 | +#include <drm/drm_print.h> |
10 | 11 |
|
11 |
| -#include "i915_drv.h" |
12 | 12 | #include "i915_reg.h"
|
| 13 | +#include "i915_utils.h" |
13 | 14 | #include "i9xx_plane.h"
|
14 | 15 | #include "i9xx_plane_regs.h"
|
15 | 16 | #include "intel_atomic.h"
|
@@ -631,92 +632,84 @@ static void
|
631 | 632 | bdw_primary_enable_flip_done(struct intel_plane *plane)
|
632 | 633 | {
|
633 | 634 | struct intel_display *display = to_intel_display(plane);
|
634 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
635 | 635 | enum pipe pipe = plane->pipe;
|
636 | 636 |
|
637 |
| - spin_lock_irq(&i915->irq_lock); |
| 637 | + spin_lock_irq(&display->irq.lock); |
638 | 638 | bdw_enable_pipe_irq(display, pipe, GEN8_PIPE_PRIMARY_FLIP_DONE);
|
639 |
| - spin_unlock_irq(&i915->irq_lock); |
| 639 | + spin_unlock_irq(&display->irq.lock); |
640 | 640 | }
|
641 | 641 |
|
642 | 642 | static void
|
643 | 643 | bdw_primary_disable_flip_done(struct intel_plane *plane)
|
644 | 644 | {
|
645 | 645 | struct intel_display *display = to_intel_display(plane);
|
646 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
647 | 646 | enum pipe pipe = plane->pipe;
|
648 | 647 |
|
649 |
| - spin_lock_irq(&i915->irq_lock); |
| 648 | + spin_lock_irq(&display->irq.lock); |
650 | 649 | bdw_disable_pipe_irq(display, pipe, GEN8_PIPE_PRIMARY_FLIP_DONE);
|
651 |
| - spin_unlock_irq(&i915->irq_lock); |
| 650 | + spin_unlock_irq(&display->irq.lock); |
652 | 651 | }
|
653 | 652 |
|
654 | 653 | static void
|
655 | 654 | ivb_primary_enable_flip_done(struct intel_plane *plane)
|
656 | 655 | {
|
657 | 656 | struct intel_display *display = to_intel_display(plane);
|
658 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
659 | 657 |
|
660 |
| - spin_lock_irq(&i915->irq_lock); |
| 658 | + spin_lock_irq(&display->irq.lock); |
661 | 659 | ilk_enable_display_irq(display, DE_PLANE_FLIP_DONE_IVB(plane->i9xx_plane));
|
662 |
| - spin_unlock_irq(&i915->irq_lock); |
| 660 | + spin_unlock_irq(&display->irq.lock); |
663 | 661 | }
|
664 | 662 |
|
665 | 663 | static void
|
666 | 664 | ivb_primary_disable_flip_done(struct intel_plane *plane)
|
667 | 665 | {
|
668 | 666 | struct intel_display *display = to_intel_display(plane);
|
669 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
670 | 667 |
|
671 |
| - spin_lock_irq(&i915->irq_lock); |
| 668 | + spin_lock_irq(&display->irq.lock); |
672 | 669 | ilk_disable_display_irq(display, DE_PLANE_FLIP_DONE_IVB(plane->i9xx_plane));
|
673 |
| - spin_unlock_irq(&i915->irq_lock); |
| 670 | + spin_unlock_irq(&display->irq.lock); |
674 | 671 | }
|
675 | 672 |
|
676 | 673 | static void
|
677 | 674 | ilk_primary_enable_flip_done(struct intel_plane *plane)
|
678 | 675 | {
|
679 | 676 | struct intel_display *display = to_intel_display(plane);
|
680 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
681 | 677 |
|
682 |
| - spin_lock_irq(&i915->irq_lock); |
| 678 | + spin_lock_irq(&display->irq.lock); |
683 | 679 | ilk_enable_display_irq(display, DE_PLANE_FLIP_DONE(plane->i9xx_plane));
|
684 |
| - spin_unlock_irq(&i915->irq_lock); |
| 680 | + spin_unlock_irq(&display->irq.lock); |
685 | 681 | }
|
686 | 682 |
|
687 | 683 | static void
|
688 | 684 | ilk_primary_disable_flip_done(struct intel_plane *plane)
|
689 | 685 | {
|
690 | 686 | struct intel_display *display = to_intel_display(plane);
|
691 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
692 | 687 |
|
693 |
| - spin_lock_irq(&i915->irq_lock); |
| 688 | + spin_lock_irq(&display->irq.lock); |
694 | 689 | ilk_disable_display_irq(display, DE_PLANE_FLIP_DONE(plane->i9xx_plane));
|
695 |
| - spin_unlock_irq(&i915->irq_lock); |
| 690 | + spin_unlock_irq(&display->irq.lock); |
696 | 691 | }
|
697 | 692 |
|
698 | 693 | static void
|
699 | 694 | vlv_primary_enable_flip_done(struct intel_plane *plane)
|
700 | 695 | {
|
701 | 696 | struct intel_display *display = to_intel_display(plane);
|
702 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
703 | 697 | enum pipe pipe = plane->pipe;
|
704 | 698 |
|
705 |
| - spin_lock_irq(&i915->irq_lock); |
| 699 | + spin_lock_irq(&display->irq.lock); |
706 | 700 | i915_enable_pipestat(display, pipe, PLANE_FLIP_DONE_INT_STATUS_VLV);
|
707 |
| - spin_unlock_irq(&i915->irq_lock); |
| 701 | + spin_unlock_irq(&display->irq.lock); |
708 | 702 | }
|
709 | 703 |
|
710 | 704 | static void
|
711 | 705 | vlv_primary_disable_flip_done(struct intel_plane *plane)
|
712 | 706 | {
|
713 | 707 | struct intel_display *display = to_intel_display(plane);
|
714 |
| - struct drm_i915_private *i915 = to_i915(plane->base.dev); |
715 | 708 | enum pipe pipe = plane->pipe;
|
716 | 709 |
|
717 |
| - spin_lock_irq(&i915->irq_lock); |
| 710 | + spin_lock_irq(&display->irq.lock); |
718 | 711 | i915_disable_pipestat(display, pipe, PLANE_FLIP_DONE_INT_STATUS_VLV);
|
719 |
| - spin_unlock_irq(&i915->irq_lock); |
| 712 | + spin_unlock_irq(&display->irq.lock); |
720 | 713 | }
|
721 | 714 |
|
722 | 715 | static bool i9xx_plane_can_async_flip(u64 modifier)
|
|
0 commit comments