diff mbox series

[v3,2/4] drm/i915/icl: Implement Display WA_1405510057

Message ID 20181030084504.21537-2-radhakrishna.sripada@intel.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Sripada, Radhakrishna Oct. 30, 2018, 8:45 a.m. UTC
Display WA_1405510057 asks to not enable YUV 420 HDMI
10bpc when horizontal blank size mod 8 reminder is 2.

V2: Rebase(r-b: Anusha)
V3: crtc_state->s/ycbcr420/output_format/

Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

kernel test robot Oct. 30, 2018, 9:17 a.m. UTC | #1
Hi Radhakrishna,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.19 next-20181030]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Radhakrishna-Sripada/drm-i915-icl-Add-WaEnable32PlaneMode/20181030-164539
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x005-201843 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/intel_hdmi.c: In function 'hdmi_deep_color_possible':
>> drivers/gpu//drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                     ^~~~~~~~~~~~~
                     output_types
>> drivers/gpu//drm/i915/intel_hdmi.c:1654:35: error: 'INTEL_OUTPUT_FORMAT_YCBCR420' undeclared (first use in this function); did you mean 'INTEL_OUTPUT_DP_MST'?
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                      INTEL_OUTPUT_DP_MST
   drivers/gpu//drm/i915/intel_hdmi.c:1654:35: note: each undeclared identifier is reported only once for each function it appears in

vim +1654 drivers/gpu//drm/i915/intel_hdmi.c

  1591	
  1592	static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
  1593					     int bpc)
  1594	{
  1595		struct drm_i915_private *dev_priv =
  1596			to_i915(crtc_state->base.crtc->dev);
  1597		struct drm_atomic_state *state = crtc_state->base.state;
  1598		struct drm_connector_state *connector_state;
  1599		struct drm_connector *connector;
  1600		const struct drm_display_mode *adjusted_mode =
  1601			&crtc_state->base.adjusted_mode;
  1602		int i;
  1603	
  1604		if (HAS_GMCH_DISPLAY(dev_priv))
  1605			return false;
  1606	
  1607		if (bpc == 10 && INTEL_GEN(dev_priv) < 11)
  1608			return false;
  1609	
  1610		if (crtc_state->pipe_bpp <= 8*3)
  1611			return false;
  1612	
  1613		if (!crtc_state->has_hdmi_sink)
  1614			return false;
  1615	
  1616		/*
  1617		 * HDMI deep color affects the clocks, so it's only possible
  1618		 * when not cloning with other encoder types.
  1619		 */
  1620		if (crtc_state->output_types != 1 << INTEL_OUTPUT_HDMI)
  1621			return false;
  1622	
  1623		for_each_new_connector_in_state(state, connector, connector_state, i) {
  1624			const struct drm_display_info *info = &connector->display_info;
  1625	
  1626			if (connector_state->crtc != crtc_state->base.crtc)
  1627				continue;
  1628	
  1629			if (crtc_state->ycbcr420) {
  1630				const struct drm_hdmi_info *hdmi = &info->hdmi;
  1631	
  1632				if (bpc == 12 && !(hdmi->y420_dc_modes &
  1633						   DRM_EDID_YCBCR420_DC_36))
  1634					return false;
  1635				else if (bpc == 10 && !(hdmi->y420_dc_modes &
  1636							DRM_EDID_YCBCR420_DC_30))
  1637					return false;
  1638			} else {
  1639				if (bpc == 12 && !(info->edid_hdmi_dc_modes &
  1640						   DRM_EDID_HDMI_DC_36))
  1641					return false;
  1642				else if (bpc == 10 && !(info->edid_hdmi_dc_modes &
  1643							DRM_EDID_HDMI_DC_30))
  1644					return false;
  1645			}
  1646		}
  1647	
  1648		/* Display WA #1139: glk */
  1649		if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
  1650		    adjusted_mode->htotal > 5460)
  1651			return false;
  1652	
  1653		/* Display Wa_1405510057:icl */
> 1654		if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
  1655		    bpc == 10 && IS_ICELAKE(dev_priv) &&
  1656		    (adjusted_mode->crtc_hblank_end -
  1657		     adjusted_mode->crtc_hblank_start) % 8 == 2)
  1658			return false;
  1659	
  1660		return true;
  1661	}
  1662	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
kernel test robot Oct. 30, 2018, 9:30 a.m. UTC | #2
Hi Radhakrishna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.19 next-20181030]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Radhakrishna-Sripada/drm-i915-icl-Add-WaEnable32PlaneMode/20181030-164539
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x075-201843 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/string.h:6:0,
                    from include/linux/uuid.h:20,
                    from include/linux/mod_devicetable.h:13,
                    from include/linux/i2c.h:29,
                    from drivers/gpu/drm/i915/intel_hdmi.c:29:
   drivers/gpu/drm/i915/intel_hdmi.c: In function 'hdmi_deep_color_possible':
   drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                     ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
     ^~
   drivers/gpu/drm/i915/intel_hdmi.c:1654:35: error: 'INTEL_OUTPUT_FORMAT_YCBCR420' undeclared (first use in this function); did you mean 'INTEL_OUTPUT_DP_MST'?
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                                      ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
     ^~
   drivers/gpu/drm/i915/intel_hdmi.c:1654:35: note: each undeclared identifier is reported only once for each function it appears in
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                                      ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
     ^~
   drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                     ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
     ^~
   drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
                     ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
     if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
     ^~

vim +/if +1654 drivers/gpu/drm/i915/intel_hdmi.c

  1591	
  1592	static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
  1593					     int bpc)
  1594	{
  1595		struct drm_i915_private *dev_priv =
  1596			to_i915(crtc_state->base.crtc->dev);
  1597		struct drm_atomic_state *state = crtc_state->base.state;
  1598		struct drm_connector_state *connector_state;
  1599		struct drm_connector *connector;
  1600		const struct drm_display_mode *adjusted_mode =
  1601			&crtc_state->base.adjusted_mode;
  1602		int i;
  1603	
  1604		if (HAS_GMCH_DISPLAY(dev_priv))
  1605			return false;
  1606	
  1607		if (bpc == 10 && INTEL_GEN(dev_priv) < 11)
  1608			return false;
  1609	
  1610		if (crtc_state->pipe_bpp <= 8*3)
  1611			return false;
  1612	
  1613		if (!crtc_state->has_hdmi_sink)
  1614			return false;
  1615	
  1616		/*
  1617		 * HDMI deep color affects the clocks, so it's only possible
  1618		 * when not cloning with other encoder types.
  1619		 */
  1620		if (crtc_state->output_types != 1 << INTEL_OUTPUT_HDMI)
  1621			return false;
  1622	
  1623		for_each_new_connector_in_state(state, connector, connector_state, i) {
  1624			const struct drm_display_info *info = &connector->display_info;
  1625	
  1626			if (connector_state->crtc != crtc_state->base.crtc)
  1627				continue;
  1628	
  1629			if (crtc_state->ycbcr420) {
  1630				const struct drm_hdmi_info *hdmi = &info->hdmi;
  1631	
  1632				if (bpc == 12 && !(hdmi->y420_dc_modes &
  1633						   DRM_EDID_YCBCR420_DC_36))
  1634					return false;
  1635				else if (bpc == 10 && !(hdmi->y420_dc_modes &
  1636							DRM_EDID_YCBCR420_DC_30))
  1637					return false;
  1638			} else {
  1639				if (bpc == 12 && !(info->edid_hdmi_dc_modes &
  1640						   DRM_EDID_HDMI_DC_36))
  1641					return false;
  1642				else if (bpc == 10 && !(info->edid_hdmi_dc_modes &
  1643							DRM_EDID_HDMI_DC_30))
  1644					return false;
  1645			}
  1646		}
  1647	
  1648		/* Display WA #1139: glk */
  1649		if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
  1650		    adjusted_mode->htotal > 5460)
  1651			return false;
  1652	
  1653		/* Display Wa_1405510057:icl */
> 1654		if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
  1655		    bpc == 10 && IS_ICELAKE(dev_priv) &&
  1656		    (adjusted_mode->crtc_hblank_end -
  1657		     adjusted_mode->crtc_hblank_start) % 8 == 2)
  1658			return false;
  1659	
  1660		return true;
  1661	}
  1662	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Rodrigo Vivi Oct. 30, 2018, 10:27 p.m. UTC | #3
On Tue, Oct 30, 2018 at 01:45:02AM -0700, Radhakrishna Sripada wrote:
> Display WA_1405510057 asks to not enable YUV 420 HDMI
> 10bpc when horizontal blank size mod 8 reminder is 2.
> 
> V2: Rebase(r-b: Anusha)
> V3: crtc_state->s/ycbcr420/output_format/
> 
> Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 129b880bce64..6c6c4dd12fd5 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1595,6 +1595,8 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
>  	struct drm_atomic_state *state = crtc_state->base.state;
>  	struct drm_connector_state *connector_state;
>  	struct drm_connector *connector;
> +	const struct drm_display_mode *adjusted_mode =
> +		&crtc_state->base.adjusted_mode;
>  	int i;
>  
>  	if (HAS_GMCH_DISPLAY(dev_priv))
> @@ -1643,7 +1645,14 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
>  
>  	/* Display WA #1139: glk */
>  	if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> -	    crtc_state->base.adjusted_mode.htotal > 5460)
> +	    adjusted_mode->htotal > 5460)
> +		return false;
> +
> +	/* Display Wa_1405510057:icl */
> +	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> +	    bpc == 10 && IS_ICELAKE(dev_priv) &&
> +	    (adjusted_mode->crtc_hblank_end -
> +	     adjusted_mode->crtc_hblank_start) % 8 == 2)
>  		return false;
>  
>  	return true;
> -- 
> 2.9.3
>
Rodrigo Vivi Oct. 30, 2018, 10:35 p.m. UTC | #4
On Tue, Oct 30, 2018 at 05:30:25PM +0800, kbuild test robot wrote:
> Hi Radhakrishna,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> [auto build test WARNING on drm-intel/for-linux-next]
> [also build test WARNING on v4.19 next-20181030]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Radhakrishna-Sripada/drm-i915-icl-Add-WaEnable32PlaneMode/20181030-164539
> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
> config: i386-randconfig-x075-201843 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/string.h:6:0,
>                     from include/linux/uuid.h:20,
>                     from include/linux/mod_devicetable.h:13,
>                     from include/linux/i2c.h:29,
>                     from drivers/gpu/drm/i915/intel_hdmi.c:29:
>    drivers/gpu/drm/i915/intel_hdmi.c: In function 'hdmi_deep_color_possible':
>    drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?

it seems you need to rebase on latest drm-tip...

>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>                      ^
>    include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
>      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
>                                  ^~~~
> >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>      ^~
>    drivers/gpu/drm/i915/intel_hdmi.c:1654:35: error: 'INTEL_OUTPUT_FORMAT_YCBCR420' undeclared (first use in this function); did you mean 'INTEL_OUTPUT_DP_MST'?
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>                                       ^
>    include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
>      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
>                                  ^~~~
> >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>      ^~
>    drivers/gpu/drm/i915/intel_hdmi.c:1654:35: note: each undeclared identifier is reported only once for each function it appears in
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>                                       ^
>    include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
>      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
>                                  ^~~~
> >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>      ^~
>    drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>                      ^
>    include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
>      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
>                                              ^~~~
> >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>      ^~
>    drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>                      ^
>    include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
>       ______r = !!(cond);     \
>                    ^~~~
> >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
>      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>      ^~
> 
> vim +/if +1654 drivers/gpu/drm/i915/intel_hdmi.c
> 
>   1591	
>   1592	static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
>   1593					     int bpc)
>   1594	{
>   1595		struct drm_i915_private *dev_priv =
>   1596			to_i915(crtc_state->base.crtc->dev);
>   1597		struct drm_atomic_state *state = crtc_state->base.state;
>   1598		struct drm_connector_state *connector_state;
>   1599		struct drm_connector *connector;
>   1600		const struct drm_display_mode *adjusted_mode =
>   1601			&crtc_state->base.adjusted_mode;
>   1602		int i;
>   1603	
>   1604		if (HAS_GMCH_DISPLAY(dev_priv))
>   1605			return false;
>   1606	
>   1607		if (bpc == 10 && INTEL_GEN(dev_priv) < 11)
>   1608			return false;
>   1609	
>   1610		if (crtc_state->pipe_bpp <= 8*3)
>   1611			return false;
>   1612	
>   1613		if (!crtc_state->has_hdmi_sink)
>   1614			return false;
>   1615	
>   1616		/*
>   1617		 * HDMI deep color affects the clocks, so it's only possible
>   1618		 * when not cloning with other encoder types.
>   1619		 */
>   1620		if (crtc_state->output_types != 1 << INTEL_OUTPUT_HDMI)
>   1621			return false;
>   1622	
>   1623		for_each_new_connector_in_state(state, connector, connector_state, i) {
>   1624			const struct drm_display_info *info = &connector->display_info;
>   1625	
>   1626			if (connector_state->crtc != crtc_state->base.crtc)
>   1627				continue;
>   1628	
>   1629			if (crtc_state->ycbcr420) {
>   1630				const struct drm_hdmi_info *hdmi = &info->hdmi;
>   1631	
>   1632				if (bpc == 12 && !(hdmi->y420_dc_modes &
>   1633						   DRM_EDID_YCBCR420_DC_36))
>   1634					return false;
>   1635				else if (bpc == 10 && !(hdmi->y420_dc_modes &
>   1636							DRM_EDID_YCBCR420_DC_30))
>   1637					return false;
>   1638			} else {
>   1639				if (bpc == 12 && !(info->edid_hdmi_dc_modes &
>   1640						   DRM_EDID_HDMI_DC_36))
>   1641					return false;
>   1642				else if (bpc == 10 && !(info->edid_hdmi_dc_modes &
>   1643							DRM_EDID_HDMI_DC_30))
>   1644					return false;
>   1645			}
>   1646		}
>   1647	
>   1648		/* Display WA #1139: glk */
>   1649		if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
>   1650		    adjusted_mode->htotal > 5460)
>   1651			return false;
>   1652	
>   1653		/* Display Wa_1405510057:icl */
> > 1654		if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
>   1655		    bpc == 10 && IS_ICELAKE(dev_priv) &&
>   1656		    (adjusted_mode->crtc_hblank_end -
>   1657		     adjusted_mode->crtc_hblank_start) % 8 == 2)
>   1658			return false;
>   1659	
>   1660		return true;
>   1661	}
>   1662	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Sripada, Radhakrishna Oct. 31, 2018, 6:54 p.m. UTC | #5
On Tue, Oct 30, 2018 at 03:35:39PM -0700, Rodrigo Vivi wrote:
> On Tue, Oct 30, 2018 at 05:30:25PM +0800, kbuild test robot wrote:
> > Hi Radhakrishna,
> > 
> > Thank you for the patch! Perhaps something to improve:
> > 
> > [auto build test WARNING on drm-intel/for-linux-next]
> > [also build test WARNING on v4.19 next-20181030]
> > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> > 
> > url:    https://github.com/0day-ci/linux/commits/Radhakrishna-Sripada/drm-i915-icl-Add-WaEnable32PlaneMode/20181030-164539
> > base:   git://anongit.freedesktop.org/drm-intel for-linux-next
> > config: i386-randconfig-x075-201843 (attached as .config)
> > compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> > reproduce:
> >         # save the attached .config to linux build tree
> >         make ARCH=i386 
> > 
> > All warnings (new ones prefixed by >>):
> > 
> >    In file included from include/linux/string.h:6:0,
> >                     from include/linux/uuid.h:20,
> >                     from include/linux/mod_devicetable.h:13,
> >                     from include/linux/i2c.h:29,
> >                     from drivers/gpu/drm/i915/intel_hdmi.c:29:
> >    drivers/gpu/drm/i915/intel_hdmi.c: In function 'hdmi_deep_color_possible':
> >    drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
> 
> it seems you need to rebase on latest drm-tip...
I rebased the patch on drm-tip. The drm-tip commit 
33b7f3ee6e00831 drm/i915: Add CRTC output format YCBCR 4:2:0
introduced crtc_state->output_format. And this commit is not part of drm-intel 
for-linux-next tag.

Regards,
Radhakrishna(RK) Sripada

> 
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >                      ^
> >    include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
> >      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
> >                                  ^~~~
> > >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >      ^~
> >    drivers/gpu/drm/i915/intel_hdmi.c:1654:35: error: 'INTEL_OUTPUT_FORMAT_YCBCR420' undeclared (first use in this function); did you mean 'INTEL_OUTPUT_DP_MST'?
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >                                       ^
> >    include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
> >      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
> >                                  ^~~~
> > >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >      ^~
> >    drivers/gpu/drm/i915/intel_hdmi.c:1654:35: note: each undeclared identifier is reported only once for each function it appears in
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >                                       ^
> >    include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
> >      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
> >                                  ^~~~
> > >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >      ^~
> >    drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >                      ^
> >    include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
> >      if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
> >                                              ^~~~
> > >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >      ^~
> >    drivers/gpu/drm/i915/intel_hdmi.c:1654:18: error: 'const struct intel_crtc_state' has no member named 'output_format'; did you mean 'output_types'?
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >                      ^
> >    include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
> >       ______r = !!(cond);     \
> >                    ^~~~
> > >> drivers/gpu/drm/i915/intel_hdmi.c:1654:2: note: in expansion of macro 'if'
> >      if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >      ^~
> > 
> > vim +/if +1654 drivers/gpu/drm/i915/intel_hdmi.c
> > 
> >   1591	
> >   1592	static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> >   1593					     int bpc)
> >   1594	{
> >   1595		struct drm_i915_private *dev_priv =
> >   1596			to_i915(crtc_state->base.crtc->dev);
> >   1597		struct drm_atomic_state *state = crtc_state->base.state;
> >   1598		struct drm_connector_state *connector_state;
> >   1599		struct drm_connector *connector;
> >   1600		const struct drm_display_mode *adjusted_mode =
> >   1601			&crtc_state->base.adjusted_mode;
> >   1602		int i;
> >   1603	
> >   1604		if (HAS_GMCH_DISPLAY(dev_priv))
> >   1605			return false;
> >   1606	
> >   1607		if (bpc == 10 && INTEL_GEN(dev_priv) < 11)
> >   1608			return false;
> >   1609	
> >   1610		if (crtc_state->pipe_bpp <= 8*3)
> >   1611			return false;
> >   1612	
> >   1613		if (!crtc_state->has_hdmi_sink)
> >   1614			return false;
> >   1615	
> >   1616		/*
> >   1617		 * HDMI deep color affects the clocks, so it's only possible
> >   1618		 * when not cloning with other encoder types.
> >   1619		 */
> >   1620		if (crtc_state->output_types != 1 << INTEL_OUTPUT_HDMI)
> >   1621			return false;
> >   1622	
> >   1623		for_each_new_connector_in_state(state, connector, connector_state, i) {
> >   1624			const struct drm_display_info *info = &connector->display_info;
> >   1625	
> >   1626			if (connector_state->crtc != crtc_state->base.crtc)
> >   1627				continue;
> >   1628	
> >   1629			if (crtc_state->ycbcr420) {
> >   1630				const struct drm_hdmi_info *hdmi = &info->hdmi;
> >   1631	
> >   1632				if (bpc == 12 && !(hdmi->y420_dc_modes &
> >   1633						   DRM_EDID_YCBCR420_DC_36))
> >   1634					return false;
> >   1635				else if (bpc == 10 && !(hdmi->y420_dc_modes &
> >   1636							DRM_EDID_YCBCR420_DC_30))
> >   1637					return false;
> >   1638			} else {
> >   1639				if (bpc == 12 && !(info->edid_hdmi_dc_modes &
> >   1640						   DRM_EDID_HDMI_DC_36))
> >   1641					return false;
> >   1642				else if (bpc == 10 && !(info->edid_hdmi_dc_modes &
> >   1643							DRM_EDID_HDMI_DC_30))
> >   1644					return false;
> >   1645			}
> >   1646		}
> >   1647	
> >   1648		/* Display WA #1139: glk */
> >   1649		if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> >   1650		    adjusted_mode->htotal > 5460)
> >   1651			return false;
> >   1652	
> >   1653		/* Display Wa_1405510057:icl */
> > > 1654		if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> >   1655		    bpc == 10 && IS_ICELAKE(dev_priv) &&
> >   1656		    (adjusted_mode->crtc_hblank_end -
> >   1657		     adjusted_mode->crtc_hblank_start) % 8 == 2)
> >   1658			return false;
> >   1659	
> >   1660		return true;
> >   1661	}
> >   1662	
> > 
> > ---
> > 0-DAY kernel test infrastructure                Open Source Technology Center
> > https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 
> 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
Rodrigo Vivi Nov. 1, 2018, 7:33 p.m. UTC | #6
On Tue, Oct 30, 2018 at 03:27:35PM -0700, Rodrigo Vivi wrote:
> On Tue, Oct 30, 2018 at 01:45:02AM -0700, Radhakrishna Sripada wrote:
> > Display WA_1405510057 asks to not enable YUV 420 HDMI
> > 10bpc when horizontal blank size mod 8 reminder is 2.
> > 
> > V2: Rebase(r-b: Anusha)
> > V3: crtc_state->s/ycbcr420/output_format/
> > 
> > Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

pushed to dinq. thanks for patches and reviews.

> 
> > ---
> >  drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index 129b880bce64..6c6c4dd12fd5 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -1595,6 +1595,8 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> >  	struct drm_atomic_state *state = crtc_state->base.state;
> >  	struct drm_connector_state *connector_state;
> >  	struct drm_connector *connector;
> > +	const struct drm_display_mode *adjusted_mode =
> > +		&crtc_state->base.adjusted_mode;
> >  	int i;
> >  
> >  	if (HAS_GMCH_DISPLAY(dev_priv))
> > @@ -1643,7 +1645,14 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> >  
> >  	/* Display WA #1139: glk */
> >  	if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> > -	    crtc_state->base.adjusted_mode.htotal > 5460)
> > +	    adjusted_mode->htotal > 5460)
> > +		return false;
> > +
> > +	/* Display Wa_1405510057:icl */
> > +	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> > +	    bpc == 10 && IS_ICELAKE(dev_priv) &&
> > +	    (adjusted_mode->crtc_hblank_end -
> > +	     adjusted_mode->crtc_hblank_start) % 8 == 2)
> >  		return false;
> >  
> >  	return true;
> > -- 
> > 2.9.3
> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Imre Deak Nov. 1, 2018, 11:52 p.m. UTC | #7
On Thu, Nov 01, 2018 at 12:33:04PM -0700, Rodrigo Vivi wrote:
> On Tue, Oct 30, 2018 at 03:27:35PM -0700, Rodrigo Vivi wrote:
> > On Tue, Oct 30, 2018 at 01:45:02AM -0700, Radhakrishna Sripada wrote:
> > > Display WA_1405510057 asks to not enable YUV 420 HDMI
> > > 10bpc when horizontal blank size mod 8 reminder is 2.
> > > 
> > > V2: Rebase(r-b: Anusha)
> > > V3: crtc_state->s/ycbcr420/output_format/
> > > 
> > > Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > 
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> pushed to dinq. thanks for patches and reviews.

I think there was a wrong conflict resolution in this push:

commit 0992e781d7ce707889d81f8e349ce1561392493f
Merge: 10cf4fd63eed f57f9371e285
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date:   Thu Nov 1 12:43:25 2018 -0700

    Merge remote-tracking branch 'drm-intel/drm-intel-next-queued' into drm-tip
    
    # Conflicts:
    #       drivers/gpu/drm/i915/i915_debugfs.c
    #       drivers/gpu/drm/i915/i915_irq.c
    #       drivers/gpu/drm/i915/intel_csr.c
    #       drivers/gpu/drm/i915/intel_display.c
    #       drivers/gpu/drm/i915/intel_dp.c
    #       drivers/gpu/drm/i915/intel_dp_mst.c
    #       drivers/gpu/drm/i915/intel_drv.h

diff --cc drivers/gpu/drm/i915/intel_display.c
index 9741cc419e1b,3618d3affc89..532178763fa1
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@@ -15701,14 -15414,18 +15414,25 @@@ static void readout_plane_state(struct 
  		crtc_state = to_intel_crtc_state(crtc->base.state);
  
  		intel_set_plane_visible(crtc_state, plane_state, visible);
+ 
+ 		DRM_DEBUG_KMS("[PLANE:%d:%s] hw state readout: %s, pipe %c\n",
+ 			      plane->base.base.id, plane->base.name,
+ 			      enableddisabled(visible), pipe_name(pipe));
+ 	}
+ 
+ 	for_each_intel_crtc(&dev_priv->drm, crtc) {
+ 		struct intel_crtc_state *crtc_state =
+ 			to_intel_crtc_state(crtc->base.state);
+ 
+ 		fixup_active_planes(crtc_state);
  	}
 +
 +	for_each_intel_crtc(&dev_priv->drm, crtc) {
 +		struct intel_crtc_state *crtc_state =
 +			to_intel_crtc_state(crtc->base.state);
 +
 +		fixup_active_planes(crtc_state);
 +	}
  }
  
  static void intel_modeset_readout_hw_state(struct drm_device *dev)

I'm resolving it with keeping only one of the for_each_intel_crtc()
loop.

> 
> > 
> > > ---
> > >  drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++++-
> > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > > index 129b880bce64..6c6c4dd12fd5 100644
> > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > @@ -1595,6 +1595,8 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > >  	struct drm_atomic_state *state = crtc_state->base.state;
> > >  	struct drm_connector_state *connector_state;
> > >  	struct drm_connector *connector;
> > > +	const struct drm_display_mode *adjusted_mode =
> > > +		&crtc_state->base.adjusted_mode;
> > >  	int i;
> > >  
> > >  	if (HAS_GMCH_DISPLAY(dev_priv))
> > > @@ -1643,7 +1645,14 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > >  
> > >  	/* Display WA #1139: glk */
> > >  	if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> > > -	    crtc_state->base.adjusted_mode.htotal > 5460)
> > > +	    adjusted_mode->htotal > 5460)
> > > +		return false;
> > > +
> > > +	/* Display Wa_1405510057:icl */
> > > +	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> > > +	    bpc == 10 && IS_ICELAKE(dev_priv) &&
> > > +	    (adjusted_mode->crtc_hblank_end -
> > > +	     adjusted_mode->crtc_hblank_start) % 8 == 2)
> > >  		return false;
> > >  
> > >  	return true;
> > > -- 
> > > 2.9.3
> > > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi Nov. 2, 2018, 12:34 a.m. UTC | #8
On Fri, Nov 02, 2018 at 01:52:20AM +0200, Imre Deak wrote:
> On Thu, Nov 01, 2018 at 12:33:04PM -0700, Rodrigo Vivi wrote:
> > On Tue, Oct 30, 2018 at 03:27:35PM -0700, Rodrigo Vivi wrote:
> > > On Tue, Oct 30, 2018 at 01:45:02AM -0700, Radhakrishna Sripada wrote:
> > > > Display WA_1405510057 asks to not enable YUV 420 HDMI
> > > > 10bpc when horizontal blank size mod 8 reminder is 2.
> > > > 
> > > > V2: Rebase(r-b: Anusha)
> > > > V3: crtc_state->s/ycbcr420/output_format/
> > > > 
> > > > Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> > > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > > 
> > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > 
> > pushed to dinq. thanks for patches and reviews.
> 
> I think there was a wrong conflict resolution in this push:
> 
> commit 0992e781d7ce707889d81f8e349ce1561392493f
> Merge: 10cf4fd63eed f57f9371e285
> Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Date:   Thu Nov 1 12:43:25 2018 -0700
> 
>     Merge remote-tracking branch 'drm-intel/drm-intel-next-queued' into drm-tip
>     
>     # Conflicts:
>     #       drivers/gpu/drm/i915/i915_debugfs.c
>     #       drivers/gpu/drm/i915/i915_irq.c
>     #       drivers/gpu/drm/i915/intel_csr.c
>     #       drivers/gpu/drm/i915/intel_display.c
>     #       drivers/gpu/drm/i915/intel_dp.c
>     #       drivers/gpu/drm/i915/intel_dp_mst.c
>     #       drivers/gpu/drm/i915/intel_drv.h
> 
> diff --cc drivers/gpu/drm/i915/intel_display.c
> index 9741cc419e1b,3618d3affc89..532178763fa1
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@@ -15701,14 -15414,18 +15414,25 @@@ static void readout_plane_state(struct 
>   		crtc_state = to_intel_crtc_state(crtc->base.state);
>   
>   		intel_set_plane_visible(crtc_state, plane_state, visible);
> + 
> + 		DRM_DEBUG_KMS("[PLANE:%d:%s] hw state readout: %s, pipe %c\n",
> + 			      plane->base.base.id, plane->base.name,
> + 			      enableddisabled(visible), pipe_name(pipe));
> + 	}
> + 
> + 	for_each_intel_crtc(&dev_priv->drm, crtc) {
> + 		struct intel_crtc_state *crtc_state =
> + 			to_intel_crtc_state(crtc->base.state);
> + 
> + 		fixup_active_planes(crtc_state);
>   	}
>  +
>  +	for_each_intel_crtc(&dev_priv->drm, crtc) {
>  +		struct intel_crtc_state *crtc_state =
>  +			to_intel_crtc_state(crtc->base.state);
>  +
>  +		fixup_active_planes(crtc_state);
>  +	}
>   }
>   
>   static void intel_modeset_readout_hw_state(struct drm_device *dev)
> 
> I'm resolving it with keeping only one of the for_each_intel_crtc()
> loop.

ops, my bad.

and it was the third or forth time I was solving this same conflict
in 1 week and got excess of confidence :/

> 
> > 
> > > 
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++++-
> > > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > index 129b880bce64..6c6c4dd12fd5 100644
> > > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > @@ -1595,6 +1595,8 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > > >  	struct drm_atomic_state *state = crtc_state->base.state;
> > > >  	struct drm_connector_state *connector_state;
> > > >  	struct drm_connector *connector;
> > > > +	const struct drm_display_mode *adjusted_mode =
> > > > +		&crtc_state->base.adjusted_mode;
> > > >  	int i;
> > > >  
> > > >  	if (HAS_GMCH_DISPLAY(dev_priv))
> > > > @@ -1643,7 +1645,14 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > > >  
> > > >  	/* Display WA #1139: glk */
> > > >  	if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> > > > -	    crtc_state->base.adjusted_mode.htotal > 5460)
> > > > +	    adjusted_mode->htotal > 5460)
> > > > +		return false;
> > > > +
> > > > +	/* Display Wa_1405510057:icl */
> > > > +	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> > > > +	    bpc == 10 && IS_ICELAKE(dev_priv) &&
> > > > +	    (adjusted_mode->crtc_hblank_end -
> > > > +	     adjusted_mode->crtc_hblank_start) % 8 == 2)
> > > >  		return false;
> > > >  
> > > >  	return true;
> > > > -- 
> > > > 2.9.3
> > > > 
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Imre Deak Nov. 2, 2018, 1:08 a.m. UTC | #9
On Thu, Nov 01, 2018 at 05:34:14PM -0700, Rodrigo Vivi wrote:
> On Fri, Nov 02, 2018 at 01:52:20AM +0200, Imre Deak wrote:
> > On Thu, Nov 01, 2018 at 12:33:04PM -0700, Rodrigo Vivi wrote:
> > > On Tue, Oct 30, 2018 at 03:27:35PM -0700, Rodrigo Vivi wrote:
> > > > On Tue, Oct 30, 2018 at 01:45:02AM -0700, Radhakrishna Sripada wrote:
> > > > > Display WA_1405510057 asks to not enable YUV 420 HDMI
> > > > > 10bpc when horizontal blank size mod 8 reminder is 2.
> > > > > 
> > > > > V2: Rebase(r-b: Anusha)
> > > > > V3: crtc_state->s/ycbcr420/output_format/
> > > > > 
> > > > > Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
> > > > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > > > 
> > > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > 
> > > pushed to dinq. thanks for patches and reviews.
> > 
> > I think there was a wrong conflict resolution in this push:
> > 
> > commit 0992e781d7ce707889d81f8e349ce1561392493f
> > Merge: 10cf4fd63eed f57f9371e285
> > Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Date:   Thu Nov 1 12:43:25 2018 -0700
> > 
> >     Merge remote-tracking branch 'drm-intel/drm-intel-next-queued' into drm-tip
> >     
> >     # Conflicts:
> >     #       drivers/gpu/drm/i915/i915_debugfs.c
> >     #       drivers/gpu/drm/i915/i915_irq.c
> >     #       drivers/gpu/drm/i915/intel_csr.c
> >     #       drivers/gpu/drm/i915/intel_display.c
> >     #       drivers/gpu/drm/i915/intel_dp.c
> >     #       drivers/gpu/drm/i915/intel_dp_mst.c
> >     #       drivers/gpu/drm/i915/intel_drv.h
> > 
> > diff --cc drivers/gpu/drm/i915/intel_display.c
> > index 9741cc419e1b,3618d3affc89..532178763fa1
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@@ -15701,14 -15414,18 +15414,25 @@@ static void readout_plane_state(struct 
> >   		crtc_state = to_intel_crtc_state(crtc->base.state);
> >   
> >   		intel_set_plane_visible(crtc_state, plane_state, visible);
> > + 
> > + 		DRM_DEBUG_KMS("[PLANE:%d:%s] hw state readout: %s, pipe %c\n",
> > + 			      plane->base.base.id, plane->base.name,
> > + 			      enableddisabled(visible), pipe_name(pipe));
> > + 	}
> > + 
> > + 	for_each_intel_crtc(&dev_priv->drm, crtc) {
> > + 		struct intel_crtc_state *crtc_state =
> > + 			to_intel_crtc_state(crtc->base.state);
> > + 
> > + 		fixup_active_planes(crtc_state);
> >   	}
> >  +
> >  +	for_each_intel_crtc(&dev_priv->drm, crtc) {
> >  +		struct intel_crtc_state *crtc_state =
> >  +			to_intel_crtc_state(crtc->base.state);
> >  +
> >  +		fixup_active_planes(crtc_state);
> >  +	}
> >   }
> >   
> >   static void intel_modeset_readout_hw_state(struct drm_device *dev)
> > 
> > I'm resolving it with keeping only one of the for_each_intel_crtc()
> > loop.
> 
> ops, my bad.
> 
> and it was the third or forth time I was solving this same conflict
> in 1 week and got excess of confidence :/

Hm, wonder why rerere doesn't pick it up.

> 
> > 
> > > 
> > > > 
> > > > > ---
> > > > >  drivers/gpu/drm/i915/intel_hdmi.c | 11 ++++++++++-
> > > > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > > index 129b880bce64..6c6c4dd12fd5 100644
> > > > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > > > @@ -1595,6 +1595,8 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > > > >  	struct drm_atomic_state *state = crtc_state->base.state;
> > > > >  	struct drm_connector_state *connector_state;
> > > > >  	struct drm_connector *connector;
> > > > > +	const struct drm_display_mode *adjusted_mode =
> > > > > +		&crtc_state->base.adjusted_mode;
> > > > >  	int i;
> > > > >  
> > > > >  	if (HAS_GMCH_DISPLAY(dev_priv))
> > > > > @@ -1643,7 +1645,14 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
> > > > >  
> > > > >  	/* Display WA #1139: glk */
> > > > >  	if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
> > > > > -	    crtc_state->base.adjusted_mode.htotal > 5460)
> > > > > +	    adjusted_mode->htotal > 5460)
> > > > > +		return false;
> > > > > +
> > > > > +	/* Display Wa_1405510057:icl */
> > > > > +	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
> > > > > +	    bpc == 10 && IS_ICELAKE(dev_priv) &&
> > > > > +	    (adjusted_mode->crtc_hblank_end -
> > > > > +	     adjusted_mode->crtc_hblank_start) % 8 == 2)
> > > > >  		return false;
> > > > >  
> > > > >  	return true;
> > > > > -- 
> > > > > 2.9.3
> > > > > 
> > > > _______________________________________________
> > > > Intel-gfx mailing list
> > > > Intel-gfx@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> > > _______________________________________________
> > > Intel-gfx mailing list
> > > Intel-gfx@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 129b880bce64..6c6c4dd12fd5 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1595,6 +1595,8 @@  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
 	struct drm_atomic_state *state = crtc_state->base.state;
 	struct drm_connector_state *connector_state;
 	struct drm_connector *connector;
+	const struct drm_display_mode *adjusted_mode =
+		&crtc_state->base.adjusted_mode;
 	int i;
 
 	if (HAS_GMCH_DISPLAY(dev_priv))
@@ -1643,7 +1645,14 @@  static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state,
 
 	/* Display WA #1139: glk */
 	if (bpc == 12 && IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1) &&
-	    crtc_state->base.adjusted_mode.htotal > 5460)
+	    adjusted_mode->htotal > 5460)
+		return false;
+
+	/* Display Wa_1405510057:icl */
+	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
+	    bpc == 10 && IS_ICELAKE(dev_priv) &&
+	    (adjusted_mode->crtc_hblank_end -
+	     adjusted_mode->crtc_hblank_start) % 8 == 2)
 		return false;
 
 	return true;