@@ -166,17 +166,6 @@ void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count)
166
166
pipe_name (pipe ), start_vbl_count , end_vbl_count );
167
167
}
168
168
169
- static void intel_update_primary_plane (struct intel_crtc * crtc )
170
- {
171
- struct drm_i915_private * dev_priv = crtc -> base .dev -> dev_private ;
172
- int reg = DSPCNTR (crtc -> plane );
173
-
174
- if (crtc -> primary_enabled )
175
- I915_WRITE (reg , I915_READ (reg ) | DISPLAY_PLANE_ENABLE );
176
- else
177
- I915_WRITE (reg , I915_READ (reg ) & ~DISPLAY_PLANE_ENABLE );
178
- }
179
-
180
169
static void
181
170
skl_update_plane (struct drm_plane * drm_plane , struct drm_crtc * crtc ,
182
171
struct drm_framebuffer * fb ,
@@ -438,8 +427,6 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc,
438
427
linear_offset += src_h * fb -> pitches [0 ] + src_w * pixel_size ;
439
428
}
440
429
441
- intel_update_primary_plane (intel_crtc );
442
-
443
430
if (key -> flags ) {
444
431
I915_WRITE (SPKEYMINVAL (pipe , plane ), key -> min_value );
445
432
I915_WRITE (SPKEYMAXVAL (pipe , plane ), key -> max_value );
@@ -480,8 +467,6 @@ vlv_disable_plane(struct drm_plane *dplane, struct drm_crtc *crtc)
480
467
int pipe = intel_plane -> pipe ;
481
468
int plane = intel_plane -> plane ;
482
469
483
- intel_update_primary_plane (intel_crtc );
484
-
485
470
I915_WRITE (SPCNTR (pipe , plane ), 0 );
486
471
487
472
/* Activate double buffered register update */
@@ -585,8 +570,6 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
585
570
}
586
571
}
587
572
588
- intel_update_primary_plane (intel_crtc );
589
-
590
573
if (key -> flags ) {
591
574
I915_WRITE (SPRKEYVAL (pipe ), key -> min_value );
592
575
I915_WRITE (SPRKEYMAX (pipe ), key -> max_value );
@@ -629,8 +612,6 @@ ivb_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
629
612
struct intel_crtc * intel_crtc = to_intel_crtc (crtc );
630
613
int pipe = intel_plane -> pipe ;
631
614
632
- intel_update_primary_plane (intel_crtc );
633
-
634
615
I915_WRITE (SPRCTL (pipe ), I915_READ (SPRCTL (pipe )) & ~SPRITE_ENABLE );
635
616
/* Can't leave the scaler enabled... */
636
617
if (intel_plane -> can_scale )
@@ -725,8 +706,6 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
725
706
linear_offset += src_h * fb -> pitches [0 ] + src_w * pixel_size ;
726
707
}
727
708
728
- intel_update_primary_plane (intel_crtc );
729
-
730
709
if (key -> flags ) {
731
710
I915_WRITE (DVSKEYVAL (pipe ), key -> min_value );
732
711
I915_WRITE (DVSKEYMAX (pipe ), key -> max_value );
@@ -764,8 +743,6 @@ ilk_disable_plane(struct drm_plane *plane, struct drm_crtc *crtc)
764
743
struct intel_crtc * intel_crtc = to_intel_crtc (crtc );
765
744
int pipe = intel_plane -> pipe ;
766
745
767
- intel_update_primary_plane (intel_crtc );
768
-
769
746
I915_WRITE (DVSCNTR (pipe ), 0 );
770
747
/* Disable the scaler */
771
748
I915_WRITE (DVSSCALE (pipe ), 0 );
@@ -818,7 +795,7 @@ intel_post_enable_primary(struct drm_crtc *crtc)
818
795
* @crtc: the CRTC whose primary plane is to be disabled
819
796
*
820
797
* Performs potentially sleeping operations that must be done before the
821
- * primary plane is enabled , such as updating FBC and IPS. Note that this may
798
+ * primary plane is disabled , such as updating FBC and IPS. Note that this may
822
799
* be called due to an explicit primary plane update, or due to an implicit
823
800
* disable that is caused when a sprite plane completely hides the primary
824
801
* plane.
@@ -844,11 +821,6 @@ intel_pre_disable_primary(struct drm_crtc *crtc)
844
821
hsw_disable_ips (intel_crtc );
845
822
}
846
823
847
- static bool colorkey_enabled (struct intel_plane * intel_plane )
848
- {
849
- return intel_plane -> ckey .flags != I915_SET_COLORKEY_NONE ;
850
- }
851
-
852
824
static int
853
825
intel_check_sprite_plane (struct drm_plane * plane ,
854
826
struct intel_plane_state * state )
@@ -1022,23 +994,10 @@ intel_check_sprite_plane(struct drm_plane *plane,
1022
994
* If the sprite is completely covering the primary plane,
1023
995
* we can disable the primary and save power.
1024
996
*/
1025
- state -> hides_primary = fb != NULL && drm_rect_equals (dst , clip ) &&
1026
- !colorkey_enabled (intel_plane );
1027
- WARN_ON (state -> hides_primary && !state -> visible && intel_crtc -> active );
1028
-
1029
997
if (intel_crtc -> active ) {
1030
- if (intel_crtc -> primary_enabled == state -> hides_primary )
1031
- intel_crtc -> atomic .wait_for_flips = true;
1032
-
1033
- if (intel_crtc -> primary_enabled && state -> hides_primary )
1034
- intel_crtc -> atomic .pre_disable_primary = true;
1035
-
1036
998
intel_crtc -> atomic .fb_bits |=
1037
999
INTEL_FRONTBUFFER_SPRITE (intel_crtc -> pipe );
1038
1000
1039
- if (!intel_crtc -> primary_enabled && !state -> hides_primary )
1040
- intel_crtc -> atomic .post_enable_primary = true;
1041
-
1042
1001
if (intel_wm_need_update (plane , & state -> base ))
1043
1002
intel_crtc -> atomic .update_wm = true;
1044
1003
@@ -1081,8 +1040,6 @@ intel_commit_sprite_plane(struct drm_plane *plane,
1081
1040
plane -> fb = fb ;
1082
1041
1083
1042
if (intel_crtc -> active ) {
1084
- intel_crtc -> primary_enabled = !state -> hides_primary ;
1085
-
1086
1043
if (state -> visible ) {
1087
1044
crtc_x = state -> dst .x1 ;
1088
1045
crtc_y = state -> dst .y1 ;
0 commit comments