@@ -349,7 +349,7 @@ skl_program_scaler(struct intel_plane *plane,
349349
350350 /* TODO: handle sub-pixel coordinates */
351351 if (is_planar_yuv_format (plane_state -> base .fb -> format -> format ) &&
352- !icl_is_hdr_plane (plane )) {
352+ !icl_is_hdr_plane (dev_priv , plane -> id )) {
353353 y_hphase = skl_scaler_calc_phase (1 , hscale , false);
354354 y_vphase = skl_scaler_calc_phase (1 , vscale , false);
355355
@@ -531,7 +531,7 @@ skl_program_plane(struct intel_plane *plane,
531531 I915_WRITE_FW (PLANE_AUX_DIST (pipe , plane_id ),
532532 (plane_state -> color_plane [1 ].offset - surf_addr ) | aux_stride );
533533
534- if (icl_is_hdr_plane (plane )) {
534+ if (icl_is_hdr_plane (dev_priv , plane_id )) {
535535 u32 cus_ctl = 0 ;
536536
537537 if (linked ) {
@@ -555,7 +555,7 @@ skl_program_plane(struct intel_plane *plane,
555555 if (INTEL_GEN (dev_priv ) >= 10 || IS_GEMINILAKE (dev_priv ))
556556 I915_WRITE_FW (PLANE_COLOR_CTL (pipe , plane_id ), plane_color_ctl );
557557
558- if (fb -> format -> is_yuv && icl_is_hdr_plane (plane ))
558+ if (fb -> format -> is_yuv && icl_is_hdr_plane (dev_priv , plane_id ))
559559 icl_program_input_csc (plane , crtc_state , plane_state );
560560
561561 skl_write_plane_wm (plane , crtc_state );
@@ -1508,15 +1508,17 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
15081508 /*
15091509 * 90/270 is not allowed with RGB64 16:16:16:16 and
15101510 * Indexed 8-bit. RGB 16-bit 5:6:5 is allowed gen11 onwards.
1511- * TBD: Add RGB64 case once its added in supported format
1512- * list.
15131511 */
15141512 switch (fb -> format -> format ) {
15151513 case DRM_FORMAT_RGB565 :
15161514 if (INTEL_GEN (dev_priv ) >= 11 )
15171515 break ;
15181516 /* fall through */
15191517 case DRM_FORMAT_C8 :
1518+ case DRM_FORMAT_XRGB16161616F :
1519+ case DRM_FORMAT_XBGR16161616F :
1520+ case DRM_FORMAT_ARGB16161616F :
1521+ case DRM_FORMAT_ABGR16161616F :
15201522 DRM_DEBUG_KMS ("Unsupported pixel format %s for 90/270!\n" ,
15211523 drm_get_format_name (fb -> format -> format ,
15221524 & format_name ));
@@ -1837,6 +1839,31 @@ static const uint32_t icl_plane_formats[] = {
18371839 DRM_FORMAT_Y416 ,
18381840};
18391841
1842+ static const uint32_t icl_hdr_plane_formats [] = {
1843+ DRM_FORMAT_C8 ,
1844+ DRM_FORMAT_RGB565 ,
1845+ DRM_FORMAT_XRGB8888 ,
1846+ DRM_FORMAT_XBGR8888 ,
1847+ DRM_FORMAT_ARGB8888 ,
1848+ DRM_FORMAT_ABGR8888 ,
1849+ DRM_FORMAT_XRGB2101010 ,
1850+ DRM_FORMAT_XBGR2101010 ,
1851+ DRM_FORMAT_XRGB16161616F ,
1852+ DRM_FORMAT_XBGR16161616F ,
1853+ DRM_FORMAT_ARGB16161616F ,
1854+ DRM_FORMAT_ABGR16161616F ,
1855+ DRM_FORMAT_YUYV ,
1856+ DRM_FORMAT_YVYU ,
1857+ DRM_FORMAT_UYVY ,
1858+ DRM_FORMAT_VYUY ,
1859+ DRM_FORMAT_Y210 ,
1860+ DRM_FORMAT_Y212 ,
1861+ DRM_FORMAT_Y216 ,
1862+ DRM_FORMAT_Y410 ,
1863+ DRM_FORMAT_Y412 ,
1864+ DRM_FORMAT_Y416 ,
1865+ };
1866+
18401867static const u32 skl_planar_formats [] = {
18411868 DRM_FORMAT_C8 ,
18421869 DRM_FORMAT_RGB565 ,
@@ -1897,6 +1924,35 @@ static const uint32_t icl_planar_formats[] = {
18971924 DRM_FORMAT_Y416 ,
18981925};
18991926
1927+ static const uint32_t icl_hdr_planar_formats [] = {
1928+ DRM_FORMAT_C8 ,
1929+ DRM_FORMAT_RGB565 ,
1930+ DRM_FORMAT_XRGB8888 ,
1931+ DRM_FORMAT_XBGR8888 ,
1932+ DRM_FORMAT_ARGB8888 ,
1933+ DRM_FORMAT_ABGR8888 ,
1934+ DRM_FORMAT_XRGB2101010 ,
1935+ DRM_FORMAT_XBGR2101010 ,
1936+ DRM_FORMAT_XRGB16161616F ,
1937+ DRM_FORMAT_XBGR16161616F ,
1938+ DRM_FORMAT_ARGB16161616F ,
1939+ DRM_FORMAT_ABGR16161616F ,
1940+ DRM_FORMAT_YUYV ,
1941+ DRM_FORMAT_YVYU ,
1942+ DRM_FORMAT_UYVY ,
1943+ DRM_FORMAT_VYUY ,
1944+ DRM_FORMAT_NV12 ,
1945+ DRM_FORMAT_P010 ,
1946+ DRM_FORMAT_P012 ,
1947+ DRM_FORMAT_P016 ,
1948+ DRM_FORMAT_Y210 ,
1949+ DRM_FORMAT_Y212 ,
1950+ DRM_FORMAT_Y216 ,
1951+ DRM_FORMAT_Y410 ,
1952+ DRM_FORMAT_Y412 ,
1953+ DRM_FORMAT_Y416 ,
1954+ };
1955+
19001956static const u64 skl_plane_format_modifiers_noccs [] = {
19011957 I915_FORMAT_MOD_Yf_TILED ,
19021958 I915_FORMAT_MOD_Y_TILED ,
@@ -2049,6 +2105,10 @@ static bool skl_plane_format_mod_supported(struct drm_plane *_plane,
20492105 return true;
20502106 /* fall through */
20512107 case DRM_FORMAT_C8 :
2108+ case DRM_FORMAT_XBGR16161616F :
2109+ case DRM_FORMAT_ABGR16161616F :
2110+ case DRM_FORMAT_XRGB16161616F :
2111+ case DRM_FORMAT_ARGB16161616F :
20522112 if (modifier == DRM_FORMAT_MOD_LINEAR ||
20532113 modifier == I915_FORMAT_MOD_X_TILED ||
20542114 modifier == I915_FORMAT_MOD_Y_TILED )
@@ -2185,7 +2245,10 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
21852245 plane -> update_slave = icl_update_slave ;
21862246
21872247 if (skl_plane_has_planar (dev_priv , pipe , plane_id )) {
2188- if (INTEL_GEN (dev_priv ) >= 11 ) {
2248+ if (icl_is_hdr_plane (dev_priv , plane_id )) {
2249+ formats = icl_hdr_planar_formats ;
2250+ num_formats = ARRAY_SIZE (icl_hdr_planar_formats );
2251+ } else if (INTEL_GEN (dev_priv ) >= 11 ) {
21892252 formats = icl_planar_formats ;
21902253 num_formats = ARRAY_SIZE (icl_planar_formats );
21912254 } else if (INTEL_GEN (dev_priv ) == 10 || IS_GEMINILAKE (dev_priv )) {
@@ -2195,6 +2258,9 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
21952258 formats = skl_planar_formats ;
21962259 num_formats = ARRAY_SIZE (skl_planar_formats );
21972260 }
2261+ } else if (icl_is_hdr_plane (dev_priv , plane_id )) {
2262+ formats = icl_hdr_plane_formats ;
2263+ num_formats = ARRAY_SIZE (icl_hdr_plane_formats );
21982264 } else if (INTEL_GEN (dev_priv ) >= 11 ) {
21992265 formats = icl_plane_formats ;
22002266 num_formats = ARRAY_SIZE (icl_plane_formats );
0 commit comments