@@ -2330,6 +2330,60 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
2330
2330
}
2331
2331
}
2332
2332
2333
+ static bool icl_plane_format_mod_supported (struct drm_plane * _plane ,
2334
+ u32 format , u64 modifier )
2335
+ {
2336
+ struct intel_plane * plane = to_intel_plane (_plane );
2337
+
2338
+ if (!intel_fb_plane_supports_modifier (plane , modifier ))
2339
+ return false;
2340
+
2341
+ switch (format ) {
2342
+ case DRM_FORMAT_XRGB8888 :
2343
+ case DRM_FORMAT_XBGR8888 :
2344
+ case DRM_FORMAT_ARGB8888 :
2345
+ case DRM_FORMAT_ABGR8888 :
2346
+ case DRM_FORMAT_XRGB2101010 :
2347
+ case DRM_FORMAT_XBGR2101010 :
2348
+ case DRM_FORMAT_ARGB2101010 :
2349
+ case DRM_FORMAT_ABGR2101010 :
2350
+ if (intel_fb_is_ccs_modifier (modifier ))
2351
+ return true;
2352
+ fallthrough ;
2353
+ case DRM_FORMAT_RGB565 :
2354
+ case DRM_FORMAT_YUYV :
2355
+ case DRM_FORMAT_YVYU :
2356
+ case DRM_FORMAT_UYVY :
2357
+ case DRM_FORMAT_VYUY :
2358
+ case DRM_FORMAT_NV12 :
2359
+ case DRM_FORMAT_XYUV8888 :
2360
+ case DRM_FORMAT_P010 :
2361
+ case DRM_FORMAT_P012 :
2362
+ case DRM_FORMAT_P016 :
2363
+ case DRM_FORMAT_XVYU2101010 :
2364
+ if (modifier == I915_FORMAT_MOD_Yf_TILED )
2365
+ return true;
2366
+ fallthrough ;
2367
+ case DRM_FORMAT_C8 :
2368
+ case DRM_FORMAT_XBGR16161616F :
2369
+ case DRM_FORMAT_ABGR16161616F :
2370
+ case DRM_FORMAT_XRGB16161616F :
2371
+ case DRM_FORMAT_ARGB16161616F :
2372
+ case DRM_FORMAT_Y210 :
2373
+ case DRM_FORMAT_Y212 :
2374
+ case DRM_FORMAT_Y216 :
2375
+ case DRM_FORMAT_XVYU12_16161616 :
2376
+ case DRM_FORMAT_XVYU16161616 :
2377
+ if (modifier == DRM_FORMAT_MOD_LINEAR ||
2378
+ modifier == I915_FORMAT_MOD_X_TILED ||
2379
+ modifier == I915_FORMAT_MOD_Y_TILED )
2380
+ return true;
2381
+ fallthrough ;
2382
+ default :
2383
+ return false;
2384
+ }
2385
+ }
2386
+
2333
2387
static bool gen12_plane_format_mod_supported (struct drm_plane * _plane ,
2334
2388
u32 format , u64 modifier )
2335
2389
{
@@ -2391,6 +2445,15 @@ static const struct drm_plane_funcs skl_plane_funcs = {
2391
2445
.format_mod_supported = skl_plane_format_mod_supported ,
2392
2446
};
2393
2447
2448
+ static const struct drm_plane_funcs icl_plane_funcs = {
2449
+ .update_plane = drm_atomic_helper_update_plane ,
2450
+ .disable_plane = drm_atomic_helper_disable_plane ,
2451
+ .destroy = intel_plane_destroy ,
2452
+ .atomic_duplicate_state = intel_plane_duplicate_state ,
2453
+ .atomic_destroy_state = intel_plane_destroy_state ,
2454
+ .format_mod_supported = icl_plane_format_mod_supported ,
2455
+ };
2456
+
2394
2457
static const struct drm_plane_funcs gen12_plane_funcs = {
2395
2458
.update_plane = drm_atomic_helper_update_plane ,
2396
2459
.disable_plane = drm_atomic_helper_disable_plane ,
@@ -2570,6 +2633,8 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
2570
2633
2571
2634
if (DISPLAY_VER (dev_priv ) >= 12 )
2572
2635
plane_funcs = & gen12_plane_funcs ;
2636
+ else if (DISPLAY_VER (dev_priv ) == 11 )
2637
+ plane_funcs = & icl_plane_funcs ;
2573
2638
else
2574
2639
plane_funcs = & skl_plane_funcs ;
2575
2640
0 commit comments