[v3] drm/i915/tgl: Add Wa_1606054188:tgl
diff mbox series

Message ID 20200201082834.10163-1-matthew.s.atwood@intel.com
State New
Headers show
Series
  • [v3] drm/i915/tgl: Add Wa_1606054188:tgl
Related show

Commit Message

Matt Atwood Feb. 1, 2020, 8:28 a.m. UTC
On Tiger Lake we do not support source keying in the pixel formats P010,
P012, P016.

v2: Move WA to end of function. Create helper function for format
check. Less verbose debugging messaging.

v3: whitespace

Bspec: 52890
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
CC: Ville Syrjälä <ville.syrjala@intel.com>
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
 drivers/gpu/drm/i915/display/intel_sprite.c | 22 +++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

kernel test robot Feb. 3, 2020, 5:53 a.m. UTC | #1
Hi Matt,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip v5.5 next-20200131]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Matt-Atwood/drm-i915-tgl-Add-Wa_1606054188-tgl/20200203-082706
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-s2-20200203 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/display/intel_sprite.c:42:0:
   drivers/gpu/drm/i915/display/intel_sprite.c: In function 'skl_plane_check_nv12_rotation':
>> drivers/gpu/drm/i915/display/intel_sprite.c:2181:13: error: 'dev_priv' undeclared (first use in this function); did you mean 'dev_crit'?
     if (IS_GEN(dev_priv, 12) &&
                ^
   drivers/gpu/drm/i915/i915_drv.h:1372:33: note: in definition of macro 'INTEL_INFO'
    #define INTEL_INFO(dev_priv) (&(dev_priv)->__info)
                                    ^~~~~~~~
>> drivers/gpu/drm/i915/display/intel_sprite.c:2181:6: note: in expansion of macro 'IS_GEN'
     if (IS_GEN(dev_priv, 12) &&
         ^~~~~~
   drivers/gpu/drm/i915/display/intel_sprite.c:2181:13: note: each undeclared identifier is reported only once for each function it appears in
     if (IS_GEN(dev_priv, 12) &&
                ^
   drivers/gpu/drm/i915/i915_drv.h:1372:33: note: in definition of macro 'INTEL_INFO'
    #define INTEL_INFO(dev_priv) (&(dev_priv)->__info)
                                    ^~~~~~~~
>> drivers/gpu/drm/i915/display/intel_sprite.c:2181:6: note: in expansion of macro 'IS_GEN'
     if (IS_GEN(dev_priv, 12) &&
         ^~~~~~

vim +2181 drivers/gpu/drm/i915/display/intel_sprite.c

  2160	
  2161	static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
  2162	{
  2163		const struct drm_framebuffer *fb = plane_state->hw.fb;
  2164		unsigned int rotation = plane_state->hw.rotation;
  2165		int src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
  2166	
  2167		/* Display WA #1106 */
  2168		if (intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier) &&
  2169		    src_w & 3 &&
  2170		    (rotation == DRM_MODE_ROTATE_270 ||
  2171		     rotation == (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90))) {
  2172			DRM_DEBUG_KMS("src width must be multiple of 4 for rotated planar YUV\n");
  2173			return -EINVAL;
  2174		}
  2175	
  2176		/* Wa_1606054188:tgl
  2177		 *
  2178		 * TODO: Add format RGB64i when implemented.
  2179		 *
  2180		 */
> 2181		if (IS_GEN(dev_priv, 12) &&
  2182		   plane_state->ckey.flags & I915_SET_COLORKEY_SOURCE &&
  2183		   intel_format_is_p01x(fb->format->format))
  2184			DRM_DEBUG_KMS("Source color keying not supported with P01x formats\n");
  2185	
  2186		return 0;
  2187	}
  2188	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
kernel test robot Feb. 3, 2020, 9:24 a.m. UTC | #2
Hi Matt,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip v5.5 next-20200131]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Matt-Atwood/drm-i915-tgl-Add-Wa_1606054188-tgl/20200203-082706
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-s2-20200203 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/display/intel_sprite.c:42:0:
   drivers/gpu/drm/i915/display/intel_sprite.c: In function 'skl_plane_check_nv12_rotation':
>> drivers/gpu/drm/i915/display/intel_sprite.c:2181:13: error: 'dev_priv' undeclared (first use in this function)
     if (IS_GEN(dev_priv, 12) &&
                ^
   drivers/gpu/drm/i915/i915_drv.h:1372:33: note: in definition of macro 'INTEL_INFO'
    #define INTEL_INFO(dev_priv) (&(dev_priv)->__info)
                                    ^~~~~~~~
   drivers/gpu/drm/i915/display/intel_sprite.c:2181:6: note: in expansion of macro 'IS_GEN'
     if (IS_GEN(dev_priv, 12) &&
         ^~~~~~
   drivers/gpu/drm/i915/display/intel_sprite.c:2181:13: note: each undeclared identifier is reported only once for each function it appears in
     if (IS_GEN(dev_priv, 12) &&
                ^
   drivers/gpu/drm/i915/i915_drv.h:1372:33: note: in definition of macro 'INTEL_INFO'
    #define INTEL_INFO(dev_priv) (&(dev_priv)->__info)
                                    ^~~~~~~~
   drivers/gpu/drm/i915/display/intel_sprite.c:2181:6: note: in expansion of macro 'IS_GEN'
     if (IS_GEN(dev_priv, 12) &&
         ^~~~~~

vim +/dev_priv +2181 drivers/gpu/drm/i915/display/intel_sprite.c

  2160	
  2161	static int skl_plane_check_nv12_rotation(const struct intel_plane_state *plane_state)
  2162	{
  2163		const struct drm_framebuffer *fb = plane_state->hw.fb;
  2164		unsigned int rotation = plane_state->hw.rotation;
  2165		int src_w = drm_rect_width(&plane_state->uapi.src) >> 16;
  2166	
  2167		/* Display WA #1106 */
  2168		if (intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier) &&
  2169		    src_w & 3 &&
  2170		    (rotation == DRM_MODE_ROTATE_270 ||
  2171		     rotation == (DRM_MODE_REFLECT_X | DRM_MODE_ROTATE_90))) {
  2172			DRM_DEBUG_KMS("src width must be multiple of 4 for rotated planar YUV\n");
  2173			return -EINVAL;
  2174		}
  2175	
  2176		/* Wa_1606054188:tgl
  2177		 *
  2178		 * TODO: Add format RGB64i when implemented.
  2179		 *
  2180		 */
> 2181		if (IS_GEN(dev_priv, 12) &&
  2182		   plane_state->ckey.flags & I915_SET_COLORKEY_SOURCE &&
  2183		   intel_format_is_p01x(fb->format->format))
  2184			DRM_DEBUG_KMS("Source color keying not supported with P01x formats\n");
  2185	
  2186		return 0;
  2187	}
  2188	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index 2f277d1fc6f1..71ff9849b5c0 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -2070,6 +2070,18 @@  vlv_sprite_check(struct intel_crtc_state *crtc_state,
 	return 0;
 }
 
+static bool intel_format_is_p01x(int format)
+{
+	switch (format) {
+	case DRM_FORMAT_P010:
+	case DRM_FORMAT_P012:
+	case DRM_FORMAT_P016:
+		return true;
+	default:
+		return false;
+	}
+}
+
 static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
 			      const struct intel_plane_state *plane_state)
 {
@@ -2143,6 +2155,16 @@  static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
 		return -EINVAL;
 	}
 
+	/* Wa_1606054188:tgl
+	 *
+	 * TODO: Add format RGB64i when implemented.
+	 *
+	 */
+	if (IS_GEN(dev_priv, 12) &&
+	   plane_state->ckey.flags & I915_SET_COLORKEY_SOURCE &&
+	   intel_format_is_p01x(fb->format->format))
+		DRM_DEBUG_KMS("Source color keying not supported with P01x formats\n");
+
 	return 0;
 }