[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev3)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev3)
URL   : https://patchwork.freedesktop.org/series/94733/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10600 -> Patchwork_21083


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21083:

### IGT changes ###

 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@core_hotunplug@unbind-rebind:
- {fi-jsl-1}: [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-jsl-1/igt@core_hotunp...@unbind-rebind.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-jsl-1/igt@core_hotunp...@unbind-rebind.html

  * igt@i915_module_load@reload:
- {fi-ehl-2}: [INCOMPLETE][3] ([i915#4136]) -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-ehl-2/igt@i915_module_l...@reload.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-ehl-2/igt@i915_module_l...@reload.html

  * igt@runner@aborted:
- {fi-ehl-2}: NOTRUN -> [FAIL][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-ehl-2/igt@run...@aborted.html

  
Known issues


  Here are the changes found in Patchwork_21083 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-sdma:
- fi-kbl-7500u:   NOTRUN -> [SKIP][6] ([fdo#109271]) +17 similar issues
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-7500u/igt@amdgpu/amd_ba...@cs-sdma.html

  * igt@core_hotunplug@unbind-rebind:
- fi-cfl-8700k:   [PASS][7] -> [INCOMPLETE][8] ([i915#4130])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-cfl-8700k/igt@core_hotunp...@unbind-rebind.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-cfl-8700k/igt@core_hotunp...@unbind-rebind.html
- fi-rkl-11600:   [PASS][9] -> [INCOMPLETE][10] ([i915#4130])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-rkl-11600/igt@core_hotunp...@unbind-rebind.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-rkl-11600/igt@core_hotunp...@unbind-rebind.html
- fi-cfl-8109u:   [PASS][11] -> [INCOMPLETE][12] ([i915#4130])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-cfl-8109u/igt@core_hotunp...@unbind-rebind.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-cfl-8109u/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [PASS][13] -> [INCOMPLETE][14] ([i915#4130])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka:  NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#2190])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-soraka/igt@gem_huc_c...@huc-copy.html

  * igt@gem_tiled_blits@basic:
- fi-kbl-soraka:  NOTRUN -> [SKIP][16] ([fdo#109271]) +5 similar issues
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-soraka/igt@gem_tiled_bl...@basic.html

  * igt@i915_module_load@reload:
- fi-kbl-soraka:  NOTRUN -> [INCOMPLETE][17] ([i915#4130])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-soraka/igt@i915_module_l...@reload.html
- fi-skl-6700k2:  NOTRUN -> [INCOMPLETE][18] ([i915#4130])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-skl-6700k2/igt@i915_module_l...@reload.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-soraka:  NOTRUN -> [SKIP][19] ([fdo#109271] / [fdo#111827]) +8 
similar issues
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-soraka/igt@kms_chamel...@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
- fi-kbl-soraka:  NOTRUN -> [SKIP][20] ([fdo#109271] / [i915#533])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-soraka/igt@kms_pipe_crc_ba...@compare-crc-sanitycheck-pipe-d.html

  * igt@runner@aborted:
- fi-kbl-soraka:  NOTRUN -> [FAIL][21] ([i915#2426] / [i915#3363])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-kbl-soraka/igt@run...@aborted.html
- fi-skl-6700k2:  NOTRUN -> [FAIL][22] ([i915#2426] / [i915#3363])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21083/fi-skl-6700k2/igt@run...@aborted.html

  
 Possible fixes 

  * 

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev3)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev3)
URL   : https://patchwork.freedesktop.org/series/94733/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
97e85fcf4aa0 drm/i915/dsi: do not register gmbus if it was reserved for MIPI 
display
-:41: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#41: FILE: drivers/gpu/drm/i915/display/intel_gmbus.c:150:
+   if ((pin == GMBUS_PIN_2_BXT && 
dev_priv->vbt.dsi.config->dual_link) ||
+pin == GMBUS_PIN_1_BXT) {

-:59: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#59: FILE: drivers/gpu/drm/i915/display/intel_gmbus.c:878:
+   if (!intel_gmbus_is_valid_pin(dev_priv, pin) ||
+intel_gmbus_ddc_reserve_for_mipi(dev_priv, pin))

total: 0 errors, 0 warnings, 2 checks, 30 lines checked




[Intel-gfx] [PATCH] drm/i915/dsi: do not register gmbus if it was reserved for MIPI display

2021-09-16 Thread Lee Shawn C
Gmbus driver would setup all Intel i2c GMBuses. But DDC bus
may configured as gpio and reserved for MIPI driver to control
panel power on/off sequence.

Using i2c tool to communicate to peripherals via i2c interface
reversed for gmbus(DDC). There will be some high/low pulse
appear on DDC SCL and SDA (might be host sent out i2c slave
address). MIPI panel would be impacted due to unexpected signal
then caused abnormal display or shut down issue.

v2: gmbus driver should not add i2c adapter for DDC interface
if LFP display was configured to support MIPI panel.
v3: fix sparse warning

Cc: Jani Nikula 
Cc: Vandita Kulkarni 
Cc: Cooper Chiou 
Cc: William Tseng 
Signed-off-by: Lee Shawn C 
---
 drivers/gpu/drm/i915/display/intel_gmbus.c | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c 
b/drivers/gpu/drm/i915/display/intel_gmbus.c
index ceb1bf8a8c3c..51d2b6bf2ed2 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -141,6 +141,21 @@ bool intel_gmbus_is_valid_pin(struct drm_i915_private 
*dev_priv,
return pin < size && get_gmbus_pin(dev_priv, pin)->name;
 }
 
+static bool intel_gmbus_ddc_reserve_for_mipi(struct drm_i915_private *dev_priv,
+unsigned int pin)
+{
+   if (intel_bios_is_dsi_present(dev_priv, NULL)) {
+   if (DISPLAY_VER(dev_priv) >= 11) {
+   if ((pin == GMBUS_PIN_2_BXT && 
dev_priv->vbt.dsi.config->dual_link) ||
+pin == GMBUS_PIN_1_BXT) {
+   return true;
+   }
+   }
+   }
+
+   return false;
+}
+
 /* Intel GPIO access functions */
 
 #define I2C_RISEFALL_TIME 10
@@ -859,7 +874,8 @@ int intel_gmbus_setup(struct drm_i915_private *dev_priv)
init_waitqueue_head(_priv->gmbus_wait_queue);
 
for (pin = 0; pin < ARRAY_SIZE(dev_priv->gmbus); pin++) {
-   if (!intel_gmbus_is_valid_pin(dev_priv, pin))
+   if (!intel_gmbus_is_valid_pin(dev_priv, pin) ||
+intel_gmbus_ddc_reserve_for_mipi(dev_priv, pin))
continue;
 
bus = _priv->gmbus[pin];
-- 
2.17.1



Re: [Intel-gfx] [PATCH v2 13/13] drm/msm: Implement HDCP 1.x using the new drm HDCP helpers

2021-09-16 Thread kernel test robot
Hi Sean,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip next-20210916]
[cannot apply to robh/for-next linus/master v5.15-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into-helpers/20210916-044145
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
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/0day-ci/linux/commit/2fc7bb157fc24840f3fe3b8ece82cea21ded8db6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into-helpers/20210916-044145
git checkout 2fc7bb157fc24840f3fe3b8ece82cea21ded8db6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross 
ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/msm/dp/dp_debug.c: In function 'dp_hdcp_key_write':
>> drivers/gpu/drm/msm/dp/dp_debug.c:361:28: error: variable 'dev' set but not 
>> used [-Werror=unused-but-set-variable]
 361 | struct drm_device *dev;
 |^~~
   cc1: all warnings being treated as errors


vim +/dev +361 drivers/gpu/drm/msm/dp/dp_debug.c

   354  
   355  static ssize_t dp_hdcp_key_write(struct file *file, const char __user 
*ubuf,
   356   size_t len, loff_t *offp)
   357  {
   358  char *input_buffer;
   359  int ret = 0;
   360  struct dp_debug_private *debug = file->private_data;
 > 361  struct drm_device *dev;
   362  
   363  dev = debug->drm_dev;
   364  
   365  if (len != (DRM_HDCP_KSV_LEN + DP_HDCP_NUM_KEYS * 
DP_HDCP_KEY_LEN))
   366  return -EINVAL;
   367  
   368  if (!debug->hdcp)
   369  return -ENOENT;
   370  
   371  input_buffer = memdup_user_nul(ubuf, len);
   372  if (IS_ERR(input_buffer))
   373  return PTR_ERR(input_buffer);
   374  
   375  ret = dp_hdcp_ingest_key(debug->hdcp, input_buffer, len);
   376  
   377  kfree(input_buffer);
   378  if (ret < 0) {
   379  DRM_ERROR("Could not ingest HDCP key, ret=%d\n", ret);
   380  return ret;
   381  }
   382  
   383  *offp += len;
   384  return len;
   385  }
   386  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip


[Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [v2,1/5] drm/i915/display/adlp: Fix PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR calculation (rev5)

2021-09-16 Thread Patchwork
== Series Details ==

Series: series starting with [v2,1/5] drm/i915/display/adlp: Fix 
PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR calculation (rev5)
URL   : https://patchwork.freedesktop.org/series/94674/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10600_full -> Patchwork_21082_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21082_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21082_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_21082_full:

### IGT changes ###

 Possible regressions 

  * igt@i915_pm_rpm@gem-mmap-type:
- shard-kbl:  NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-kbl3/igt@i915_pm_...@gem-mmap-type.html

  * igt@kms_atomic@plane-invalid-params:
- shard-iclb: [PASS][2] -> [DMESG-WARN][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-iclb7/igt@kms_ato...@plane-invalid-params.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-iclb2/igt@kms_ato...@plane-invalid-params.html

  
Known issues


  Here are the changes found in Patchwork_21082_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@device_reset@unbind-reset-rebind:
- shard-kbl:  NOTRUN -> [DMESG-WARN][4] ([i915#4130])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-kbl6/igt@device_re...@unbind-reset-rebind.html

  * igt@feature_discovery@chamelium:
- shard-skl:  NOTRUN -> [SKIP][5] ([fdo#109271]) +18 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-skl10/igt@feature_discov...@chamelium.html

  * igt@gem_eio@unwedge-stress:
- shard-skl:  [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#3063])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-skl9/igt@gem_...@unwedge-stress.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-skl10/igt@gem_...@unwedge-stress.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-tglb: NOTRUN -> [FAIL][8] ([i915#2842])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-tglb3/igt@gem_exec_fair@basic-none-s...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
- shard-kbl:  [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-kbl3/igt@gem_exec_fair@basic-p...@vcs0.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-kbl6/igt@gem_exec_fair@basic-p...@vcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][11] ([i915#2842])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-iclb1/igt@gem_exec_fair@basic-p...@vcs1.html

  * igt@gem_pread@exhaustion:
- shard-tglb: NOTRUN -> [WARN][12] ([i915#2658])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-tglb3/igt@gem_pr...@exhaustion.html
- shard-kbl:  NOTRUN -> [WARN][13] ([i915#2658])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-kbl6/igt@gem_pr...@exhaustion.html

  * igt@gem_userptr_blits@input-checking:
- shard-kbl:  NOTRUN -> [DMESG-WARN][14] ([i915#3002])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-kbl6/igt@gem_userptr_bl...@input-checking.html

  * igt@gen9_exec_parse@bb-start-cmd:
- shard-tglb: NOTRUN -> [SKIP][15] ([i915#2856])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-tglb5/igt@gen9_exec_pa...@bb-start-cmd.html

  * igt@i915_pm_rc6_residency@media-rc6-accuracy:
- shard-tglb: NOTRUN -> [SKIP][16] ([fdo#109289] / [fdo#111719])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-tglb5/igt@i915_pm_rc6_reside...@media-rc6-accuracy.html

  * igt@i915_pm_rpm@modeset-pc8-residency-stress:
- shard-tglb: NOTRUN -> [SKIP][17] ([fdo#109506] / [i915#2411])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-tglb5/igt@i915_pm_...@modeset-pc8-residency-stress.html

  * igt@i915_suspend@fence-restore-untiled:
- shard-kbl:  NOTRUN -> [DMESG-WARN][18] ([i915#180]) +1 similar 
issue
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/shard-kbl3/igt@i915_susp...@fence-restore-untiled.html

  * igt@kms_atomic@crtc-invalid-params-fence:
- shard-iclb: [PASS][19] -> [DMESG-WARN][20] ([i915#3728])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-iclb3/igt@kms_ato...@crtc-invalid-params-fence.html
   [20]: 

Re: [Intel-gfx] [PATCH v2 08/13] drm/msm/dpu_kms: Re-order dpu includes

2021-09-16 Thread Stephen Boyd
Quoting Sean Paul (2021-09-15 13:38:27)
> From: Sean Paul 
>
> Make includes alphabetical in dpu_kms.c
>
> Signed-off-by: Sean Paul 
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-9-s...@poorly.run
>  #v1
>
> Changes in v2:
> -None
> ---

Reviewed-by: Stephen Boyd 


Re: [Intel-gfx] [PATCH v2 09/13] drm/msm/dpu: Remove useless checks in dpu_encoder

2021-09-16 Thread Stephen Boyd
Quoting Sean Paul (2021-09-15 13:38:28)
> From: Sean Paul 
>
> A couple more useless checks to remove in dpu_encoder.
>
> Signed-off-by: Sean Paul 
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-10-s...@poorly.run
>  #v1
>
> Changes in v2:
> -None
> ---

Reviewed-by: Stephen Boyd 


Re: [Intel-gfx] [PATCH v2 10/13] drm/msm/dpu: Remove encoder->enable() hack

2021-09-16 Thread Stephen Boyd
Quoting Sean Paul (2021-09-15 13:38:29)
> From: Sean Paul 
>
> encoder->commit() was being misused because there were some global
> resources which needed to be tweaked in encoder->enable() which were not
> accessible in dpu_encoder.c. That is no longer true and the redirect
> serves no purpose any longer. So remove the indirection.

When did it become false? Just curious when this became obsolete.

>
> Signed-off-by: Sean Paul 
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-11-s...@poorly.run
>  #v1
>
> Changes in v2:
> -None
> ---

Reviewed-by: Stephen Boyd 
Tested-by: Stephen Boyd 


Re: [Intel-gfx] [PATCH v2 11/13] drm/msm/dp: Re-order dp_audio_put in deinit_sub_modules

2021-09-16 Thread Stephen Boyd
Quoting Sean Paul (2021-09-15 13:38:30)
> From: Sean Paul 
>
> Audio is initialized last, it should be de-initialized first to match
> the order in dp_init_sub_modules().

I don't really understand why the driver is written with all this "get"
stuff but sure.

>
> Signed-off-by: Sean Paul 
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-12-s...@poorly.run
>  #v1
>
> Changes in v2:
> -None
> ---

Reviewed-by: Stephen Boyd 


[Intel-gfx] ✗ Fi.CI.IGT: failure for Add support for querying hw info that UMDs need

2021-09-16 Thread Patchwork
== Series Details ==

Series: Add support for querying hw info that UMDs need
URL   : https://patchwork.freedesktop.org/series/94780/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10600_full -> Patchwork_21080_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21080_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21080_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_21080_full:

### IGT changes ###

 Possible regressions 

  * igt@i915_pm_rpm@debugfs-forcewake-user:
- shard-iclb: [PASS][1] -> [DMESG-FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-iclb7/igt@i915_pm_...@debugfs-forcewake-user.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-iclb1/igt@i915_pm_...@debugfs-forcewake-user.html

  * igt@kms_cursor_crc@pipe-d-cursor-suspend:
- shard-tglb: [PASS][3] -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-tglb3/igt@kms_cursor_...@pipe-d-cursor-suspend.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-tglb7/igt@kms_cursor_...@pipe-d-cursor-suspend.html

  * igt@testdisplay:
- shard-kbl:  [PASS][5] -> [TIMEOUT][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-kbl1/i...@testdisplay.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-kbl4/i...@testdisplay.html

  

### Piglit changes ###

 Possible regressions 

  * spec@glsl-1.30@execution@tex-miplevel-selection textureprojlod 2d (NEW):
- pig-snb-2600:   NOTRUN -> [FAIL][7]
   [7]: None

  
New tests
-

  New tests have been introduced between CI_DRM_10600_full and 
Patchwork_21080_full:

### New IGT tests (1) ###

  * igt@i915_query@hwconfig_table:
- Statuses :
- Exec time: [None] s

  


### New Piglit tests (1) ###

  * spec@glsl-1.30@execution@tex-miplevel-selection textureprojlod 2d:
- Statuses : 1 fail(s)
- Exec time: [7.20] s

  

Known issues


  Here are the changes found in Patchwork_21080_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@core_hotunplug@unbind-rebind:
- shard-kbl:  [PASS][8] -> [INCOMPLETE][9] ([i915#4130])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-kbl7/igt@core_hotunp...@unbind-rebind.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-kbl6/igt@core_hotunp...@unbind-rebind.html

  * igt@drm_import_export@prime:
- shard-kbl:  [PASS][10] -> [INCOMPLETE][11] ([i915#2895] / 
[i915#2944])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-kbl6/igt@drm_import_exp...@prime.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-kbl7/igt@drm_import_exp...@prime.html

  * igt@gem_ctx_sseu@engines:
- shard-tglb: NOTRUN -> [SKIP][12] ([i915#280])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-tglb7/igt@gem_ctx_s...@engines.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-iclb: NOTRUN -> [FAIL][13] ([i915#2842]) +1 similar issue
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-iclb3/igt@gem_exec_fair@basic-pace-s...@rcs0.html
- shard-tglb: NOTRUN -> [FAIL][14] ([i915#2842])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-tglb6/igt@gem_exec_fair@basic-pace-s...@rcs0.html

  * igt@gem_exec_fair@basic-sync@rcs0:
- shard-kbl:  [PASS][15] -> [SKIP][16] ([fdo#109271])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/shard-kbl3/igt@gem_exec_fair@basic-s...@rcs0.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-kbl4/igt@gem_exec_fair@basic-s...@rcs0.html

  * igt@gem_pread@exhaustion:
- shard-tglb: NOTRUN -> [WARN][17] ([i915#2658])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-tglb7/igt@gem_pr...@exhaustion.html
- shard-kbl:  NOTRUN -> [WARN][18] ([i915#2658])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-kbl1/igt@gem_pr...@exhaustion.html

  * igt@gem_render_copy@y-tiled-ccs-to-y-tiled-mc-ccs:
- shard-iclb: NOTRUN -> [SKIP][19] ([i915#768]) +2 similar issues
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/shard-iclb3/igt@gem_render_c...@y-tiled-ccs-to-y-tiled-mc-ccs.html

  * igt@gem_softpin@evict-snoop-interruptible:
- shard-tglb: NOTRUN -> [SKIP][20] ([fdo#109312])
   [20]: 

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Add "intel_" as prefix in set_mocs_index() (rev2)

2021-09-16 Thread Matt Roper
On Thu, Sep 16, 2021 at 09:35:04PM +, Patchwork wrote:
> == Series Details ==
> 
> Series: drm/i915/gt: Add "intel_" as prefix in set_mocs_index() (rev2)
> URL   : https://patchwork.freedesktop.org/series/94721/
> State : failure
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_10599 -> Patchwork_21077
> 
> 
> Summary
> ---
> 
>   **FAILURE**
> 
>   Serious unknown changes coming with Patchwork_21077 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_21077, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/index.html
> 
> Possible new issues
> ---
> 
>   Here are the unknown changes that may have been introduced in 
> Patchwork_21077:
> 
> ### IGT changes ###
> 
>  Possible regressions 
> 
>   * igt@i915_module_load@reload:
> - fi-icl-y:   [PASS][1] -> [INCOMPLETE][2]
>[1]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-icl-y/igt@i915_module_l...@reload.html
>[2]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-icl-y/igt@i915_module_l...@reload.html

Different test, but this seems to be the same panic seen in
https://gitlab.freedesktop.org/drm/intel/-/issues/4130 due to a page
fault in azx_interrupt() (from the snd_hda_codec driver).


Matt

> 
>   
>  Suppressed 
> 
>   The following results come from untrusted machines, tests, or statuses.
>   They do not affect the overall result.
> 
>   * igt@i915_module_load@reload:
> - {fi-ehl-2}: [INCOMPLETE][3] ([i915#4136]) -> [INCOMPLETE][4]
>[3]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-ehl-2/igt@i915_module_l...@reload.html
>[4]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-ehl-2/igt@i915_module_l...@reload.html
> 
>   
> Known issues
> 
> 
>   Here are the changes found in Patchwork_21077 that come from known issues:
> 
> ### IGT changes ###
> 
>  Issues hit 
> 
>   * igt@amdgpu/amd_basic@cs-sdma:
> - fi-kbl-7500u:   NOTRUN -> [SKIP][5] ([fdo#109271]) +17 similar 
> issues
>[5]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-7500u/igt@amdgpu/amd_ba...@cs-sdma.html
> 
>   * igt@core_hotunplug@unbind-rebind:
> - fi-cfl-guc: [PASS][6] -> [INCOMPLETE][7] ([i915#4130])
>[6]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html
>[7]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html
> 
>   * igt@i915_module_load@reload:
> - fi-skl-6700k2:  [PASS][8] -> [INCOMPLETE][9] ([i915#4130])
>[8]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-skl-6700k2/igt@i915_module_l...@reload.html
>[9]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-skl-6700k2/igt@i915_module_l...@reload.html
> 
>   * igt@runner@aborted:
> - fi-kbl-soraka:  NOTRUN -> [FAIL][10] ([i915#2426] / [i915#3363])
>[10]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-soraka/igt@run...@aborted.html
> - fi-skl-6700k2:  NOTRUN -> [FAIL][11] ([i915#2426] / [i915#3363])
>[11]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-skl-6700k2/igt@run...@aborted.html
> 
>   
>  Possible fixes 
> 
>   * igt@i915_module_load@reload:
> - fi-kbl-7500u:   [INCOMPLETE][12] ([i915#4130] / [i915#4136]) -> 
> [PASS][13]
>[12]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7500u/igt@i915_module_l...@reload.html
>[13]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-7500u/igt@i915_module_l...@reload.html
> 
>   
>  Warnings 
> 
>   * igt@i915_module_load@reload:
> - fi-cml-u2:  [INCOMPLETE][14] ([i915#4130] / [i915#4136]) -> 
> [INCOMPLETE][15] ([i915#4130])
>[14]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cml-u2/igt@i915_module_l...@reload.html
>[15]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-cml-u2/igt@i915_module_l...@reload.html
> - fi-kbl-soraka:  [INCOMPLETE][16] -> [INCOMPLETE][17] ([i915#4130])
>[16]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-soraka/igt@i915_module_l...@reload.html
>[17]: 
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-soraka/igt@i915_module_l...@reload.html
> 
>   
>   {name}: This element is suppressed. This means it is ignored when computing
>   the status of the difference (SUCCESS, WARNING, or FAILURE).
> 
>   [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
>   [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
>   [fdo#112080]: 

[Intel-gfx] ✓ Fi.CI.IGT: success for Enable GuC submission by default on DG1 (rev7)

2021-09-16 Thread Patchwork
== Series Details ==

Series: Enable GuC submission by default on DG1 (rev7)
URL   : https://patchwork.freedesktop.org/series/93325/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10599_full -> Patchwork_21078_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Known issues


  Here are the changes found in Patchwork_21078_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@core_hotunplug@unbind-rebind:
- shard-kbl:  [PASS][1] -> [INCOMPLETE][2] ([i915#4130])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-kbl3/igt@core_hotunp...@unbind-rebind.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-kbl1/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_ctx_param@set-priority-not-supported:
- shard-tglb: NOTRUN -> [SKIP][3] ([fdo#109314])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb6/igt@gem_ctx_pa...@set-priority-not-supported.html

  * igt@gem_ctx_sseu@invalid-args:
- shard-tglb: NOTRUN -> [SKIP][4] ([i915#280])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb3/igt@gem_ctx_s...@invalid-args.html

  * igt@gem_exec_fair@basic-deadline:
- shard-kbl:  NOTRUN -> [FAIL][5] ([i915#2846])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-kbl6/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-kbl:  NOTRUN -> [FAIL][6] ([i915#2842])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-kbl3/igt@gem_exec_fair@basic-none-s...@rcs0.html
- shard-tglb: NOTRUN -> [FAIL][7] ([i915#2842])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb6/igt@gem_exec_fair@basic-none-s...@rcs0.html

  * igt@gem_exec_params@secure-non-root:
- shard-tglb: NOTRUN -> [SKIP][8] ([fdo#112283])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb3/igt@gem_exec_par...@secure-non-root.html

  * igt@gem_exec_suspend@basic-s0:
- shard-tglb: [PASS][9] -> [INCOMPLETE][10] ([i915#456]) +1 similar 
issue
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-tglb6/igt@gem_exec_susp...@basic-s0.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb7/igt@gem_exec_susp...@basic-s0.html

  * igt@gem_pread@exhaustion:
- shard-tglb: NOTRUN -> [WARN][11] ([i915#2658])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb6/igt@gem_pr...@exhaustion.html
- shard-kbl:  NOTRUN -> [WARN][12] ([i915#2658])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-kbl3/igt@gem_pr...@exhaustion.html

  * igt@gem_softpin@evict-snoop-interruptible:
- shard-tglb: NOTRUN -> [SKIP][13] ([fdo#109312])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb2/igt@gem_soft...@evict-snoop-interruptible.html

  * igt@gem_userptr_blits@input-checking:
- shard-tglb: NOTRUN -> [DMESG-WARN][14] ([i915#3002])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb3/igt@gem_userptr_bl...@input-checking.html

  * igt@gen7_exec_parse@basic-offset:
- shard-tglb: NOTRUN -> [SKIP][15] ([fdo#109289])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb6/igt@gen7_exec_pa...@basic-offset.html

  * igt@gen9_exec_parse@bb-chained:
- shard-tglb: NOTRUN -> [SKIP][16] ([i915#2856])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb2/igt@gen9_exec_pa...@bb-chained.html

  * igt@i915_pm_rc6_residency@rc6-fence:
- shard-tglb: NOTRUN -> [WARN][17] ([i915#2681])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb2/igt@i915_pm_rc6_reside...@rc6-fence.html

  * igt@i915_pm_rpm@system-suspend-execbuf:
- shard-tglb: [PASS][18] -> [INCOMPLETE][19] ([i915#2411] / 
[i915#456] / [i915#750])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-tglb6/igt@i915_pm_...@system-suspend-execbuf.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb7/igt@i915_pm_...@system-suspend-execbuf.html

  * igt@i915_query@query-topology-unsupported:
- shard-tglb: NOTRUN -> [SKIP][20] ([fdo#109302])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-tglb6/igt@i915_qu...@query-topology-unsupported.html

  * igt@i915_selftest@live@execlists:
- shard-skl:  [PASS][21] -> [INCOMPLETE][22] ([i915#198])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-skl3/igt@i915_selftest@l...@execlists.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/shard-skl7/igt@i915_selftest@l...@execlists.html

  * igt@kms_big_fb@x-tiled-16bpp-rotate-90:
- shard-tglb: 

[Intel-gfx] linux-next: build failure after merge of the amdgpu tree

2021-09-16 Thread Stephen Rothwell
Hi all,

After merging the amdgpu tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

In file included from include/drm/ttm/ttm_bo_driver.h:40,
 from include/drm/drm_gem_ttm_helper.h:11,
 from drivers/gpu/drm/drm_gem_ttm_helper.c:5:
include/drm/ttm/ttm_device.h:274:19: error: duplicate member 'pinned'
  274 |  struct list_head pinned;
  |   ^~

Caused by commit

  59084e464297 ("drm/ttm: Create pinned list")

interacting with commit

  32eadf52d449 ("drm/ttm: Create pinned list")

from the drm-misc tree.

The automatic merge proved incorrect, so I have removed one of the
insertions.

-- 
Cheers,
Stephen Rothwell


pgprJS2FOhlIi.pgp
Description: OpenPGP digital signature


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)
URL   : https://patchwork.freedesktop.org/series/94733/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10599_full -> Patchwork_21076_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21076_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21076_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_21076_full:

### IGT changes ###

 Possible regressions 

  * igt@i915_pm_sseu@full-enable:
- shard-skl:  [PASS][1] -> [FAIL][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-skl2/igt@i915_pm_s...@full-enable.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-skl9/igt@i915_pm_s...@full-enable.html

  
 Warnings 

  * igt@i915_pm_rpm@gem-mmap-type:
- shard-kbl:  [SKIP][3] ([fdo#109271]) -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-kbl3/igt@i915_pm_...@gem-mmap-type.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-kbl4/igt@i915_pm_...@gem-mmap-type.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
- {shard-rkl}:NOTRUN -> [SKIP][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-rkl-6/igt@kms_multipipe_mode...@basic-max-pipe-crc-check.html

  
Known issues


  Here are the changes found in Patchwork_21076_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@drm_import_export@flink:
- shard-kbl:  NOTRUN -> [INCOMPLETE][6] ([i915#2369])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-kbl2/igt@drm_import_exp...@flink.html

  * igt@gem_ctx_param@set-priority-not-supported:
- shard-tglb: NOTRUN -> [SKIP][7] ([fdo#109314])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-tglb2/igt@gem_ctx_pa...@set-priority-not-supported.html

  * igt@gem_ctx_sseu@invalid-args:
- shard-tglb: NOTRUN -> [SKIP][8] ([i915#280])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-tglb2/igt@gem_ctx_s...@invalid-args.html

  * igt@gem_eio@in-flight-contexts-immediate:
- shard-iclb: [PASS][9] -> [TIMEOUT][10] ([i915#3070])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-iclb2/igt@gem_...@in-flight-contexts-immediate.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-iclb4/igt@gem_...@in-flight-contexts-immediate.html

  * igt@gem_eio@unwedge-stress:
- shard-skl:  [PASS][11] -> [TIMEOUT][12] ([i915#2369] / 
[i915#3063])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-skl1/igt@gem_...@unwedge-stress.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-skl9/igt@gem_...@unwedge-stress.html

  * igt@gem_exec_fair@basic-deadline:
- shard-kbl:  NOTRUN -> [FAIL][13] ([i915#2846])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-kbl7/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-kbl:  NOTRUN -> [FAIL][14] ([i915#2842])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-kbl2/igt@gem_exec_fair@basic-none-s...@rcs0.html
- shard-tglb: NOTRUN -> [FAIL][15] ([i915#2842])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-tglb2/igt@gem_exec_fair@basic-none-s...@rcs0.html

  * igt@gem_exec_fair@basic-sync@rcs0:
- shard-kbl:  [PASS][16] -> [SKIP][17] ([fdo#109271])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/shard-kbl7/igt@gem_exec_fair@basic-s...@rcs0.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-kbl4/igt@gem_exec_fair@basic-s...@rcs0.html

  * igt@gem_exec_params@secure-non-root:
- shard-tglb: NOTRUN -> [SKIP][18] ([fdo#112283])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-tglb2/igt@gem_exec_par...@secure-non-root.html

  * igt@gem_pread@exhaustion:
- shard-tglb: NOTRUN -> [WARN][19] ([i915#2658])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-tglb2/igt@gem_pr...@exhaustion.html
- shard-kbl:  NOTRUN -> [WARN][20] ([i915#2658])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/shard-kbl2/igt@gem_pr...@exhaustion.html

  * 

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/5] drm/i915/display/adlp: Fix PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR calculation (rev5)

2021-09-16 Thread Patchwork
== Series Details ==

Series: series starting with [v2,1/5] drm/i915/display/adlp: Fix 
PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR calculation (rev5)
URL   : https://patchwork.freedesktop.org/series/94674/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10600 -> Patchwork_21082


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/index.html

Known issues


  Here are the changes found in Patchwork_21082 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-gfx:
- fi-skl-6700k2:  NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-skl-6700k2/igt@amdgpu/amd_ba...@cs-gfx.html

  * igt@amdgpu/amd_basic@cs-sdma:
- fi-cfl-8109u:   NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-cfl-8109u/igt@amdgpu/amd_ba...@cs-sdma.html
- fi-kbl-7500u:   NOTRUN -> [SKIP][3] ([fdo#109271]) +17 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-kbl-7500u/igt@amdgpu/amd_ba...@cs-sdma.html

  * igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2:  NOTRUN -> [SKIP][4] ([fdo#109315]) +17 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-icl-u2/igt@amdgpu/amd_cs_...@fork-gfx0.html

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-rkl-11600:   NOTRUN -> [SKIP][5] ([fdo#109315]) +17 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-rkl-11600/igt@amdgpu/amd_cs_...@sync-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-cfl-guc: [PASS][6] -> [INCOMPLETE][7] ([i915#4130])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [PASS][8] -> [INCOMPLETE][9] ([i915#4130])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  * igt@i915_module_load@reload:
- fi-icl-y:   [PASS][10] -> [INCOMPLETE][11] ([i915#4130])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-icl-y/igt@i915_module_l...@reload.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-icl-y/igt@i915_module_l...@reload.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7500u:   [PASS][12] -> [DMESG-WARN][13] ([i915#2868])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-7500u/igt@kms_chamel...@common-hpd-after-suspend.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-kbl-7500u/igt@kms_chamel...@common-hpd-after-suspend.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-skl-6700k2:  [INCOMPLETE][14] ([i915#4130]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
- fi-icl-u2:  [INCOMPLETE][16] ([i915#4130]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7500u:   [INCOMPLETE][18] ([i915#4130]) -> [PASS][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-7500u/igt@core_hotunp...@unbind-rebind.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-kbl-7500u/igt@core_hotunp...@unbind-rebind.html

  * igt@i915_module_load@reload:
- fi-rkl-11600:   [INCOMPLETE][20] ([i915#4136]) -> [PASS][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-rkl-11600/igt@i915_module_l...@reload.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-rkl-11600/igt@i915_module_l...@reload.html
- fi-kbl-guc: [INCOMPLETE][22] ([i915#4130] / [i915#4139]) -> 
[PASS][23]
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-guc/igt@i915_module_l...@reload.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21082/fi-kbl-guc/igt@i915_module_l...@reload.html

  
 Warnings 

  * igt@i915_module_load@reload:
- fi-kbl-8809g:   [INCOMPLETE][24] ([i915#3910] / [i915#4136]) -> 
[INCOMPLETE][25] ([i915#4130])
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-8809g/igt@i915_module_l...@reload.html
   [25]: 

Re: [Intel-gfx] [PATCH 01/16] Revert "drm/i915/display: Disable audio, DRRS and PSR before planes"

2021-09-16 Thread Souza, Jose
On Thu, 2021-09-16 at 16:21 +0300, Ville Syrjälä wrote:
> On Wed, Sep 15, 2021 at 08:19:41PM +, Souza, Jose wrote:
> > On Wed, 2021-09-15 at 15:30 +0300, Ville Syrjälä wrote:
> > > On Wed, Sep 15, 2021 at 12:00:28AM +, Souza, Jose wrote:
> > > > On Tue, 2021-09-14 at 16:30 -0700, José Roberto de Souza wrote:
> > > > > On Tue, 2021-09-14 at 11:20 +0300, Ville Syrjälä wrote:
> > > > > > On Mon, Sep 13, 2021 at 04:28:35PM +, Souza, Jose wrote:
> > > > > > > On Mon, 2021-09-13 at 17:44 +0300, Ville Syrjala wrote:
> > > > > > > > From: Ville Syrjälä 
> > > > > > > > 
> > > > > > > > Disabling planes in the middle of the modeset seuqnece does not 
> > > > > > > > make
> > > > > > > > sense since userspace can anyway disable planes before the 
> > > > > > > > modeset
> > > > > > > > even starts. So when the modeset seuqence starts the set of 
> > > > > > > > enabled
> > > > > > > > planes is entirely arbitrary. Trying to sprinkle the plane 
> > > > > > > > disabling
> > > > > > > > into the modeset sequence just means more randomness and 
> > > > > > > > potential
> > > > > > > > for hard to reproduce bugs.
> > > > > > > 
> > > > > > > The patch being reverted did not changed anything about plane, it 
> > > > > > > only disables audio and PSR before pipe is disabled in this case.
> > > > > > 
> > > > > > The commit message only talks about planes. Also we already disable
> > > > > > the pipe in the post_disable hook, so PSR/audio was always disabled
> > > > > > before the pipe IIRC.
> > > > > 
> > > > > That is true, my bad.
> > > > > 
> > > > > Reviewed-by: José Roberto de Souza 
> > > > 
> > > > Sorry I missed the intel_crtc_disable_planes() call, so here is the 
> > > > problem:
> > > > 
> > > > 
> > > > intel_commit_modeset_disables()
> > > > intel_old_crtc_state_disables()
> > > > intel_crtc_disable_planes()
> > > > intel_disable_plane()
> > > > dev_priv->display.crtc_disable(state, 
> > > > crtc)/hsw_crtc_disable()
> > > > intel_encoders_disable()
> > > > encoder->disable()/intel_disable_ddi()
> > > > intel_psr_disable()
> > > > intel_encoders_post_disable()
> > > > post_disable/intel_ddi_post_disable()
> > > > intel_disable_pipe()
> > > > 
> > > > So all the planes are disabled while PSR is still on, that is why this 
> > > > patch fixed the underrun.
> > > > 
> > > > We need to call the pre_disable() before intel_crtc_disable_planes() 
> > > > and for the case where pipe is not disabled but all of its planes are 
> > > > requires
> > > > the pending patch that I have.
> > > > 
> > > > Or do you have other suggestion?
> > > 
> > > I would like to follow the same sequence always, ie. disable planes
> > > first (be it from userspace or from the kernel just before the modeset),
> > > and then we take the exact same measures in both cases to deal with
> > > whatever is the problem with PSR vs. disabled planes. That makes the
> > > sequence as deterministic as possible, and thus we avoid potential
> > > weird bugs stemming from userspace behaviour wrt. disabling planes.
> > > 
> > > Hmm. Our modeset plane disable code is certainly a bit lackluster.
> > > It misses a bunch of stuff that we do for normal plane updates.
> > > So we might want to put a few extra things in there. Maybe PSR
> > > needs the vblank_get+psr_idle trick? And we might want a
> > > vrr_push/etc. in there as well, not sure.
> > > 
> > > What exactly is your solution to the case where the planes are
> > > already disabled by userspace?
> > 
> > https://github.com/zehortigoza/linux/commit/013478a67e0b96abbaf6ab2d1b4be324b0fe737b
> 
> That's not going to work correctly. You can't depend on
> connectors being part of the state since that's not the case for
> pure plane updates/etc.

Thanks for catching it, fixed here: 
https://github.com/zehortigoza/linux/commit/77f3dd1e1dccdf25d04cb42a45b95570b2d3d3e8

> 
> In general I really dislike the PSR code's reliance on the
> encoder/connector. Tht makes it really hard to do these sorts
> of things. So I think we'd have to redesign it to try to
> operate purely on the crtc and not need the encoder/connector.

I can help with reviews if you want to do that.

> 
> > 
> > Whole branch: 
> > https://github.com/zehortigoza/linux/commits/upstream-psr2-sel-fetch-new
> > 
> > > 
> > 
> 



Re: [Intel-gfx] [PATCH v2 07/13] drm/i915/hdcp: Use HDCP helpers for i915

2021-09-16 Thread kernel test robot
Hi Sean,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip next-20210916]
[cannot apply to robh/for-next linus/master v5.15-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into-helpers/20210916-044145
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-r033-20210916 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
c8b3d7d6d6de37af68b2f379d0e37304f78e115f)
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/0day-ci/linux/commit/eb031b7a8eac1f8c6f61fee94daa7fd43945ce96
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into-helpers/20210916-044145
git checkout eb031b7a8eac1f8c6f61fee94daa7fd43945ce96
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 
ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

   In file included from :4:
>> drivers/gpu/drm/i915/display/intel_hdcp.h:30:15: error: declaration of 
>> 'struct drm_atomic_state' will not be visible outside of this function 
>> [-Werror,-Wvisibility]
struct drm_atomic_state *state);
   ^
   1 error generated.


vim +30 drivers/gpu/drm/i915/display/intel_hdcp.h

25  
26  int intel_hdcp_init(struct intel_connector *connector,
27  struct intel_digital_port *dig_port,
28  const struct intel_hdcp_shim *hdcp_shim);
29  int intel_hdcp_setup(struct drm_connector *drm_connector,
  > 30   struct drm_atomic_state *state);
31  int intel_hdcp_load_keys(struct drm_connector *drm_connector);
32  bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port 
port);
33  int intel_hdcp_capable(struct intel_connector *connector, bool 
*capable);
34  int intel_hdcp2_capable(struct drm_connector *drm_connector, bool 
*capable);
35  int intel_hdcp2_enable(struct drm_connector *drm_connector);
36  int intel_hdcp2_disable(struct drm_connector *drm_connector);
37  int intel_hdcp2_check_link(struct drm_connector *drm_connector);
38  int intel_hdcp1_store_receiver_info(struct drm_connector *drm_connector,
39  u32 *ksv, u32 status, u8 caps,
40  bool repeater_present);
41  int intel_hdcp1_read_an(struct drm_connector *drm_connector,
42  struct drm_hdcp_an *an);
43  int intel_hdcp1_enable_encryption(struct drm_connector *drm_connector);
44  int intel_hdcp1_wait_for_r0(struct drm_connector *drm_connector);
45  int intel_hdcp1_match_ri(struct drm_connector *drm_connector, u32 
ri_prime);
46  int intel_hdcp1_post_encryption(struct drm_connector *drm_connector);
47  int intel_hdcp1_store_ksv_fifo(struct drm_connector *drm_connector,
48 u8 *ksv_fifo, u8 num_downstream, u8 
*bstatus,
49 u32 *v_prime);
50  int intel_hdcp1_check_link(struct drm_connector *drm_connector);
51  int intel_hdcp1_disable(struct drm_connector *drm_connector);
52  void intel_hdcp_component_init(struct drm_i915_private *dev_priv);
53  void intel_hdcp_component_fini(struct drm_i915_private *dev_priv);
54  void intel_hdcp_cleanup(struct intel_connector *connector);
55  void intel_hdcp_handle_cp_irq(struct intel_connector *connector);
56  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


.config.gz
Description: application/gzip


[Intel-gfx] ✓ Fi.CI.BAT: success for Add support for querying hw info that UMDs need

2021-09-16 Thread Patchwork
== Series Details ==

Series: Add support for querying hw info that UMDs need
URL   : https://patchwork.freedesktop.org/series/94780/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10600 -> Patchwork_21080


Summary
---

  **WARNING**

  Minor unknown changes coming with Patchwork_21080 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21080, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21080:

### IGT changes ###

 Warnings 

  * igt@i915_module_load@reload:
- fi-kbl-8809g:   [INCOMPLETE][1] ([i915#3910] / [i915#4136]) -> 
[INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-8809g/igt@i915_module_l...@reload.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-kbl-8809g/igt@i915_module_l...@reload.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_module_load@reload:
- {fi-ehl-2}: [INCOMPLETE][3] ([i915#4136]) -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-ehl-2/igt@i915_module_l...@reload.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-ehl-2/igt@i915_module_l...@reload.html

  * igt@i915_pm_rpm@module-reload:
- {fi-jsl-1}: NOTRUN -> [INCOMPLETE][5]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-jsl-1/igt@i915_pm_...@module-reload.html

  * igt@runner@aborted:
- {fi-jsl-1}: NOTRUN -> [FAIL][6]
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-jsl-1/igt@run...@aborted.html
- {fi-ehl-2}: NOTRUN -> [FAIL][7]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-ehl-2/igt@run...@aborted.html

  
Known issues


  Here are the changes found in Patchwork_21080 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-sdma:
- fi-kbl-7500u:   NOTRUN -> [SKIP][8] ([fdo#109271]) +17 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-kbl-7500u/igt@amdgpu/amd_ba...@cs-sdma.html

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-rkl-11600:   NOTRUN -> [SKIP][9] ([fdo#109315]) +17 similar issues
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-rkl-11600/igt@amdgpu/amd_cs_...@sync-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-cfl-8700k:   [PASS][10] -> [INCOMPLETE][11] ([i915#4130])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-cfl-8700k/igt@core_hotunp...@unbind-rebind.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-cfl-8700k/igt@core_hotunp...@unbind-rebind.html
- fi-cfl-8109u:   [PASS][12] -> [INCOMPLETE][13] ([i915#4130])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-cfl-8109u/igt@core_hotunp...@unbind-rebind.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-cfl-8109u/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [PASS][14] -> [INCOMPLETE][15] ([i915#4130])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka:  NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#2190])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-kbl-soraka/igt@gem_huc_c...@huc-copy.html

  * igt@gem_tiled_blits@basic:
- fi-kbl-soraka:  NOTRUN -> [SKIP][17] ([fdo#109271]) +5 similar issues
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-kbl-soraka/igt@gem_tiled_bl...@basic.html

  * igt@i915_module_load@reload:
- fi-kbl-soraka:  NOTRUN -> [INCOMPLETE][18] ([i915#4130])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-kbl-soraka/igt@i915_module_l...@reload.html
- fi-rkl-guc: [PASS][19] -> [INCOMPLETE][20] ([i915#4130])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10600/fi-rkl-guc/igt@i915_module_l...@reload.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-rkl-guc/igt@i915_module_l...@reload.html
- fi-skl-6700k2:  NOTRUN -> [INCOMPLETE][21] ([i915#4130])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21080/fi-skl-6700k2/igt@i915_module_l...@reload.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-soraka:  NOTRUN -> [SKIP][22] ([fdo#109271] / 

[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible
URL   : https://patchwork.freedesktop.org/series/94786/
State : failure

== Summary ==

Applying: dmr: cleanup: drm_modeset_lock_all_ctx() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: dmr/i915: cleanup: drm_modeset_lock_all_ctx() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: dmr/msm: cleanup: drm_modeset_lock_all_ctx() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/vmwgfx: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/tegra: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/shmobile: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/radeon: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/omapdrm: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/nouveau: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/msm: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
Applying: drm/i915: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
error: sha1 information is lacking or useless 
(drivers/gpu/drm/i915/display/intel_display.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0012 drm/i915: cleanup: drm_modeset_lock_all() --> 
DRM_MODESET_LOCK_ALL_BEGIN()
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".




[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add support for querying hw info that UMDs need

2021-09-16 Thread Patchwork
== Series Details ==

Series: Add support for querying hw info that UMDs need
URL   : https://patchwork.freedesktop.org/series/94780/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
2e34f570f67b drm/i915/guc: Add fetch of hwconfig table
-:98: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does 
MAINTAINERS need updating?
#98: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 247 lines checked
c7fa0fd27d07 drm/i915/uapi: Add query for hwconfig table




[Intel-gfx] ✗ Fi.CI.IGT: failure for lib, stackdepot: check stackdepot handle before accessing slabs (rev3)

2021-09-16 Thread Patchwork
== Series Details ==

Series: lib, stackdepot: check stackdepot handle before accessing slabs (rev3)
URL   : https://patchwork.freedesktop.org/series/94696/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10598_full -> Patchwork_21075_full


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21075_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21075_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
---

  Here are the unknown changes that may have been introduced in 
Patchwork_21075_full:

### IGT changes ###

 Possible regressions 

  * igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_gen12_mc_ccs:
- shard-iclb: NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-iclb7/igt@kms_ccs@pipe-a-crc-primary-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile:
- shard-iclb: [PASS][2] -> [SKIP][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-iclb4/igt@kms_flip_scaled_...@flip-32bpp-ytileccs-to-64bpp-ytile.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-iclb2/igt@kms_flip_scaled_...@flip-32bpp-ytileccs-to-64bpp-ytile.html

  
Known issues


  Here are the changes found in Patchwork_21075_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@gem_eio@unwedge-stress:
- shard-tglb: [PASS][4] -> [TIMEOUT][5] ([i915#2369] / [i915#3063] 
/ [i915#3648])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-tglb3/igt@gem_...@unwedge-stress.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-tglb7/igt@gem_...@unwedge-stress.html
- shard-skl:  [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#3063])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-skl7/igt@gem_...@unwedge-stress.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-skl4/igt@gem_...@unwedge-stress.html

  * igt@gem_exec_fair@basic-deadline:
- shard-kbl:  NOTRUN -> [FAIL][8] ([i915#2846])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-kbl6/igt@gem_exec_f...@basic-deadline.html

  * igt@gem_exec_fair@basic-pace@rcs0:
- shard-tglb: [PASS][9] -> [FAIL][10] ([i915#2842])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-tglb3/igt@gem_exec_fair@basic-p...@rcs0.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-tglb8/igt@gem_exec_fair@basic-p...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
- shard-iclb: [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-iclb8/igt@gem_exec_fair@basic-p...@vcs0.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-iclb4/igt@gem_exec_fair@basic-p...@vcs0.html

  * igt@gem_exec_fair@basic-pace@vcs1:
- shard-iclb: NOTRUN -> [FAIL][13] ([i915#2842])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-iclb4/igt@gem_exec_fair@basic-p...@vcs1.html

  * igt@gem_huc_copy@huc-copy:
- shard-kbl:  NOTRUN -> [SKIP][14] ([fdo#109271] / [i915#2190])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-kbl4/igt@gem_huc_c...@huc-copy.html

  * igt@gem_pread@exhaustion:
- shard-skl:  NOTRUN -> [WARN][15] ([i915#2658])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-skl1/igt@gem_pr...@exhaustion.html

  * igt@gen7_exec_parse@basic-offset:
- shard-skl:  NOTRUN -> [SKIP][16] ([fdo#109271]) +64 similar issues
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-skl1/igt@gen7_exec_pa...@basic-offset.html

  * igt@gen9_exec_parse@allowed-all:
- shard-tglb: NOTRUN -> [SKIP][17] ([i915#2856])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-tglb3/igt@gen9_exec_pa...@allowed-all.html

  * igt@gen9_exec_parse@allowed-single:
- shard-skl:  [PASS][18] -> [DMESG-WARN][19] ([i915#1436] / 
[i915#716])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-skl7/igt@gen9_exec_pa...@allowed-single.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-skl4/igt@gen9_exec_pa...@allowed-single.html

  * igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][20] -> [FAIL][21] ([i915#454])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/shard-iclb4/igt@i915_pm...@dc6-psr.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/shard-iclb6/igt@i915_pm...@dc6-psr.html

  * igt@i915_selftest@mock@requests:
- 

Re: [Intel-gfx] [PATCH v2 03/13] drm/hdcp: Update property value on content type and user changes

2021-09-16 Thread kernel test robot
Hi Sean,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip robh/for-next linus/master 
v5.15-rc1 next-20210916]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:
https://github.com/0day-ci/linux/commits/Sean-Paul/drm-hdcp-Pull-HDCP-auth-exchange-check-into-helpers/20210916-044145
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-m001-20210916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

smatch warnings:
drivers/gpu/drm/drm_hdcp.c:509 drm_hdcp_atomic_check() warn: inconsistent 
indenting

vim +509 drivers/gpu/drm/drm_hdcp.c

a46c52c65fdbf76 Sean Paul 2021-09-15  425  
a46c52c65fdbf76 Sean Paul 2021-09-15  426  /**
a46c52c65fdbf76 Sean Paul 2021-09-15  427   * drm_hdcp_atomic_check - Helper 
for drivers to call during connector->atomic_check
a46c52c65fdbf76 Sean Paul 2021-09-15  428   *
a46c52c65fdbf76 Sean Paul 2021-09-15  429   * @state: pointer to the atomic 
state being checked
a46c52c65fdbf76 Sean Paul 2021-09-15  430   * @connector: drm_connector on 
which content protection state needs an update
a46c52c65fdbf76 Sean Paul 2021-09-15  431   *
a46c52c65fdbf76 Sean Paul 2021-09-15  432   * This function can be used by 
display drivers to perform an atomic check on the
d0cdceca77739a6 Sean Paul 2021-09-15  433   * hdcp state elements. If hdcp 
state has changed in a manner which requires the
d0cdceca77739a6 Sean Paul 2021-09-15  434   * driver to enable or disable 
content protection, this function will return
d0cdceca77739a6 Sean Paul 2021-09-15  435   * true.
d0cdceca77739a6 Sean Paul 2021-09-15  436   *
d0cdceca77739a6 Sean Paul 2021-09-15  437   * Returns:
d0cdceca77739a6 Sean Paul 2021-09-15  438   * true if the driver must 
enable/disable hdcp, false otherwise
a46c52c65fdbf76 Sean Paul 2021-09-15  439   */
d0cdceca77739a6 Sean Paul 2021-09-15  440  bool drm_hdcp_atomic_check(struct 
drm_connector *connector,
a46c52c65fdbf76 Sean Paul 2021-09-15  441  struct 
drm_atomic_state *state)
a46c52c65fdbf76 Sean Paul 2021-09-15  442  {
a46c52c65fdbf76 Sean Paul 2021-09-15  443   struct drm_connector_state 
*new_conn_state, *old_conn_state;
a46c52c65fdbf76 Sean Paul 2021-09-15  444   struct drm_crtc_state 
*new_crtc_state;
a46c52c65fdbf76 Sean Paul 2021-09-15  445   u64 old_hdcp, new_hdcp;
a46c52c65fdbf76 Sean Paul 2021-09-15  446  
a46c52c65fdbf76 Sean Paul 2021-09-15  447   old_conn_state = 
drm_atomic_get_old_connector_state(state, connector);
a46c52c65fdbf76 Sean Paul 2021-09-15  448   old_hdcp = 
old_conn_state->content_protection;
a46c52c65fdbf76 Sean Paul 2021-09-15  449  
a46c52c65fdbf76 Sean Paul 2021-09-15  450   new_conn_state = 
drm_atomic_get_new_connector_state(state, connector);
a46c52c65fdbf76 Sean Paul 2021-09-15  451   new_hdcp = 
new_conn_state->content_protection;
a46c52c65fdbf76 Sean Paul 2021-09-15  452  
a46c52c65fdbf76 Sean Paul 2021-09-15  453   if (!new_conn_state->crtc) {
a46c52c65fdbf76 Sean Paul 2021-09-15  454   /*
a46c52c65fdbf76 Sean Paul 2021-09-15  455* If the connector is 
being disabled with CP enabled, mark it
a46c52c65fdbf76 Sean Paul 2021-09-15  456* desired so it's 
re-enabled when the connector is brought back
a46c52c65fdbf76 Sean Paul 2021-09-15  457*/
d0cdceca77739a6 Sean Paul 2021-09-15  458   if (old_hdcp == 
DRM_MODE_CONTENT_PROTECTION_ENABLED) {
a46c52c65fdbf76 Sean Paul 2021-09-15  459   
new_conn_state->content_protection =
a46c52c65fdbf76 Sean Paul 2021-09-15  460   
DRM_MODE_CONTENT_PROTECTION_DESIRED;
d0cdceca77739a6 Sean Paul 2021-09-15  461   return true;
d0cdceca77739a6 Sean Paul 2021-09-15  462   }
d0cdceca77739a6 Sean Paul 2021-09-15  463   return false;
a46c52c65fdbf76 Sean Paul 2021-09-15  464   }
a46c52c65fdbf76 Sean Paul 2021-09-15  465  
a46c52c65fdbf76 Sean Paul 2021-09-15  466   new_crtc_state = 
drm_atomic_get_new_crtc_state(state,
a46c52c65fdbf76 Sean Paul 2021-09-15  467   
   new_conn_state->crtc);
a46c52c65fdbf76 Sean Paul 2021-09-15  468   /*
a46c52c65fdbf76 Sean Paul 2021-09-15  469   * Fix the HDCP uapi content 
protection state in case of modeset.
a46c52c65fdbf76 Sean Paul 2021-09-15  470   * FIXME: As per HDCP content 
protection property uapi doc, an uevent()
a46c52c65fdbf76 Sean Paul 2021-09-15  471   * need to be sent if there is 
transition from ENABLED->DESIRED.
a46c52c65fdbf76 Sean Paul 2021-09-15  472   */
a46c52c65fdbf76 Sean

[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v2,1/5] drm/i915/display/adlp: Fix PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR calculation (rev4)

2021-09-16 Thread Patchwork
== Series Details ==

Series: series starting with [v2,1/5] drm/i915/display/adlp: Fix 
PSR2_MAN_TRK_CTL_SU_REGION_END_ADDR calculation (rev4)
URL   : https://patchwork.freedesktop.org/series/94674/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10599 -> Patchwork_21079


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21079 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21079, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21079:

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@reload:
- fi-kbl-7567u:   NOTRUN -> [INCOMPLETE][1]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-kbl-7567u/igt@i915_module_l...@reload.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_module_load@reload:
- {fi-ehl-2}: [INCOMPLETE][2] ([i915#4136]) -> [INCOMPLETE][3]
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-ehl-2/igt@i915_module_l...@reload.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-ehl-2/igt@i915_module_l...@reload.html

  
Known issues


  Here are the changes found in Patchwork_21079 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-gfx:
- fi-rkl-guc: NOTRUN -> [SKIP][4] ([fdo#109315]) +17 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-rkl-guc/igt@amdgpu/amd_ba...@cs-gfx.html

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-rkl-11600:   NOTRUN -> [SKIP][5] ([fdo#109315]) +17 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-rkl-11600/igt@amdgpu/amd_cs_...@sync-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-skl-6700k2:  [PASS][6] -> [INCOMPLETE][7] ([i915#4130])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_exec_suspend@basic-s0:
- fi-kbl-soraka:  [PASS][8] -> [INCOMPLETE][9] ([i915#155])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-soraka/igt@gem_exec_susp...@basic-s0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-kbl-soraka/igt@gem_exec_susp...@basic-s0.html

  * igt@i915_module_load@reload:
- fi-icl-u2:  NOTRUN -> [INCOMPLETE][10] ([i915#4130])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-icl-u2/igt@i915_module_l...@reload.html
- fi-kbl-guc: [PASS][11] -> [INCOMPLETE][12] ([i915#4130] / 
[i915#4139])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-guc/igt@i915_module_l...@reload.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-kbl-guc/igt@i915_module_l...@reload.html

  * igt@runner@aborted:
- fi-icl-u2:  NOTRUN -> [FAIL][13] ([i915#2426] / [i915#3363] / 
[i915#3690])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-icl-u2/igt@run...@aborted.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-rkl-guc: [INCOMPLETE][14] ([i915#4130]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
- fi-icl-u2:  [INCOMPLETE][16] ([i915#4130]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
- fi-rkl-11600:   [INCOMPLETE][18] ([i915#4130]) -> [PASS][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-rkl-11600/igt@core_hotunp...@unbind-rebind.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-rkl-11600/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [INCOMPLETE][20] ([i915#4130]) -> [PASS][21]
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21079/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  
 Warnings 

  * igt@i915_module_load@reload:
- fi-kbl-8809g:   

[Intel-gfx] ✓ Fi.CI.BAT: success for Enable GuC submission by default on DG1 (rev7)

2021-09-16 Thread Patchwork
== Series Details ==

Series: Enable GuC submission by default on DG1 (rev7)
URL   : https://patchwork.freedesktop.org/series/93325/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10599 -> Patchwork_21078


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/index.html

Known issues


  Here are the changes found in Patchwork_21078 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-gfx:
- fi-rkl-guc: NOTRUN -> [SKIP][1] ([fdo#109315]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-rkl-guc/igt@amdgpu/amd_ba...@cs-gfx.html

  * igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2:  NOTRUN -> [SKIP][2] ([fdo#109315]) +17 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-icl-u2/igt@amdgpu/amd_cs_...@fork-gfx0.html

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-kbl-7567u:   NOTRUN -> [SKIP][3] ([fdo#109271]) +17 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-kbl-7567u/igt@amdgpu/amd_cs_...@sync-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-skl-6700k2:  [PASS][4] -> [INCOMPLETE][5] ([i915#4130])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7500u:   [PASS][6] -> [INCOMPLETE][7] ([i915#4130])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7500u/igt@core_hotunp...@unbind-rebind.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-kbl-7500u/igt@core_hotunp...@unbind-rebind.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-rkl-guc: [INCOMPLETE][8] ([i915#4130]) -> [PASS][9]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
- fi-icl-u2:  [INCOMPLETE][10] ([i915#4130]) -> [PASS][11]
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [INCOMPLETE][12] ([i915#4130]) -> [PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  
 Warnings 

  * igt@i915_module_load@reload:
- fi-cml-u2:  [INCOMPLETE][14] ([i915#4130] / [i915#4136]) -> 
[INCOMPLETE][15] ([i915#4130])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cml-u2/igt@i915_module_l...@reload.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-cml-u2/igt@i915_module_l...@reload.html
- fi-kbl-soraka:  [INCOMPLETE][16] -> [INCOMPLETE][17] ([i915#4136])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-soraka/igt@i915_module_l...@reload.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21078/fi-kbl-soraka/igt@i915_module_l...@reload.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
  [i915#4130]: https://gitlab.freedesktop.org/drm/intel/issues/4130
  [i915#4136]: https://gitlab.freedesktop.org/drm/intel/issues/4136


Participating hosts (38 -> 34)
--

  Missing(4): fi-bdw-samus fi-tgl-1115g4 fi-bsw-cyan bat-dg1-6 


Build changes
-

  * Linux: CI_DRM_10599 -> Patchwork_21078

  CI-20190529: 20190529
  CI_DRM_10599: 7517e1f3124126ca9f24627f9494330d155e5ff6 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6211: 7b275b3eb17ddf6e7c5b7b9ba359b7f5345a5311 @ 
https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_21078: df0bb551122fcaa579736d52630e24bda0ebc7a9 @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

df0bb551122f drm/i915: Take pinning into account in __i915_gem_object_is_lmem
7b0f2ce85e30 drm/i915/guc: Enable GuC submission by default on DG1
b340f3b2a3fa drm/i915/guc: Add DG1 GuC / HuC firmware defs
731edcbbae63 drm/i915/guc: put all guc objects in lmem when available
d5a9a44f2a45 drm/i915: Do not define vma on 

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Enable GuC submission by default on DG1 (rev7)

2021-09-16 Thread Patchwork
== Series Details ==

Series: Enable GuC submission by default on DG1 (rev7)
URL   : https://patchwork.freedesktop.org/series/93325/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
-
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:27:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:32:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:49:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_engine_stats.h:56:9: warning: trying to copy 
expression type 31
+drivers/gpu/drm/i915/gt/intel_reset.c:1392:5: warning: context imbalance in 
'intel_gt_reset_trylock' - different lock contexts for basic block
+drivers/gpu/drm/i915/i915_perf.c:1442:15: warning: memset with byte count of 
16777216
+drivers/gpu/drm/i915/i915_perf.c:1496:15: warning: memset with byte count of 
16777216
+./include/asm-generic/bitops/find.h:112:45: warning: shift count is negative 
(-262080)
+./include/asm-generic/bitops/find.h:32:31: warning: shift count is negative 
(-262080)
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_read16' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_read32' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_read64' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_read8' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'fwtable_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_read16' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_read32' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_read64' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_read8' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen11_fwtable_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen12_fwtable_write16' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen12_fwtable_write32' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 
'gen12_fwtable_write8' - different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_read16' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_read32' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_read64' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_read8' - 
different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_write16' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_write32' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen6_write8' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen8_write16' 
- different lock contexts for basic block
+./include/linux/spinlock.h:418:9: warning: context imbalance in 'gen8_write32' 
- 

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Add "intel_" as prefix in set_mocs_index() (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/gt: Add "intel_" as prefix in set_mocs_index() (rev2)
URL   : https://patchwork.freedesktop.org/series/94721/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10599 -> Patchwork_21077


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21077 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21077, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21077:

### IGT changes ###

 Possible regressions 

  * igt@i915_module_load@reload:
- fi-icl-y:   [PASS][1] -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-icl-y/igt@i915_module_l...@reload.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-icl-y/igt@i915_module_l...@reload.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_module_load@reload:
- {fi-ehl-2}: [INCOMPLETE][3] ([i915#4136]) -> [INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-ehl-2/igt@i915_module_l...@reload.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-ehl-2/igt@i915_module_l...@reload.html

  
Known issues


  Here are the changes found in Patchwork_21077 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-sdma:
- fi-kbl-7500u:   NOTRUN -> [SKIP][5] ([fdo#109271]) +17 similar issues
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-7500u/igt@amdgpu/amd_ba...@cs-sdma.html

  * igt@core_hotunplug@unbind-rebind:
- fi-cfl-guc: [PASS][6] -> [INCOMPLETE][7] ([i915#4130])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html

  * igt@i915_module_load@reload:
- fi-skl-6700k2:  [PASS][8] -> [INCOMPLETE][9] ([i915#4130])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-skl-6700k2/igt@i915_module_l...@reload.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-skl-6700k2/igt@i915_module_l...@reload.html

  * igt@runner@aborted:
- fi-kbl-soraka:  NOTRUN -> [FAIL][10] ([i915#2426] / [i915#3363])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-soraka/igt@run...@aborted.html
- fi-skl-6700k2:  NOTRUN -> [FAIL][11] ([i915#2426] / [i915#3363])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-skl-6700k2/igt@run...@aborted.html

  
 Possible fixes 

  * igt@i915_module_load@reload:
- fi-kbl-7500u:   [INCOMPLETE][12] ([i915#4130] / [i915#4136]) -> 
[PASS][13]
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7500u/igt@i915_module_l...@reload.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-7500u/igt@i915_module_l...@reload.html

  
 Warnings 

  * igt@i915_module_load@reload:
- fi-cml-u2:  [INCOMPLETE][14] ([i915#4130] / [i915#4136]) -> 
[INCOMPLETE][15] ([i915#4130])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cml-u2/igt@i915_module_l...@reload.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-cml-u2/igt@i915_module_l...@reload.html
- fi-kbl-soraka:  [INCOMPLETE][16] -> [INCOMPLETE][17] ([i915#4130])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-soraka/igt@i915_module_l...@reload.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21077/fi-kbl-soraka/igt@i915_module_l...@reload.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#2932]: https://gitlab.freedesktop.org/drm/intel/issues/2932
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#3690]: https://gitlab.freedesktop.org/drm/intel/issues/3690
  [i915#4130]: https://gitlab.freedesktop.org/drm/intel/issues/4130
  [i915#4136]: https://gitlab.freedesktop.org/drm/intel/issues/4136


Participating hosts (38 -> 35)
--

  Missing   

[Intel-gfx] [PATCH 09/15] drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/omapdrm/omap_fb.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c 
b/drivers/gpu/drm/omapdrm/omap_fb.c
index 190afc564914..56013c3ef701 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -62,13 +62,15 @@ static int omap_framebuffer_dirty(struct drm_framebuffer 
*fb,
  unsigned num_clips)
 {
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
-   drm_modeset_lock_all(fb->dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(fb->dev, ctx, 0, ret);
 
drm_for_each_crtc(crtc, fb->dev)
omap_crtc_flush(crtc);
 
-   drm_modeset_unlock_all(fb->dev);
+   DRM_MODESET_LOCK_ALL_END(fb->dev, ctx, ret);
 
return 0;
 }
-- 
2.33.0



[Intel-gfx] [PATCH 06/15] drm/tegra: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/tegra/dsi.c  |  6 --
 drivers/gpu/drm/tegra/hdmi.c |  5 +++--
 drivers/gpu/drm/tegra/sor.c  | 10 ++
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index f46d377f0c30..77a496f6a2e9 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -202,10 +202,12 @@ static int tegra_dsi_show_regs(struct seq_file *s, void 
*data)
struct tegra_dsi *dsi = node->info_ent->data;
struct drm_crtc *crtc = dsi->output.encoder.crtc;
struct drm_device *drm = node->minor->dev;
+   struct drm_modeset_acquire_ctx ctx;
unsigned int i;
int err = 0;
+   int ret;
 
-   drm_modeset_lock_all(drm);
+   DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, ret);
 
if (!crtc || !crtc->state->active) {
err = -EBUSY;
@@ -220,7 +222,7 @@ static int tegra_dsi_show_regs(struct seq_file *s, void 
*data)
}
 
 unlock:
-   drm_modeset_unlock_all(drm);
+   DRM_MODESET_LOCK_ALL_END(drm, ctx, ret);
return err;
 }
 
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index e5d2a4026028..669a2ebb55ae 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -1031,10 +1031,11 @@ static int tegra_hdmi_show_regs(struct seq_file *s, 
void *data)
struct tegra_hdmi *hdmi = node->info_ent->data;
struct drm_crtc *crtc = hdmi->output.encoder.crtc;
struct drm_device *drm = node->minor->dev;
+   struct drm_modeset_acquire_ctx ctx;
unsigned int i;
int err = 0;
 
-   drm_modeset_lock_all(drm);
+   DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err);
 
if (!crtc || !crtc->state->active) {
err = -EBUSY;
@@ -1049,7 +1050,7 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void 
*data)
}
 
 unlock:
-   drm_modeset_unlock_all(drm);
+   DRM_MODESET_LOCK_ALL_END(drm, ctx, err);
return err;
 }
 
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 0ea320c1092b..323d95eb0cac 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1490,10 +1490,11 @@ static int tegra_sor_show_crc(struct seq_file *s, void 
*data)
struct tegra_sor *sor = node->info_ent->data;
struct drm_crtc *crtc = sor->output.encoder.crtc;
struct drm_device *drm = node->minor->dev;
+   struct drm_modeset_acquire_ctx ctx;
int err = 0;
u32 value;
 
-   drm_modeset_lock_all(drm);
+   DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err);
 
if (!crtc || !crtc->state->active) {
err = -EBUSY;
@@ -1522,7 +1523,7 @@ static int tegra_sor_show_crc(struct seq_file *s, void 
*data)
seq_printf(s, "%08x\n", value);
 
 unlock:
-   drm_modeset_unlock_all(drm);
+   DRM_MODESET_LOCK_ALL_END(drm, ctx, err);
return err;
 }
 
@@ -1652,10 +1653,11 @@ static int tegra_sor_show_regs(struct seq_file *s, void 
*data)
struct tegra_sor *sor = node->info_ent->data;
struct drm_crtc *crtc = sor->output.encoder.crtc;
struct drm_device *drm = node->minor->dev;
+   struct drm_modeset_acquire_ctx ctx;
unsigned int i;
int err = 0;
 
-   drm_modeset_lock_all(drm);
+   DRM_MODESET_LOCK_ALL_BEGIN(drm, ctx, 0, err);
 
if (!crtc || !crtc->state->active) {
err = -EBUSY;
@@ -1670,7 +1672,7 @@ static int tegra_sor_show_regs(struct seq_file *s, void 
*data)
}
 
 unlock:
-   drm_modeset_unlock_all(drm);
+   DRM_MODESET_LOCK_ALL_END(drm, ctx, err);
return err;
 }
 
-- 
2.33.0



[Intel-gfx] [PATCH 13/15] drm/gma500: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/gma500/psb_device.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_device.c 
b/drivers/gpu/drm/gma500/psb_device.c
index 951725a0f7a3..4e27f65a1f16 100644
--- a/drivers/gpu/drm/gma500/psb_device.c
+++ b/drivers/gpu/drm/gma500/psb_device.c
@@ -8,6 +8,7 @@
 #include 
 
 #include 
+#include 
 
 #include "gma_device.h"
 #include "intel_bios.h"
@@ -169,8 +170,10 @@ static int psb_save_display_registers(struct drm_device 
*dev)
 {
struct drm_psb_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
struct gma_connector *connector;
struct psb_state *regs = _priv->regs.psb;
+   int ret;
 
/* Display arbitration control + watermarks */
regs->saveDSPARB = PSB_RVDC32(DSPARB);
@@ -183,7 +186,7 @@ static int psb_save_display_registers(struct drm_device 
*dev)
regs->saveCHICKENBIT = PSB_RVDC32(DSPCHICKENBIT);
 
/* Save crtc and output state */
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
list_for_each_entry(crtc, >mode_config.crtc_list, head) {
if (drm_helper_crtc_in_use(crtc))
dev_priv->ops->save_crtc(crtc);
@@ -193,7 +196,8 @@ static int psb_save_display_registers(struct drm_device 
*dev)
if (connector->save)
connector->save(>base);
 
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
+
return 0;
 }
 
@@ -207,8 +211,10 @@ static int psb_restore_display_registers(struct drm_device 
*dev)
 {
struct drm_psb_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
struct gma_connector *connector;
struct psb_state *regs = _priv->regs.psb;
+   int ret;
 
/* Display arbitration + watermarks */
PSB_WVDC32(regs->saveDSPARB, DSPARB);
@@ -223,7 +229,7 @@ static int psb_restore_display_registers(struct drm_device 
*dev)
/*make sure VGA plane is off. it initializes to on after reset!*/
PSB_WVDC32(0x8000, VGACNTRL);
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
list_for_each_entry(crtc, >mode_config.crtc_list, head)
if (drm_helper_crtc_in_use(crtc))
dev_priv->ops->restore_crtc(crtc);
@@ -232,7 +238,7 @@ static int psb_restore_display_registers(struct drm_device 
*dev)
if (connector->restore)
connector->restore(>base);
 
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
return 0;
 }
 
-- 
2.33.0



[Intel-gfx] [PATCH 15/15] doc: drm: remove TODO entry regarding DRM_MODSET_LOCK_ALL cleanup

2021-09-16 Thread Fernando Ramos
The previous commits do exactly what this entry in the TODO file asks
for, thus we can remove it now as it is no longer applicable.

Signed-off-by: Fernando Ramos 
---
 Documentation/gpu/todo.rst| 17 -
 Documentation/locking/ww-mutex-design.rst |  2 +-
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 12e61869939e..6613543955e9 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -353,23 +353,6 @@ converted, except for struct drm_driver.gem_prime_mmap.
 
 Level: Intermediate
 
-Use DRM_MODESET_LOCK_ALL_* helpers instead of boilerplate
--
-
-For cases where drivers are attempting to grab the modeset locks with a local
-acquire context. Replace the boilerplate code surrounding
-drm_modeset_lock_all_ctx() with DRM_MODESET_LOCK_ALL_BEGIN() and
-DRM_MODESET_LOCK_ALL_END() instead.
-
-This should also be done for all places where drm_modeset_lock_all() is still
-used.
-
-As a reference, take a look at the conversions already completed in drm core.
-
-Contact: Sean Paul, respective driver maintainers
-
-Level: Starter
-
 Rename CMA helpers to DMA helpers
 -
 
diff --git a/Documentation/locking/ww-mutex-design.rst 
b/Documentation/locking/ww-mutex-design.rst
index 6a4d7319f8f0..6a8f8beb9ec4 100644
--- a/Documentation/locking/ww-mutex-design.rst
+++ b/Documentation/locking/ww-mutex-design.rst
@@ -60,7 +60,7 @@ Concepts
 Compared to normal mutexes two additional concepts/objects show up in the lock
 interface for w/w mutexes:
 
-Acquire context: To ensure eventual forward progress it is important the a task
+Acquire context: To ensure eventual forward progress it is important that a 
task
 trying to acquire locks doesn't grab a new reservation id, but keeps the one it
 acquired when starting the lock acquisition. This ticket is stored in the
 acquire context. Furthermore the acquire context keeps track of debugging state
-- 
2.33.0



[Intel-gfx] [PATCH 10/15] drm/nouveau: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c 
b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index d7b9f7f8c9e3..eb613af4cdd5 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -667,15 +667,17 @@ nv50_audio_component_bind(struct device *kdev, struct 
device *hda_kdev,
struct drm_device *drm_dev = dev_get_drvdata(kdev);
struct nouveau_drm *drm = nouveau_drm(drm_dev);
struct drm_audio_component *acomp = data;
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
if (WARN_ON(!device_link_add(hda_kdev, kdev, DL_FLAG_STATELESS)))
return -ENOMEM;
 
-   drm_modeset_lock_all(drm_dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret);
acomp->ops = _audio_component_ops;
acomp->dev = kdev;
drm->audio.component = acomp;
-   drm_modeset_unlock_all(drm_dev);
+   DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret);
return 0;
 }
 
@@ -686,12 +688,14 @@ nv50_audio_component_unbind(struct device *kdev, struct 
device *hda_kdev,
struct drm_device *drm_dev = dev_get_drvdata(kdev);
struct nouveau_drm *drm = nouveau_drm(drm_dev);
struct drm_audio_component *acomp = data;
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
-   drm_modeset_lock_all(drm_dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(drm_dev, ctx, 0, ret);
drm->audio.component = NULL;
acomp->ops = NULL;
acomp->dev = NULL;
-   drm_modeset_unlock_all(drm_dev);
+   DRM_MODESET_LOCK_ALL_END(drm_dev, ctx, ret);
 }
 
 static const struct component_ops nv50_audio_component_bind_ops = {
-- 
2.33.0



[Intel-gfx] [PATCH 08/15] drm/radeon: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/radeon/radeon_device.c | 13 +
 drivers/gpu/drm/radeon/radeon_dp_mst.c |  7 +--
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c 
b/drivers/gpu/drm/radeon/radeon_device.c
index 4f0fbf667431..3feb1fd44409 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1559,7 +1560,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool 
suspend,
struct pci_dev *pdev;
struct drm_crtc *crtc;
struct drm_connector *connector;
+   struct drm_modeset_acquire_ctx ctx;
int i, r;
+   int ret;
 
if (dev == NULL || dev->dev_private == NULL) {
return -ENODEV;
@@ -1573,12 +1576,12 @@ int radeon_suspend_kms(struct drm_device *dev, bool 
suspend,
 
drm_kms_helper_poll_disable(dev);
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
/* turn off display hw */
list_for_each_entry(connector, >mode_config.connector_list, head) {
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
}
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 
/* unpin the front buffers and cursors */
list_for_each_entry(crtc, >mode_config.crtc_list, head) {
@@ -1663,7 +1666,9 @@ int radeon_resume_kms(struct drm_device *dev, bool 
resume, bool fbcon)
struct radeon_device *rdev = dev->dev_private;
struct pci_dev *pdev = to_pci_dev(dev->dev);
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
int r;
+   int ret;
 
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
return 0;
@@ -1741,11 +1746,11 @@ int radeon_resume_kms(struct drm_device *dev, bool 
resume, bool fbcon)
if (fbcon) {
drm_helper_resume_force_mode(dev);
/* turn on display hw */
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
list_for_each_entry(connector, 
>mode_config.connector_list, head) {
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
}
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
}
 
drm_kms_helper_poll_enable(dev);
diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c 
b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index ec867fa880a4..04fe7b0a6746 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -4,6 +4,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "atom.h"
 #include "ni_reg.h"
@@ -737,11 +738,13 @@ static int radeon_debugfs_mst_info_show(struct seq_file 
*m, void *unused)
struct radeon_device *rdev = (struct radeon_device *)m->private;
struct drm_device *dev = rdev->ddev;
struct drm_connector *connector;
+   struct drm_modeset_acquire_ctx ctx;
struct radeon_connector *radeon_connector;
struct radeon_connector_atom_dig *dig_connector;
int i;
+   int ret;
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
list_for_each_entry(connector, >mode_config.connector_list, head) {
if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort)
continue;
@@ -759,7 +762,7 @@ static int radeon_debugfs_mst_info_show(struct seq_file *m, 
void *unused)
   radeon_connector->cur_stream_attribs[i].fe,
   
radeon_connector->cur_stream_attribs[i].slots);
}
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
return 0;
 }
 
-- 
2.33.0



[Intel-gfx] [PATCH 02/15] dmr/i915: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace the boilerplate code
surrounding drm_modeset_lock_all_ctx() with DRM_MODESET_LOCK_ALL_BEGIN()
and DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/i915/display/intel_display.c | 17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 134a6acbd8fb..997a16e85c85 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -13476,22 +13476,13 @@ void intel_display_resume(struct drm_device *dev)
if (state)
state->acquire_ctx = 
 
-   drm_modeset_acquire_init(, 0);
-
-   while (1) {
-   ret = drm_modeset_lock_all_ctx(dev, );
-   if (ret != -EDEADLK)
-   break;
-
-   drm_modeset_backoff();
-   }
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
-   if (!ret)
-   ret = __intel_display_resume(dev, state, );
+   ret = __intel_display_resume(dev, state, );
 
intel_enable_ipc(dev_priv);
-   drm_modeset_drop_locks();
-   drm_modeset_acquire_fini();
+
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 
if (ret)
drm_err(_priv->drm,
-- 
2.33.0



[Intel-gfx] [PATCH 04/15] drm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/drm_client_modeset.c |  5 +++--
 drivers/gpu/drm/drm_crtc_helper.c| 18 --
 drivers/gpu/drm/drm_fb_helper.c  | 10 ++
 drivers/gpu/drm/drm_framebuffer.c|  6 --
 4 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index 5f5184f071ed..43f772543d2a 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -1062,9 +1062,10 @@ static int drm_client_modeset_commit_legacy(struct 
drm_client_dev *client)
struct drm_device *dev = client->dev;
struct drm_mode_set *mode_set;
struct drm_plane *plane;
+   struct drm_modeset_acquire_ctx ctx;
int ret = 0;
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
drm_for_each_plane(plane, dev) {
if (plane->type != DRM_PLANE_TYPE_PRIMARY)
drm_plane_force_disable(plane);
@@ -1093,7 +1094,7 @@ static int drm_client_modeset_commit_legacy(struct 
drm_client_dev *client)
goto out;
}
 out:
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 
return ret;
 }
diff --git a/drivers/gpu/drm/drm_crtc_helper.c 
b/drivers/gpu/drm/drm_crtc_helper.c
index bff917531f33..f3ce073dff79 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -218,11 +218,14 @@ static void __drm_helper_disable_unused_functions(struct 
drm_device *dev)
  */
 void drm_helper_disable_unused_functions(struct drm_device *dev)
 {
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
+
WARN_ON(drm_drv_uses_atomic_modeset(dev));
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
__drm_helper_disable_unused_functions(dev);
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 }
 EXPORT_SYMBOL(drm_helper_disable_unused_functions);
 
@@ -942,12 +945,14 @@ void drm_helper_resume_force_mode(struct drm_device *dev)
struct drm_crtc *crtc;
struct drm_encoder *encoder;
const struct drm_crtc_helper_funcs *crtc_funcs;
+   struct drm_modeset_acquire_ctx ctx;
int encoder_dpms;
bool ret;
+   int err;
 
WARN_ON(drm_drv_uses_atomic_modeset(dev));
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
drm_for_each_crtc(crtc, dev) {
 
if (!crtc->enabled)
@@ -982,7 +987,7 @@ void drm_helper_resume_force_mode(struct drm_device *dev)
 
/* disable the unused connectors while restoring the modesetting */
__drm_helper_disable_unused_functions(dev);
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, err);
 }
 EXPORT_SYMBOL(drm_helper_resume_force_mode);
 
@@ -1002,9 +1007,10 @@ EXPORT_SYMBOL(drm_helper_resume_force_mode);
 int drm_helper_force_disable_all(struct drm_device *dev)
 {
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
int ret = 0;
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
drm_for_each_crtc(crtc, dev)
if (crtc->enabled) {
struct drm_mode_set set = {
@@ -1016,7 +1022,7 @@ int drm_helper_force_disable_all(struct drm_device *dev)
goto out;
}
 out:
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
return ret;
 }
 EXPORT_SYMBOL(drm_helper_force_disable_all);
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 3ab078321045..6860223f0068 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -940,10 +940,11 @@ static int setcmap_legacy(struct fb_cmap *cmap, struct 
fb_info *info)
struct drm_fb_helper *fb_helper = info->par;
struct drm_mode_set *modeset;
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
u16 *r, *g, *b;
int ret = 0;
 
-   drm_modeset_lock_all(fb_helper->dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(fb_helper->dev, ctx, 0, ret);
drm_client_for_each_modeset(modeset, _helper->client) {
crtc = modeset->crtc;
if (!crtc->funcs->gamma_set || !crtc->gamma_size) {
@@ -970,7 +971,7 @@ static int setcmap_legacy(struct fb_cmap *cmap, struct 
fb_info *info)
goto out;
}
 out:
-   drm_modeset_unlock_all(fb_helper->dev);
+   DRM_MODESET_LOCK_ALL_END(fb_helper->dev, ctx, ret);
 
return ret;
 }
@@ -1441,10 +1442,11 @@ static int pan_display_legacy(struct fb_var_screeninfo 
*var,

[Intel-gfx] [PATCH 03/15] dmr/msm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace the boilerplate code
surrounding drm_modeset_lock_all_ctx() with DRM_MODESET_LOCK_ALL_BEGIN()
and DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c 
b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
index cabe15190ec1..c83db90b0e02 100644
--- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
+++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c
@@ -99,20 +99,18 @@ static void msm_disp_capture_atomic_state(struct 
msm_disp_state *disp_state)
 {
struct drm_device *ddev;
struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
disp_state->timestamp = ktime_get();
 
ddev = disp_state->drm_dev;
 
-   drm_modeset_acquire_init(, 0);
-
-   while (drm_modeset_lock_all_ctx(ddev, ) != 0)
-   drm_modeset_backoff();
+   DRM_MODESET_LOCK_ALL_BEGIN(ddev, ctx, 0, ret);
 
disp_state->atomic_state = drm_atomic_helper_duplicate_state(ddev,
);
-   drm_modeset_drop_locks();
-   drm_modeset_acquire_fini();
+
+   DRM_MODESET_LOCK_ALL_END(ddev, ctx, ret);
 }
 
 void msm_disp_snapshot_capture_state(struct msm_disp_state *disp_state)
-- 
2.33.0



[Intel-gfx] [PATCH 11/15] drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 768012243b44..4cbc79eaee17 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -1172,14 +1172,16 @@ static int _dpu_debugfs_status_show(struct seq_file *s, 
void *data)
struct drm_display_mode *mode;
struct drm_framebuffer *fb;
struct drm_plane_state *state;
+   struct drm_modeset_acquire_ctx ctx;
struct dpu_crtc_state *cstate;
 
int i, out_width;
+   int ret;
 
dpu_crtc = s->private;
crtc = _crtc->base;
 
-   drm_modeset_lock_all(crtc->dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(crtc->dev, ctx, 0, ret);
cstate = to_dpu_crtc_state(crtc->state);
 
mode = >state->adjusted_mode;
@@ -1263,7 +1265,7 @@ static int _dpu_debugfs_status_show(struct seq_file *s, 
void *data)
dpu_crtc->vblank_cb_time = ktime_set(0, 0);
}
 
-   drm_modeset_unlock_all(crtc->dev);
+   DRM_MODESET_LOCK_ALL_END(crtc->dev, ctx, ret);
 
return 0;
 }
-- 
2.33.0



[Intel-gfx] [PATCH 05/15] drm/vmwgfx: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 11 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c   | 12 
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
index 28af34ab6ed6..7df35c6f1458 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
@@ -28,6 +28,7 @@
 #include "vmwgfx_drv.h"
 #include "vmwgfx_devcaps.h"
 #include 
+#include 
 #include "vmwgfx_kms.h"
 
 int vmw_getparam_ioctl(struct drm_device *dev, void *data,
@@ -172,6 +173,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
struct drm_vmw_rect __user *clips_ptr;
struct drm_vmw_rect *clips = NULL;
struct drm_framebuffer *fb;
+   struct drm_modeset_acquire_ctx ctx;
struct vmw_framebuffer *vfb;
struct vmw_resource *res;
uint32_t num_clips;
@@ -203,7 +205,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
goto out_no_copy;
}
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
fb = drm_framebuffer_lookup(dev, file_priv, arg->fb_id);
if (!fb) {
@@ -231,7 +233,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
 out_no_surface:
drm_framebuffer_put(fb);
 out_no_fb:
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 out_no_copy:
kfree(clips);
 out_clips:
@@ -250,6 +252,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void 
*data,
struct drm_vmw_rect __user *clips_ptr;
struct drm_vmw_rect *clips = NULL;
struct drm_framebuffer *fb;
+   struct drm_modeset_acquire_ctx ctx;
struct vmw_framebuffer *vfb;
uint32_t num_clips;
int ret;
@@ -280,7 +283,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void 
*data,
goto out_no_copy;
}
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
fb = drm_framebuffer_lookup(dev, file_priv, arg->fb_id);
if (!fb) {
@@ -303,7 +306,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void 
*data,
 out_no_ttm_lock:
drm_framebuffer_put(fb);
 out_no_fb:
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 out_no_copy:
kfree(clips);
 out_clips:
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 74fa41909213..268095cb8c84 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "vmwgfx_kms.h"
 
@@ -243,15 +244,17 @@ void vmw_kms_legacy_hotspot_clear(struct vmw_private 
*dev_priv)
struct drm_device *dev = _priv->drm;
struct vmw_display_unit *du;
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
drm_for_each_crtc(crtc, dev) {
du = vmw_crtc_to_du(crtc);
 
du->hotspot_x = 0;
du->hotspot_y = 0;
}
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 }
 
 void vmw_kms_cursor_post_execbuf(struct vmw_private *dev_priv)
@@ -1012,9 +1015,10 @@ static int vmw_framebuffer_bo_dirty(struct 
drm_framebuffer *framebuffer,
struct vmw_framebuffer_bo *vfbd =
vmw_framebuffer_to_vfbd(framebuffer);
struct drm_clip_rect norect;
+   struct drm_modeset_acquire_ctx ctx;
int ret, increment = 1;
 
-   drm_modeset_lock_all(_priv->drm);
+   DRM_MODESET_LOCK_ALL_BEGIN((_priv->drm), ctx, 0, ret);
 
if (!num_clips) {
num_clips = 1;
@@ -1040,7 +1044,7 @@ static int vmw_framebuffer_bo_dirty(struct 
drm_framebuffer *framebuffer,
 
vmw_cmd_flush(dev_priv, false);
 
-   drm_modeset_unlock_all(_priv->drm);
+   DRM_MODESET_LOCK_ALL_END((_priv->drm), ctx, ret);
 
return ret;
 }
-- 
2.33.0



[Intel-gfx] [PATCH 01/15] dmr: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace the boilerplate code
surrounding drm_modeset_lock_all_ctx() with DRM_MODESET_LOCK_ALL_BEGIN()
and DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/drm_client_modeset.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c 
b/drivers/gpu/drm/drm_client_modeset.c
index ced09c7c06f9..5f5184f071ed 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -574,6 +574,7 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
int num_connectors_detected = 0;
int num_tiled_conns = 0;
struct drm_modeset_acquire_ctx ctx;
+   int err;
 
if (!drm_drv_uses_atomic_modeset(dev))
return false;
@@ -585,10 +586,7 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
if (!save_enabled)
return false;
 
-   drm_modeset_acquire_init(, 0);
-
-   while (drm_modeset_lock_all_ctx(dev, ) != 0)
-   drm_modeset_backoff();
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
 
memcpy(save_enabled, enabled, count);
mask = GENMASK(count - 1, 0);
@@ -743,8 +741,7 @@ static bool drm_client_firmware_config(struct 
drm_client_dev *client,
ret = false;
}
 
-   drm_modeset_drop_locks();
-   drm_modeset_acquire_fini();
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, err);
 
kfree(save_enabled);
return ret;
-- 
2.33.0



[Intel-gfx] [PATCH 12/15] drm/i915: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/i915/display/intel_audio.c| 12 +++--
 drivers/gpu/drm/i915/display/intel_display.c  |  5 ++-
 .../drm/i915/display/intel_display_debugfs.c  | 35 ++-
 drivers/gpu/drm/i915/display/intel_overlay.c  | 45 +--
 drivers/gpu/drm/i915/display/intel_pipe_crc.c |  5 ++-
 drivers/gpu/drm/i915/i915_drv.c   | 12 +++--
 6 files changed, 67 insertions(+), 47 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_audio.c 
b/drivers/gpu/drm/i915/display/intel_audio.c
index 532237588511..ab6a5a734b95 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -1214,7 +1214,9 @@ static int i915_audio_component_bind(struct device 
*i915_kdev,
 {
struct i915_audio_component *acomp = data;
struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev);
+   struct drm_modeset_acquire_ctx ctx;
int i;
+   int ret;
 
if (drm_WARN_ON(_priv->drm, acomp->base.ops || acomp->base.dev))
return -EEXIST;
@@ -1224,14 +1226,14 @@ static int i915_audio_component_bind(struct device 
*i915_kdev,
 DL_FLAG_STATELESS)))
return -ENOMEM;
 
-   drm_modeset_lock_all(_priv->drm);
+   DRM_MODESET_LOCK_ALL_BEGIN((_priv->drm), ctx, 0, ret);
acomp->base.ops = _audio_component_ops;
acomp->base.dev = i915_kdev;
BUILD_BUG_ON(MAX_PORTS != I915_MAX_PORTS);
for (i = 0; i < ARRAY_SIZE(acomp->aud_sample_rate); i++)
acomp->aud_sample_rate[i] = 0;
dev_priv->audio_component = acomp;
-   drm_modeset_unlock_all(_priv->drm);
+   DRM_MODESET_LOCK_ALL_END((_priv->drm), ctx, ret);
 
return 0;
 }
@@ -1241,12 +1243,14 @@ static void i915_audio_component_unbind(struct device 
*i915_kdev,
 {
struct i915_audio_component *acomp = data;
struct drm_i915_private *dev_priv = kdev_to_i915(i915_kdev);
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
-   drm_modeset_lock_all(_priv->drm);
+   DRM_MODESET_LOCK_ALL_BEGIN((_priv->drm), ctx, 0, ret);
acomp->base.ops = NULL;
acomp->base.dev = NULL;
dev_priv->audio_component = NULL;
-   drm_modeset_unlock_all(_priv->drm);
+   DRM_MODESET_LOCK_ALL_END((_priv->drm), ctx, ret);
 
device_link_remove(hda_kdev, i915_kdev);
 
diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
b/drivers/gpu/drm/i915/display/intel_display.c
index 997a16e85c85..dc2e4d89e5aa 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -12511,6 +12511,7 @@ int intel_modeset_init_noirq(struct drm_i915_private 
*i915)
 int intel_modeset_init_nogem(struct drm_i915_private *i915)
 {
struct drm_device *dev = >drm;
+   struct drm_modeset_acquire_ctx ctx;
enum pipe pipe;
struct intel_crtc *crtc;
int ret;
@@ -12562,9 +12563,9 @@ int intel_modeset_init_nogem(struct drm_i915_private 
*i915)
intel_vga_disable(i915);
intel_setup_outputs(i915);
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
intel_modeset_setup_hw_state(dev, dev->mode_config.acquire_ctx);
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 
for_each_intel_crtc(dev, crtc) {
struct intel_initial_plane_config plane_config = {};
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c 
b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 8fdacb252bb1..d73af228862e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -1057,11 +1057,13 @@ static int i915_display_info(struct seq_file *m, void 
*unused)
struct intel_crtc *crtc;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
+   struct drm_modeset_acquire_ctx ctx;
intel_wakeref_t wakeref;
+   int ret;
 
wakeref = intel_runtime_pm_get(_priv->runtime_pm);
 
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
seq_printf(m, "CRTC info\n");
seq_printf(m, "-\n");
@@ -1076,7 +1078,7 @@ static int i915_display_info(struct seq_file *m, void 
*unused)
intel_connector_info(m, connector);
drm_connector_list_iter_end(_iter);
 
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 
intel_runtime_pm_put(_priv->runtime_pm, wakeref);
 
@@ -1087,9 +1089,11 @@ static int i915_shared_dplls_info(struct seq_file *m, 
void *unused)
 {
struct drm_i915_private *dev_priv = node_to_i915(m->private);
struct 

[Intel-gfx] [PATCH 14/15] drm/amd: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   | 13 +++--
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 +--
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 23 +
 3 files changed, 46 insertions(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 7a7316731911..55ecc4aa859f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void amdgpu_display_flip_callback(struct dma_fence *f,
 struct dma_fence_cb *cb)
@@ -1543,16 +1544,18 @@ int amdgpu_display_suspend_helper(struct amdgpu_device 
*adev)
struct drm_crtc *crtc;
struct drm_connector *connector;
struct drm_connector_list_iter iter;
+   struct drm_modeset_acquire_ctx ctx;
int r;
+   int ret;
 
/* turn off display hw */
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
drm_connector_list_iter_begin(dev, );
drm_for_each_connector_iter(connector, )
drm_helper_connector_dpms(connector,
  DRM_MODE_DPMS_OFF);
drm_connector_list_iter_end();
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
/* unpin the front buffers and cursors */
list_for_each_entry(crtc, >mode_config.crtc_list, head) {
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc);
@@ -1590,7 +1593,9 @@ int amdgpu_display_resume_helper(struct amdgpu_device 
*adev)
struct drm_connector *connector;
struct drm_connector_list_iter iter;
struct drm_crtc *crtc;
+   struct drm_modeset_acquire_ctx ctx;
int r;
+   int ret;
 
/* pin cursors */
list_for_each_entry(crtc, >mode_config.crtc_list, head) {
@@ -1612,7 +1617,7 @@ int amdgpu_display_resume_helper(struct amdgpu_device 
*adev)
drm_helper_resume_force_mode(dev);
 
/* turn on display hw */
-   drm_modeset_lock_all(dev);
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
 
drm_connector_list_iter_begin(dev, );
drm_for_each_connector_iter(connector, )
@@ -1620,7 +1625,7 @@ int amdgpu_display_resume_helper(struct amdgpu_device 
*adev)
  DRM_MODE_DPMS_ON);
drm_connector_list_iter_end();
 
-   drm_modeset_unlock_all(dev);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
 
return 0;
 }
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 9b1fc54555ee..5196c1d26f87 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -80,6 +80,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #if defined(CONFIG_DRM_AMD_DC_DCN)
 #include "ivsrcid/dcn/irqsrcs_dcn_1_0.h"
@@ -2621,6 +2622,9 @@ static void handle_hpd_irq(void *param)
 #ifdef CONFIG_DRM_AMD_DC_HDCP
struct dm_connector_state *dm_con_state = 
to_dm_connector_state(connector->state);
 #endif
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
+
 
if (adev->dm.disable_hpd_irq)
return;
@@ -2646,14 +2650,6 @@ static void handle_hpd_irq(void *param)
if (aconnector->base.force && new_connection_type == 
dc_connection_none) {
emulated_link_detect(aconnector->dc_link);
 
-
-   drm_modeset_lock_all(dev);
-   dm_restore_drm_connector_state(dev, connector);
-   drm_modeset_unlock_all(dev);
-
-   if (aconnector->base.force == DRM_FORCE_UNSPECIFIED)
-   drm_kms_helper_hotplug_event(dev);
-
} else if (dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD)) {
if (new_connection_type == dc_connection_none &&
aconnector->dc_link->type == dc_connection_none)
@@ -2661,13 +2657,18 @@ static void handle_hpd_irq(void *param)
 
amdgpu_dm_update_connector_after_detect(aconnector);
 
-   drm_modeset_lock_all(dev);
-   dm_restore_drm_connector_state(dev, connector);
-   drm_modeset_unlock_all(dev);
-
-   if (aconnector->base.force == DRM_FORCE_UNSPECIFIED)
-   drm_kms_helper_hotplug_event(dev);
+   } else {
+   goto out;
}
+
+   DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
+   dm_restore_drm_connector_state(dev, connector);
+   DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
+
+   if (aconnector->base.force == DRM_FORCE_UNSPECIFIED)
+   drm_kms_helper_hotplug_event(dev);

[Intel-gfx] [PATCH 07/15] drm/shmobile: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()

2021-09-16 Thread Fernando Ramos
As requested in Documentation/gpu/todo.rst, replace driver calls to
drm_modeset_lock_all() with DRM_MODESET_LOCK_ALL_BEGIN() and
DRM_MODESET_LOCK_ALL_END()

Signed-off-by: Fernando Ramos 
---
 drivers/gpu/drm/shmobile/shmob_drm_drv.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c 
b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 7db01904d18d..8ee215ab614e 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -156,10 +156,12 @@ static int shmob_drm_pm_suspend(struct device *dev)
 static int shmob_drm_pm_resume(struct device *dev)
 {
struct shmob_drm_device *sdev = dev_get_drvdata(dev);
+   struct drm_modeset_acquire_ctx ctx;
+   int ret;
 
-   drm_modeset_lock_all(sdev->ddev);
+   DRM_MODESET_LOCK_ALL_BEGIN(sdev->ddev, ctx, 0, ret);
shmob_drm_crtc_resume(>crtc);
-   drm_modeset_unlock_all(sdev->ddev);
+   DRM_MODESET_LOCK_ALL_END(sdev->ddev, ctx, ret);
 
drm_kms_helper_poll_enable(sdev->ddev);
return 0;
-- 
2.33.0



[Intel-gfx] [PATCH 00/15] drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible

2021-09-16 Thread Fernando Ramos
Hi all,

One of the things in the DRM TODO list ("Documentation/gpu/todo.rst") was to
"use DRM_MODESET_LOCAL_ALL_* helpers instead of boilerplate". That's what this
patch series is about.

You will find two types of changes here:

  - Replacing "drm_modeset_lock_all_ctx()" (and surrounding boilerplate) with
"DRM_MODESET_LOCK_ALL_BEGIN()/END()" in the remaining places (as it has
already been done in previous commits such as b7ea04d2)

  - Replacing "drm_modeset_lock_all()" with "DRM_MODESET_LOCK_ALL_BEGIN()/END()"
in the remaining places (as it has already been done in previous commits
such as 57037094)

Most of the changes are straight forward, except for a few cases in the "amd"
and "i915" drivers where some extra dancing was needed to overcome the
limitation that the DRM_MODESET_LOCK_ALL_BEGIN()/END() macros can only be used
once inside the same function (the reason being that the macro expansion
includes *labels*, and you can not have two labels named the same inside one
function)

Notice that, even after this patch series, some places remain where
"drm_modeset_lock_all()" and "drm_modeset_lock_all_ctx()" are still present,
all inside drm core (which makes sense), except for two (in "amd" and "i915")
which cannot be replaced due to the way they are being used.

Fernando Ramos (15):
  dmr: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()
  dmr/i915: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()
  dmr/msm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/vmwgfx: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/tegra: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/shmobile: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/radeon: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/omapdrm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/nouveau: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/msm: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/i915: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/gma500: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  drm/amd: cleanup: drm_modeset_lock_all() --> DRM_MODESET_LOCK_ALL_BEGIN()
  doc: drm: remove TODO entry regarding DRM_MODSET_LOCK_ALL cleanup

 Documentation/gpu/todo.rst| 17 ---
 Documentation/locking/ww-mutex-design.rst |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   | 13 +++--
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 50 +--
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 23 +
 drivers/gpu/drm/drm_client_modeset.c  | 14 +++---
 drivers/gpu/drm/drm_crtc_helper.c | 18 ---
 drivers/gpu/drm/drm_fb_helper.c   | 10 ++--
 drivers/gpu/drm/drm_framebuffer.c |  6 ++-
 drivers/gpu/drm/gma500/psb_device.c   | 14 --
 drivers/gpu/drm/i915/display/intel_audio.c| 12 +++--
 drivers/gpu/drm/i915/display/intel_display.c  | 22 +++-
 .../drm/i915/display/intel_display_debugfs.c  | 35 -
 drivers/gpu/drm/i915/display/intel_overlay.c  | 45 -
 drivers/gpu/drm/i915/display/intel_pipe_crc.c |  5 +-
 drivers/gpu/drm/i915/i915_drv.c   | 12 +++--
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c  |  6 ++-
 .../gpu/drm/msm/disp/msm_disp_snapshot_util.c | 10 ++--
 drivers/gpu/drm/nouveau/dispnv50/disp.c   | 12 +++--
 drivers/gpu/drm/omapdrm/omap_fb.c |  6 ++-
 drivers/gpu/drm/radeon/radeon_device.c| 13 +++--
 drivers/gpu/drm/radeon/radeon_dp_mst.c|  7 ++-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c  |  6 ++-
 drivers/gpu/drm/tegra/dsi.c   |  6 ++-
 drivers/gpu/drm/tegra/hdmi.c  |  5 +-
 drivers/gpu/drm/tegra/sor.c   | 10 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 11 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c   | 12 +++--
 28 files changed, 222 insertions(+), 180 deletions(-)

-- 
2.33.0



[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)
URL   : https://patchwork.freedesktop.org/series/94733/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10599 -> Patchwork_21076


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/index.html

Known issues


  Here are the changes found in Patchwork_21076 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2:  NOTRUN -> [SKIP][1] ([fdo#109315]) +17 similar issues
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-icl-u2/igt@amdgpu/amd_cs_...@fork-gfx0.html

  * igt@amdgpu/amd_cs_nop@sync-fork-gfx0:
- fi-cfl-8700k:   NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-cfl-8700k/igt@amdgpu/amd_cs_...@sync-fork-gfx0.html

  * igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-kbl-7567u:   NOTRUN -> [SKIP][3] ([fdo#109271]) +17 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-kbl-7567u/igt@amdgpu/amd_cs_...@sync-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-cfl-guc: [PASS][4] -> [INCOMPLETE][5] ([i915#4130])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-cfl-guc/igt@core_hotunp...@unbind-rebind.html

  * igt@i915_module_load@reload:
- fi-skl-6700k2:  [PASS][6] -> [INCOMPLETE][7] ([i915#4130])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-skl-6700k2/igt@i915_module_l...@reload.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-skl-6700k2/igt@i915_module_l...@reload.html
- fi-kbl-guc: [PASS][8] -> [INCOMPLETE][9] ([i915#4130] / 
[i915#4139])
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-guc/igt@i915_module_l...@reload.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-kbl-guc/igt@i915_module_l...@reload.html
- fi-icl-y:   [PASS][10] -> [INCOMPLETE][11] ([i915#4130])
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-icl-y/igt@i915_module_l...@reload.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-icl-y/igt@i915_module_l...@reload.html

  * igt@runner@aborted:
- fi-kbl-soraka:  NOTRUN -> [FAIL][12] ([i915#2426] / [i915#3363])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-kbl-soraka/igt@run...@aborted.html
- fi-skl-6700k2:  NOTRUN -> [FAIL][13] ([i915#2426] / [i915#3363])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-skl-6700k2/igt@run...@aborted.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-cfl-8700k:   [INCOMPLETE][14] ([i915#4130]) -> [PASS][15]
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cfl-8700k/igt@core_hotunp...@unbind-rebind.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-cfl-8700k/igt@core_hotunp...@unbind-rebind.html
- fi-icl-u2:  [INCOMPLETE][16] ([i915#4130]) -> [PASS][17]
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [INCOMPLETE][18] ([i915#4130]) -> [PASS][19]
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  
 Warnings 

  * igt@i915_module_load@reload:
- fi-cml-u2:  [INCOMPLETE][20] ([i915#4130] / [i915#4136]) -> 
[INCOMPLETE][21] ([i915#4130])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-cml-u2/igt@i915_module_l...@reload.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-cml-u2/igt@i915_module_l...@reload.html
- fi-kbl-soraka:  [INCOMPLETE][22] -> [INCOMPLETE][23] ([i915#4130])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-soraka/igt@i915_module_l...@reload.html
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-kbl-soraka/igt@i915_module_l...@reload.html
- fi-kbl-7500u:   [INCOMPLETE][24] ([i915#4130] / [i915#4136]) -> 
[INCOMPLETE][25] ([i915#4130])
   [24]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10599/fi-kbl-7500u/igt@i915_module_l...@reload.html
   [25]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21076/fi-kbl-7500u/igt@i915_module_l...@reload.html

  
  {name}: This element is suppressed. This means it is ignored when computing
  

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)
URL   : https://patchwork.freedesktop.org/series/94733/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
-
+drivers/gpu/drm/i915/display/intel_gmbus.c:144:6: warning: symbol 
'intel_gmbus_ddc_reserve_for_mipi' was not declared. Should it be static?




[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel (rev2)
URL   : https://patchwork.freedesktop.org/series/94733/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
55ecb5a0d048 drm/i915/dsi: do not register gmbus if it was reserved for MIPI 
display
-:42: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#42: FILE: drivers/gpu/drm/i915/display/intel_gmbus.c:152:
+   if ((pin == GMBUS_PIN_2_BXT && 
dev_priv->vbt.dsi.config->dual_link) ||
+pin == GMBUS_PIN_1_BXT)

total: 0 errors, 0 warnings, 1 checks, 31 lines checked




[Intel-gfx] ✓ Fi.CI.BAT: success for lib, stackdepot: check stackdepot handle before accessing slabs (rev3)

2021-09-16 Thread Patchwork
== Series Details ==

Series: lib, stackdepot: check stackdepot handle before accessing slabs (rev3)
URL   : https://patchwork.freedesktop.org/series/94696/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10598 -> Patchwork_21075


Summary
---

  **WARNING**

  Minor unknown changes coming with Patchwork_21075 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21075, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21075:

### IGT changes ###

 Warnings 

  * igt@i915_module_load@reload:
- fi-cml-u2:  [INCOMPLETE][1] ([i915#4136]) -> [INCOMPLETE][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-cml-u2/igt@i915_module_l...@reload.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-cml-u2/igt@i915_module_l...@reload.html

  
Known issues


  Here are the changes found in Patchwork_21075 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-gfx:
- fi-rkl-guc: NOTRUN -> [SKIP][3] ([fdo#109315]) +17 similar issues
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-rkl-guc/igt@amdgpu/amd_ba...@cs-gfx.html

  * igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2:  NOTRUN -> [SKIP][4] ([fdo#109315]) +17 similar issues
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-icl-u2/igt@amdgpu/amd_cs_...@fork-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-skl-6700k2:  [PASS][5] -> [INCOMPLETE][6] ([i915#4130])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-skl-6700k2/igt@core_hotunp...@unbind-rebind.html
- fi-rkl-11600:   [PASS][7] -> [INCOMPLETE][8] ([i915#4130])
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-rkl-11600/igt@core_hotunp...@unbind-rebind.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-rkl-11600/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7500u:   [PASS][9] -> [INCOMPLETE][10] ([i915#4130])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-kbl-7500u/igt@core_hotunp...@unbind-rebind.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-kbl-7500u/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [PASS][11] -> [INCOMPLETE][12] ([i915#4130])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  * igt@i915_module_load@reload:
- fi-cfl-8700k:   [PASS][13] -> [INCOMPLETE][14] ([i915#4136])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-cfl-8700k/igt@i915_module_l...@reload.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-cfl-8700k/igt@i915_module_l...@reload.html
- fi-kbl-guc: [PASS][15] -> [INCOMPLETE][16] ([i915#4130] / 
[i915#4139])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-kbl-guc/igt@i915_module_l...@reload.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-kbl-guc/igt@i915_module_l...@reload.html

  
 Possible fixes 

  * igt@core_hotunplug@unbind-rebind:
- fi-rkl-guc: [INCOMPLETE][17] ([i915#4130]) -> [PASS][18]
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
- fi-icl-u2:  [INCOMPLETE][19] ([i915#4130]) -> [PASS][20]
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2:  [DMESG-WARN][21] ([i915#2868]) -> [PASS][22]
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10598/fi-icl-u2/igt@kms_chamel...@common-hpd-after-suspend.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21075/fi-icl-u2/igt@kms_chamel...@common-hpd-after-suspend.html

  
 Warnings 

  * igt@i915_module_load@reload:
- fi-kbl-soraka:  [INCOMPLETE][23] ([i915#4130] / [i915#4136]) -> 
[INCOMPLETE][24] ([i915#4130])
   [23]: 

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for lib, stackdepot: check stackdepot handle before accessing slabs (rev3)

2021-09-16 Thread Patchwork
== Series Details ==

Series: lib, stackdepot: check stackdepot handle before accessing slabs (rev3)
URL   : https://patchwork.freedesktop.org/series/94696/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d7e2c22d032f lib, stackdepot: check stackdepot handle before accessing slabs.
1a68f8420ad4 lib, stackdepot: Add helper to print stack entries.
5f20e9afbc22 lib, stackdepot: Add helper to print stack entries into buffer.
-:152: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#152: FILE: include/linux/stackdepot.h:23:
+int stack_depot_snprint(depot_stack_handle_t handle, char *buf, size_t size,
+  int spaces);

-:179: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#179: FILE: lib/stackdepot.c:231:
+int stack_depot_snprint(depot_stack_handle_t handle, char *buf, size_t size,
+  int spaces)

total: 0 errors, 0 warnings, 2 checks, 157 lines checked




Re: [Intel-gfx] [PATCH 1/1] drm/i915/dmc: Update to DMC v2.12

2021-09-16 Thread Imre Deak
On Tue, Sep 14, 2021 at 02:57:32PM -0700, Anusha Srivatsa wrote:
> The release notes mentions that this version-
> 1. Fix for unblock indication to punit.
> 2. Robustness fix for DC6/6v abort scenarios.
> 
> Cc: Imre Deak 
> Signed-off-by: Anusha Srivatsa 

Reviewed-by: Imre Deak 

> ---
>  drivers/gpu/drm/i915/display/intel_dmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c 
> b/drivers/gpu/drm/i915/display/intel_dmc.c
> index 3c3c6cb5c0df..0978d97d9c3c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dmc.c
> +++ b/drivers/gpu/drm/i915/display/intel_dmc.c
> @@ -45,8 +45,8 @@
>  
>  #define GEN12_DMC_MAX_FW_SIZEICL_DMC_MAX_FW_SIZE
>  
> -#define ADLP_DMC_PATHDMC_PATH(adlp, 2, 10)
> -#define ADLP_DMC_VERSION_REQUIREDDMC_VERSION(2, 10)
> +#define ADLP_DMC_PATHDMC_PATH(adlp, 2, 12)
> +#define ADLP_DMC_VERSION_REQUIREDDMC_VERSION(2, 12)
>  MODULE_FIRMWARE(ADLP_DMC_PATH);
>  
>  #define ADLS_DMC_PATHDMC_PATH(adls, 2, 01)
> -- 
> 2.25.1
> 


[Intel-gfx] [PATCH v2 2/2] drm/i915/uapi: Add query for hwconfig table

2021-09-16 Thread John . C . Harrison
From: Rodrigo Vivi 

GuC contains a consolidated table with a bunch of information about the
current device.

Previously, this information was spread and hardcoded to all the components
including GuC, i915 and various UMDs. The goal here is to consolidate
the data into GuC in a way that all interested components can grab the
very latest and synchronized information using a simple query.

As per most of the other queries, this one can be called twice.
Once with item.length=0 to determine the exact buffer size, then
allocate the user memory and call it again for to retrieve the
table data. For example:
  struct drm_i915_query_item item = {
.query_id = DRM_I915_QUERY_HWCONCFIG_TABLE;
  };
  query.items_ptr = (int64_t) 
  query.num_items = 1;

  ioctl(fd, DRM_IOCTL_I915_QUERY, query, sizeof(query));

  if (item.length <= 0)
return -ENOENT;

  data = malloc(item.length);
  item.data_ptr = (int64_t) 
  ioctl(fd, DRM_IOCTL_I915_QUERY, query, sizeof(query));

  // Parse the data as appropriate...

The returned array is a simple and flexible KLV (Key/Length/Value)
formatted table. For example, it could be just:
  enum device_attr {
 ATTR_SOME_VALUE = 0,
 ATTR_SOME_MASK  = 1,
  };

  static const u32 hwconfig[] = {
  ATTR_SOME_VALUE,
  1, // Value Length in DWords
  8, // Value

  ATTR_SOME_MASK,
  3,
  0x00, 0x, 0xFF00,
  };

The attribute ids are defined in a hardware spec.

Cc: Tvrtko Ursulin 
Cc: Kenneth Graunke 
Cc: Michal Wajdeczko 
Cc: Slawomir Milczarek 
Signed-off-by: Rodrigo Vivi 
Signed-off-by: John Harrison 
Reviewed-by: Matthew Brost 
---
 drivers/gpu/drm/i915/i915_query.c | 23 +++
 include/uapi/drm/i915_drm.h   |  1 +
 2 files changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_query.c 
b/drivers/gpu/drm/i915/i915_query.c
index 5e2b909827f4..96989a37453c 100644
--- a/drivers/gpu/drm/i915/i915_query.c
+++ b/drivers/gpu/drm/i915/i915_query.c
@@ -477,12 +477,35 @@ static int query_memregion_info(struct drm_i915_private 
*i915,
return total_length;
 }
 
+static int query_hwconfig_table(struct drm_i915_private *i915,
+   struct drm_i915_query_item *query_item)
+{
+   struct intel_gt *gt = >gt;
+   struct intel_guc_hwconfig *hwconfig = >uc.guc.hwconfig;
+
+   if (!hwconfig->size || !hwconfig->ptr)
+   return -ENODEV;
+
+   if (query_item->length == 0)
+   return hwconfig->size;
+
+   if (query_item->length < hwconfig->size)
+   return -EINVAL;
+
+   if (copy_to_user(u64_to_user_ptr(query_item->data_ptr),
+hwconfig->ptr, hwconfig->size))
+   return -EFAULT;
+
+   return hwconfig->size;
+}
+
 static int (* const i915_query_funcs[])(struct drm_i915_private *dev_priv,
struct drm_i915_query_item *query_item) 
= {
query_topology_info,
query_engine_info,
query_perf_config,
query_memregion_info,
+   query_hwconfig_table,
 };
 
 int i915_query_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index bde5860b3686..a1281f35b190 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -2499,6 +2499,7 @@ struct drm_i915_query_item {
 #define DRM_I915_QUERY_ENGINE_INFO 2
 #define DRM_I915_QUERY_PERF_CONFIG  3
 #define DRM_I915_QUERY_MEMORY_REGIONS   4
+#define DRM_I915_QUERY_HWCONFIG_TABLE   5
 /* Must be kept compact -- no holes and well documented */
 
/**
-- 
2.25.1



[Intel-gfx] [PATCH v2 1/2] drm/i915/guc: Add fetch of hwconfig table

2021-09-16 Thread John . C . Harrison
From: John Harrison 

Implement support for fetching the hardware description table from the
GuC. The call is made twice - once without a destination buffer to
query the size and then a second time to fill in the buffer.

Note that the table is only available on ADL-P and later platforms.

Cc: Michal Wajdeczko 
Signed-off-by: Rodrigo Vivi 
Signed-off-by: John Harrison 
Reviewed-by: Matthew Brost 
---
 drivers/gpu/drm/i915/Makefile |   1 +
 .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h  |   1 +
 .../gpu/drm/i915/gt/uc/abi/guc_errors_abi.h   |   4 +
 drivers/gpu/drm/i915/gt/uc/intel_guc.c|   3 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc.h|   3 +
 .../gpu/drm/i915/gt/uc/intel_guc_hwconfig.c   | 156 ++
 .../gpu/drm/i915/gt/uc/intel_guc_hwconfig.h   |  19 +++
 drivers/gpu/drm/i915/gt/uc/intel_uc.c |   6 +
 8 files changed, 192 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.h

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index c1e9f7369fb5..3789f03a1021 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -190,6 +190,7 @@ i915-y += gt/uc/intel_uc.o \
  gt/uc/intel_guc_rc.o \
  gt/uc/intel_guc_slpc.o \
  gt/uc/intel_guc_submission.o \
+ gt/uc/intel_guc_hwconfig.o \
  gt/uc/intel_huc.o \
  gt/uc/intel_huc_debugfs.o \
  gt/uc/intel_huc_fw.o
diff --git a/drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h 
b/drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h
index 8ff58aff..72fd492b726a 100644
--- a/drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h
+++ b/drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h
@@ -137,6 +137,7 @@ enum intel_guc_action {
INTEL_GUC_ACTION_ENGINE_FAILURE_NOTIFICATION = 0x1009,
INTEL_GUC_ACTION_SETUP_PC_GUCRC = 0x3004,
INTEL_GUC_ACTION_AUTHENTICATE_HUC = 0x4000,
+   INTEL_GUC_ACTION_GET_HWCONFIG = 0x4100,
INTEL_GUC_ACTION_REGISTER_CONTEXT = 0x4502,
INTEL_GUC_ACTION_DEREGISTER_CONTEXT = 0x4503,
INTEL_GUC_ACTION_REGISTER_COMMAND_TRANSPORT_BUFFER = 0x4505,
diff --git a/drivers/gpu/drm/i915/gt/uc/abi/guc_errors_abi.h 
b/drivers/gpu/drm/i915/gt/uc/abi/guc_errors_abi.h
index 488b6061ee89..f9e2a6aaef4a 100644
--- a/drivers/gpu/drm/i915/gt/uc/abi/guc_errors_abi.h
+++ b/drivers/gpu/drm/i915/gt/uc/abi/guc_errors_abi.h
@@ -8,6 +8,10 @@
 
 enum intel_guc_response_status {
INTEL_GUC_RESPONSE_STATUS_SUCCESS = 0x0,
+   INTEL_GUC_RESPONSE_NOT_SUPPORTED = 0x20,
+   INTEL_GUC_RESPONSE_NO_ATTRIBUTE_TABLE = 0x201,
+   INTEL_GUC_RESPONSE_NO_DECRYPTION_KEY = 0x202,
+   INTEL_GUC_RESPONSE_DECRYPTION_FAILED = 0x204,
INTEL_GUC_RESPONSE_STATUS_GENERIC_FAIL = 0xF000,
 };
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
index fbfcae727d7f..82c0ce0090c6 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
@@ -422,13 +422,14 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 
*request, u32 len,
/*
 * No GuC command should ever take longer than 10ms.
 * Fast commands should still complete in 10us.
+* Except for the hwconfig table query, which takes ~50ms.
 */
ret = __intel_wait_for_register_fw(uncore,
   guc_send_reg(guc, 0),
   GUC_HXG_MSG_0_ORIGIN,
   FIELD_PREP(GUC_HXG_MSG_0_ORIGIN,
  GUC_HXG_ORIGIN_GUC),
-  10, 10, );
+  10, 100, );
if (unlikely(ret)) {
 timeout:
drm_err(>drm, "mmio request %#x: no reply %x\n",
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h 
b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
index 5dd174babf7a..6bc20774007d 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h
@@ -13,6 +13,7 @@
 #include "intel_guc_fw.h"
 #include "intel_guc_fwif.h"
 #include "intel_guc_ct.h"
+#include "intel_guc_hwconfig.h"
 #include "intel_guc_log.h"
 #include "intel_guc_reg.h"
 #include "intel_guc_slpc_types.h"
@@ -37,6 +38,8 @@ struct intel_guc {
struct intel_guc_ct ct;
/** @slpc: sub-structure containing SLPC related data and objects */
struct intel_guc_slpc slpc;
+   /** @hwconfig: hardware configuration KLV table */
+   struct intel_guc_hwconfig hwconfig;
 
/** @sched_engine: Global engine used to submit requests to GuC */
struct i915_sched_engine *sched_engine;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
new file mode 100644
index ..af4fc9fdbaaf
--- /dev/null
+++ 

[Intel-gfx] [PATCH v2 0/2] Add support for querying hw info that UMDs need

2021-09-16 Thread John . C . Harrison
From: John Harrison 

Various UMDs require hardware configuration information about the
current platform. A bunch of static information is available in a
fixed table that can be retrieved from the GuC.

v2: Add a kerneldoc comment.

Test-with: 20210915215558.2473428-2-john.c.harri...@intel.com
UMD: https://github.com/intel/compute-runtime/pull/432/files
UMD: https://github.com/intel/media-driver/pull/1239/files

CC: Katarzyna Cencelewska 
CC: Tony Ye 
CC: Jason Ekstrand 
Signed-off-by: John Harrison 
Reviewed-by: Matthew Brost 


John Harrison (1):
  drm/i915/guc: Add fetch of hwconfig table

Rodrigo Vivi (1):
  drm/i915/uapi: Add query for hwconfig table

 drivers/gpu/drm/i915/Makefile |   1 +
 .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h  |   1 +
 .../gpu/drm/i915/gt/uc/abi/guc_errors_abi.h   |   4 +
 drivers/gpu/drm/i915/gt/uc/intel_guc.c|   3 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc.h|   3 +
 .../gpu/drm/i915/gt/uc/intel_guc_hwconfig.c   | 156 ++
 .../gpu/drm/i915/gt/uc/intel_guc_hwconfig.h   |  19 +++
 drivers/gpu/drm/i915/gt/uc/intel_uc.c |   6 +
 drivers/gpu/drm/i915/i915_query.c |  23 +++
 include/uapi/drm/i915_drm.h   |   1 +
 10 files changed, 216 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.c
 create mode 100644 drivers/gpu/drm/i915/gt/uc/intel_guc_hwconfig.h

-- 
2.25.1



Re: [Intel-gfx] ✗ Fi.CI.BUILD: failure for use DYNAMIC_DEBUG to implement DRM.debug (rev3)

2021-09-16 Thread jim . cromie
On Wed, Sep 15, 2021 at 10:50 AM Patchwork
 wrote:
>
> == Series Details ==
>
> Series: use DYNAMIC_DEBUG to implement DRM.debug (rev3)
> URL   : https://patchwork.freedesktop.org/series/93914/
> State : failure
>
> == Summary ==
>
> Applying: dyndbg: add module to a vpr-info in dd-exec-queries
> Applying: dyndbg: pr-info in boot-param should say so
> Applying: dyndbg: rationalize verbosity
> Applying: dyndbg: use alt-quotes in vpr-infos, not those user might use
> Applying: dyndbg: vpr-info on remove-module complete, not starting
> Applying: dyndbg: no vpr-info on empty queries
> Applying: dyndbg-doc: fix bootparam usage example
> Applying: dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES bitmap and callbacks
> Applying: drm: fix doc grammar error
> Applying: i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes
> Applying: i915/gvt: use DEFINE_DYNAMIC_DEBUG_CATEGORIES for existing prdbgs
> Applying: amdgpu: use DEFINE_DYNAMIC_DEBUG_CATEGORIES on existing prdbgs
> Applying: drm_print: add choice to use dynamic debug in drm-debug
> error: sha1 information is lacking or useless 
> (drivers/gpu/drm/amd/amdgpu/Makefile).
> error: could not build fake ancestor
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> Patch failed at 0013 drm_print: add choice to use dynamic debug in drm-debug
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
>
>

it looks like some conflict, patchset is against 5.14.
I copied branch and it applied clean to master, drm-tip
so I have nothing to look at.
is this a transient error ?


Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 1/1] tests/i915/query: Query, parse and validate the hwconfig table

2021-09-16 Thread John Harrison

On 9/16/2021 01:59, Petri Latvala wrote:

On Wed, Sep 15, 2021 at 02:55:58PM -0700, john.c.harri...@intel.com wrote:

From: Rodrigo Vivi 

Newer platforms have an embedded table giving details about that
platform's hardware configuration. This table can be retrieved from
the KMD via the existing query API. So add a test for it as both an
example of how to fetch the table and to validate the contents as much
as is possible.

Signed-off-by: Rodrigo Vivi 
Signed-off-by: John Harrison 
Cc: Slawomir Milczarek 
Reviewed-by: Matthew Brost 
---
  include/drm-uapi/i915_drm.h |   1 +
  lib/intel_hwconfig_types.h  | 106 +++
  tests/i915/i915_query.c | 168 
  3 files changed, 275 insertions(+)
  create mode 100644 lib/intel_hwconfig_types.h

diff --git a/include/drm-uapi/i915_drm.h b/include/drm-uapi/i915_drm.h
index b9632bb2c..ae0c8dfad 100644
--- a/include/drm-uapi/i915_drm.h
+++ b/include/drm-uapi/i915_drm.h
@@ -2451,6 +2451,7 @@ struct drm_i915_query_item {
  #define DRM_I915_QUERY_ENGINE_INFO2
  #define DRM_I915_QUERY_PERF_CONFIG  3
  #define DRM_I915_QUERY_MEMORY_REGIONS   4
+#define DRM_I915_QUERY_HWCONFIG_TABLE   5
  /* Must be kept compact -- no holes and well documented */

Please update i915_drm.h with a copy from the kernel and state in the
commit message which kernel commit sha it's from. If this change is
not in the kernel yet, add this token to lib/i915/i915_drm_local.h
instead.


Neither side is merged yet. My understanding is that all sides need to 
be posted in parallel for CI to work. Once green and reviewed, the 
kernel side gets merged first. Then the IGT/UMD patches get updated with 
the official kernel headers, reposted and then merged.


John.



Re: [Intel-gfx] [PATCH 4/5] drm/i915/guc: Enable GuC submission by default on DG1

2021-09-16 Thread John Harrison

On 9/16/2021 09:28, Matthew Brost wrote:

Enable GuC submission by default on DG1

Signed-off-by: Matthew Brost 

Reviewed-by: John Harrison 


---
  drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c 
b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index 86c318516e14..2fef3b0bbe95 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -35,7 +35,7 @@ static void uc_expand_default_options(struct intel_uc *uc)
}
  
  	/* Intermediate platforms are HuC authentication only */

-   if (IS_DG1(i915) || IS_ALDERLAKE_S(i915)) {
+   if (IS_ALDERLAKE_S(i915)) {
i915->params.enable_guc = ENABLE_GUC_LOAD_HUC;
return;
}




Re: [Intel-gfx] [PATCH v2 3/5] drm/i915/display: Workaround cursor left overs with PSR2 selective fetch enabled

2021-09-16 Thread Souza, Jose
On Thu, 2021-09-16 at 16:17 +0300, Ville Syrjälä wrote:
> On Wed, Sep 15, 2021 at 06:18:35PM +, Souza, Jose wrote:
> > On Wed, 2021-09-15 at 17:58 +0300, Ville Syrjälä wrote:
> > > On Tue, Sep 14, 2021 at 02:25:05PM -0700, José Roberto de Souza wrote:
> > > > Not sure why but when moving the cursor fast it causes some artifacts
> > > > of the cursor to be left in the cursor path, adding some pixels above
> > > > the cursor to the damaged area fixes the issue, so leaving this as a
> > > > workaround until proper fix is found.
> > > 
> > > Have you tried warping the cursor clear across the screen while
> > > a partial update is already pending? I think it will go badly.
> > 
> > You mean move the cursor for example from 0x0 to 500x500 in one frame?
> > It will mark as damaged the previous area and the new one.
> 
> Legacy cursor updates bypass all that stuff so you're not going to
> updating the sel fetch area for the other planes.
> 
> > 
> > > 
> > > In fact I'm thinking the mailbox style legacy cursor updates are just
> > > fundementally incompatible with partial updates since the cursor
> > > can move outside of the already committed update region any time.
> > > Ie. I suspect while the cursor is visible we simply can't do partial
> > > updates.
> > 
> > Probably I did not understand what you want to say, but each cursor update 
> > will be in one frame, updating the necessary area.
> 
> The legacy cursor uses mailbox updates so there is no 1:1 relationship
> between actual scanned out frames and cursor ioctl calls. You can
> have umpteen thousand cursor updates per frame.

Not if intel_legacy_cursor_update() is changed to go to the slow path and do 
one atomic commit for each move.
https://patchwork.freedesktop.org/patch/453192/?series=94522=1

I believe compositors will do a single atomic commit updating cursor and all 
the other planes into a single commit.

> 
> > So I can't understand why it is incompatible.
> 
> Because all the other planes already got their selective fetch area
> updated earlir, and now the cursor's new update area is something
> totally different. Doesn't the total area need to computed to comprise
> of a single crtc space rectangle essentially?
> 
> So we could start with something like:
> 
> sel fetch area
>  |
>  v
>  
> >    |
> > > plane |  |
> > >   |_ |
> > _ ||
> >   _   | plane ||
> >  |_|  |___||
> > |   
> ^
> |
> cursor
> 
> Then the cursor moves before the hardware has even latched the previous
> update:
> 
> old sel fetch area
>  |
>  v
>  
> >    |
> > > plane |  |_
> > >   |_ |   |_|
> > _ ||^
> >   | plane |||
> >   |___||   cursor
> > |
> 



Re: [Intel-gfx] [PATCH 5/5] drm/i915: Take pinning into account in __i915_gem_object_is_lmem

2021-09-16 Thread Thomas Hellström
On Thu, 2021-09-16 at 09:28 -0700, Matthew Brost wrote:
> Don't blow up on a GEM_WARN_ON in __i915_gem_object_is_lmem if the
> object is pinned (not evictable).
> 
> Signed-off-by: Matthew Brost 
> Cc: Thomas Hellström 
Reviewed-by: Thomas Hellström 

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
> b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
> index 034226c5d4d0..d659239fcbcc 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
> @@ -56,8 +56,8 @@ bool i915_gem_object_is_lmem(struct
> drm_i915_gem_object *obj)
>   * @obj: The object to check.
>   *
>   * This function is intended to be called from within the fence
> signaling
> - * path where the fence keeps the object from being migrated. For
> example
> - * during gpu reset or similar.
> + * path where the fence, or a pin, keeps the object from being
> migrated. For
> + * example during gpu reset or similar.
>   *
>   * Return: Whether the object is resident in lmem.
>   */
> @@ -66,7 +66,8 @@ bool __i915_gem_object_is_lmem(struct
> drm_i915_gem_object *obj)
> struct intel_memory_region *mr = READ_ONCE(obj->mm.region);
>  
>  #ifdef CONFIG_LOCKDEP
> -   GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, true));
> +   GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, true) &&
> +   !i915_gem_object_evictable(obj));
>  #endif
> return mr && (mr->type == INTEL_MEMORY_LOCAL ||
>   mr->type == INTEL_MEMORY_STOLEN_LOCAL);




Re: [Intel-gfx] [PATCH 4/9] drm/privacy-screen: Add notifier support

2021-09-16 Thread Lyude Paul
On Thu, 2021-09-16 at 11:06 +0200, Hans de Goede wrote:
> Hi,
> 
> On 9/15/21 10:26 PM, Lyude Paul wrote:
> > On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote:
> > > Add support for privacy-screen consumers to register a notifier to
> > > be notified of external (e.g. done by the hw itself on a hotkey press)
> > > state changes.
> > > 
> > > Reviewed-by: Emil Velikov 
> > > Signed-off-by: Hans de Goede 
> > > ---
> > >  drivers/gpu/drm/drm_privacy_screen.c  | 67 +++
> > >  include/drm/drm_privacy_screen_consumer.h | 15 +
> > >  include/drm/drm_privacy_screen_driver.h   |  4 ++
> > >  3 files changed, 86 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_privacy_screen.c
> > > b/drivers/gpu/drm/drm_privacy_screen.c
> > > index 294a09194bfb..7a5f878c3171 100644
> > > --- a/drivers/gpu/drm/drm_privacy_screen.c
> > > +++ b/drivers/gpu/drm/drm_privacy_screen.c
> > > @@ -255,6 +255,49 @@ void drm_privacy_screen_get_state(struct
> > > drm_privacy_screen *priv,
> > >  }
> > >  EXPORT_SYMBOL(drm_privacy_screen_get_state);
> > >  
> > > +/**
> > > + * drm_privacy_screen_register_notifier - register a notifier
> > > + * @priv: Privacy screen to register the notifier with
> > > + * @nb: Notifier-block for the notifier to register
> > > + *
> > > + * Register a notifier with the privacy-screen to be notified of
> > > changes
> > > made
> > > + * to the privacy-screen state from outside of the privacy-screen
> > > class.
> > > + * E.g. the state may be changed by the hardware itself in response to
> > > a
> > > + * hotkey press.
> > > + *
> > > + * The notifier is called with no locks held. The new hw_state and
> > > sw_state
> > > + * can be retrieved using the drm_privacy_screen_get_state() function.
> > > + * A pointer to the drm_privacy_screen's struct is passed as the void
> > > *data
> > > + * argument of the notifier_block's notifier_call.
> > > + *
> > > + * The notifier will NOT be called when changes are made through
> > > + * drm_privacy_screen_set_sw_state(). It is only called for external
> > > changes.
> > > + *
> > > + * Return: 0 on success, negative error code on failure.
> > > + */
> > > +int drm_privacy_screen_register_notifier(struct drm_privacy_screen
> > > *priv,
> > > +    struct notifier_block *nb)
> > > +{
> > > +   return blocking_notifier_chain_register(>notifier_head,
> > > nb);
> > > +}
> > > +EXPORT_SYMBOL(drm_privacy_screen_register_notifier);
> > > +
> > > +/**
> > > + * drm_privacy_screen_unregister_notifier - unregister a notifier
> > > + * @priv: Privacy screen to register the notifier with
> > > + * @nb: Notifier-block for the notifier to register
> > > + *
> > > + * Unregister a notifier registered with
> > > drm_privacy_screen_register_notifier().
> > > + *
> > > + * Return: 0 on success, negative error code on failure.
> > > + */
> > > +int drm_privacy_screen_unregister_notifier(struct drm_privacy_screen
> > > *priv,
> > > +  struct notifier_block *nb)
> > > +{
> > > +   return blocking_notifier_chain_unregister(>notifier_head,
> > > nb);
> > > +}
> > > +EXPORT_SYMBOL(drm_privacy_screen_unregister_notifier);
> > > +
> > >  /*** drm_privacy_screen_driver.h functions ***/
> > >  
> > >  static ssize_t sw_state_show(struct device *dev,
> > > @@ -352,6 +395,7 @@ struct drm_privacy_screen
> > > *drm_privacy_screen_register(
> > > return ERR_PTR(-ENOMEM);
> > >  
> > > mutex_init(>lock);
> > > +   BLOCKING_INIT_NOTIFIER_HEAD(>notifier_head);
> > >  
> > > priv->dev.class = drm_class;
> > > priv->dev.type = _privacy_screen_type;
> > > @@ -399,3 +443,26 @@ void drm_privacy_screen_unregister(struct
> > > drm_privacy_screen *priv)
> > > device_unregister(>dev);
> > >  }
> > >  EXPORT_SYMBOL(drm_privacy_screen_unregister);
> > > +
> > > +/**
> > > + * drm_privacy_screen_call_notifier_chain - notify consumers of state
> > > change
> > > + * @priv: Privacy screen to register the notifier with
> > > + *
> > > + * A privacy-screen provider driver can call this functions upon
> > > external
> > > + * changes to the privacy-screen state. E.g. the state may be changed
> > > by
> > > the
> > > + * hardware itself in response to a hotkey press.
> > > + * This function must be called without holding the privacy-screen
> > > lock.
> > > + * the driver must update sw_state and hw_state to reflect the new
> > > state
> > > before
> > > + * calling this function.
> > > + * The expected behavior from the driver upon receiving an external
> > > state
> > > + * change event is: 1. Take the lock; 2. Update sw_state and hw_state;
> > > + * 3. Release the lock. 4. Call
> > > drm_privacy_screen_call_notifier_chain().
> > > + */
> > > +void drm_privacy_screen_call_notifier_chain(struct drm_privacy_screen
> > > *priv)
> > > +{
> > > +   if (WARN_ON(mutex_is_locked(>lock)))
> > > +   return;
> > 
> > Are we sure about this 

Re: [Intel-gfx] [PATCH 03/14] drm/i915: Use u8 consistently for active_planes bitmask

2021-09-16 Thread Lisovskiy, Stanislav
On Fri, May 14, 2021 at 03:57:40PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> Be consistent in that active_planes bitmask fits in a u8.
> 
> Signed-off-by: Ville Syrjälä 

Reviewed-by: Stanislav Lisovskiy 

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 2fb496fbed43..8a08a7c0e71f 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1706,7 +1706,7 @@ static int vlv_compute_fifo(struct intel_crtc_state 
> *crtc_state)
>   const struct g4x_pipe_wm *raw =
>   _state->wm.vlv.raw[VLV_WM_LEVEL_PM2];
>   struct vlv_fifo_state *fifo_state = _state->wm.vlv.fifo_state;
> - unsigned int active_planes = crtc_state->active_planes & 
> ~BIT(PLANE_CURSOR);
> + u8 active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
>   int num_active_planes = hweight8(active_planes);
>   const int fifo_size = 511;
>   int fifo_extra, fifo_left = fifo_size;
> @@ -1898,8 +1898,8 @@ static int vlv_compute_pipe_wm(struct intel_crtc_state 
> *crtc_state)
>   struct vlv_wm_state *wm_state = _state->wm.vlv.optimal;
>   const struct vlv_fifo_state *fifo_state =
>   _state->wm.vlv.fifo_state;
> - int num_active_planes = hweight8(crtc_state->active_planes &
> -  ~BIT(PLANE_CURSOR));
> + u8 active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
> + int num_active_planes = hweight8(active_planes);
>   bool needs_modeset = drm_atomic_crtc_needs_modeset(_state->uapi);
>   const struct intel_plane_state *old_plane_state;
>   const struct intel_plane_state *new_plane_state;
> -- 
> 2.26.3
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/5] drm/i915/guc: put all guc objects in lmem when available

2021-09-16 Thread Matthew Brost
From: Daniele Ceraolo Spurio 

The firmware binary has to be loaded from lmem and the recommendation is
to put all other objects in there as well. Note that we don't fall back
to system memory if the allocation in lmem fails because all objects are
allocated during driver load and if we have issues with lmem at that point
something is seriously wrong with the system, so no point in trying to
handle it.

Cc: Matthew Auld 
Cc: Abdiel Janulgue 
Cc: Michal Wajdeczko 
Cc: Vinay Belgaumkar 
Cc: Radoslaw Szwichtenberg 
Signed-off-by: Daniele Ceraolo Spurio 
Signed-off-by: Matthew Brost 
Reviewed-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gem/i915_gem_lmem.c  | 26 
 drivers/gpu/drm/i915/gem/i915_gem_lmem.h  |  4 ++
 drivers/gpu/drm/i915/gt/uc/intel_guc.c|  9 ++-
 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 13 ++--
 drivers/gpu/drm/i915/gt/uc/intel_huc.c| 14 -
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c  | 75 +--
 6 files changed, 128 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c 
b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
index eb345305dc52..034226c5d4d0 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
@@ -103,6 +103,32 @@ __i915_gem_object_create_lmem_with_ps(struct 
drm_i915_private *i915,
 size, page_size, flags);
 }
 
+struct drm_i915_gem_object *
+i915_gem_object_create_lmem_from_data(struct drm_i915_private *i915,
+ const void *data, size_t size)
+{
+   struct drm_i915_gem_object *obj;
+   void *map;
+
+   obj = i915_gem_object_create_lmem(i915,
+ round_up(size, PAGE_SIZE),
+ I915_BO_ALLOC_CONTIGUOUS);
+   if (IS_ERR(obj))
+   return obj;
+
+   map = i915_gem_object_pin_map_unlocked(obj, I915_MAP_WC);
+   if (IS_ERR(map)) {
+   i915_gem_object_put(obj);
+   return map;
+   }
+
+   memcpy(map, data, size);
+
+   i915_gem_object_unpin_map(obj);
+
+   return obj;
+}
+
 struct drm_i915_gem_object *
 i915_gem_object_create_lmem(struct drm_i915_private *i915,
resource_size_t size,
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem.h 
b/drivers/gpu/drm/i915/gem/i915_gem_lmem.h
index 4ee81fc66302..1b88ea13435c 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.h
@@ -23,6 +23,10 @@ bool i915_gem_object_is_lmem(struct drm_i915_gem_object 
*obj);
 
 bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
 
+struct drm_i915_gem_object *
+i915_gem_object_create_lmem_from_data(struct drm_i915_private *i915,
+ const void *data, size_t size);
+
 struct drm_i915_gem_object *
 __i915_gem_object_create_lmem_with_ps(struct drm_i915_private *i915,
  resource_size_t size,
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
index fbfcae727d7f..8ffb689066f6 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
@@ -3,6 +3,7 @@
  * Copyright © 2014-2019 Intel Corporation
  */
 
+#include "gem/i915_gem_lmem.h"
 #include "gt/intel_gt.h"
 #include "gt/intel_gt_irq.h"
 #include "gt/intel_gt_pm_irq.h"
@@ -647,7 +648,13 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc 
*guc, u32 size)
u64 flags;
int ret;
 
-   obj = i915_gem_object_create_shmem(gt->i915, size);
+   if (HAS_LMEM(gt->i915))
+   obj = i915_gem_object_create_lmem(gt->i915, size,
+ I915_BO_ALLOC_CPU_CLEAR |
+ I915_BO_ALLOC_CONTIGUOUS);
+   else
+   obj = i915_gem_object_create_shmem(gt->i915, size);
+
if (IS_ERR(obj))
return ERR_CAST(obj);
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c 
b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
index 76fe766ad1bc..196424be0998 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
@@ -41,18 +41,21 @@ static void guc_prepare_xfer(struct intel_uncore *uncore)
 }
 
 /* Copy RSA signature from the fw image to HW for verification */
-static void guc_xfer_rsa(struct intel_uc_fw *guc_fw,
-struct intel_uncore *uncore)
+static int guc_xfer_rsa(struct intel_uc_fw *guc_fw,
+   struct intel_uncore *uncore)
 {
u32 rsa[UOS_RSA_SCRATCH_COUNT];
size_t copied;
int i;
 
copied = intel_uc_fw_copy_rsa(guc_fw, rsa, sizeof(rsa));
-   GEM_BUG_ON(copied < sizeof(rsa));
+   if (copied < sizeof(rsa))
+   return -ENOMEM;
 
for (i = 0; i < UOS_RSA_SCRATCH_COUNT; i++)
intel_uncore_write(uncore, UOS_RSA_SCRATCH(i), 

[Intel-gfx] [PATCH 1/5] drm/i915: Do not define vma on stack

2021-09-16 Thread Matthew Brost
From: Venkata Sandeep Dhanalakota 

Defining vma on stack can cause stack overflow, if
vma gets populated with new fields.

v2:
 (Daniel Vetter)
  - Add kerneldoc for new field

Cc: Daniele Ceraolo Spurio 
Cc: Tvrtko Ursulin 
Signed-off-by: Venkata Sandeep Dhanalakota 
Signed-off-by: Matthew Brost 
Reviewed-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 18 +-
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h |  9 +
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c 
b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 3a16d08608a5..f632dbd32b42 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -413,20 +413,20 @@ static void uc_fw_bind_ggtt(struct intel_uc_fw *uc_fw)
 {
struct drm_i915_gem_object *obj = uc_fw->obj;
struct i915_ggtt *ggtt = __uc_fw_to_gt(uc_fw)->ggtt;
-   struct i915_vma dummy = {
-   .node.start = uc_fw_ggtt_offset(uc_fw),
-   .node.size = obj->base.size,
-   .pages = obj->mm.pages,
-   .vm = >vm,
-   };
+   struct i915_vma *dummy = _fw->dummy;
+
+   dummy->node.start = uc_fw_ggtt_offset(uc_fw);
+   dummy->node.size = obj->base.size;
+   dummy->pages = obj->mm.pages;
+   dummy->vm = >vm;
 
GEM_BUG_ON(!i915_gem_object_has_pinned_pages(obj));
-   GEM_BUG_ON(dummy.node.size > ggtt->uc_fw.size);
+   GEM_BUG_ON(dummy->node.size > ggtt->uc_fw.size);
 
/* uc_fw->obj cache domains were not controlled across suspend */
-   drm_clflush_sg(dummy.pages);
+   drm_clflush_sg(dummy->pages);
 
-   ggtt->vm.insert_entries(>vm, , I915_CACHE_NONE, 0);
+   ggtt->vm.insert_entries(>vm, dummy, I915_CACHE_NONE, 0);
 }
 
 static void uc_fw_unbind_ggtt(struct intel_uc_fw *uc_fw)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h 
b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
index 99bb1fe1af66..1e00bf65639e 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h
@@ -10,6 +10,7 @@
 #include "intel_uc_fw_abi.h"
 #include "intel_device_info.h"
 #include "i915_gem.h"
+#include "i915_vma.h"
 
 struct drm_printer;
 struct drm_i915_private;
@@ -75,6 +76,14 @@ struct intel_uc_fw {
bool user_overridden;
size_t size;
struct drm_i915_gem_object *obj;
+   /**
+* @dummy: A vma used in binding the uc fw to ggtt. We can't define this
+* vma on the stack as it can lead to a stack overflow, so we define it
+* here. Safe to have 1 copy per uc fw because the binding is single
+* threaded as it done during driver load (inherently single threaded)
+* or during a GT reset (mutex guarantees single threaded).
+*/
+   struct i915_vma dummy;
 
/*
 * The firmware build process will generate a version header file with 
major and
-- 
2.32.0



[Intel-gfx] [PATCH 3/5] drm/i915/guc: Add DG1 GuC / HuC firmware defs

2021-09-16 Thread Matthew Brost
From: Daniele Ceraolo Spurio 

Add DG1 GuC / HuC firmware defs

Signed-off-by: Matthew Brost 
Signed-off-by: Daniele Ceraolo Spurio 
Reviewed-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c 
b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index f8cb00ffb506..a685d563df72 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -51,6 +51,7 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw,
 #define INTEL_UC_FIRMWARE_DEFS(fw_def, guc_def, huc_def) \
fw_def(ALDERLAKE_P, 0, guc_def(adlp, 62, 0, 3), huc_def(tgl, 7, 9, 3)) \
fw_def(ALDERLAKE_S, 0, guc_def(tgl, 62, 0, 0), huc_def(tgl,  7, 9, 3)) \
+   fw_def(DG1, 0, guc_def(dg1, 62, 0, 0), huc_def(dg1,  7, 9, 3)) \
fw_def(ROCKETLAKE,  0, guc_def(tgl, 62, 0, 0), huc_def(tgl,  7, 9, 3)) \
fw_def(TIGERLAKE,   0, guc_def(tgl, 62, 0, 0), huc_def(tgl,  7, 9, 3)) \
fw_def(JASPERLAKE,  0, guc_def(ehl, 62, 0, 0), huc_def(ehl,  9, 0, 0)) \
-- 
2.32.0



[Intel-gfx] [PATCH 4/5] drm/i915/guc: Enable GuC submission by default on DG1

2021-09-16 Thread Matthew Brost
Enable GuC submission by default on DG1

Signed-off-by: Matthew Brost 
---
 drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c 
b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index 86c318516e14..2fef3b0bbe95 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -35,7 +35,7 @@ static void uc_expand_default_options(struct intel_uc *uc)
}
 
/* Intermediate platforms are HuC authentication only */
-   if (IS_DG1(i915) || IS_ALDERLAKE_S(i915)) {
+   if (IS_ALDERLAKE_S(i915)) {
i915->params.enable_guc = ENABLE_GUC_LOAD_HUC;
return;
}
-- 
2.32.0



[Intel-gfx] [PATCH 0/5] Enable GuC submission by default on DG1

2021-09-16 Thread Matthew Brost
Minimum set of patches to enable GuC submission on DG1 and enable it by
default.

A little difficult to test as IGTs do not work with DG1 due to a bunch
of uAPI features being disabled (e.g. relocations, caching memory
options, etc...) and CI for DG1 isn't all that useful yet. Tested quite
thoroughly locally though.

Signed-off-by: Matthew Brost 

Daniele Ceraolo Spurio (2):
  drm/i915/guc: put all guc objects in lmem when available
  drm/i915/guc: Add DG1 GuC / HuC firmware defs

Matthew Brost (2):
  drm/i915/guc: Enable GuC submission by default on DG1
  drm/i915: Take pinning into account in __i915_gem_object_is_lmem

Venkata Sandeep Dhanalakota (1):
  drm/i915: Do not define vma on stack

 drivers/gpu/drm/i915/gem/i915_gem_lmem.c  | 33 -
 drivers/gpu/drm/i915/gem/i915_gem_lmem.h  |  4 +
 drivers/gpu/drm/i915/gt/uc/intel_guc.c|  9 ++-
 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c | 13 +++-
 drivers/gpu/drm/i915/gt/uc/intel_huc.c| 14 +++-
 drivers/gpu/drm/i915/gt/uc/intel_uc.c |  2 +-
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c  | 90 ---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.h  |  9 +++
 8 files changed, 150 insertions(+), 24 deletions(-)

-- 
2.32.0



[Intel-gfx] [PATCH 5/5] drm/i915: Take pinning into account in __i915_gem_object_is_lmem

2021-09-16 Thread Matthew Brost
Don't blow up on a GEM_WARN_ON in __i915_gem_object_is_lmem if the
object is pinned (not evictable).

Signed-off-by: Matthew Brost 
Cc: Thomas Hellström 
---
 drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c 
b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
index 034226c5d4d0..d659239fcbcc 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_lmem.c
@@ -56,8 +56,8 @@ bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj)
  * @obj: The object to check.
  *
  * This function is intended to be called from within the fence signaling
- * path where the fence keeps the object from being migrated. For example
- * during gpu reset or similar.
+ * path where the fence, or a pin, keeps the object from being migrated. For
+ * example during gpu reset or similar.
  *
  * Return: Whether the object is resident in lmem.
  */
@@ -66,7 +66,8 @@ bool __i915_gem_object_is_lmem(struct drm_i915_gem_object 
*obj)
struct intel_memory_region *mr = READ_ONCE(obj->mm.region);
 
 #ifdef CONFIG_LOCKDEP
-   GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, true));
+   GEM_WARN_ON(dma_resv_test_signaled(obj->base.resv, true) &&
+   !i915_gem_object_evictable(obj));
 #endif
return mr && (mr->type == INTEL_MEMORY_LOCAL ||
  mr->type == INTEL_MEMORY_STOLEN_LOCAL);
-- 
2.32.0



Re: [Intel-gfx] [PATCH 02/14] drm/i915: Fix g4x cxsr enable condition

2021-09-16 Thread Lisovskiy, Stanislav
On Fri, May 14, 2021 at 03:57:39PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> The intention was to check whether the primary plane is enabled
> without any sprites planes being enabled. Instead we ended up checking
> whether just any one of the planes is enabled. g4x isn't vlv/chv and
> cxsr only works with the primary plane. Fix the check to examine the
> bitmask of active planes rather than the number of bits set in said
> bitmask.
> 
> Signed-off-by: Ville Syrjälä 
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 00a5fe424c5a..2fb496fbed43 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1376,8 +1376,7 @@ static int g4x_compute_pipe_wm(struct intel_crtc_state 
> *crtc_state)
>   struct intel_atomic_state *state =
>   to_intel_atomic_state(crtc_state->uapi.state);
>   struct g4x_wm_state *wm_state = _state->wm.g4x.optimal;
> - int num_active_planes = hweight8(crtc_state->active_planes &
> -  ~BIT(PLANE_CURSOR));
> + u8 active_planes = crtc_state->active_planes & ~BIT(PLANE_CURSOR);
>   const struct g4x_pipe_wm *raw;
>   const struct intel_plane_state *old_plane_state;
>   const struct intel_plane_state *new_plane_state;
> @@ -1417,7 +1416,7 @@ static int g4x_compute_pipe_wm(struct intel_crtc_state 
> *crtc_state)
>   wm_state->sr.cursor = raw->plane[PLANE_CURSOR];
>   wm_state->sr.fbc = raw->fbc;
>  
> - wm_state->cxsr = num_active_planes == BIT(PLANE_PRIMARY);
> + wm_state->cxsr = active_planes == BIT(PLANE_PRIMARY);

Shouldn't this be "active_planes & BIT(PLANE_PRIMARY)" as we might
have other non-cursor planes enabled, which will then fail or am I missing 
something?

Stan

>  
>   level = G4X_WM_LEVEL_HPLL;
>   if (!g4x_raw_crtc_wm_is_valid(crtc_state, level))
> -- 
> 2.26.3
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 01/14] drm/i915: s/crtc_state/new_crtc_state/ etc.

2021-09-16 Thread Lisovskiy, Stanislav
On Fri, May 14, 2021 at 03:57:38PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä 
> 
> intel_plane_atomic_calc_changes() deals with both the old and
> new crtc/plane states. Make the variable names reflect that
> more clearly.
> 
> Signed-off-by: Ville Syrjälä 

Reviewed-by: Stanislav Lisovskiy 

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 38 ++--
>  1 file changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 0c2b194006f8..41683c529c3d 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -6826,27 +6826,27 @@ static bool needs_scaling(const struct 
> intel_plane_state *state)
>  }
>  
>  int intel_plane_atomic_calc_changes(const struct intel_crtc_state 
> *old_crtc_state,
> - struct intel_crtc_state *crtc_state,
> + struct intel_crtc_state *new_crtc_state,
>   const struct intel_plane_state 
> *old_plane_state,
> - struct intel_plane_state *plane_state)
> + struct intel_plane_state *new_plane_state)
>  {
> - struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> - struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
> + struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
> + struct intel_plane *plane = to_intel_plane(new_plane_state->uapi.plane);
>   struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> - bool mode_changed = intel_crtc_needs_modeset(crtc_state);
> + bool mode_changed = intel_crtc_needs_modeset(new_crtc_state);
>   bool was_crtc_enabled = old_crtc_state->hw.active;
> - bool is_crtc_enabled = crtc_state->hw.active;
> + bool is_crtc_enabled = new_crtc_state->hw.active;
>   bool turn_off, turn_on, visible, was_visible;
>   int ret;
>  
>   if (DISPLAY_VER(dev_priv) >= 9 && plane->id != PLANE_CURSOR) {
> - ret = skl_update_scaler_plane(crtc_state, plane_state);
> + ret = skl_update_scaler_plane(new_crtc_state, new_plane_state);
>   if (ret)
>   return ret;
>   }
>  
>   was_visible = old_plane_state->uapi.visible;
> - visible = plane_state->uapi.visible;
> + visible = new_plane_state->uapi.visible;
>  
>   if (!was_crtc_enabled && drm_WARN_ON(_priv->drm, was_visible))
>   was_visible = false;
> @@ -6862,7 +6862,7 @@ int intel_plane_atomic_calc_changes(const struct 
> intel_crtc_state *old_crtc_stat
>* only combine the results from all planes in the current place?
>*/
>   if (!is_crtc_enabled) {
> - intel_plane_set_invisible(crtc_state, plane_state);
> + intel_plane_set_invisible(new_crtc_state, new_plane_state);
>   visible = false;
>   }
>  
> @@ -6881,28 +6881,28 @@ int intel_plane_atomic_calc_changes(const struct 
> intel_crtc_state *old_crtc_stat
>  
>   if (turn_on) {
>   if (DISPLAY_VER(dev_priv) < 5 && !IS_G4X(dev_priv))
> - crtc_state->update_wm_pre = true;
> + new_crtc_state->update_wm_pre = true;
>  
>   /* must disable cxsr around plane enable/disable */
>   if (plane->id != PLANE_CURSOR)
> - crtc_state->disable_cxsr = true;
> + new_crtc_state->disable_cxsr = true;
>   } else if (turn_off) {
>   if (DISPLAY_VER(dev_priv) < 5 && !IS_G4X(dev_priv))
> - crtc_state->update_wm_post = true;
> + new_crtc_state->update_wm_post = true;
>  
>   /* must disable cxsr around plane enable/disable */
>   if (plane->id != PLANE_CURSOR)
> - crtc_state->disable_cxsr = true;
> - } else if (intel_wm_need_update(old_plane_state, plane_state)) {
> + new_crtc_state->disable_cxsr = true;
> + } else if (intel_wm_need_update(old_plane_state, new_plane_state)) {
>   if (DISPLAY_VER(dev_priv) < 5 && !IS_G4X(dev_priv)) {
>   /* FIXME bollocks */
> - crtc_state->update_wm_pre = true;
> - crtc_state->update_wm_post = true;
> + new_crtc_state->update_wm_pre = true;
> + new_crtc_state->update_wm_post = true;
>   }
>   }
>  
>   if (visible || was_visible)
> - crtc_state->fb_bits |= plane->frontbuffer_bit;
> + new_crtc_state->fb_bits |= plane->frontbuffer_bit;
>  
>   /*
>* ILK/SNB DVSACNTR/Sprite Enable
> @@ -6941,8 +6941,8 @@ int intel_plane_atomic_calc_changes(const struct 
> intel_crtc_state *old_crtc_stat
>   (IS_IRONLAKE(dev_priv) || IS_SANDYBRIDGE(dev_priv) ||
>

Re: [Intel-gfx] [PATCH v9 04/17] drm/i915/pxp: allocate a vcs context for pxp usage

2021-09-16 Thread Teres Alexis, Alan Previn

On Thu, 2021-09-16 at 09:59 -0400, Rodrigo Vivi wrote:
> On Thu, Sep 16, 2021 at 02:06:56PM +0300, Jani Nikula wrote:
> > On Wed, 15 Sep 2021, Rodrigo Vivi  wrote:
> > > On Wed, Sep 15, 2021 at 04:53:35PM +0300, Jani Nikula wrote:
> > > > On Fri, 10 Sep 2021, Daniele Ceraolo Spurio 
> > > >  wrote:
> > > > > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.h 
> > > > > b/drivers/gpu/drm/i915/pxp/intel_pxp.h
> > > > > new file mode 100644
> > > > > index ..e87550fb9821
> > > > > --- /dev/null
> > > > > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.h
> > > > > @@ -0,0 +1,35 @@
> > > > > +/* SPDX-License-Identifier: MIT */
> > > > > +/*
> > > > > + * Copyright(c) 2020, Intel Corporation. All rights reserved.
> > > > > + */
> > > > > +
> > > > > +#ifndef __INTEL_PXP_H__
> > > > > +#define __INTEL_PXP_H__
> > > > > +
> > > > > +#include "gt/intel_gt_types.h"
> > > > 
> > > > I've been trying to promote the idea that we don't include headers from
> > > > headers, unless really necessary. It helps with build times by reducing
> > > > rebuilds due to changes, but more importantly, it helps with coming up
> > > > with abstractions that don't need to look at the guts of other
> > > > components.
> > > > 
> > > > The above include line pulls in 67 other includes. And it has to look at
> > > > the same files a *lot* more times to know not to include them again.
> > > > 
> > > > Maybe we need to start being more aggressive about hiding the
> > > > abstractions behind the interfaces and headers. Static inlines are
> > > > nothing but micro-optimizations that leak abstractions. Do we need
> > > > these?
> > > 
> > > Yeap, we have a few cases where this is already happening...
> > > 
> > > Should we start using the container_of more directly and avoid the 
> > > a_to_b()
> > > helpers?
> > > 
> > > Should we create the a_to_b() helpers only inside .c files like we have
> > > in a few other cases?
> > > 
> > > In this pxp case here it looks like using the container of directly is
> > > everywhere is better... is this your recommendation?
> > 
> > Either that, or make it a non-inline function that's actually
> > abstracted. Yes, it leads to a function call, but I'm really starting to
> > wonder about the costs of a function call vs. maintainability across the
> > board.
> 
> Alan, could you please address this? With that addressed and CI happy
> we will merge to the already created topic/pxp and do the proper
> pull requests.
> 
> if your change only touches this patch don't need to resend the whole
> series but just in-reply-to. But if changes everything to container-of
> please resend it entirely.
> 
> Thanks,
> Rodrigo.
> 

Yes - as you are aware, I have something ready to publish but it touches 
multiple patches (as function
get introduced and modified across multiple patches). The approach i am taking 
is to make them function
prototypes (except when CONFG_PXP is off as they are can be inline stubs). I 
just have more clean ups +
testing to do.

> > Static inlines considered harmful.
> > 
> > 
> > BR,
> > Jani.
> > 
> > 
> > > > > +#include "intel_pxp_types.h"
> > > > > +
> > > > > +static inline struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp)
> > > > > +{
> > > > > + return container_of(pxp, struct intel_gt, pxp);
> > > > > +}
> > > > 
> > > > I think it's questionable to claim the parameter is const, when you can
> > > > do:
> > > > 
> > > > const struct intel_pxp *const_pxp = something;
> > > > struct intel_pxp *pxp = _to_gt(const_pxp)->pxp;
> > > > 
> > > > BR,
> > > > Jani.
> > > > 
> > > > > +
> > > > > +static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
> > > > > +{
> > > > > + return pxp->ce;
> > > > > +}
> > > > > +
> > > > > +#ifdef CONFIG_DRM_I915_PXP
> > > > > +void intel_pxp_init(struct intel_pxp *pxp);
> > > > > +void intel_pxp_fini(struct intel_pxp *pxp);
> > > > > +#else
> > > > > +static inline void intel_pxp_init(struct intel_pxp *pxp)
> > > > > +{
> > > > > +}
> > > > > +
> > > > > +static inline void intel_pxp_fini(struct intel_pxp *pxp)
> > > > > +{
> > > > > +}
> > > > > +#endif
> > > > > +
> > > > > +#endif /* __INTEL_PXP_H__ */
> > > > > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_types.h 
> > > > > b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> > > > > new file mode 100644
> > > > > index ..bd12c520e60a
> > > > > --- /dev/null
> > > > > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> > > > > @@ -0,0 +1,15 @@
> > > > > +/* SPDX-License-Identifier: MIT */
> > > > > +/*
> > > > > + * Copyright(c) 2020, Intel Corporation. All rights reserved.
> > > > > + */
> > > > > +
> > > > > +#ifndef __INTEL_PXP_TYPES_H__
> > > > > +#define __INTEL_PXP_TYPES_H__
> > > > > +
> > > > > +struct intel_context;
> > > > > +
> > > > > +struct intel_pxp {
> > > > > + struct intel_context *ce;
> > > > > +};
> > > > > +
> > > > > +#endif /* __INTEL_PXP_TYPES_H__ */
> > > > 
> > > > -- 
> > > > Jani Nikula, Intel Open Source Graphics Center
> 

Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-09-16 Thread Tvrtko Ursulin



On 16/09/2021 15:30, Tvrtko Ursulin wrote:


On 16/09/2021 14:41, Maarten Lankhorst wrote:

Op 03-09-2021 om 12:48 schreef Tvrtko Ursulin:


On 03/09/2021 10:31, Maarten Lankhorst wrote:

Op 31-08-2021 om 12:29 schreef Tvrtko Ursulin:


On 31/08/2021 10:34, Maarten Lankhorst wrote:

Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin:


On 30/08/2021 13:09, Maarten Lankhorst wrote:
vma->obj and vma->resv are now never NULL, and some checks can 
be removed.


Is the direction here compatible with SVM / VM_BIND?



Yeah, it should be. The changes here make the obj->resv->lock the 
main lock, so it should at least simplify locking for VM_BIND.


Hm but what will vma->obj point to in case of SVM, when there is no 
GEM BO?


Probably to one of the bo's in i915_vm, or a dummy bo that least 
shares the vm_resv object, similar to the aliasing gtt handling.


As a long term or short term solution? Worried that would waste a lot 
of SLAB space just for convenience (whole struct drm_i915_gem_object 
just to store a single pointer to a dma_resv object, if I got that 
right), while it should be possible to come up with a cleaner design.


Even for the upcoming page granularity work we will need multiple 
VMAs point to single GEM bo in ppgtt and that, when SVM is 
considered, could for instance mean that VMAs should instead be 
backed by some new backing store objects, which in turn may (or may 
not) point to GEM BOs.


Regards,

Tvrtko


We could revisit this if it's required for SVM, since we can always 
optimize that code later, I don't think it's a problem to remove it 
for now, especially since it's a lot easier if VMA becomes a pointer 
to a memory slab for an object only, without its own lifetime rules. :)


Not sure what you meant with "pointer to memory slab for an object"?

But on the high level, what worries me is whether the direction is not 
wrong. Sure you can change it all again later, but if we are moving 
towards the world where VMAs are fundamentally and predominantly *not* 
backed by GEM buffer objects, then I have to ask the question whether 
this plan of rewriting everything twice is the most efficient one.


Maybe its not that scary, not sure, but again, all I see is a large-ish 
series which implements some very important functionality, and _seems_ 
to rely on what I think is a design direction incompatible with where I 
thought we needed to go.


I suppose all I can do is ask you to verify this direction with Daniel. 
Maybe you already have but I did not see it in public at least. So 
adding him to CC.


Okay I reminded myself of how the SVM is implemented and perhaps it is 
not a concern. It seems that it doesn't use the VMA for more than a 
temporary vehicle during PTE setup stage.


And for page granularity paths over legacy binding I think it should 
also be fine since, as you say, all VMAs can and should point to the 
same obj.


Regards,

Tvrtko


Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-09-16 Thread Tvrtko Ursulin



On 16/09/2021 14:41, Maarten Lankhorst wrote:

Op 03-09-2021 om 12:48 schreef Tvrtko Ursulin:


On 03/09/2021 10:31, Maarten Lankhorst wrote:

Op 31-08-2021 om 12:29 schreef Tvrtko Ursulin:


On 31/08/2021 10:34, Maarten Lankhorst wrote:

Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin:


On 30/08/2021 13:09, Maarten Lankhorst wrote:

vma->obj and vma->resv are now never NULL, and some checks can be removed.


Is the direction here compatible with SVM / VM_BIND?



Yeah, it should be. The changes here make the obj->resv->lock the main lock, so 
it should at least simplify locking for VM_BIND.


Hm but what will vma->obj point to in case of SVM, when there is no GEM BO?


Probably to one of the bo's in i915_vm, or a dummy bo that least shares the 
vm_resv object, similar to the aliasing gtt handling.


As a long term or short term solution? Worried that would waste a lot of SLAB 
space just for convenience (whole struct drm_i915_gem_object just to store a 
single pointer to a dma_resv object, if I got that right), while it should be 
possible to come up with a cleaner design.

Even for the upcoming page granularity work we will need multiple VMAs point to 
single GEM bo in ppgtt and that, when SVM is considered, could for instance 
mean that VMAs should instead be backed by some new backing store objects, 
which in turn may (or may not) point to GEM BOs.

Regards,

Tvrtko


We could revisit this if it's required for SVM, since we can always optimize 
that code later, I don't think it's a problem to remove it for now, especially 
since it's a lot easier if VMA becomes a pointer to a memory slab for an object 
only, without its own lifetime rules. :)


Not sure what you meant with "pointer to memory slab for an object"?

But on the high level, what worries me is whether the direction is not 
wrong. Sure you can change it all again later, but if we are moving 
towards the world where VMAs are fundamentally and predominantly *not* 
backed by GEM buffer objects, then I have to ask the question whether 
this plan of rewriting everything twice is the most efficient one.


Maybe its not that scary, not sure, but again, all I see is a large-ish 
series which implements some very important functionality, and _seems_ 
to rely on what I think is a design direction incompatible with where I 
thought we needed to go.


I suppose all I can do is ask you to verify this direction with Daniel. 
Maybe you already have but I did not see it in public at least. So 
adding him to CC.


Regards,

Tvrtko


Re: [Intel-gfx] [PATCH] drm/i915/gt: Add "intel_" as prefix in set_mocs_index()

2021-09-16 Thread Matt Roper
On Thu, Sep 16, 2021 at 11:57:36AM +0530, Ayaz A Siddiqui wrote:
> Adding missing "intel_" prefix in set_mocs_index().
> 
> Fixes: b62aa57e3c78 ("drm/i915/gt: Add support of mocs propagation")
> Cc: Matt Roper 
> Signed-off-by: Ayaz A Siddiqui 

Thanks for fixing this up.

Reviewed-by: Matt Roper 

> ---
>  drivers/gpu/drm/i915/gt/intel_gt.c   | 2 +-
>  drivers/gpu/drm/i915/gt/intel_mocs.c | 2 +-
>  drivers/gpu/drm/i915/gt/intel_mocs.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c 
> b/drivers/gpu/drm/i915/gt/intel_gt.c
> index 55e87aff51d2..04b83c9578d5 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -682,7 +682,7 @@ int intel_gt_init(struct intel_gt *gt)
>   goto err_pm;
>   }
>  
> - set_mocs_index(gt);
> + intel_set_mocs_index(gt);
>  
>   err = intel_engines_init(gt);
>   if (err)
> diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.c 
> b/drivers/gpu/drm/i915/gt/intel_mocs.c
> index e4b97cd14cf9..15f9ada28a7a 100644
> --- a/drivers/gpu/drm/i915/gt/intel_mocs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_mocs.c
> @@ -616,7 +616,7 @@ static u32 global_mocs_offset(void)
>   return i915_mmio_reg_offset(GEN12_GLOBAL_MOCS(0));
>  }
>  
> -void set_mocs_index(struct intel_gt *gt)
> +void intel_set_mocs_index(struct intel_gt *gt)
>  {
>   struct drm_i915_mocs_table table;
>  
> diff --git a/drivers/gpu/drm/i915/gt/intel_mocs.h 
> b/drivers/gpu/drm/i915/gt/intel_mocs.h
> index 8a09d64b115f..76db827210c0 100644
> --- a/drivers/gpu/drm/i915/gt/intel_mocs.h
> +++ b/drivers/gpu/drm/i915/gt/intel_mocs.h
> @@ -36,6 +36,6 @@ struct intel_gt;
>  
>  void intel_mocs_init(struct intel_gt *gt);
>  void intel_mocs_init_engine(struct intel_engine_cs *engine);
> -void set_mocs_index(struct intel_gt *gt);
> +void intel_set_mocs_index(struct intel_gt *gt);
>  
>  #endif
> -- 
> 2.26.2
> 

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation
(916) 356-2795


[Intel-gfx] [PATCH] drm/i915/dsi: do not register gmbus if it was reserved for MIPI display

2021-09-16 Thread Lee Shawn C
Gmbus driver would setup all Intel i2c GMBuses. But DDC bus
may configured as gpio and reserved for MIPI driver to control
panel power on/off sequence.

Using i2c tool to communicate to peripherals via i2c interface
reversed for gmbus(DDC). There will be some high/low pulse
appear on DDC SCL and SDA (might be host sent out i2c slave
address). MIPI panel would be impacted due to unexpected signal
then caused abnormal display or shut down issue.

v2: gmbus driver should not add i2c adapter for DDC interface
if LFP display was configured to support MIPI panel.

Cc: Jani Nikula 
Cc: Vandita Kulkarni 
Cc: Cooper Chiou 
Cc: William Tseng 
Signed-off-by: Lee Shawn C 
---
 drivers/gpu/drm/i915/display/intel_gmbus.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_gmbus.c 
b/drivers/gpu/drm/i915/display/intel_gmbus.c
index ceb1bf8a8c3c..8d2dcc4a6a53 100644
--- a/drivers/gpu/drm/i915/display/intel_gmbus.c
+++ b/drivers/gpu/drm/i915/display/intel_gmbus.c
@@ -141,6 +141,22 @@ bool intel_gmbus_is_valid_pin(struct drm_i915_private 
*dev_priv,
return pin < size && get_gmbus_pin(dev_priv, pin)->name;
 }
 
+bool intel_gmbus_ddc_reserve_for_mipi(struct drm_i915_private *dev_priv,
+ unsigned int pin)
+{
+   enum port port;
+
+   if (intel_bios_is_dsi_present(dev_priv, )) {
+   if (DISPLAY_VER(dev_priv) >= 11) {
+   if ((pin == GMBUS_PIN_2_BXT && 
dev_priv->vbt.dsi.config->dual_link) ||
+pin == GMBUS_PIN_1_BXT)
+   return true;
+   }
+   }
+
+   return false;
+}
+
 /* Intel GPIO access functions */
 
 #define I2C_RISEFALL_TIME 10
@@ -862,6 +878,9 @@ int intel_gmbus_setup(struct drm_i915_private *dev_priv)
if (!intel_gmbus_is_valid_pin(dev_priv, pin))
continue;
 
+   if (intel_gmbus_ddc_reserve_for_mipi(dev_priv, pin))
+   continue;
+
bus = _priv->gmbus[pin];
 
bus->adapter.owner = THIS_MODULE;
-- 
2.17.1



Re: [Intel-gfx] [PATCH 9/9] drm/i915: Add privacy-screen support

2021-09-16 Thread Ville Syrjälä
On Thu, Sep 16, 2021 at 12:40:11PM +0300, Jani Nikula wrote:
> 
> Cc: Ville for input here, see question inline.
> 
> On Mon, 06 Sep 2021, Hans de Goede  wrote:
> > Add support for eDP panels with a built-in privacy screen using the
> > new drm_privacy_screen class.
> >
> > One thing which stands out here is the addition of these 2 lines to
> > intel_atomic_commit_tail:
> >
> > for_each_new_connector_in_state(>base, connector, ...
> > drm_connector_update_privacy_screen(connector, state);
> >
> > It may seem more logical to instead take care of updating the
> > privacy-screen state by marking the crtc as needing a modeset and then
> > do this in both the encoder update_pipe (for fast-sets) and enable
> > (for full modesets) callbacks. But ATM these callbacks only get passed
> > the new connector_state and these callbacks are all called after
> > drm_atomic_helper_swap_state() at which point there is no way to get
> > the old state from the new state.
> >
> > Without access to the old state, we do not know if the sw_state of
> > the privacy-screen has changes so we would need to call
> > drm_privacy_screen_set_sw_state() unconditionally. This is undesirable
> > since all current known privacy-screen providers use ACPI calls which
> > are somewhat expensive to make.
> >
> > Also, as all providers use ACPI calls, rather then poking GPU registers,
> > there is no need to order this together with other encoder operations.
> > Since no GPU poking is involved having this as a separate step of the
> > commit process actually is the logical thing to do.
> >
> > Reviewed-by: Emil Velikov 
> > Signed-off-by: Hans de Goede 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c |  5 +
> >  drivers/gpu/drm/i915/display/intel_dp.c  | 10 ++
> >  drivers/gpu/drm/i915/i915_pci.c  | 12 
> >  3 files changed, 27 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c 
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index 5560d2f4c352..7285873d329a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -10140,6 +10140,8 @@ static void intel_atomic_commit_tail(struct 
> > intel_atomic_state *state)
> > struct drm_device *dev = state->base.dev;
> > struct drm_i915_private *dev_priv = to_i915(dev);
> > struct intel_crtc_state *new_crtc_state, *old_crtc_state;
> > +   struct drm_connector_state *new_connector_state;
> > +   struct drm_connector *connector;
> > struct intel_crtc *crtc;
> > u64 put_domains[I915_MAX_PIPES] = {};
> > intel_wakeref_t wakeref = 0;
> > @@ -10237,6 +10239,9 @@ static void intel_atomic_commit_tail(struct 
> > intel_atomic_state *state)
> > intel_color_load_luts(new_crtc_state);
> > }
> >  
> > +   for_each_new_connector_in_state(>base, connector, 
> > new_connector_state, i)
> > +   drm_connector_update_privacy_screen(connector, >base);
> > +
> > /*
> >  * Now that the vblank has passed, we can go ahead and program the
> >  * optimal watermarks on platforms that need two-step watermark
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
> > b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 7f8e8865048f..3aa2072cccf6 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -37,6 +37,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >  #include 
> >  
> >  #include "g4x_dp.h"
> > @@ -5217,6 +5218,7 @@ static bool intel_edp_init_connector(struct intel_dp 
> > *intel_dp,
> > struct drm_connector *connector = _connector->base;
> > struct drm_display_mode *fixed_mode = NULL;
> > struct drm_display_mode *downclock_mode = NULL;
> > +   struct drm_privacy_screen *privacy_screen;
> > bool has_dpcd;
> > enum pipe pipe = INVALID_PIPE;
> > struct edid *edid;
> > @@ -5308,6 +5310,14 @@ static bool intel_edp_init_connector(struct intel_dp 
> > *intel_dp,
> > fixed_mode->hdisplay, fixed_mode->vdisplay);
> > }
> >  
> > +   privacy_screen = drm_privacy_screen_get(dev->dev, NULL);
> > +   if (!IS_ERR(privacy_screen)) {
> > +   drm_connector_attach_privacy_screen_provider(connector,
> > +privacy_screen);
> > +   } else if (PTR_ERR(privacy_screen) != -ENODEV) {
> > +   drm_warn(_priv->drm, "Error getting privacy-screen\n");
> > +   }
> > +
> > return true;
> >  
> >  out_vdd_off:
> > diff --git a/drivers/gpu/drm/i915/i915_pci.c 
> > b/drivers/gpu/drm/i915/i915_pci.c
> > index 146f7e39182a..d6913f567a1c 100644
> > --- a/drivers/gpu/drm/i915/i915_pci.c
> > +++ b/drivers/gpu/drm/i915/i915_pci.c
> > @@ -25,6 +25,7 @@
> >  #include 
> >  
> >  #include 
> > +#include 
> >  #include 
> >  
> >  #include "i915_drv.h"
> > @@ -1167,6 +1168,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const 
> 

Re: [Intel-gfx] [PATCH v9 04/17] drm/i915/pxp: allocate a vcs context for pxp usage

2021-09-16 Thread Rodrigo Vivi
On Thu, Sep 16, 2021 at 02:06:56PM +0300, Jani Nikula wrote:
> On Wed, 15 Sep 2021, Rodrigo Vivi  wrote:
> > On Wed, Sep 15, 2021 at 04:53:35PM +0300, Jani Nikula wrote:
> >> On Fri, 10 Sep 2021, Daniele Ceraolo Spurio 
> >>  wrote:
> >> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.h 
> >> > b/drivers/gpu/drm/i915/pxp/intel_pxp.h
> >> > new file mode 100644
> >> > index ..e87550fb9821
> >> > --- /dev/null
> >> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.h
> >> > @@ -0,0 +1,35 @@
> >> > +/* SPDX-License-Identifier: MIT */
> >> > +/*
> >> > + * Copyright(c) 2020, Intel Corporation. All rights reserved.
> >> > + */
> >> > +
> >> > +#ifndef __INTEL_PXP_H__
> >> > +#define __INTEL_PXP_H__
> >> > +
> >> > +#include "gt/intel_gt_types.h"
> >> 
> >> I've been trying to promote the idea that we don't include headers from
> >> headers, unless really necessary. It helps with build times by reducing
> >> rebuilds due to changes, but more importantly, it helps with coming up
> >> with abstractions that don't need to look at the guts of other
> >> components.
> >> 
> >> The above include line pulls in 67 other includes. And it has to look at
> >> the same files a *lot* more times to know not to include them again.
> >> 
> >> Maybe we need to start being more aggressive about hiding the
> >> abstractions behind the interfaces and headers. Static inlines are
> >> nothing but micro-optimizations that leak abstractions. Do we need
> >> these?
> >
> > Yeap, we have a few cases where this is already happening...
> >
> > Should we start using the container_of more directly and avoid the a_to_b()
> > helpers?
> >
> > Should we create the a_to_b() helpers only inside .c files like we have
> > in a few other cases?
> >
> > In this pxp case here it looks like using the container of directly is
> > everywhere is better... is this your recommendation?
> 
> Either that, or make it a non-inline function that's actually
> abstracted. Yes, it leads to a function call, but I'm really starting to
> wonder about the costs of a function call vs. maintainability across the
> board.

Alan, could you please address this? With that addressed and CI happy
we will merge to the already created topic/pxp and do the proper
pull requests.

if your change only touches this patch don't need to resend the whole
series but just in-reply-to. But if changes everything to container-of
please resend it entirely.

Thanks,
Rodrigo.

> 
> Static inlines considered harmful.
> 
> 
> BR,
> Jani.
> 
> 
> >
> >> 
> >> > +#include "intel_pxp_types.h"
> >> > +
> >> > +static inline struct intel_gt *pxp_to_gt(const struct intel_pxp *pxp)
> >> > +{
> >> > +return container_of(pxp, struct intel_gt, pxp);
> >> > +}
> >> 
> >> I think it's questionable to claim the parameter is const, when you can
> >> do:
> >> 
> >>const struct intel_pxp *const_pxp = something;
> >>struct intel_pxp *pxp = _to_gt(const_pxp)->pxp;
> >> 
> >> BR,
> >> Jani.
> >> 
> >> > +
> >> > +static inline bool intel_pxp_is_enabled(const struct intel_pxp *pxp)
> >> > +{
> >> > +return pxp->ce;
> >> > +}
> >> > +
> >> > +#ifdef CONFIG_DRM_I915_PXP
> >> > +void intel_pxp_init(struct intel_pxp *pxp);
> >> > +void intel_pxp_fini(struct intel_pxp *pxp);
> >> > +#else
> >> > +static inline void intel_pxp_init(struct intel_pxp *pxp)
> >> > +{
> >> > +}
> >> > +
> >> > +static inline void intel_pxp_fini(struct intel_pxp *pxp)
> >> > +{
> >> > +}
> >> > +#endif
> >> > +
> >> > +#endif /* __INTEL_PXP_H__ */
> >> > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_types.h 
> >> > b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> >> > new file mode 100644
> >> > index ..bd12c520e60a
> >> > --- /dev/null
> >> > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_types.h
> >> > @@ -0,0 +1,15 @@
> >> > +/* SPDX-License-Identifier: MIT */
> >> > +/*
> >> > + * Copyright(c) 2020, Intel Corporation. All rights reserved.
> >> > + */
> >> > +
> >> > +#ifndef __INTEL_PXP_TYPES_H__
> >> > +#define __INTEL_PXP_TYPES_H__
> >> > +
> >> > +struct intel_context;
> >> > +
> >> > +struct intel_pxp {
> >> > +struct intel_context *ce;
> >> > +};
> >> > +
> >> > +#endif /* __INTEL_PXP_TYPES_H__ */
> >> 
> >> -- 
> >> Jani Nikula, Intel Open Source Graphics Center
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH v9 12/17] drm/i915/pxp: Enable PXP power management

2021-09-16 Thread Rodrigo Vivi
On Wed, Sep 15, 2021 at 11:23:45AM -0400, Rodrigo Vivi wrote:
> On Wed, Sep 15, 2021 at 08:11:54AM -0700, Daniele Ceraolo Spurio wrote:
> > 
> > 
> > On 9/14/2021 12:13 PM, Rodrigo Vivi wrote:
> > > On Fri, Sep 10, 2021 at 08:36:22AM -0700, Daniele Ceraolo Spurio wrote:
> > > > From: "Huang, Sean Z" 
> > > > 
> > > > During the power event S3+ sleep/resume, hardware will lose all the
> > > > encryption keys for every hardware session, even though the
> > > > session state might still be marked as alive after resume. Therefore,
> > > > we should consider the session as dead on suspend and invalidate all the
> > > > objects. The session will be automatically restarted on the first
> > > > protected submission on resume.
> > > > 
> > > > v2: runtime suspend also invalidates the keys
> > > > v3: fix return codes, simplify rpm ops (Chris), use the new worker func
> > > > v4: invalidate the objects on suspend, don't re-create the arb sesson on
> > > > resume (delayed to first submission).
> > > > v5: move irq changes back to irq patch (Rodrigo)
> > > > v6: drop invalidation in runtime suspend (Rodrigo)
> > > > 
> > > > Signed-off-by: Huang, Sean Z 
> > > > Signed-off-by: Daniele Ceraolo Spurio 
> > > > Cc: Chris Wilson 
> > > > Cc: Rodrigo Vivi 
> > > ops, I had missed this patch. Sorry
> > > and thanks Alan for the ping.
> > > 
> > > > ---
> > > >   drivers/gpu/drm/i915/Makefile|  1 +
> > > >   drivers/gpu/drm/i915/gt/intel_gt_pm.c| 15 ++-
> > > >   drivers/gpu/drm/i915/i915_drv.c  |  2 +
> > > >   drivers/gpu/drm/i915/pxp/intel_pxp_irq.c |  1 +
> > > >   drivers/gpu/drm/i915/pxp/intel_pxp_pm.c  | 46 
> > > >   drivers/gpu/drm/i915/pxp/intel_pxp_pm.h  | 23 ++
> > > >   drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 38 +++-
> > > >   drivers/gpu/drm/i915/pxp/intel_pxp_tee.c |  9 
> > > >   8 files changed, 124 insertions(+), 11 deletions(-)
> > > >   create mode 100644 drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
> > > >   create mode 100644 drivers/gpu/drm/i915/pxp/intel_pxp_pm.h
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/Makefile 
> > > > b/drivers/gpu/drm/i915/Makefile
> > > > index b22b8c195bb8..366e82cec44d 100644
> > > > --- a/drivers/gpu/drm/i915/Makefile
> > > > +++ b/drivers/gpu/drm/i915/Makefile
> > > > @@ -286,6 +286,7 @@ i915-$(CONFIG_DRM_I915_PXP) += \
> > > > pxp/intel_pxp.o \
> > > > pxp/intel_pxp_cmd.o \
> > > > pxp/intel_pxp_irq.o \
> > > > +   pxp/intel_pxp_pm.o \
> > > > pxp/intel_pxp_session.o \
> > > > pxp/intel_pxp_tee.o
> > > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c 
> > > > b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > > > index dea8e2479897..b47a8d8f1bb5 100644
> > > > --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > > > +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
> > > > @@ -18,6 +18,7 @@
> > > >   #include "intel_rc6.h"
> > > >   #include "intel_rps.h"
> > > >   #include "intel_wakeref.h"
> > > > +#include "pxp/intel_pxp_pm.h"
> > > >   static void user_forcewake(struct intel_gt *gt, bool suspend)
> > > >   {
> > > > @@ -262,6 +263,8 @@ int intel_gt_resume(struct intel_gt *gt)
> > > > intel_uc_resume(>uc);
> > > > +   intel_pxp_resume(>pxp);
> > > > +
> > > > user_forcewake(gt, false);
> > > >   out_fw:
> > > > @@ -296,6 +299,7 @@ void intel_gt_suspend_prepare(struct intel_gt *gt)
> > > > user_forcewake(gt, true);
> > > > wait_for_suspend(gt);
> > > > +   intel_pxp_suspend(>pxp, false);
> > > > intel_uc_suspend(>uc);
> > > >   }
> > > > @@ -346,6 +350,7 @@ void intel_gt_suspend_late(struct intel_gt *gt)
> > > >   void intel_gt_runtime_suspend(struct intel_gt *gt)
> > > >   {
> > > > +   intel_pxp_suspend(>pxp, true);
> > > We should actually remove this from here
> > 
> > No we shouldn't. The PXP suspend does other things in addition to the
> > invalidation (e.g. marking the ARB session as invalid) and those must be
> > performed, otherwise the SW state won't match the HW. That's why I added a
> > variable instead of dropping the call. Similar for the resume.
> 
> Why? We are blocking the runtime PM. This functions will never be called 
> anyway...

Daniele reminded me offline that there are cases where we might not have the 
active
context, hence the runtime_pm won't be blocked and we need to take care of the
pxp suspend and resume without needing to invalidate the context.

with that clarified:

Reviewed-by: Rodrigo Vivi 

> 
> > 
> > Daniele
> > 
> > > 
> > > > intel_uc_runtime_suspend(>uc);
> > > > GT_TRACE(gt, "\n");
> > > > @@ -353,11 +358,19 @@ void intel_gt_runtime_suspend(struct intel_gt *gt)
> > > >   int intel_gt_runtime_resume(struct intel_gt *gt)
> > > >   {
> > > > +   int ret;
> > > > +
> > > > GT_TRACE(gt, "\n");
> > > > intel_gt_init_swizzling(gt);
> > > > intel_ggtt_restore_fences(gt->ggtt);
> > > > -   return 

Re: [Intel-gfx] [PATCH 13/19] drm/i915: Take object lock in i915_ggtt_pin if ww is not set

2021-09-16 Thread Maarten Lankhorst
Op 08-09-2021 om 05:11 schreef Niranjana Vishwanathapura:
> On Mon, Aug 30, 2021 at 02:10:00PM +0200, Maarten Lankhorst wrote:
>> i915_vma_wait_for_bind needs the vma lock held, fix the caller.
>>
>
> Need an lock assert in i915_vma_wait_for_bind()?
>
> Niranjana 
Yeah, makes sense. I suppose changing dma_resv_get_excl_unlocked() to 
dma_resv_excl_fence() will work too. Will do that instead..


Re: [Intel-gfx] [PATCH 17/19] drm/i915: Add functions to set/get moving fence

2021-09-16 Thread Maarten Lankhorst
Op 08-09-2021 om 06:08 schreef Niranjana Vishwanathapura:
> On Mon, Aug 30, 2021 at 02:10:04PM +0200, Maarten Lankhorst wrote:
>> We want to get rid of i915_vma tracking to simplify the code and
>> lifetimes. Add a way to set/put the moving fence, in preparation for
>> removing the tracking.
>>
>> Signed-off-by: Maarten Lankhorst 
>> ---
>> drivers/gpu/drm/i915/gem/i915_gem_object.c | 15 +++
>> drivers/gpu/drm/i915/gem/i915_gem_object.h |  6 ++
>> 2 files changed, 21 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c 
>> b/drivers/gpu/drm/i915/gem/i915_gem_object.c
>> index 6fb9afb65034..dc0d2da297a0 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
>> @@ -32,6 +32,7 @@
>> #include "i915_gem_object.h"
>> #include "i915_memcpy.h"
>> #include "i915_trace.h"
>> +#include "i915_gem_ttm.h"
>>
>> static struct kmem_cache *slab_objects;
>>
>> @@ -674,6 +675,20 @@ static const struct drm_gem_object_funcs 
>> i915_gem_object_funcs = {
>> .export = i915_gem_prime_export,
>> };
>>
>> +struct dma_fence *
>> +i915_gem_object_get_moving_fence(struct drm_i915_gem_object *obj)
>> +{
>> +    return dma_fence_get(i915_gem_to_ttm(obj)->moving);
>> +}
>> +
>> +void  i915_gem_object_set_moving_fence(struct drm_i915_gem_object *obj,
>> +   struct dma_fence *fence)
>> +{
>> +    dma_fence_put(i915_gem_to_ttm(obj)->moving);
>> +
>> +    i915_gem_to_ttm(obj)->moving = dma_fence_get(fence);
>> +}
>
> When is i915_gem_object_set_moving_fence() called?
> I am not seeing it being called in this patch series. 

It's not called directly any more but it was in an earlier version; it could be 
removed but I kept it for now.

TTM will set ttm_bo->moving directly in the callbacks, could drop this function 
if you want.



Re: [Intel-gfx] [PATCH v3 08/12] drm/i915/ttm: add tt shmem backend

2021-09-16 Thread Thomas Hellström
On Wed, 2021-09-15 at 19:59 +0100, Matthew Auld wrote:
> For cached objects we can allocate our pages directly in shmem. This
> should make it possible(in a later patch) to utilise the existing
> i915-gem shrinker code for such objects. For now this is still
> disabled.
> 
> Signed-off-by: Matthew Auld 
> Cc: Thomas Hellström 
> Cc: Christian König 
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_object.h |   8 +
>  drivers/gpu/drm/i915/gem/i915_gem_shmem.c  |  14 +-
>  drivers/gpu/drm/i915/gem/i915_gem_ttm.c    | 217 ++-
> --
>  3 files changed, 209 insertions(+), 30 deletions(-)
> 
> 

...

>  }
> @@ -223,6 +349,10 @@ static bool i915_ttm_eviction_valuable(struct
> ttm_buffer_object *bo,
>  {
> struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
>  
> +   if (place->mem_type == TTM_PL_SYSTEM &&
> +   bo->ttm && bo->ttm->page_flags & I915_TTM_TT_SHMEM)
> +   return false;
> +


Should we use ttm_bo_pin() / ttm_bo_unpin() to remove the bo from the
TTM LRU lists when it's SHMEM populated, and change the above to a
GEM_BUG_ON()?


> /* Will do for now. Our pinned objects are still on TTM's LRU
> lists */
> return i915_gem_object_evictable(obj);
>  }
> @@ -316,9 +446,11 @@ static void
> i915_ttm_adjust_gem_after_move(struct drm_i915_gem_object *obj)
> i915_gem_object_set_cache_coherency(obj, cache_level);
>  }
>  
> -static void i915_ttm_purge(struct drm_i915_gem_object *obj)
> +static void i915_ttm_writeback(struct drm_i915_gem_object *obj)
>  {
> struct ttm_buffer_object *bo = i915_gem_to_ttm(obj);
> +   struct i915_ttm_tt *i915_tt =
> +   container_of(bo->ttm, typeof(*i915_tt), ttm);
> struct ttm_operation_ctx ctx = {
> .interruptible = true,
> .no_wait_gpu = false,
> @@ -326,18 +458,52 @@ static void i915_ttm_purge(struct
> drm_i915_gem_object *obj)
> struct ttm_placement place = {};
> int ret;
>  
> -   if (obj->mm.madv == __I915_MADV_PURGED)
> +   if (!bo->ttm || !(bo->ttm->page_flags & I915_TTM_TT_SHMEM))
> return;
>  
> -   /* TTM's purge interface. Note that we might be reentering.
> */
> +   i915_tt->backup = true;
> ret = ttm_bo_validate(bo, , );

It looks like writeback() becomes the backend's primary callback for
shrinking, although for the shmem backend, this is put_pages(), and the
writeback() callback is only called if needed to accelerate shmem's
transfer of pages to the swap cache. It appears like this will break
the shrinker reporting of shrunken pages?

Should we try to do the primary shrinking from the put_pages() callback
instead, like the shmem backend? Although we'd have to allow NULL pages
in put_pages() to account for evicted-to-shmem and adjust other
backends if necessary.



> -   if (!ret) {
> -   obj->write_domain = 0;
> -   obj->read_domains = 0;
> -   i915_ttm_adjust_gem_after_move(obj);
> -   i915_ttm_free_cached_io_st(obj);
> -   obj->mm.madv = __I915_MADV_PURGED;
> +   i915_tt->backup = false;
> +   if (ret)
> +   return;
> +
> +   __shmem_writeback(obj->base.size, i915_tt->filp->f_mapping);
> +}
> +




Re: [Intel-gfx] [PATCH 9/9] drm/i915: Add privacy-screen support

2021-09-16 Thread Ville Syrjälä
On Mon, Sep 06, 2021 at 09:35:19AM +0200, Hans de Goede wrote:
> Add support for eDP panels with a built-in privacy screen using the
> new drm_privacy_screen class.
> 
> One thing which stands out here is the addition of these 2 lines to
> intel_atomic_commit_tail:
> 
>   for_each_new_connector_in_state(>base, connector, ...
>   drm_connector_update_privacy_screen(connector, state);
> 
> It may seem more logical to instead take care of updating the
> privacy-screen state by marking the crtc as needing a modeset and then
> do this in both the encoder update_pipe (for fast-sets) and enable
> (for full modesets) callbacks. But ATM these callbacks only get passed
> the new connector_state and these callbacks are all called after
> drm_atomic_helper_swap_state() at which point there is no way to get
> the old state from the new state.

Pretty sure the full atomic state is plumbed all the way
down these days.

> 
> Without access to the old state, we do not know if the sw_state of
> the privacy-screen has changes so we would need to call
> drm_privacy_screen_set_sw_state() unconditionally. This is undesirable
> since all current known privacy-screen providers use ACPI calls which
> are somewhat expensive to make.

I doubt anyone is going to care about a bit of overhead for a modeset.
The usual rule is that a modeset doesn't skip anything. That way we
can be 100% sure we remeber to update everythinbg. For fastsets I guess
one could argue skipping it if not needed, but not sure even that is
warranted.

The current code you have in there is cettainly 110% dodgy. Since the
sw_state is stored in the connector state I presume it's at least
trying to be an atomic property, which means you shouldn't go poking
at it after the swap_state ever. swap_state just swaps the pointers
which is all that you need. So at least that part should get nuked.
The immutable hw_state I guess should get updated when we program the
actual hw.

-- 
Ville Syrjälä
Intel


Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-09-16 Thread Maarten Lankhorst
Op 03-09-2021 om 12:48 schreef Tvrtko Ursulin:
>
> On 03/09/2021 10:31, Maarten Lankhorst wrote:
>> Op 31-08-2021 om 12:29 schreef Tvrtko Ursulin:
>>>
>>> On 31/08/2021 10:34, Maarten Lankhorst wrote:
 Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin:
>
> On 30/08/2021 13:09, Maarten Lankhorst wrote:
>> vma->obj and vma->resv are now never NULL, and some checks can be 
>> removed.
>
> Is the direction here compatible with SVM / VM_BIND?


 Yeah, it should be. The changes here make the obj->resv->lock the main 
 lock, so it should at least simplify locking for VM_BIND.
>>>
>>> Hm but what will vma->obj point to in case of SVM, when there is no GEM BO?
>>
>> Probably to one of the bo's in i915_vm, or a dummy bo that least shares the 
>> vm_resv object, similar to the aliasing gtt handling.
>
> As a long term or short term solution? Worried that would waste a lot of SLAB 
> space just for convenience (whole struct drm_i915_gem_object just to store a 
> single pointer to a dma_resv object, if I got that right), while it should be 
> possible to come up with a cleaner design.
>
> Even for the upcoming page granularity work we will need multiple VMAs point 
> to single GEM bo in ppgtt and that, when SVM is considered, could for 
> instance mean that VMAs should instead be backed by some new backing store 
> objects, which in turn may (or may not) point to GEM BOs.
>
> Regards,
>
> Tvrtko

We could revisit this if it's required for SVM, since we can always optimize 
that code later, I don't think it's a problem to remove it for now, especially 
since it's a lot easier if VMA becomes a pointer to a memory slab for an object 
only, without its own lifetime rules. :)



[Intel-gfx] [PATCH RESEND v3 1/3] lib, stackdepot: check stackdepot handle before accessing slabs.

2021-09-16 Thread Imran Khan
stack_depot_save allocates slabs that will be used for storing
objects in future.If this slab allocation fails we may get to
a situation where space allocation for a new stack_record fails,
causing stack_depot_save to return 0 as handle.
If user of this handle ends up invoking stack_depot_fetch with
this handle value, current implementation of stack_depot_fetch
will end up using slab from wrong index.
To avoid this check handle value at the beginning.

Signed-off-by: Imran Khan 
Suggested-by: Vlastimil Babka 

Acked-by: Vlastimil Babka 
---
 lib/stackdepot.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 0a2e417f83cb..67439c082490 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -232,6 +232,9 @@ unsigned int stack_depot_fetch(depot_stack_handle_t handle,
struct stack_record *stack;
 
*entries = NULL;
+   if (!handle)
+   return 0;
+
if (parts.slabindex > depot_index) {
WARN(1, "slab index %d out of bounds (%d) for stack id %08x\n",
parts.slabindex, depot_index, handle);
-- 
2.30.2



[Intel-gfx] [PATCH RESEND v3 0/3] lib, stackdepot: check stackdepot handle before accessing slabs

2021-09-16 Thread Imran Khan
Changes in v3:
 - Fixed build error [1], due to missing EXPORT_SYMBOL_GPL in patch-3

[1] https://patchwork.freedesktop.org/series/94696/#rev2

Changes in v2:
 - Fixed compilation error [1] due to typo in patch-3 (stack_depot_print
   used in place of stack_depot_snprint)
   This compilation error appears with CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y
   and this was missed by my test config (x86_64_defconfig)

[1] https://patchwork.freedesktop.org/series/94696/

Original cover letter
--
This patch series consolidates the changes submitted and reviewed at [1]
and [2].
The patches at [1] and [2] were submitted separarely, but they have some
inter dependency (later patches were created on top of earlier ones).
As both sets are still under review, I have put them in a single
change set here, so that it can be reviewed/included together and also
to avoid automation build failures where git am fails because of absent
parent.

I have included Acked-by (from Vlastimil) and Reviewed-by (from Alexander)
tags obtained so far for these changes and have also addressed last review
comment from Vlastimil [3].

To summarize, the changes in this set are as follows:

PATCH-1: Checks validity of a stackdepot handle before proceeding
to access stackdepot slab/objects.

PATCH-2: Adds a helper in stackdepot, to allow users to print
stack entries just by specifying the stackdepot handle. It also
changes such users to use this new interface.   

PATCH-3: Adds a helper in stackdepot, to allow users to print
stack entries into buffers just by specifying the stackdepot handle and
destination buffer. It also changes such users to use this new interface.

[1] 
https://lore.kernel.org/lkml/20210902000154.1096484-1-imran.f.k...@oracle.com/
[2] 
https://lore.kernel.org/lkml/20210910141001.1622130-1-imran.f.k...@oracle.com/
[3] https://lore.kernel.org/lkml/ef0aa660-0cb6-dc21-f2ce-368b34f8a...@suse.cz/

Imran Khan (3):
  lib, stackdepot: check stackdepot handle before accessing slabs.
  lib, stackdepot: Add helper to print stack entries.
  lib, stackdepot: Add helper to print stack entries into buffer.

 drivers/gpu/drm/drm_dp_mst_topology.c   |  5 +--
 drivers/gpu/drm/drm_mm.c|  5 +--
 drivers/gpu/drm/i915/i915_vma.c |  5 +--
 drivers/gpu/drm/i915/intel_runtime_pm.c | 20 +++
 include/linux/stackdepot.h  |  5 +++
 lib/stackdepot.c| 46 +
 mm/kasan/report.c   | 15 ++--
 mm/page_owner.c | 18 +++---
 8 files changed, 67 insertions(+), 52 deletions(-)


base-commit: 70ced02f322fd5bde59e805e77b19c811950d165
-- 
2.30.2



[Intel-gfx] [PATCH RESEND v3 3/3] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-16 Thread Imran Khan
To print stack entries into a buffer, users of stackdepot,
first get a list of stack entries using stack_depot_fetch
and then print this list into a buffer using stack_trace_snprint.
Provide a helper in stackdepot for this purpose.
Also change above mentioned users to use this helper.

Signed-off-by: Imran Khan 
Suggested-by: Vlastimil Babka 

Acked-by: Vlastimil Babka 
---
 drivers/gpu/drm/drm_dp_mst_topology.c   |  5 +
 drivers/gpu/drm/drm_mm.c|  5 +
 drivers/gpu/drm/i915/i915_vma.c |  5 +
 drivers/gpu/drm/i915/intel_runtime_pm.c | 20 +---
 include/linux/stackdepot.h  |  3 +++
 lib/stackdepot.c| 25 +
 mm/page_owner.c |  5 +
 7 files changed, 37 insertions(+), 31 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c 
b/drivers/gpu/drm/drm_dp_mst_topology.c
index 86d13d6bc463..2d1adab9e360 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -1668,13 +1668,10 @@ __dump_topology_ref_history(struct 
drm_dp_mst_topology_ref_history *history,
for (i = 0; i < history->len; i++) {
const struct drm_dp_mst_topology_ref_entry *entry =
>entries[i];
-   ulong *entries;
-   uint nr_entries;
u64 ts_nsec = entry->ts_nsec;
u32 rem_nsec = do_div(ts_nsec, 10);
 
-   nr_entries = stack_depot_fetch(entry->backtrace, );
-   stack_trace_snprint(buf, PAGE_SIZE, entries, nr_entries, 4);
+   stack_depot_snprint(entry->backtrace, buf, PAGE_SIZE, 4);
 
drm_printf(, "  %d %ss (last at %5llu.%06u):\n%s",
   entry->count,
diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
index 93d48a6f04ab..7d1c578388d3 100644
--- a/drivers/gpu/drm/drm_mm.c
+++ b/drivers/gpu/drm/drm_mm.c
@@ -118,8 +118,6 @@ static noinline void save_stack(struct drm_mm_node *node)
 static void show_leaks(struct drm_mm *mm)
 {
struct drm_mm_node *node;
-   unsigned long *entries;
-   unsigned int nr_entries;
char *buf;
 
buf = kmalloc(BUFSZ, GFP_KERNEL);
@@ -133,8 +131,7 @@ static void show_leaks(struct drm_mm *mm)
continue;
}
 
-   nr_entries = stack_depot_fetch(node->stack, );
-   stack_trace_snprint(buf, BUFSZ, entries, nr_entries, 0);
+   stack_depot_snprint(node->stack, buf, BUFSZ, 0);
DRM_ERROR("node [%08llx + %08llx]: inserted at\n%s",
  node->start, node->size, buf);
}
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 4b7fc4647e46..f2d9ed375109 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -56,8 +56,6 @@ void i915_vma_free(struct i915_vma *vma)
 
 static void vma_print_allocator(struct i915_vma *vma, const char *reason)
 {
-   unsigned long *entries;
-   unsigned int nr_entries;
char buf[512];
 
if (!vma->node.stack) {
@@ -66,8 +64,7 @@ static void vma_print_allocator(struct i915_vma *vma, const 
char *reason)
return;
}
 
-   nr_entries = stack_depot_fetch(vma->node.stack, );
-   stack_trace_snprint(buf, sizeof(buf), entries, nr_entries, 0);
+   stack_depot_snprint(vma->node.stack, buf, sizeof(buf), 0);
DRM_DEBUG_DRIVER("vma.node [%08llx + %08llx] %s: inserted at %s\n",
 vma->node.start, vma->node.size, reason, buf);
 }
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c 
b/drivers/gpu/drm/i915/intel_runtime_pm.c
index eaf7688f517d..0d85f3c5c526 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -65,16 +65,6 @@ static noinline depot_stack_handle_t __save_depot_stack(void)
return stack_depot_save(entries, n, GFP_NOWAIT | __GFP_NOWARN);
 }
 
-static void __print_depot_stack(depot_stack_handle_t stack,
-   char *buf, int sz, int indent)
-{
-   unsigned long *entries;
-   unsigned int nr_entries;
-
-   nr_entries = stack_depot_fetch(stack, );
-   stack_trace_snprint(buf, sz, entries, nr_entries, indent);
-}
-
 static void init_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm)
 {
spin_lock_init(>debug.lock);
@@ -146,12 +136,12 @@ static void untrack_intel_runtime_pm_wakeref(struct 
intel_runtime_pm *rpm,
if (!buf)
return;
 
-   __print_depot_stack(stack, buf, PAGE_SIZE, 2);
+   stack_depot_snprint(stack, buf, PAGE_SIZE, 2);
DRM_DEBUG_DRIVER("wakeref %x from\n%s", stack, buf);
 
stack = READ_ONCE(rpm->debug.last_release);
if (stack) {
-   __print_depot_stack(stack, buf, PAGE_SIZE, 2);
+   

[Intel-gfx] [PATCH RESEND v3 2/3] lib, stackdepot: Add helper to print stack entries.

2021-09-16 Thread Imran Khan
To print a stack entries, users of stackdepot, first
use stack_depot_fetch to get a list of stack entries
and then use stack_trace_print to print this list.
Provide a helper in stackdepot to print stack entries
based on stackdepot handle.
Also change above mentioned users to use this helper.

Signed-off-by: Imran Khan 
Suggested-by: Vlastimil Babka 

Acked-by: Vlastimil Babka 
Reviewed-by: Alexander Potapenko 
---
 include/linux/stackdepot.h |  2 ++
 lib/stackdepot.c   | 18 ++
 mm/kasan/report.c  | 15 +++
 mm/page_owner.c| 13 -
 4 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/include/linux/stackdepot.h b/include/linux/stackdepot.h
index 6bb4bc1a5f54..d77a30543dd4 100644
--- a/include/linux/stackdepot.h
+++ b/include/linux/stackdepot.h
@@ -19,6 +19,8 @@ depot_stack_handle_t stack_depot_save(unsigned long *entries,
 unsigned int stack_depot_fetch(depot_stack_handle_t handle,
   unsigned long **entries);
 
+void stack_depot_print(depot_stack_handle_t stack);
+
 unsigned int filter_irq_stacks(unsigned long *entries, unsigned int 
nr_entries);
 
 #ifdef CONFIG_STACKDEPOT
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 67439c082490..354fe1b62017 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -214,6 +214,24 @@ static inline struct stack_record *find_stack(struct 
stack_record *bucket,
return NULL;
 }
 
+/**
+ * stack_depot_print - print stack entries from a depot
+ *
+ * @stack: Stack depot handle which was returned from
+ * stack_depot_save().
+ *
+ */
+void stack_depot_print(depot_stack_handle_t stack)
+{
+   unsigned long *entries;
+   unsigned int nr_entries;
+
+   nr_entries = stack_depot_fetch(stack, );
+   if (nr_entries > 0)
+   stack_trace_print(entries, nr_entries, 0);
+}
+EXPORT_SYMBOL_GPL(stack_depot_print);
+
 /**
  * stack_depot_fetch - Fetch stack entries from a depot
  *
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 884a950c7026..3239fd8f8747 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -132,20 +132,11 @@ static void end_report(unsigned long *flags, unsigned 
long addr)
kasan_enable_current();
 }
 
-static void print_stack(depot_stack_handle_t stack)
-{
-   unsigned long *entries;
-   unsigned int nr_entries;
-
-   nr_entries = stack_depot_fetch(stack, );
-   stack_trace_print(entries, nr_entries, 0);
-}
-
 static void print_track(struct kasan_track *track, const char *prefix)
 {
pr_err("%s by task %u:\n", prefix, track->pid);
if (track->stack) {
-   print_stack(track->stack);
+   stack_depot_print(track->stack);
} else {
pr_err("(stack is not available)\n");
}
@@ -214,12 +205,12 @@ static void describe_object_stacks(struct kmem_cache 
*cache, void *object,
return;
if (alloc_meta->aux_stack[0]) {
pr_err("Last potentially related work creation:\n");
-   print_stack(alloc_meta->aux_stack[0]);
+   stack_depot_print(alloc_meta->aux_stack[0]);
pr_err("\n");
}
if (alloc_meta->aux_stack[1]) {
pr_err("Second to last potentially related work creation:\n");
-   print_stack(alloc_meta->aux_stack[1]);
+   stack_depot_print(alloc_meta->aux_stack[1]);
pr_err("\n");
}
 #endif
diff --git a/mm/page_owner.c b/mm/page_owner.c
index d24ed221357c..7918770c2b2b 100644
--- a/mm/page_owner.c
+++ b/mm/page_owner.c
@@ -394,8 +394,6 @@ void __dump_page_owner(const struct page *page)
struct page_ext *page_ext = lookup_page_ext(page);
struct page_owner *page_owner;
depot_stack_handle_t handle;
-   unsigned long *entries;
-   unsigned int nr_entries;
gfp_t gfp_mask;
int mt;
 
@@ -423,20 +421,17 @@ void __dump_page_owner(const struct page *page)
 page_owner->pid, page_owner->ts_nsec, 
page_owner->free_ts_nsec);
 
handle = READ_ONCE(page_owner->handle);
-   if (!handle) {
+   if (!handle)
pr_alert("page_owner allocation stack trace missing\n");
-   } else {
-   nr_entries = stack_depot_fetch(handle, );
-   stack_trace_print(entries, nr_entries, 0);
-   }
+   else
+   stack_depot_print(handle);
 
handle = READ_ONCE(page_owner->free_handle);
if (!handle) {
pr_alert("page_owner free stack trace missing\n");
} else {
-   nr_entries = stack_depot_fetch(handle, );
pr_alert("page last free stack trace:\n");
-   stack_trace_print(entries, nr_entries, 0);
+   stack_depot_print(handle);
}
 
if (page_owner->last_migrate_reason != -1)
-- 
2.30.2



Re: [Intel-gfx] [PATCH 01/19] drm/i915: Move __i915_gem_free_object to ttm_bo_destroy

2021-09-16 Thread Maarten Lankhorst
Op 16-09-2021 om 11:43 schreef Thomas Hellström (Intel):
>
> On 8/30/21 2:09 PM, Maarten Lankhorst wrote:
>> When we implement delayed destroy, we may have a second
>> call to the delete_mem_notify() handler, while free_object()
>> only should be called once.
>>
>> Move it to bo->destroy(), to ensure it's only called once.
>> This fixes some weird memory corruption issues with delayed
>> destroy when async eviction is used.
>>
>> Signed-off-by: Maarten Lankhorst 
>
> Reviewed-by: Thomas Hellström 
>
> I wonder whether you could push this early with a Fixes: tag, perhaps. I 
> actually managed to hit this once without any vma- or async modifications, 
> but a bit curious how.
>
> Thanks,
>
> Thomas
>
I think I triggered that as well once when testing the series with no patch 
applied yet as base, but I wasn't sure a the time. Since that's 2 suspicious 
cases, I will push this now with a fixes tag.

Thanks & pushed,

Maarten



[Intel-gfx] [PULL] drm-intel-fixes

2021-09-16 Thread Jani Nikula


Hi Dave & Daniel -

Fixes for v5.15-rc2. Looks like our CI is currently unhealthy. It's a
wip, but these don't seem to make matters worse, so I think better get
them moving than holding on.


drm-intel-fixes-2021-09-16:
drm/i915 fixes for v5.15-rc2:
- Propagate DP link training error returns
- Use max link params for eDP 1.3 and earlier
- Build warning fixes
- Gem selftest fixes
- Ensure wakeref is held before hardware access

BR,
Jani.

The following changes since commit 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f:

  Linux 5.15-rc1 (2021-09-12 16:28:37 -0700)

are available in the Git repository at:

  git://anongit.freedesktop.org/drm/drm-intel tags/drm-intel-fixes-2021-09-16

for you to fetch changes up to 7889367d7795b3b1766e33ac1ae8a5fbc292108b:

  drm/i915: Enable -Wsometimes-uninitialized (2021-09-14 19:48:30 +0300)


drm/i915 fixes for v5.15-rc2:
- Propagate DP link training error returns
- Use max link params for eDP 1.3 and earlier
- Build warning fixes
- Gem selftest fixes
- Ensure wakeref is held before hardware access


Daniel Vetter (1):
  drm/i915: Release ctx->syncobj on final put, not on ctx close

Daniele Ceraolo Spurio (1):
  drm/i915/guc: drop guc_communication_enabled

Kai-Heng Feng (1):
  drm/i915/dp: Use max params for panels < eDP 1.4

Lee Shawn C (1):
  drm/i915/dp: return proper DPRX link training result

Nathan Chancellor (3):
  drm/i915/selftests: Do not use import_obj uninitialized
  drm/i915/selftests: Always initialize err in 
igt_dmabuf_import_same_driver_lmem()
  drm/i915: Enable -Wsometimes-uninitialized

Thomas Hellström (1):
  drm/i915/gem: Fix the mman selftest

Vinay Belgaumkar (1):
  drm/i915: Get PM ref before accessing HW register

 drivers/gpu/drm/i915/Makefile  |  1 -
 drivers/gpu/drm/i915/display/intel_dp.c|  5 -
 .../gpu/drm/i915/display/intel_dp_link_training.c  |  2 +-
 drivers/gpu/drm/i915/gem/i915_gem_context.c|  6 ++---
 .../gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c   |  7 +++---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 26 +-
 drivers/gpu/drm/i915/gt/intel_rps.c|  8 ++-
 drivers/gpu/drm/i915/gt/uc/intel_uc.c  | 11 +++--
 8 files changed, 42 insertions(+), 24 deletions(-)

-- 
Jani Nikula, Intel Open Source Graphics Center


Re: [Intel-gfx] [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-16 Thread Peter Zijlstra
On Thu, Sep 16, 2021 at 03:00:39PM +0200, Maarten Lankhorst wrote:

> > For merge logistics, can we pls have a stable branch? I expect that the
> > i915 patches will be ready for 5.16.
> >
> > Or send it in for -rc2 so that the interface change doesn't cause needless
> > conflicts, whatever you think is best.

> Yeah, some central branch drm could pull from, would make upstreaming patches 
> that depends on it easier. :)

I think I'll make tip/locking/wwmutex and include that in
tip/locking/core, let me have a poke.


Re: [Intel-gfx] [PATCH 01/16] Revert "drm/i915/display: Disable audio, DRRS and PSR before planes"

2021-09-16 Thread Ville Syrjälä
On Wed, Sep 15, 2021 at 08:19:41PM +, Souza, Jose wrote:
> On Wed, 2021-09-15 at 15:30 +0300, Ville Syrjälä wrote:
> > On Wed, Sep 15, 2021 at 12:00:28AM +, Souza, Jose wrote:
> > > On Tue, 2021-09-14 at 16:30 -0700, José Roberto de Souza wrote:
> > > > On Tue, 2021-09-14 at 11:20 +0300, Ville Syrjälä wrote:
> > > > > On Mon, Sep 13, 2021 at 04:28:35PM +, Souza, Jose wrote:
> > > > > > On Mon, 2021-09-13 at 17:44 +0300, Ville Syrjala wrote:
> > > > > > > From: Ville Syrjälä 
> > > > > > > 
> > > > > > > Disabling planes in the middle of the modeset seuqnece does not 
> > > > > > > make
> > > > > > > sense since userspace can anyway disable planes before the modeset
> > > > > > > even starts. So when the modeset seuqence starts the set of 
> > > > > > > enabled
> > > > > > > planes is entirely arbitrary. Trying to sprinkle the plane 
> > > > > > > disabling
> > > > > > > into the modeset sequence just means more randomness and potential
> > > > > > > for hard to reproduce bugs.
> > > > > > 
> > > > > > The patch being reverted did not changed anything about plane, it 
> > > > > > only disables audio and PSR before pipe is disabled in this case.
> > > > > 
> > > > > The commit message only talks about planes. Also we already disable
> > > > > the pipe in the post_disable hook, so PSR/audio was always disabled
> > > > > before the pipe IIRC.
> > > > 
> > > > That is true, my bad.
> > > > 
> > > > Reviewed-by: José Roberto de Souza 
> > > 
> > > Sorry I missed the intel_crtc_disable_planes() call, so here is the 
> > > problem:
> > > 
> > > 
> > > intel_commit_modeset_disables()
> > >   intel_old_crtc_state_disables()
> > >   intel_crtc_disable_planes()
> > >   intel_disable_plane()
> > >   dev_priv->display.crtc_disable(state, crtc)/hsw_crtc_disable()
> > >   intel_encoders_disable()
> > >   encoder->disable()/intel_disable_ddi()
> > >   intel_psr_disable()
> > >   intel_encoders_post_disable()
> > >   post_disable/intel_ddi_post_disable()
> > >   intel_disable_pipe()
> > > 
> > > So all the planes are disabled while PSR is still on, that is why this 
> > > patch fixed the underrun.
> > > 
> > > We need to call the pre_disable() before intel_crtc_disable_planes() and 
> > > for the case where pipe is not disabled but all of its planes are requires
> > > the pending patch that I have.
> > > 
> > > Or do you have other suggestion?
> > 
> > I would like to follow the same sequence always, ie. disable planes
> > first (be it from userspace or from the kernel just before the modeset),
> > and then we take the exact same measures in both cases to deal with
> > whatever is the problem with PSR vs. disabled planes. That makes the
> > sequence as deterministic as possible, and thus we avoid potential
> > weird bugs stemming from userspace behaviour wrt. disabling planes.
> > 
> > Hmm. Our modeset plane disable code is certainly a bit lackluster.
> > It misses a bunch of stuff that we do for normal plane updates.
> > So we might want to put a few extra things in there. Maybe PSR
> > needs the vblank_get+psr_idle trick? And we might want a
> > vrr_push/etc. in there as well, not sure.
> > 
> > What exactly is your solution to the case where the planes are
> > already disabled by userspace?
> 
> https://github.com/zehortigoza/linux/commit/013478a67e0b96abbaf6ab2d1b4be324b0fe737b

That's not going to work correctly. You can't depend on
connectors being part of the state since that's not the case for
pure plane updates/etc.

In general I really dislike the PSR code's reliance on the
encoder/connector. Tht makes it really hard to do these sorts
of things. So I think we'd have to redesign it to try to
operate purely on the crtc and not need the encoder/connector.

> 
> Whole branch: 
> https://github.com/zehortigoza/linux/commits/upstream-psr2-sel-fetch-new
> 
> > 
> 

-- 
Ville Syrjälä
Intel


[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: zero fill vma name buffer (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915: zero fill vma name buffer (rev2)
URL   : https://patchwork.freedesktop.org/series/94708/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10596 -> Patchwork_21074


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21074 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21074, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21074:

### IGT changes ###

 Possible regressions 

  * igt@core_hotunplug@unbind-rebind:
- fi-rkl-guc: [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-rkl-guc/igt@core_hotunp...@unbind-rebind.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@i915_module_load@reload:
- {fi-tgl-dsi}:   [INCOMPLETE][3] ([i915#4130] / [i915#4136]) -> 
[INCOMPLETE][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-tgl-dsi/igt@i915_module_l...@reload.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-tgl-dsi/igt@i915_module_l...@reload.html
- {fi-ehl-2}: [INCOMPLETE][5] ([i915#4136]) -> [INCOMPLETE][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-ehl-2/igt@i915_module_l...@reload.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-ehl-2/igt@i915_module_l...@reload.html

  
Known issues


  Here are the changes found in Patchwork_21074 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@amdgpu/amd_basic@cs-gfx:
- fi-skl-6700k2:  NOTRUN -> [SKIP][7] ([fdo#109271]) +17 similar issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-skl-6700k2/igt@amdgpu/amd_ba...@cs-gfx.html

  * igt@amdgpu/amd_basic@cs-sdma:
- fi-cfl-8109u:   NOTRUN -> [SKIP][8] ([fdo#109271]) +17 similar issues
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-cfl-8109u/igt@amdgpu/amd_ba...@cs-sdma.html
- fi-kbl-7500u:   NOTRUN -> [SKIP][9] ([fdo#109271]) +17 similar issues
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-kbl-7500u/igt@amdgpu/amd_ba...@cs-sdma.html

  * igt@amdgpu/amd_cs_nop@sync-fork-gfx0:
- fi-cfl-8700k:   NOTRUN -> [SKIP][10] ([fdo#109271]) +17 similar issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-cfl-8700k/igt@amdgpu/amd_cs_...@sync-fork-gfx0.html

  * igt@core_hotunplug@unbind-rebind:
- fi-tgl-1115g4:  NOTRUN -> [INCOMPLETE][11] ([i915#4130])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-tgl-1115g4/igt@core_hotunp...@unbind-rebind.html
- fi-icl-u2:  [PASS][12] -> [INCOMPLETE][13] ([i915#4130])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-icl-u2/igt@core_hotunp...@unbind-rebind.html
- fi-kbl-7567u:   [PASS][14] -> [INCOMPLETE][15] ([i915#4130])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-kbl-7567u/igt@core_hotunp...@unbind-rebind.html

  * igt@gem_huc_copy@huc-copy:
- fi-tgl-1115g4:  NOTRUN -> [SKIP][16] ([i915#2190])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-tgl-1115g4/igt@gem_huc_c...@huc-copy.html

  * igt@i915_module_load@reload:
- fi-kbl-guc: [PASS][17] -> [INCOMPLETE][18] ([i915#4139])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-kbl-guc/igt@i915_module_l...@reload.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-kbl-guc/igt@i915_module_l...@reload.html
- fi-icl-y:   [PASS][19] -> [INCOMPLETE][20] ([i915#4130])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-icl-y/igt@i915_module_l...@reload.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-icl-y/igt@i915_module_l...@reload.html

  * igt@i915_pm_backlight@basic-brightness:
- fi-tgl-1115g4:  NOTRUN -> [SKIP][21] ([i915#1155])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21074/fi-tgl-1115g4/igt@i915_pm_backli...@basic-brightness.html

  * igt@kms_chamelium@common-hpd-after-suspend:
- fi-tgl-1115g4:  NOTRUN -> [SKIP][22] 

Re: [Intel-gfx] [PATCH 8/8] usb: typec: altmodes/displayport: Notify drm subsys of hotplug events

2021-09-16 Thread Hans de Goede
Hi,

On 9/16/21 5:20 AM, Stephen Boyd wrote:
> Quoting Hans de Goede (2021-08-17 14:52:01)
>> diff --git a/drivers/usb/typec/altmodes/displayport.c 
>> b/drivers/usb/typec/altmodes/displayport.c
>> index aa669b9cf70e..c1d8c23baa39 100644
>> --- a/drivers/usb/typec/altmodes/displayport.c
>> +++ b/drivers/usb/typec/altmodes/displayport.c
>> @@ -125,6 +129,7 @@ static int dp_altmode_configure(struct dp_altmode *dp, 
>> u8 con)
>>  static int dp_altmode_status_update(struct dp_altmode *dp)
>>  {
>> bool configured = !!DP_CONF_GET_PIN_ASSIGN(dp->data.conf);
>> +   bool hpd = !!(dp->data.status & DP_STATUS_HPD_STATE);
>> u8 con = DP_STATUS_CONNECTION(dp->data.status);
>> int ret = 0;
>>
>> @@ -137,6 +142,11 @@ static int dp_altmode_status_update(struct dp_altmode 
>> *dp)
>> ret = dp_altmode_configure(dp, con);
>> if (!ret)
>> dp->state = DP_STATE_CONFIGURE;
>> +   } else {
>> +   if (dp->hpd != hpd) {
>> +   
>> drm_connector_oob_hotplug_event(dp->connector_fwnode);
>> +   dp->hpd = hpd;
>> +   }
>> }
>>
>> return ret;
>> @@ -512,6 +522,7 @@ static const struct attribute_group dp_altmode_group = {
>>  int dp_altmode_probe(struct typec_altmode *alt)
>>  {
>> const struct typec_altmode *port = typec_altmode_get_partner(alt);
>> +   struct fwnode_handle *fwnode;
>> struct dp_altmode *dp;
>> int ret;
>>
>> @@ -540,6 +551,11 @@ int dp_altmode_probe(struct typec_altmode *alt)
>> alt->desc = "DisplayPort";
>> alt->ops = _altmode_ops;
>>
>> +   fwnode = dev_fwnode(alt->dev.parent->parent); /* typec_port fwnode */
>> +   dp->connector_fwnode = fwnode_find_reference(fwnode, "displayport", 
>> 0);
> 
> I'm trying to figure out how to translate this over to DT bindings.

First of all let me say that it is great that people are looking
into using this functionality outside of the niche application
for which I wrote it.

> Is
> there a binding document for this fwnode reference? If not, can you
> please update
> Documentation/devicetree/bindings/connector/usb-connector.yaml with this
> property?

My use case is some Intel Cherry Trail based mini-laptops which use a
Intel Whiskey Cove PMIC with a FUSB302 Type-C controller + a
PI3USB30532 USB switch, specifically the GPD Win and GPD Pocket
(first generation of each).

These are ACPI/X86 devices so devicetree is not used there, the
connector_fwnode checked here is actually sw_node, this sw_node
reference gets setup here:

drivers/platform/x86/intel/int33fe/intel_cht_int33fe_typec.c

The setup/use of a sw_node reference for this was actually
designed by Heikki (in the Cc already), so he might be a better
person to answer your questions.

With that said, as to your question if I can document this in
usb-connector.yaml, no I cannot (sorry). Since this is a sw_node
setup by X86 code and not a normal devicetree fwnode reference,
atm this is purely a kernel internal API/binding really and the
DT-binding maintainers have repeatedly told me that I should NOT
submit DT-binding updates for these. Only once a real devicetree
user for this shows up will the accept DT-bindings patches for this.

The good news here though is, that if this turns out to be
non-ideal for the devicetree case we can still change things
as long as drivers/platform/x86/intel/int33fe/intel_cht_int33fe_typec.c
also gets updated so as to not break things.

> I think this means that the type-c node would have a 'displayport =
> <_phandle>' property in it that points to the display port hardware
> device that's pumping out the DisplayPort data?

It points to a fwnode belonging to the drm-connector for the DisplayPort
connector/pins to which the Type-C data-lines mux/switch is connected, see:

https://cgit.freedesktop.org/drm-misc/commit/?id=48c429c6d18db115c277b75000152d8fa4cd35d0
https://cgit.freedesktop.org/drm-misc/commit/?id=3d3f7c1e68691574c1d87cd0f9f2348323bc0199
https://cgit.freedesktop.org/drm-intel/commit/?id=a481d0e80eabbc3fed666103744aeaf47f63e708

So this get working with devicetree you would need something like this:

1. Have devicetree-node-s describing video-output connectors, similar
to how we have usb-connector nodes to describe usb-connectors

2. Have your drm/kms driver lookup these video-output-connector of_node-s
and assign them to drm_connector.fwnode, at least for the DP video-output
used.

3. Have the usb-connector node for your Type-C connector (the same of_node
as which has the source-pdos, sink-pdos, etc props) have a 
'displayport = <_phandle>' property pointing to the of_node for
the DP video-output used.

I hope this helps.

> 
>> +   if (IS_ERR(dp->connector_fwnode))
>> +   dp->connector_fwnode = NULL;
>> +
>> typec_altmode_set_drvdata(alt, dp);
>>
>> dp->state = DP_STATE_ENTER;
>> @@ -555,6 +571,13 @@ void dp_altmode_remove(struct 

Re: [Intel-gfx] [PATCH v2 3/5] drm/i915/display: Workaround cursor left overs with PSR2 selective fetch enabled

2021-09-16 Thread Ville Syrjälä
On Wed, Sep 15, 2021 at 06:18:35PM +, Souza, Jose wrote:
> On Wed, 2021-09-15 at 17:58 +0300, Ville Syrjälä wrote:
> > On Tue, Sep 14, 2021 at 02:25:05PM -0700, José Roberto de Souza wrote:
> > > Not sure why but when moving the cursor fast it causes some artifacts
> > > of the cursor to be left in the cursor path, adding some pixels above
> > > the cursor to the damaged area fixes the issue, so leaving this as a
> > > workaround until proper fix is found.
> > 
> > Have you tried warping the cursor clear across the screen while
> > a partial update is already pending? I think it will go badly.
> 
> You mean move the cursor for example from 0x0 to 500x500 in one frame?
> It will mark as damaged the previous area and the new one.

Legacy cursor updates bypass all that stuff so you're not going to
updating the sel fetch area for the other planes.

> 
> > 
> > In fact I'm thinking the mailbox style legacy cursor updates are just
> > fundementally incompatible with partial updates since the cursor
> > can move outside of the already committed update region any time.
> > Ie. I suspect while the cursor is visible we simply can't do partial
> > updates.
> 
> Probably I did not understand what you want to say, but each cursor update 
> will be in one frame, updating the necessary area.

The legacy cursor uses mailbox updates so there is no 1:1 relationship
between actual scanned out frames and cursor ioctl calls. You can
have umpteen thousand cursor updates per frame.

> So I can't understand why it is incompatible.

Because all the other planes already got their selective fetch area
updated earlir, and now the cursor's new update area is something
totally different. Doesn't the total area need to computed to comprise
of a single crtc space rectangle essentially?

So we could start with something like:

sel fetch area
 |
 v
 
|    |
| | plane |  |
| |   |_ |
| _ ||
|   _   | plane ||
|  |_|  |___||
||   
^
|
cursor

Then the cursor moves before the hardware has even latched the previous
update:

old sel fetch area
 |
 v
 
|    |
| | plane |  |_
| |   |_ |   |_|
| _ ||^
|   | plane |||
|   |___||   cursor
||

-- 
Ville Syrjälä
Intel


Re: [Intel-gfx] [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-16 Thread Maarten Lankhorst
Op 14-09-2021 om 15:54 schreef Daniel Vetter:
> On Tue, Sep 14, 2021 at 02:43:02PM +0200, Maarten Lankhorst wrote:
>> Op 14-09-2021 om 08:50 schreef Peter Zijlstra:
>>> On Mon, Sep 13, 2021 at 10:42:36AM +0200, Maarten Lankhorst wrote:
>>>
> +/**
> + * ww_mutex_trylock - tries to acquire the w/w mutex with optional 
> acquire context
> + * @ww: mutex to lock
> + * @ww_ctx: optional w/w acquire context
> + *
> + * Trylocks a mutex with the optional acquire context; no deadlock 
> detection is
> + * possible. Returns 1 if the mutex has been acquired successfully, 0 
> otherwise.
> + *
> + * Unlike ww_mutex_lock, no deadlock handling is performed. However, if 
> a @ctx is
> + * specified, -EALREADY handling may happen in calls to ww_mutex_trylock.
> + *
> + * A mutex acquired with this function must be released with 
> ww_mutex_unlock.
> + */
> +int ww_mutex_trylock(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx)
> +{
> + if (!ww_ctx)
> + return mutex_trylock(>base);
> +
> + MUTEX_WARN_ON(ww->base.magic != >base);
> +
> + if (unlikely(ww_ctx == READ_ONCE(ww->ctx)))
> + return -EALREADY;
 I'm not 100% sure this is a good idea, because it would make the
 trylock weird.  For i915 I checked manually, because I didn't want to
 change the function signature. This is probably the other extreme.

 "if (ww_mutex_trylock())" would look correct, but actually be wrong
 and lead to double unlock without adjustments.  Maybe we could make a
 ww_mutex_trylock_ctx_err, which would return -EALREADY or -EBUSY on
 failure, and 0 on success?  We could keep ww_mutex_trylock without
 ctx, probably just #define as (!ww_mutex_trylock_ctx_err(lock, NULL))
>>> Urgh, yeah. Also, I suppose that if we already own it, we'll just fail
>>> the trylock anyway. Let me take this out.
>>>
> + /*
> +  * Reset the wounded flag after a kill. No other process can
> +  * race and wound us here, since they can't have a valid owner
> +  * pointer if we don't have any locks held.
> +  */
> + if (ww_ctx->acquired == 0)
> + ww_ctx->wounded = 0;
 Yeah I guess this needs fixing too. Not completely sure since trylock
 wouldn't do the whole ww dance, but since it's our first lock,
 probably best to do so regardless so other users don't trip over it.
>>> This is actually critical, because if this trylock is the first lock
>>> acquisition for the context, there won't be any other opportunity to
>>> reset this value.
>>>
> +
> + if (__mutex_trylock(>base)) {
> + ww_mutex_set_context_fastpath(ww, ww_ctx);
> + mutex_acquire_nest(>base.dep_map, 0, 1, _ctx->dep_map, 
> _RET_IP_);
> + return 1;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(ww_mutex_trylock);
>>> Updated version below...
>>>
>>> ---
>>> Subject: kernel/locking: Add context to ww_mutex_trylock()
>>> From: Maarten Lankhorst 
>>> Date: Thu, 9 Sep 2021 11:32:18 +0200
>>>
>>> From: Maarten Lankhorst 
>>>
>>> i915 will soon gain an eviction path that trylock a whole lot of locks
>>> for eviction, getting dmesg failures like below:
>>>
>>>   BUG: MAX_LOCK_DEPTH too low!
>>>   turning off the locking correctness validator.
>>>   depth: 48  max: 48!
>>>   48 locks held by i915_selftest/5776:
>>>#0: 888101a79240 (>mutex){}-{3:3}, at: 
>>> __driver_attach+0x88/0x160
>>>#1: c99778c0 (reservation_ww_class_acquire){+.+.}-{0:0}, at: 
>>> i915_vma_pin.constprop.63+0x39/0x1b0 [i915]
>>>#2: 88800cf74de8 (reservation_ww_class_mutex){+.+.}-{3:3}, at: 
>>> i915_vma_pin.constprop.63+0x5f/0x1b0 [i915]
>>>#3: 88810c7f9e38 (>mutex/1){+.+.}-{3:3}, at: 
>>> i915_vma_pin_ww+0x1c4/0x9d0 [i915]
>>>#4: 88810bad5768 (reservation_ww_class_mutex){+.+.}-{3:3}, at: 
>>> i915_gem_evict_something+0x110/0x860 [i915]
>>>#5: 88810bad60e8 (reservation_ww_class_mutex){+.+.}-{3:3}, at: 
>>> i915_gem_evict_something+0x110/0x860 [i915]
>>>   ...
>>>#46: 88811964d768 (reservation_ww_class_mutex){+.+.}-{3:3}, at: 
>>> i915_gem_evict_something+0x110/0x860 [i915]
>>>#47: 88811964e0e8 (reservation_ww_class_mutex){+.+.}-{3:3}, at: 
>>> i915_gem_evict_something+0x110/0x860 [i915]
>>>   INFO: lockdep is turned off.
>>>
>>> Fixing eviction to nest into ww_class_acquire is a high priority, but
>>> it requires a rework of the entire driver, which can only be done one
>>> step at a time.
>>>
>>> As an intermediate solution, add an acquire context to
>>> ww_mutex_trylock, which allows us to do proper nesting annotations on
>>> the trylocks, making the above lockdep splat disappear.
>>>
>>> This is also useful in regulator_lock_nested, which may avoid dropping
>>> regulator_nesting_mutex in the uncontended path, so use it there.
>>>
>>> TTM may be another user for this, where we could lock a buffer in a
>>> 

Re: [Intel-gfx] [PATCH v2 12/13] dt-bindings: msm/dp: Add bindings for HDCP registers

2021-09-16 Thread Rob Herring
On Wed, Sep 15, 2021 at 04:38:31PM -0400, Sean Paul wrote:
> From: Sean Paul 
> 
> This patch adds the bindings for the MSM DisplayPort HDCP registers
> which are required to write the HDCP key into the display controller as
> well as the registers to enable HDCP authentication/key
> exchange/encryption.
> 
> Cc: Rob Herring 
> Cc: Stephen Boyd 
> Signed-off-by: Sean Paul 
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-13-s...@poorly.run
>  #v1
> 
> Changes in v2:
> -Drop register range names (Stephen)
> -Fix yaml errors (Rob)
> ---
>  .../devicetree/bindings/display/msm/dp-controller.yaml | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml 
> b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml
> index 64d8d9e5e47a..80a55e9ff532 100644
> --- a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml
> +++ b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml
> @@ -19,7 +19,7 @@ properties:
>- qcom,sc7180-dp
>  
>reg:
> -maxItems: 1
> +maxItems: 3

You need to define what each entry is.

items:
  - description: ...
  - description: ...
  - description: ...

>  
>interrupts:
>  maxItems: 1
> @@ -99,8 +99,9 @@ examples:
>  #include 
>  
>  displayport-controller@ae9 {
> -compatible = "qcom,sc7180-dp";
> -reg = <0xae9 0x1400>;
> +reg = <0 0x0ae9 0 0x1400>,
> +  <0 0x0aed1000 0 0x174>,
> +  <0 0x0aee1000 0 0x2c>;
>  interrupt-parent = <>;
>  interrupts = <12>;
>  clocks = < DISP_CC_MDSS_AHB_CLK>,
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> 
> 


[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: zero fill vma name buffer (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915: zero fill vma name buffer (rev2)
URL   : https://patchwork.freedesktop.org/series/94708/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
129ca4e746b8 drm/i915: use strscpy() to avoid buffer overrun
-:11: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description 
(prefer a maximum 75 chars per line)
#11: 
4. fixed_size_dest: You might overrun the 16-character fixed-size string c->name

total: 0 errors, 1 warnings, 0 checks, 24 lines checked




[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [01/26] dma-buf: add dma_resv_for_each_fence_unlocked v2

2021-09-16 Thread Patchwork
== Series Details ==

Series: series starting with [01/26] dma-buf: add 
dma_resv_for_each_fence_unlocked v2
URL   : https://patchwork.freedesktop.org/series/94750/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10596 -> Patchwork_21073


Summary
---

  **FAILURE**

  Serious unknown changes coming with Patchwork_21073 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_21073, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/index.html

Possible new issues
---

  Here are the unknown changes that may have been introduced in Patchwork_21073:

### IGT changes ###

 Possible regressions 

  * igt@kms_force_connector_basic@force-connector-state:
- fi-kbl-7567u:   [PASS][1] -> [DMESG-WARN][2]
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-kbl-7567u/igt@kms_force_connector_ba...@force-connector-state.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-kbl-7567u/igt@kms_force_connector_ba...@force-connector-state.html
- fi-kbl-8809g:   [PASS][3] -> [DMESG-WARN][4]
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-kbl-8809g/igt@kms_force_connector_ba...@force-connector-state.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-kbl-8809g/igt@kms_force_connector_ba...@force-connector-state.html
- fi-kbl-guc: [PASS][5] -> [DMESG-WARN][6]
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-kbl-guc/igt@kms_force_connector_ba...@force-connector-state.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-kbl-guc/igt@kms_force_connector_ba...@force-connector-state.html

  * igt@runner@aborted:
- fi-rkl-11600:   NOTRUN -> [FAIL][7]
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-rkl-11600/igt@run...@aborted.html
- fi-bwr-2160:NOTRUN -> [FAIL][8]
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-bwr-2160/igt@run...@aborted.html

  
 Warnings 

  * igt@runner@aborted:
- fi-rkl-guc: [FAIL][9] ([i915#2426]) -> [FAIL][10]
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-rkl-guc/igt@run...@aborted.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-rkl-guc/igt@run...@aborted.html

  
 Suppressed 

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@runner@aborted:
- {fi-tgl-dsi}:   [FAIL][11] ([i915#2932] / [i915#3690]) -> [FAIL][12]
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/fi-tgl-dsi/igt@run...@aborted.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-tgl-dsi/igt@run...@aborted.html
- {fi-jsl-1}: NOTRUN -> [FAIL][13]
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-jsl-1/igt@run...@aborted.html

  
Known issues


  Here are the changes found in Patchwork_21073 that come from known issues:

### IGT changes ###

 Issues hit 

  * igt@runner@aborted:
- fi-pnv-d510:NOTRUN -> [FAIL][14] ([i915#2403])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-pnv-d510/igt@run...@aborted.html
- fi-cfl-8700k:   NOTRUN -> [FAIL][15] ([i915#3363] / [k.org#202107] / 
[k.org#202109])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-cfl-8700k/igt@run...@aborted.html
- fi-skl-6600u:   NOTRUN -> [FAIL][16] ([i915#3363])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-skl-6600u/igt@run...@aborted.html
- fi-cfl-8109u:   NOTRUN -> [FAIL][17] ([i915#3363] / [k.org#202107] / 
[k.org#202109])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-cfl-8109u/igt@run...@aborted.html
- fi-icl-u2:  NOTRUN -> [FAIL][18] ([i915#1569] / [i915#3363])
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-icl-u2/igt@run...@aborted.html
- fi-kbl-8809g:   NOTRUN -> [FAIL][19] ([i915#3363])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-kbl-8809g/igt@run...@aborted.html
- fi-kbl-r:   NOTRUN -> [FAIL][20] ([i915#1569] / [i915#192] / 
[i915#193] / [i915#194] / [i915#3363])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-kbl-r/igt@run...@aborted.html
- fi-kbl-7500u:   NOTRUN -> [FAIL][21] ([i915#1569] / [i915#192] / 
[i915#193] / [i915#194] / [i915#3363])
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21073/fi-kbl-7500u/igt@run...@aborted.html
- fi-kbl-guc: NOTRUN -> [FAIL][22] ([i915#3363])
   [22]: 

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/dsi: unregister gmbus if LFP display was MIPI panel

2021-09-16 Thread Patchwork
== Series Details ==

Series: drm/i915/dsi: unregister gmbus if LFP display was MIPI panel
URL   : https://patchwork.freedesktop.org/series/94733/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10596_full -> Patchwork_21071_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Known issues


  Here are the changes found in Patchwork_21071_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@feature_discovery@display-3x:
- shard-tglb: NOTRUN -> [SKIP][1] ([i915#1839])
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-tglb1/igt@feature_discov...@display-3x.html

  * igt@feature_discovery@psr2:
- shard-iclb: [PASS][2] -> [SKIP][3] ([i915#658])
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-iclb2/igt@feature_discov...@psr2.html
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-iclb1/igt@feature_discov...@psr2.html

  * igt@gem_eio@unwedge-stress:
- shard-tglb: [PASS][4] -> [TIMEOUT][5] ([i915#2369] / [i915#3063] 
/ [i915#3648])
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-tglb7/igt@gem_...@unwedge-stress.html
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-tglb6/igt@gem_...@unwedge-stress.html
- shard-iclb: [PASS][6] -> [TIMEOUT][7] ([i915#2369] / [i915#2481] 
/ [i915#3070])
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-iclb1/igt@gem_...@unwedge-stress.html
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-iclb1/igt@gem_...@unwedge-stress.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
- shard-iclb: [PASS][8] -> [FAIL][9] ([i915#2842]) +1 similar issue
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-iclb5/igt@gem_exec_fair@basic-none-sh...@rcs0.html
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-iclb4/igt@gem_exec_fair@basic-none-sh...@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
- shard-kbl:  [PASS][10] -> [FAIL][11] ([i915#2842]) +2 similar 
issues
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-kbl2/igt@gem_exec_fair@basic-n...@vcs0.html
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-kbl7/igt@gem_exec_fair@basic-n...@vcs0.html

  * igt@gem_exec_fair@basic-none@vcs1:
- shard-iclb: NOTRUN -> [FAIL][12] ([i915#2842])
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-iclb2/igt@gem_exec_fair@basic-n...@vcs1.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-tglb: NOTRUN -> [FAIL][13] ([i915#2842])
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-tglb5/igt@gem_exec_fair@basic-pace-sh...@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
- shard-tglb: [PASS][14] -> [FAIL][15] ([i915#2842])
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-tglb6/igt@gem_exec_fair@basic-p...@vcs0.html
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-tglb8/igt@gem_exec_fair@basic-p...@vcs0.html

  * igt@gem_exec_params@secure-non-master:
- shard-tglb: NOTRUN -> [SKIP][16] ([fdo#112283])
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-tglb1/igt@gem_exec_par...@secure-non-master.html

  * igt@gem_exec_suspend@basic-s3:
- shard-skl:  [PASS][17] -> [INCOMPLETE][18] ([i915#198])
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-skl4/igt@gem_exec_susp...@basic-s3.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-skl1/igt@gem_exec_susp...@basic-s3.html

  * igt@gem_render_copy@yf-tiled-mc-ccs-to-vebox-y-tiled:
- shard-iclb: NOTRUN -> [SKIP][19] ([i915#768])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-iclb6/igt@gem_render_c...@yf-tiled-mc-ccs-to-vebox-y-tiled.html

  * igt@gem_spin_batch@user-each:
- shard-skl:  [PASS][20] -> [FAIL][21] ([i915#2898])
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10596/shard-skl6/igt@gem_spin_ba...@user-each.html
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-skl5/igt@gem_spin_ba...@user-each.html

  * igt@gem_userptr_blits@dmabuf-sync:
- shard-kbl:  NOTRUN -> [SKIP][22] ([fdo#109271] / [i915#3323])
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-kbl1/igt@gem_userptr_bl...@dmabuf-sync.html
- shard-tglb: NOTRUN -> [SKIP][23] ([i915#3323])
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21071/shard-tglb1/igt@gem_userptr_bl...@dmabuf-sync.html

  * igt@gem_userptr_blits@unsync-unmap-after-close:
- shard-tglb: NOTRUN -> [SKIP][24] ([i915#3297]) +1 similar issue
   [24]: 

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/26] dma-buf: add dma_resv_for_each_fence_unlocked v2

2021-09-16 Thread Patchwork
== Series Details ==

Series: series starting with [01/26] dma-buf: add 
dma_resv_for_each_fence_unlocked v2
URL   : https://patchwork.freedesktop.org/series/94750/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
79becb99fccc dma-buf: add dma_resv_for_each_fence_unlocked v2
-:72: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#72: FILE: drivers/dma-buf/dma-resv.c:368:
+   fence = rcu_dereference(

-:134: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'obj' - possible 
side-effects?
#134: FILE: include/linux/dma-resv.h:183:
+#define dma_resv_for_each_fence_unlocked(obj, cursor, all_fences, fence)\
+   for (fence = dma_resv_walk_unlocked(obj, cursor, all_fences, true); \
+fence; dma_fence_put(fence),   \
+fence = dma_resv_walk_unlocked(obj, cursor, all_fences, false))

-:134: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'cursor' - possible 
side-effects?
#134: FILE: include/linux/dma-resv.h:183:
+#define dma_resv_for_each_fence_unlocked(obj, cursor, all_fences, fence)\
+   for (fence = dma_resv_walk_unlocked(obj, cursor, all_fences, true); \
+fence; dma_fence_put(fence),   \
+fence = dma_resv_walk_unlocked(obj, cursor, all_fences, false))

-:134: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'all_fences' - possible 
side-effects?
#134: FILE: include/linux/dma-resv.h:183:
+#define dma_resv_for_each_fence_unlocked(obj, cursor, all_fences, fence)\
+   for (fence = dma_resv_walk_unlocked(obj, cursor, all_fences, true); \
+fence; dma_fence_put(fence),   \
+fence = dma_resv_walk_unlocked(obj, cursor, all_fences, false))

-:134: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fence' - possible 
side-effects?
#134: FILE: include/linux/dma-resv.h:183:
+#define dma_resv_for_each_fence_unlocked(obj, cursor, all_fences, fence)\
+   for (fence = dma_resv_walk_unlocked(obj, cursor, all_fences, true); \
+fence; dma_fence_put(fence),   \
+fence = dma_resv_walk_unlocked(obj, cursor, all_fences, false))

-:162: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address 
mismatch: 'From: "Christian König" ' != 
'Signed-off-by: Christian König '

total: 0 errors, 1 warnings, 5 checks, 130 lines checked
43fd9d11fcd6 dma-buf: add dma_resv_for_each_fence
-:81: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'obj' - possible side-effects?
#81: FILE: include/linux/dma-resv.h:182:
+#define dma_resv_for_each_fence(obj, cursor, all_fences, fence)
  \
+   for (fence = dma_resv_walk(obj, cursor, all_fences, true); fence; \
+fence = dma_resv_walk(obj, cursor, all_fences, false))

-:81: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'cursor' - possible 
side-effects?
#81: FILE: include/linux/dma-resv.h:182:
+#define dma_resv_for_each_fence(obj, cursor, all_fences, fence)
  \
+   for (fence = dma_resv_walk(obj, cursor, all_fences, true); fence; \
+fence = dma_resv_walk(obj, cursor, all_fences, false))

-:81: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'all_fences' - possible 
side-effects?
#81: FILE: include/linux/dma-resv.h:182:
+#define dma_resv_for_each_fence(obj, cursor, all_fences, fence)
  \
+   for (fence = dma_resv_walk(obj, cursor, all_fences, true); fence; \
+fence = dma_resv_walk(obj, cursor, all_fences, false))

-:81: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fence' - possible 
side-effects?
#81: FILE: include/linux/dma-resv.h:182:
+#define dma_resv_for_each_fence(obj, cursor, all_fences, fence)
  \
+   for (fence = dma_resv_walk(obj, cursor, all_fences, true); fence; \
+fence = dma_resv_walk(obj, cursor, all_fences, false))

-:97: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address 
mismatch: 'From: "Christian König" ' != 
'Signed-off-by: Christian König '

total: 0 errors, 1 warnings, 4 checks, 73 lines checked
a8b725463938 dma-buf: use new iterator in dma_resv_copy_fences
-:124: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address 
mismatch: 'From: "Christian König" ' != 
'Signed-off-by: Christian König '

total: 0 errors, 1 warnings, 0 checks, 106 lines checked
20181be832c0 dma-buf: use new iterator in dma_resv_get_fences v2
-:156: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address 
mismatch: 'From: "Christian König" ' != 
'Signed-off-by: Christian König '

total: 0 errors, 1 warnings, 0 checks, 136 lines checked
d07cfed64ece dma-buf: use new iterator in dma_resv_wait_timeout
-:99: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address 
mismatch: 'From: "Christian König" ' != 
'Signed-off-by: Christian König '

total: 0 errors, 1 warnings, 0 checks, 81 lines checked
f26d368dba9c dma-buf: use new iterator in dma_resv_test_signaled
-:91: 

[Intel-gfx] [PATCH v2] drm/i915: use strscpy() to avoid buffer overrun

2021-09-16 Thread Tim Gardner
In capture_vma() Coverity complains of a possible buffer overrun. Even
though this is a static function where all call sites can be checked,
limiting the copy length could save some future grief.

CID 93300 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW)
4. fixed_size_dest: You might overrun the 16-character fixed-size string c->name
   by copying name without checking the length.
5. parameter_as_source: Note: This defect has an elevated risk because the
   source argument is a parameter of the current function.
1326strcpy(c->name, name);

Fix any possible overflows by using strscpy() which guarantees NULL termination.

Also correct 2 other strcpy() call sites with the same potential for Coverity
warnings or overruns.

v2 - Change $SUBJECT from "drm/i915: zero fill vma name buffer"
 Use strscpy() instead of strncpy(). Its a much simpler change.

Cc: Jani Nikula 
Cc: Joonas Lahtinen 
Cc: Rodrigo Vivi 
Cc: David Airlie 
Cc: Daniel Vetter 
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-de...@lists.freedesktop.org
Cc: linux-ker...@vger.kernel.org
Signed-off-by: Tim Gardner 
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c 
b/drivers/gpu/drm/i915/i915_gpu_error.c
index 9cf6ac575de1..7f246f51959d 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1015,7 +1015,7 @@ i915_vma_coredump_create(const struct intel_gt *gt,
return NULL;
}
 
-   strcpy(dst->name, name);
+   strscpy(dst->name, name, sizeof(dst->name));
dst->next = NULL;
 
dst->gtt_offset = vma->node.start;
@@ -1279,7 +1279,7 @@ static bool record_context(struct 
i915_gem_context_coredump *e,
rcu_read_lock();
task = pid_task(ctx->pid, PIDTYPE_PID);
if (task) {
-   strcpy(e->comm, task->comm);
+   strscpy(e->comm, task->comm, sizeof(e->comm));
e->pid = task->pid;
}
rcu_read_unlock();
@@ -1323,7 +1323,7 @@ capture_vma(struct intel_engine_capture_vma *next,
return next;
}
 
-   strcpy(c->name, name);
+   strscpy(c->name, name, sizeof(c->name));
c->vma = vma; /* reference held while active */
 
c->next = next;
-- 
2.33.0



Re: [Intel-gfx] [PATCH v2 12/13] dt-bindings: msm/dp: Add bindings for HDCP registers

2021-09-16 Thread Rob Herring
On Wed, 15 Sep 2021 16:38:31 -0400, Sean Paul wrote:
> From: Sean Paul 
> 
> This patch adds the bindings for the MSM DisplayPort HDCP registers
> which are required to write the HDCP key into the display controller as
> well as the registers to enable HDCP authentication/key
> exchange/encryption.
> 
> Cc: Rob Herring 
> Cc: Stephen Boyd 
> Signed-off-by: Sean Paul 
> Link: 
> https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-13-s...@poorly.run
>  #v1
> 
> Changes in v2:
> -Drop register range names (Stephen)
> -Fix yaml errors (Rob)
> ---
>  .../devicetree/bindings/display/msm/dp-controller.yaml | 7 ---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/msm/dp-controller.example.dt.yaml:
 example-0: displayport-controller@ae9:reg:0: [0, 183042048, 0, 5120] is 
too long
From schema: 
/usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/msm/dp-controller.example.dt.yaml:
 example-0: displayport-controller@ae9:reg:1: [0, 183308288, 0, 372] is too 
long
From schema: 
/usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/msm/dp-controller.example.dt.yaml:
 example-0: displayport-controller@ae9:reg:2: [0, 183373824, 0, 44] is too 
long
From schema: 
/usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1528559

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.



[Intel-gfx] ✗ Fi.CI.BUILD: failure for lib, stackdepot: check stackdepot handle before accessing slabs (rev2)

2021-09-16 Thread Patchwork
== Series Details ==

Series: lib, stackdepot: check stackdepot handle before accessing slabs (rev2)
URL   : https://patchwork.freedesktop.org/series/94696/
State : failure

== Summary ==

CALLscripts/checksyscalls.sh
  CALLscripts/atomic/check-atomics.sh
  DESCEND objtool
  CHK include/generated/compile.h
Kernel: arch/x86/boot/bzImage is ready  (#1)
  MODPOST modules-only.symvers
ERROR: modpost: "stack_depot_snprint" [drivers/gpu/drm/i915/i915.ko] undefined!
scripts/Makefile.modpost:134: recipe for target 'modules-only.symvers' failed
make[1]: *** [modules-only.symvers] Error 1
make[1]: *** Deleting file 'modules-only.symvers'
Makefile:1783: recipe for target 'modules' failed
make: *** [modules] Error 2




Re: [Intel-gfx] [PATCH 01/26] dma-buf: add dma_resv_for_each_fence_unlocked v2

2021-09-16 Thread Daniel Vetter
On Thu, Sep 16, 2021 at 01:30:17PM +0200, Christian König wrote:
> Abstract the complexity of iterating over all the fences
> in a dma_resv object.
> 
> The new loop handles the whole RCU and retry dance and
> returns only fences where we can be sure we grabbed the
> right one.
> 
> v2: fix accessing the shared fences while they might be freed,
> improve kerneldoc, rename _cursor to _iter, add
> dma_resv_iter_is_exclusive
> 
> Signed-off-by: Christian König 

Replied in the other thread with the fully typed out example, this really
needs iter_init/next/end here. Or it's just way too fragile and tricky for
a generic helper that we roll out everywhere.
-Daniel

> ---
>  drivers/dma-buf/dma-resv.c | 62 ++
>  include/linux/dma-resv.h   | 50 ++
>  2 files changed, 112 insertions(+)
> 
> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
> index 84fbe60629e3..77083170ec3b 100644
> --- a/drivers/dma-buf/dma-resv.c
> +++ b/drivers/dma-buf/dma-resv.c
> @@ -323,6 +323,68 @@ void dma_resv_add_excl_fence(struct dma_resv *obj, 
> struct dma_fence *fence)
>  }
>  EXPORT_SYMBOL(dma_resv_add_excl_fence);
>  
> +/**
> + * dma_resv_walk_unlocked - walk over fences in a dma_resv obj
> + * @obj: the dma_resv object
> + * @cursor: cursor to record the current position
> + * @all_fences: true returns also the shared fences
> + * @first: if we should start over
> + *
> + * Return all the fences in the dma_resv object which are not yet signaled.
> + * The returned fence has an extra local reference so will stay alive.
> + * If a concurrent modify is detected the whole iterator is started over 
> again.
> + */
> +struct dma_fence *dma_resv_walk_unlocked(struct dma_resv *obj,
> +  struct dma_resv_iter *cursor,
> +  bool all_fences, bool first)
> +{
> + struct dma_fence *fence = NULL;
> +
> + first |= read_seqcount_retry(>seq, cursor->seq);
> + do {
> + /* Drop the reference from the previous round */
> + dma_fence_put(fence);
> +
> + cursor->is_first = first;
> + if (first) {
> + cursor->seq = read_seqcount_begin(>seq);
> + cursor->index = -1;
> + cursor->fences = dma_resv_shared_list(obj);
> +
> + fence = dma_resv_excl_fence(obj);
> + if (fence && test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
> +   >flags))
> + fence = NULL;
> + } else {
> + fence = NULL;
> + }
> +
> + if (fence) {
> + fence = dma_fence_get_rcu(fence);
> + } else if (all_fences && cursor->fences) {
> + struct dma_resv_list *fences = cursor->fences;
> +
> + while (++cursor->index < fences->shared_count) {
> + fence = rcu_dereference(
> + fences->shared[cursor->index]);
> + if (!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
> +   >flags))
> + break;
> + }
> + if (cursor->index < fences->shared_count)
> + fence = dma_fence_get_rcu(fence);
> + else
> + fence = NULL;
> + }
> +
> + /* For the eventually next round */
> + first = true;
> + } while (read_seqcount_retry(>seq, cursor->seq));
> +
> + return fence;
> +}
> +EXPORT_SYMBOL_GPL(dma_resv_walk_unlocked);
> +
>  /**
>   * dma_resv_copy_fences - Copy all fences from src to dst.
>   * @dst: the destination reservation object
> diff --git a/include/linux/dma-resv.h b/include/linux/dma-resv.h
> index 9100dd3dc21f..1cd686384c71 100644
> --- a/include/linux/dma-resv.h
> +++ b/include/linux/dma-resv.h
> @@ -149,6 +149,53 @@ struct dma_resv {
>   struct dma_resv_list __rcu *fence;
>  };
>  
> +/**
> + * struct dma_resv_iter - current position into the dma_resv fences
> + *
> + * Don't touch this directly in the driver, use the accessor function 
> instead.
> + */
> +struct dma_resv_iter {
> + /** @seq: sequence number to check for modifications */
> + unsigned int seq;
> +
> + /** @index: index into the shared fences */
> + unsigned int index;
> +
> + /** @fences: the shared fences */
> + struct dma_resv_list *fences;
> +
> + /** @is_first: true if this is the first returned fence */
> + bool is_first;
> +};
> +
> +/**
> + * dma_resv_for_each_fence_unlocked - fence iterator
> + * @obj: a dma_resv object pointer
> + * @cursor: a struct dma_resv_iter pointer
> + * @all_fences: true if all fences should be returned
> + * @fence: the current fence
> + *
> + * Iterate over the 

  1   2   >