diff mbox series

drm/i915/fbc: Disable FBC when VT-d is enabled for Gen9

Message ID 20221121091855.3562288-1-arun.r.murthy@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/fbc: Disable FBC when VT-d is enabled for Gen9 | expand

Commit Message

Arun R Murthy Nov. 21, 2022, 9:18 a.m. UTC
The WaFbcTurnOffFbcWhenHyperVisorIsUsed is applicable for all GEN9
platforms as per BspecID: 0852

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jani Nikula Nov. 21, 2022, 11:18 a.m. UTC | #1
On Mon, 21 Nov 2022, Arun R Murthy <arun.r.murthy@intel.com> wrote:
> The WaFbcTurnOffFbcWhenHyperVisorIsUsed is applicable for all GEN9
> platforms as per BspecID: 0852

The commit subject and commit message do not match the code.

Also, the format for Bspec references is:

Bspec: 0852

next to the other tags. See 'git log --grep=Bspec:'.

BR,
Jani.


>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index b5ee5ea0d010..efd5659b3b60 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -1652,9 +1652,9 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *i915)
>  
>  static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
>  {
> -	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
> +	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,cnl,kbl */
>  	if (i915_vtd_active(i915) &&
> -	    (IS_SKYLAKE(i915) || IS_BROXTON(i915))) {
> +	    (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
>  		drm_info(&i915->drm,
>  			 "Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
>  		return true;
kernel test robot Nov. 21, 2022, 10:10 p.m. UTC | #2
Hi Arun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Arun-R-Murthy/drm-i915-fbc-Disable-FBC-when-VT-d-is-enabled-for-Gen9/20221121-172027
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20221121091855.3562288-1-arun.r.murthy%40intel.com
patch subject: [Intel-gfx] [PATCH] drm/i915/fbc: Disable FBC when VT-d is enabled for Gen9
config: x86_64-rhel-8.3-func
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/61ba49ddf3c6cae1717955273c865563fd7afe87
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arun-R-Murthy/drm-i915-fbc-Disable-FBC-when-VT-d-is-enabled-for-Gen9/20221121-172027
        git checkout 61ba49ddf3c6cae1717955273c865563fd7afe87
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

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

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/i915/display/intel_fbc.c: In function 'need_fbc_vtd_wa':
>> drivers/gpu/drm/i915/display/intel_fbc.c:1656:35: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    1656 |         if (i915_vtd_active(i915) &&
         |             ~~~~~~~~~~~~~~~~~~~~~~^~
    1657 |             (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
         |             ~~~~~~~~~~~~~~~~~~~~~~~~


vim +1656 drivers/gpu/drm/i915/display/intel_fbc.c

80788a0fbbdfbb drivers/gpu/drm/i915/intel_fbc.c         Paulo Zanoni   2016-04-13  1652  
d061882344279e drivers/gpu/drm/i915/display/intel_fbc.c Ville Syrjälä  2021-11-04  1653  static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1654  {
61ba49ddf3c6ca drivers/gpu/drm/i915/display/intel_fbc.c Arun R Murthy  2022-11-21  1655  	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,cnl,kbl */
a7f46d5b91a5eb drivers/gpu/drm/i915/display/intel_fbc.c Tvrtko Ursulin 2022-03-29 @1656  	if (i915_vtd_active(i915) &&
61ba49ddf3c6ca drivers/gpu/drm/i915/display/intel_fbc.c Arun R Murthy  2022-11-21  1657  	    (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
d061882344279e drivers/gpu/drm/i915/display/intel_fbc.c Ville Syrjälä  2021-11-04  1658  		drm_info(&i915->drm,
97ed48b5c8b148 drivers/gpu/drm/i915/display/intel_fbc.c Wambui Karuga  2020-03-10  1659  			 "Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1660  		return true;
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1661  	}
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1662  
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1663  	return false;
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1664  }
36dbc4d76918d7 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1665
kernel test robot Nov. 22, 2022, 12:21 a.m. UTC | #3
Hi Arun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Arun-R-Murthy/drm-i915-fbc-Disable-FBC-when-VT-d-is-enabled-for-Gen9/20221121-172027
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20221121091855.3562288-1-arun.r.murthy%40intel.com
patch subject: [Intel-gfx] [PATCH] drm/i915/fbc: Disable FBC when VT-d is enabled for Gen9
config: i386-randconfig-a015-20221121
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/61ba49ddf3c6cae1717955273c865563fd7afe87
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arun-R-Murthy/drm-i915-fbc-Disable-FBC-when-VT-d-is-enabled-for-Gen9/20221121-172027
        git checkout 61ba49ddf3c6cae1717955273c865563fd7afe87
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/display/intel_fbc.c: In function 'need_fbc_vtd_wa':
>> drivers/gpu/drm/i915/display/intel_fbc.c:1656:35: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
    1656 |         if (i915_vtd_active(i915) &&
         |             ~~~~~~~~~~~~~~~~~~~~~~^~
    1657 |             (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
         |             ~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +1656 drivers/gpu/drm/i915/display/intel_fbc.c

80788a0fbbdfbb1 drivers/gpu/drm/i915/intel_fbc.c         Paulo Zanoni   2016-04-13  1652  
d061882344279eb drivers/gpu/drm/i915/display/intel_fbc.c Ville Syrjälä  2021-11-04  1653  static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1654  {
61ba49ddf3c6cae drivers/gpu/drm/i915/display/intel_fbc.c Arun R Murthy  2022-11-21  1655  	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,cnl,kbl */
a7f46d5b91a5eb0 drivers/gpu/drm/i915/display/intel_fbc.c Tvrtko Ursulin 2022-03-29 @1656  	if (i915_vtd_active(i915) &&
61ba49ddf3c6cae drivers/gpu/drm/i915/display/intel_fbc.c Arun R Murthy  2022-11-21  1657  	    (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
d061882344279eb drivers/gpu/drm/i915/display/intel_fbc.c Ville Syrjälä  2021-11-04  1658  		drm_info(&i915->drm,
97ed48b5c8b1487 drivers/gpu/drm/i915/display/intel_fbc.c Wambui Karuga  2020-03-10  1659  			 "Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1660  		return true;
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1661  	}
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1662  
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1663  	return false;
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1664  }
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1665
kernel test robot Nov. 22, 2022, 4:54 a.m. UTC | #4
Hi Arun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Arun-R-Murthy/drm-i915-fbc-Disable-FBC-when-VT-d-is-enabled-for-Gen9/20221121-172027
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20221121091855.3562288-1-arun.r.murthy%40intel.com
patch subject: [Intel-gfx] [PATCH] drm/i915/fbc: Disable FBC when VT-d is enabled for Gen9
config: x86_64-randconfig-a001-20221121
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/61ba49ddf3c6cae1717955273c865563fd7afe87
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arun-R-Murthy/drm-i915-fbc-Disable-FBC-when-VT-d-is-enabled-for-Gen9/20221121-172027
        git checkout 61ba49ddf3c6cae1717955273c865563fd7afe87
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

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

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_fbc.c:1656:28: warning: '&&' within '||' [-Wlogical-op-parentheses]
           if (i915_vtd_active(i915) &&
               ~~~~~~~~~~~~~~~~~~~~~~^~
   drivers/gpu/drm/i915/display/intel_fbc.c:1656:28: note: place parentheses around the '&&' expression to silence this warning
           if (i915_vtd_active(i915) &&
                                     ^
               (
   1 warning generated.


vim +1656 drivers/gpu/drm/i915/display/intel_fbc.c

80788a0fbbdfbb1 drivers/gpu/drm/i915/intel_fbc.c         Paulo Zanoni   2016-04-13  1652  
d061882344279eb drivers/gpu/drm/i915/display/intel_fbc.c Ville Syrjälä  2021-11-04  1653  static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1654  {
61ba49ddf3c6cae drivers/gpu/drm/i915/display/intel_fbc.c Arun R Murthy  2022-11-21  1655  	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,cnl,kbl */
a7f46d5b91a5eb0 drivers/gpu/drm/i915/display/intel_fbc.c Tvrtko Ursulin 2022-03-29 @1656  	if (i915_vtd_active(i915) &&
61ba49ddf3c6cae drivers/gpu/drm/i915/display/intel_fbc.c Arun R Murthy  2022-11-21  1657  	    (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
d061882344279eb drivers/gpu/drm/i915/display/intel_fbc.c Ville Syrjälä  2021-11-04  1658  		drm_info(&i915->drm,
97ed48b5c8b1487 drivers/gpu/drm/i915/display/intel_fbc.c Wambui Karuga  2020-03-10  1659  			 "Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1660  		return true;
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1661  	}
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1662  
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1663  	return false;
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1664  }
36dbc4d76918d75 drivers/gpu/drm/i915/intel_fbc.c         Chris Wilson   2016-08-04  1665
Ville Syrjala Nov. 22, 2022, 11:13 a.m. UTC | #5
On Mon, Nov 21, 2022 at 02:48:55PM +0530, Arun R Murthy wrote:
> The WaFbcTurnOffFbcWhenHyperVisorIsUsed is applicable for all GEN9
> platforms as per BspecID: 0852

No. It says it was broken on kbl/cnl A-step.

> 
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fbc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
> index b5ee5ea0d010..efd5659b3b60 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -1652,9 +1652,9 @@ static int intel_sanitize_fbc_option(struct drm_i915_private *i915)
>  
>  static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
>  {
> -	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
> +	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,cnl,kbl */
>  	if (i915_vtd_active(i915) &&
> -	    (IS_SKYLAKE(i915) || IS_BROXTON(i915))) {
> +	    (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
>  		drm_info(&i915->drm,
>  			 "Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
>  		return true;
> -- 
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index b5ee5ea0d010..efd5659b3b60 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1652,9 +1652,9 @@  static int intel_sanitize_fbc_option(struct drm_i915_private *i915)
 
 static bool need_fbc_vtd_wa(struct drm_i915_private *i915)
 {
-	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt */
+	/* WaFbcTurnOffFbcWhenHyperVisorIsUsed:skl,bxt,cnl,kbl */
 	if (i915_vtd_active(i915) &&
-	    (IS_SKYLAKE(i915) || IS_BROXTON(i915))) {
+	    (DISPLAY_VER(i915) == 9) || DISPLAY_VER(i915) == 10) {
 		drm_info(&i915->drm,
 			 "Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled\n");
 		return true;