@@ -2722,6 +2722,17 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
2722
2722
if (size_aligned * 2 > dev_priv -> stolen_usable_size )
2723
2723
return false;
2724
2724
2725
+ switch (fb -> modifier ) {
2726
+ case DRM_FORMAT_MOD_LINEAR :
2727
+ case I915_FORMAT_MOD_X_TILED :
2728
+ case I915_FORMAT_MOD_Y_TILED :
2729
+ break ;
2730
+ default :
2731
+ DRM_DEBUG_DRIVER ("Unsupported modifier for initial FB: 0x%llx\n" ,
2732
+ fb -> modifier );
2733
+ return false;
2734
+ }
2735
+
2725
2736
mutex_lock (& dev -> struct_mutex );
2726
2737
obj = i915_gem_object_create_stolen_for_preallocated (dev_priv ,
2727
2738
base_aligned ,
@@ -2731,8 +2742,17 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
2731
2742
if (!obj )
2732
2743
return false;
2733
2744
2734
- if (plane_config -> tiling == I915_TILING_X )
2735
- obj -> tiling_and_stride = fb -> pitches [0 ] | I915_TILING_X ;
2745
+ switch (plane_config -> tiling ) {
2746
+ case I915_TILING_NONE :
2747
+ break ;
2748
+ case I915_TILING_X :
2749
+ case I915_TILING_Y :
2750
+ obj -> tiling_and_stride = fb -> pitches [0 ] | plane_config -> tiling ;
2751
+ break ;
2752
+ default :
2753
+ MISSING_CASE (plane_config -> tiling );
2754
+ return false;
2755
+ }
2736
2756
2737
2757
mode_cmd .pixel_format = fb -> format -> format ;
2738
2758
mode_cmd .width = fb -> width ;
@@ -8865,6 +8885,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
8865
8885
fb -> modifier = I915_FORMAT_MOD_X_TILED ;
8866
8886
break ;
8867
8887
case PLANE_CTL_TILED_Y :
8888
+ plane_config -> tiling = I915_TILING_Y ;
8868
8889
if (val & PLANE_CTL_RENDER_DECOMPRESSION_ENABLE )
8869
8890
fb -> modifier = I915_FORMAT_MOD_Y_TILED_CCS ;
8870
8891
else
0 commit comments