Re: [Intel-gfx] [PATCH] drm/i915/dmc: DMC 1.07 for Cannonlake

2018-01-03 Thread Saarinen, Jani
HI,
> -Original Message-
> From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf Of
> Anusha Srivatsa
> Sent: keskiviikko 3. tammikuuta 2018 23.22
> To: intel-gfx@lists.freedesktop.org
> Cc: Vivi, Rodrigo 
> Subject: [Intel-gfx] [PATCH] drm/i915/dmc: DMC 1.07 for Cannonlake
> 
> There is a new version of DMC available for CNL.
> 
> The release notes mentions:
> 1. Fix for the issue where DC_STATE was getting enabled even when disabled by
> driver causing data corruption
> 
> v2: Since the firmware is  merged to linux-firmware.git, add
> MODUE_FIRMWARE.
Minor typo s/MODUE_/MODULE_ 
> 
> Cc: Rodrigo Vivi 
> Signed-off-by: Anusha Srivatsa 
> Reviewed-by: Rodrigo Vivi 
> ---
>  drivers/gpu/drm/i915/intel_csr.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_csr.c 
> b/drivers/gpu/drm/i915/intel_csr.c
> index f417101..0d7b3b6 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -37,8 +37,9 @@
>  #define I915_CSR_GLK "i915/glk_dmc_ver1_04.bin"
>  #define GLK_CSR_VERSION_REQUIRED CSR_VERSION(1, 4)
> 
> -#define I915_CSR_CNL "i915/cnl_dmc_ver1_06.bin"
> -#define CNL_CSR_VERSION_REQUIRED CSR_VERSION(1, 6)
> +#define I915_CSR_CNL "i915/cnl_dmc_ver1_07.bin"
> +MODULE_FIRMWARE(I915_CSR_CNL);
> +#define CNL_CSR_VERSION_REQUIRED CSR_VERSION(1, 7)
> 
>  #define I915_CSR_KBL "i915/kbl_dmc_ver1_01.bin"
>  MODULE_FIRMWARE(I915_CSR_KBL);
> --
> 2.7.4
> 

Br,

Jani Saarinen
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] Review https://patchwork.freedesktop.org/patch/160274/

2018-01-03 Thread Mustaffa, Mustamin B
Hi all,

Please help to review a patch https://patchwork.freedesktop.org/patch/160274/

Best regard

Mustamin

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] FW: [PATCH] drm: i915: Fix audio issue on BXT

2018-01-03 Thread Sharma, Shashank

Regards

Shashank


On 1/4/2018 11:40 AM, Sharma, Shashank wrote:

On Wed, Jan 03, 2018 at 08:31:10PM +, Pandiyan, Dhinakaran wrote:

On Thu, 2018-01-04 at 00:48 +0530, Gaurav K Singh wrote:

From: Gaurav Singh 

On Apollolake, with stress test warm reboot, audio card was not
getting enumerated after reboot. This was a

The problem looks similar to
https://lists.freedesktop.org/archives/intel-gfx/2017-October/144495.h
tml

although the proposed solutions are vastly different. I have Cc'd some
more people.


spurious issue happening on Apollolake. HW codec and HD audio
controller link was going out of sync for which there was a fix in
i915 driver but was not getting invoked for BXT. Extending this fix
to BXT as well.

Tested on apollolake chromebook by stress test warm reboot with 2500
iterations.

Signed-off-by: Gaurav K Singh 
---
  drivers/gpu/drm/i915/intel_audio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c
b/drivers/gpu/drm/i915/intel_audio.c
index f1502a0188eb..c71c04e1c3f6 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -729,7 +729,7 @@ static void i915_audio_component_codec_wake_override(struct 
device *kdev,
struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
u32 tmp;
  
-	if (!IS_GEN9_BC(dev_priv))

+   if (!IS_GEN9_BC(dev_priv) && !IS_BROXTON(dev_priv))

IS_GEN9()? GLK might need this too.

if GLK need there is the possibility of CNL also needing it...
So not sure where to stop.

Also looking to the original patch that introduced this function, commit '632f3ab95fe2 
("drm/i915/audio: add codec wakeup override enabled/disable callback")'

it tells that the reason was:
"In SKL, HDMI/DP codec and PCH HD Audio Controller are in different p$ wells, so 
it's necessary to reset display audio codecs when power we$ otherwise display audio 
codecs will disappear when resume from low p$ state."

Is this the case here on BXT?
I think this is valid for all GEN9 displays, because HW codec's power 
control is with display engine only.
The scenario which this patch is going to cover is a possible race 
during boot-up:

- display probe happens, first (or second) display modeset is in progress.
- meanwhile audio probe happens in parallel, audio driver is trying to 
probe HDMI audio codec.
- codec's power well is under display's control, and there is a chance 
that while modeset, display would have disabled power wells during 
disable sequence, so the codec can't be probed.
- now audio driver needs a way, to enable power using I915 driver, so 
that it can probe and enable codec
IIRC component framework was added to solve this problem only, so this 
situation is valid for any platform where HD audio codec depends on 
display power well, so I guess this should go for GLK too.


Acked-by: Shashank Sharma 

- Shashank

Another interesting thing I noticed on Spec when searching for this bit was 
that this bit is related to an workaround on SKL/KBL/CFL... no mention to BXT.

"This workaround is needed for an HW issue in SKL and KBL in which HW codec and HD 
audio controller link was going out of sync."

Thanks,
Rodrigo.




return;
  
  	i915_audio_component_get_power(kdev);

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC] drm/i915: Add a new modparam for customized ring multiplier

2018-01-03 Thread Sagar Arun Kamble
Since ring frequency programming needs consideration of both IA and GT 
frequency requests I think keeping the logic
to program the ring frequency table in driver that monitors both IA/GT 
busyness and power budgets like intel_ips
will be more appropriate. intel_ips is relying on global load derived 
from all CPUs.
I understand that power awareness and busyness based policy might be 
trickier but having that as tunable will give better flexibility.


On 1/3/2018 11:51 PM, Yaodong Li wrote:


You are thinking of plugging into intel_pstate to make it smarter 
for ia freq transitions?
Yep. This seems a correct step to give some automatic support instead 
of parameter/hardcoded multiplier.


Does this mean we should use cpufreq/intel_pstate based approach 
instead of the current modparam solution for Gen9?


Some concerns and questions about intel_pstate approach:
a) Currently, we cannot get the accurate pstate/target freq value from 
cpufreq in intel_pstate active mode since
 these values won't be exported to cpufreq layer, so if we won't 
change intel_pstate code then we only can get

 the max cpu freq of a new policy.
b) intel_pstate policy is attached to each logic cpu, which means we 
will receive policy/freq transition notification
    for each logic cpu freq change. One question is how we are going 
to decide the freq of the ring? just use the max

    cpu freq reported?
c) With the intel_pstate approach we may still run into thermal 
throttling, in this case, can a certain cooling device

    be triggered to lower the cpu freq?

Thanks and Regards,
-Jackie



___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dmc: DMC 1.07 for Cannonlake (rev4)

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm/i915/dmc: DMC 1.07 for Cannonlake (rev4)
URL   : https://patchwork.freedesktop.org/series/35651/
State : failure

== Summary ==

Applying: drm/i915/dmc: DMC 1.07 for Cannonlake
error: sha1 information is lacking or useless 
(drivers/gpu/drm/i915/intel_csr.c).
error: could not build fake ancestor
Patch failed at 0001 drm/i915/dmc: DMC 1.07 for Cannonlake
The copy of the patch that failed is found in: .git/rebase-apply/patch
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 mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/dmc: DMC 1.07 for Cannonlake

2018-01-03 Thread Anusha Srivatsa
There is a new version of DMC available for CNL.

The release notes mentions:
1. Fix for the issue where DC_STATE was getting enabled
even when disabled by driver causing data corruption

v2: Since the firmware is  merged to linux-firmware.git,
add MODUE_FIRMWARE.

Cc: Rodrigo Vivi 
Signed-off-by: Anusha Srivatsa 
Reviewed-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/intel_csr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index f417101..0d7b3b6 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -37,8 +37,9 @@
 #define I915_CSR_GLK "i915/glk_dmc_ver1_04.bin"
 #define GLK_CSR_VERSION_REQUIRED   CSR_VERSION(1, 4)
 
-#define I915_CSR_CNL "i915/cnl_dmc_ver1_06.bin"
-#define CNL_CSR_VERSION_REQUIRED   CSR_VERSION(1, 6)
+#define I915_CSR_CNL "i915/cnl_dmc_ver1_07.bin"
+MODULE_FIRMWARE(I915_CSR_CNL);
+#define CNL_CSR_VERSION_REQUIRED   CSR_VERSION(1, 7)
 
 #define I915_CSR_KBL "i915/kbl_dmc_ver1_01.bin"
 MODULE_FIRMWARE(I915_CSR_KBL);
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/3] drm/i915/psr: Kill psr.source_ok flag.

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/3] drm/i915/psr: Kill psr.source_ok flag.
URL   : https://patchwork.freedesktop.org/series/35965/
State : success

== Summary ==

Warning: bzip CI_DRM_3595/shard-glkb2/results3.json.bz2 wasn't in correct JSON 
format
Test gem_eio:
Subgroup in-flight:
pass   -> DMESG-WARN (shard-snb) fdo#104058
Test kms_flip:
Subgroup wf_vblank-vs-dpms:
pass   -> DMESG-WARN (shard-hsw) fdo#102614
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
pass   -> FAIL   (shard-snb) fdo#101623
Test drv_suspend:
Subgroup debugfs-reader-hibernate:
skip   -> FAIL   (shard-hsw) fdo#103375

fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:2713 pass:1537 dwarn:2   dfail:0   fail:10  skip:1164 
time:9391s
shard-snbtotal:2713 pass:1309 dwarn:2   dfail:0   fail:10  skip:1392 
time:8076s
Blacklisted hosts:
shard-apltotal:2713 pass:1686 dwarn:1   dfail:0   fail:25  skip:1001 
time:13674s
shard-kbltotal:2636 pass:1759 dwarn:1   dfail:0   fail:22  skip:853 
time:10365s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7603/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Add generic fbdev emulation (rev2)

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm: Add generic fbdev emulation (rev2)
URL   : https://patchwork.freedesktop.org/series/35873/
State : success

== Summary ==

Series 35873v2 drm: Add generic fbdev emulation
https://patchwork.freedesktop.org/api/1.0/series/35873/revisions/2/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:437s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:452s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:386s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:501s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:497s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:500s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:482s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:473s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:529s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:406s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:415s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:424s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:471s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:427s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:484s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:513s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:469s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:514s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:595s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:446s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:525s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:541s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:508s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:498s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:447s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:542s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:410s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:580s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:481s

d26e7804b83cf7d3754323d02afa5ff04326d33d drm-tip: 2018y-01m-03d-17h-48m-30s UTC 
integration manifest
fc7421689c65 drm/vc4: Test generic fbdev emulation
896906b4c1de drm/fb-helper: Add generic fbdev emulation
dbd4dcf1cf44 drm: Handle fbdev emulation in core
ad91cd97f6bb drm/fb-helper: Don't restore if fbdev is not in use
e014540787a3 drm/fb-helper: Ensure driver module is pinned in fb_open()
50d1352cc8ca drm: Export some ioctl functions
f80d3012c620 drm/ioctl: Remove trailing whitespace
ffbe71a1ca18 drm: provide management functions for drm_file

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7604/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC v2 2/8] drm/ioctl: Remove trailing whitespace

2018-01-03 Thread Noralf Trønnes
Remove a couple of trailing spaces.

Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 4aafe4802099..b1e96fb68ea8 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -509,7 +509,7 @@ int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
return -EACCES;
 
/* MASTER is only for master or control clients */
-   if (unlikely((flags & DRM_MASTER) && 
+   if (unlikely((flags & DRM_MASTER) &&
 !drm_is_current_master(file_priv) &&
 !drm_is_control_client(file_priv)))
return -EACCES;
@@ -704,7 +704,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
  *
  * ##define DRM_IOCTL_MY_DRIVER_OPERATION \
  * DRM_IOW(DRM_COMMAND_BASE, struct my_driver_operation)
- * 
+ *
  * DRM driver private IOCTL must be in the range from DRM_COMMAND_BASE to
  * DRM_COMMAND_END. Finally you need an array of  drm_ioctl_desc to wire
  * up the handlers and set the access rights::
-- 
2.14.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC v2 0/8] drm: Add generic fbdev emulation

2018-01-03 Thread Noralf Trønnes
This patchset explores the possibility of having generic fbdev emulation
in DRM for drivers that supports dumb buffers which they can export.

Chris pointed out a bug in the previous version. I've solved this by
deferring buffer creation until fb_ops->fb_open. This works fine for
fbcon as well, since the first thing it does is to call fb_open.

I also had to export some functions for modular builds.

Noralf.

Changes since version 1:
- Don't add drm_fb_helper_fb_open() and drm_fb_helper_fb_release() to
  DRM_FB_HELPER_DEFAULT_OPS(). (Fi.CI.STATIC)
  The following uses that macro and sets fb_open/close: udlfb_ops,
  amdgpufb_ops, drm_fb_helper_generic_fbdev_ops, nouveau_fbcon_ops,
  nouveau_fbcon_sw_ops, radeonfb_ops.
  This results in: warning: Initializer entry defined twice
- Support CONFIG_DRM_KMS_HELPER=m (kbuild test robot)
  ERROR:  [drivers/gpu/drm/drm_kms_helper.ko] undefined!
- Drop buggy patch: (Chris Wilson)
  drm/prime: Clear drm_gem_object->dma_buf on release
- Defer buffer creation until fb_open.


David Herrmann (1):
  drm: provide management functions for drm_file

Noralf Trønnes (7):
  drm/ioctl: Remove trailing whitespace
  drm: Export some ioctl functions
  drm/fb-helper: Ensure driver module is pinned in fb_open()
  drm/fb-helper: Don't restore if fbdev is not in use
  drm: Handle fbdev emulation in core
  drm/fb-helper: Add generic fbdev emulation
  drm/vc4: Test generic fbdev emulation

 drivers/gpu/drm/drm_auth.c  |   1 +
 drivers/gpu/drm/drm_crtc_internal.h |   4 -
 drivers/gpu/drm/drm_dumb_buffers.c  |   1 +
 drivers/gpu/drm/drm_fb_helper.c | 356 +++-
 drivers/gpu/drm/drm_file.c  | 323 ++--
 drivers/gpu/drm/drm_framebuffer.c   |   1 +
 drivers/gpu/drm/drm_internal.h  |   4 -
 drivers/gpu/drm/drm_ioctl.c |   5 +-
 drivers/gpu/drm/drm_mode_config.c   |  10 +
 drivers/gpu/drm/drm_prime.c |   1 +
 drivers/gpu/drm/drm_probe_helper.c  |   4 +
 drivers/gpu/drm/vc4/vc4_drv.c   |   3 -
 drivers/gpu/drm/vc4/vc4_kms.c   |   3 +-
 include/drm/drm_auth.h  |   3 +
 include/drm/drm_dumb_buffers.h  |  10 +
 include/drm/drm_fb_helper.h |  93 ++
 include/drm/drm_file.h  |   2 +
 include/drm/drm_framebuffer.h   |   3 +
 include/drm/drm_prime.h |   2 +
 19 files changed, 680 insertions(+), 149 deletions(-)
 create mode 100644 include/drm/drm_dumb_buffers.h

-- 
2.14.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC v2 6/8] drm: Handle fbdev emulation in core

2018-01-03 Thread Noralf Trønnes
Prepare for generic fbdev emulation by letting DRM core work directly
with the fbdev compatibility layer. This is done by adding new fbdev
helper vtable callbacks for restore, hotplug_event, unregister and
release.

Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_file.c | 12 +++-
 drivers/gpu/drm/drm_mode_config.c  | 10 ++
 drivers/gpu/drm/drm_probe_helper.c |  4 
 include/drm/drm_fb_helper.h| 33 +
 4 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index 400d44437e93..7ec09fb83135 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -441,10 +442,19 @@ static void drm_legacy_dev_reinit(struct drm_device *dev)
 
 void drm_lastclose(struct drm_device * dev)
 {
+   struct drm_fb_helper *fb_helper = dev->fb_helper;
+   int ret;
+
DRM_DEBUG("\n");
 
-   if (dev->driver->lastclose)
+   if (dev->driver->lastclose) {
dev->driver->lastclose(dev);
+   } else if (fb_helper && fb_helper->funcs && fb_helper->funcs->restore) {
+   ret = fb_helper->funcs->restore(fb_helper);
+   if (ret)
+   DRM_ERROR("Failed to restore fbdev: %d\n", ret);
+   }
+
DRM_DEBUG("driver lastclose completed\n");
 
if (drm_core_check_feature(dev, DRIVER_LEGACY))
diff --git a/drivers/gpu/drm/drm_mode_config.c 
b/drivers/gpu/drm/drm_mode_config.c
index bc5c46306b3d..260eb1730244 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -21,6 +21,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 
@@ -61,6 +62,11 @@ int drm_modeset_register_all(struct drm_device *dev)
 
 void drm_modeset_unregister_all(struct drm_device *dev)
 {
+   struct drm_fb_helper *fb_helper = dev->fb_helper;
+
+   if (fb_helper && fb_helper->funcs && fb_helper->funcs->unregister)
+   fb_helper->funcs->unregister(fb_helper);
+
drm_connector_unregister_all(dev);
drm_encoder_unregister_all(dev);
drm_crtc_unregister_all(dev);
@@ -408,6 +414,7 @@ EXPORT_SYMBOL(drm_mode_config_init);
  */
 void drm_mode_config_cleanup(struct drm_device *dev)
 {
+   struct drm_fb_helper *fb_helper = dev->fb_helper;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
struct drm_crtc *crtc, *ct;
@@ -417,6 +424,9 @@ void drm_mode_config_cleanup(struct drm_device *dev)
struct drm_property_blob *blob, *bt;
struct drm_plane *plane, *plt;
 
+   if (fb_helper && fb_helper->funcs && fb_helper->funcs->release)
+   fb_helper->funcs->release(fb_helper);
+
list_for_each_entry_safe(encoder, enct, >mode_config.encoder_list,
 head) {
encoder->funcs->destroy(encoder);
diff --git a/drivers/gpu/drm/drm_probe_helper.c 
b/drivers/gpu/drm/drm_probe_helper.c
index 555fbe54d6e2..9d8b0ba54173 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -559,10 +559,14 @@ EXPORT_SYMBOL(drm_helper_probe_single_connector_modes);
  */
 void drm_kms_helper_hotplug_event(struct drm_device *dev)
 {
+   struct drm_fb_helper *fb_helper = dev->fb_helper;
+
/* send a uevent + call fbdev */
drm_sysfs_hotplug_event(dev);
if (dev->mode_config.funcs->output_poll_changed)
dev->mode_config.funcs->output_poll_changed(dev);
+   else if (fb_helper && fb_helper->funcs && 
fb_helper->funcs->hotplug_event)
+   fb_helper->funcs->hotplug_event(fb_helper);
 }
 EXPORT_SYMBOL(drm_kms_helper_hotplug_event);
 
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 16d8773b60e3..385f967c3552 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -125,6 +125,39 @@ struct drm_fb_helper_funcs {
   struct drm_display_mode **modes,
   struct drm_fb_offset *offsets,
   bool *enabled, int width, int height);
+
+   /**
+* @restore:
+*
+* Optional callback for restoring fbdev emulation.
+* Called by drm_lastclose() if _driver->lastclose is not set.
+*/
+   int (*restore)(struct drm_fb_helper *fb_helper);
+
+   /**
+* @hotplug_event:
+*
+* Optional callback for hotplug events.
+* Called by drm_kms_helper_hotplug_event() if
+* _mode_config_funcs->output_poll_changed  is not set.
+*/
+   int (*hotplug_event)(struct drm_fb_helper *fb_helper);
+
+   /**
+* @unregister:
+*
+* Optional callback for unregistrering fbdev emulation.
+* Called by drm_dev_unregister().
+*/
+   void (*unregister)(struct drm_fb_helper 

[Intel-gfx] [RFC v2 5/8] drm/fb-helper: Don't restore if fbdev is not in use

2018-01-03 Thread Noralf Trønnes
Keep track of fbdev users and only restore fbdev in
drm_fb_helper_restore_fbdev_mode_unlocked() when in use. This avoids
fbdev being restored in drm_driver.last_close when nothing uses it.
Additionally fbdev is turned off when the last user is closing.
fbcon is a user in this context.

Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_fb_helper.c | 15 +++
 include/drm/drm_fb_helper.h | 14 ++
 2 files changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 2c6adf1d80c2..f9dcc7a5761f 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -522,6 +522,9 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct 
drm_fb_helper *fb_helper)
if (READ_ONCE(fb_helper->deferred_setup))
return 0;
 
+   if (!atomic_read(_helper->open_count))
+   return 0;
+
mutex_lock(_helper->lock);
ret = restore_fbdev_mode(fb_helper);
 
@@ -781,6 +784,7 @@ void drm_fb_helper_prepare(struct drm_device *dev, struct 
drm_fb_helper *helper,
INIT_WORK(>resume_work, drm_fb_helper_resume_worker);
INIT_WORK(>dirty_work, drm_fb_helper_dirty_work);
helper->dirty_clip.x1 = helper->dirty_clip.y1 = ~0;
+   atomic_set(>open_count, 1);
mutex_init(>lock);
helper->funcs = funcs;
helper->dev = dev;
@@ -1212,6 +1216,7 @@ EXPORT_SYMBOL(drm_fb_helper_cfb_imageblit);
  * @info: fbdev registered by the helper
  * @user: 1=userspace, 0=fbcon
  *
+ * Increase fbdev use count.
  * If _ops is wrapped in a library, pin the driver module.
  */
 int drm_fb_helper_fb_open(struct fb_info *info, int user)
@@ -1224,6 +1229,8 @@ int drm_fb_helper_fb_open(struct fb_info *info, int user)
return -ENODEV;
}
 
+   atomic_inc(_helper->open_count);
+
return 0;
 }
 EXPORT_SYMBOL(drm_fb_helper_fb_open);
@@ -1233,6 +1240,7 @@ EXPORT_SYMBOL(drm_fb_helper_fb_open);
  * @info: fbdev registered by the helper
  * @user: 1=userspace, 0=fbcon
  *
+ * Decrease fbdev use count and turn off if there are no users left.
  * If _ops is wrapped in a library, unpin the driver module.
  */
 int drm_fb_helper_fb_release(struct fb_info *info, int user)
@@ -1240,6 +1248,10 @@ int drm_fb_helper_fb_release(struct fb_info *info, int 
user)
struct drm_fb_helper *fb_helper = info->par;
struct drm_device *dev = fb_helper->dev;
 
+   if (atomic_dec_and_test(_helper->open_count) &&
+   !drm_dev_is_unplugged(fb_helper->dev))
+   drm_fb_helper_blank(FB_BLANK_POWERDOWN, info);
+
if (info->fbops->owner != dev->driver->fops->owner)
module_put(dev->driver->fops->owner);
 
@@ -1936,6 +1948,9 @@ static int drm_fb_helper_single_fb_probe(struct 
drm_fb_helper *fb_helper,
if (ret < 0)
return ret;
 
+   if (fb_helper->fbdev->fbops->fb_open == drm_fb_helper_fb_open)
+   atomic_set(_helper->open_count, 0);
+
strcpy(fb_helper->fb->comm, "[fbcon]");
return 0;
 }
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index a593f01ff69e..16d8773b60e3 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -232,6 +232,20 @@ struct drm_fb_helper {
 * See also: @deferred_setup
 */
int preferred_bpp;
+
+   /**
+* @open_count:
+*
+* Keeps track of fbdev use to know when to not restore fbdev.
+*
+* Drivers that use drm_fb_helper_fb_open() as their \.fb_open
+* callback will get an initial value of 0 and get restore based on
+* actual use. Others will get an initial value of 1 which means that
+* fbdev will always be restored. Drivers that call
+* drm_fb_helper_fb_open() in their \.fb_open, thus needs to set the
+* initial value to 0 themselves.
+*/
+   atomic_t open_count;
 };
 
 /**
-- 
2.14.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC v2 8/8] drm/vc4: Test generic fbdev emulation

2018-01-03 Thread Noralf Trønnes
Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/vc4/vc4_drv.c | 3 ---
 drivers/gpu/drm/vc4/vc4_kms.c | 3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index ceb385fd69c5..ef8a2d3a6d1f 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -152,7 +152,6 @@ static struct drm_driver vc4_drm_driver = {
DRIVER_HAVE_IRQ |
DRIVER_RENDER |
DRIVER_PRIME),
-   .lastclose = drm_fb_helper_lastclose,
.irq_handler = vc4_irq,
.irq_preinstall = vc4_irq_preinstall,
.irq_postinstall = vc4_irq_postinstall,
@@ -297,8 +296,6 @@ static void vc4_drm_unbind(struct device *dev)
 
drm_dev_unregister(drm);
 
-   drm_fb_cma_fbdev_fini(drm);
-
drm_mode_config_cleanup(drm);
 
drm_dev_unref(drm);
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index 4256f294c346..671c62f1b4d3 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -188,7 +188,6 @@ static struct drm_framebuffer *vc4_fb_create(struct 
drm_device *dev,
 }
 
 static const struct drm_mode_config_funcs vc4_mode_funcs = {
-   .output_poll_changed = drm_fb_helper_output_poll_changed,
.atomic_check = drm_atomic_helper_check,
.atomic_commit = vc4_atomic_commit,
.fb_create = vc4_fb_create,
@@ -219,7 +218,7 @@ int vc4_kms_load(struct drm_device *dev)
drm_mode_config_reset(dev);
 
if (dev->mode_config.num_connector)
-   drm_fb_cma_fbdev_init(dev, 32, 0);
+   drm_fb_helper_generic_fbdev_setup(dev, 32, 0);
 
drm_kms_helper_poll_init(dev);
 
-- 
2.14.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC v2 1/8] drm: provide management functions for drm_file

2018-01-03 Thread Noralf Trønnes
From: David Herrmann 

Rather than doing drm_file allocation/destruction right in the fops, lets
provide separate helpers. This decouples drm_file management from the
still-mandatory drm-fops. It prepares for use of drm_file without the
fops, both by possible separate fops implementations and APIs (not that I
am aware of any such plans), and more importantly from in-kernel use where
no real file is available.

Signed-off-by: David Herrmann 
[rebased]
Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_file.c | 309 +++--
 drivers/gpu/drm/drm_internal.h |   2 +
 2 files changed, 179 insertions(+), 132 deletions(-)

diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index b3c6e997ccdb..d208faade27e 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -101,6 +101,179 @@ DEFINE_MUTEX(drm_global_mutex);
 
 static int drm_open_helper(struct file *filp, struct drm_minor *minor);
 
+/**
+ * drm_file_alloc - allocate file context
+ * @minor: minor to allocate on
+ *
+ * This allocates a new DRM file context. It is not linked into any context and
+ * can be used by the caller freely. Note that the context keeps a pointer to
+ * @minor, so it must be freed before @minor is.
+ *
+ * The legacy paths might require the drm_global_mutex to be held.
+ *
+ * RETURNS:
+ * Pointer to newly allocated context, ERR_PTR on failure.
+ */
+struct drm_file *drm_file_alloc(struct drm_minor *minor)
+{
+   struct drm_device *dev = minor->dev;
+   struct drm_file *file;
+   int ret;
+
+   file = kzalloc(sizeof(*file), GFP_KERNEL);
+   if (!file)
+   return ERR_PTR(-ENOMEM);
+
+   file->pid = get_pid(task_pid(current));
+   file->minor = minor;
+
+   /* for compatibility root is always authenticated */
+   file->authenticated = capable(CAP_SYS_ADMIN);
+   file->lock_count = 0;
+
+   INIT_LIST_HEAD(>lhead);
+   INIT_LIST_HEAD(>fbs);
+   mutex_init(>fbs_lock);
+   INIT_LIST_HEAD(>blobs);
+   INIT_LIST_HEAD(>pending_event_list);
+   INIT_LIST_HEAD(>event_list);
+   init_waitqueue_head(>event_wait);
+   file->event_space = 4096; /* set aside 4k for event buffer */
+
+   mutex_init(>event_read_lock);
+
+   if (drm_core_check_feature(dev, DRIVER_GEM))
+   drm_gem_open(dev, file);
+
+   if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
+   drm_syncobj_open(file);
+
+   if (drm_core_check_feature(dev, DRIVER_PRIME))
+   drm_prime_init_file_private(>prime);
+
+   if (dev->driver->open) {
+   ret = dev->driver->open(dev, file);
+   if (ret < 0)
+   goto out_prime_destroy;
+   }
+
+   if (drm_is_primary_client(file)) {
+   ret = drm_master_open(file);
+   if (ret)
+   goto out_close;
+   }
+
+   return file;
+
+out_close:
+   if (dev->driver->postclose)
+   dev->driver->postclose(dev, file);
+out_prime_destroy:
+   if (drm_core_check_feature(dev, DRIVER_PRIME))
+   drm_prime_destroy_file_private(>prime);
+   if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
+   drm_syncobj_release(file);
+   if (drm_core_check_feature(dev, DRIVER_GEM))
+   drm_gem_release(dev, file);
+   put_pid(file->pid);
+   kfree(file);
+
+   return ERR_PTR(ret);
+}
+
+static void drm_events_release(struct drm_file *file_priv)
+{
+   struct drm_device *dev = file_priv->minor->dev;
+   struct drm_pending_event *e, *et;
+   unsigned long flags;
+
+   spin_lock_irqsave(>event_lock, flags);
+
+   /* Unlink pending events */
+   list_for_each_entry_safe(e, et, _priv->pending_event_list,
+pending_link) {
+   list_del(>pending_link);
+   e->file_priv = NULL;
+   }
+
+   /* Remove unconsumed events */
+   list_for_each_entry_safe(e, et, _priv->event_list, link) {
+   list_del(>link);
+   kfree(e);
+   }
+
+   spin_unlock_irqrestore(>event_lock, flags);
+}
+
+/**
+ * drm_file_free - free file context
+ * @file: context to free, or NULL
+ *
+ * This destroys and deallocates a DRM file context previously allocated via
+ * drm_file_alloc(). The caller must make sure to unlink it from any contexts
+ * before calling this.
+ *
+ * The legacy paths might require the drm_global_mutex to be held.
+ *
+ * If NULL is passed, this is a no-op.
+ *
+ * RETURNS:
+ * 0 on success, or error code on failure.
+ */
+void drm_file_free(struct drm_file *file)
+{
+   struct drm_device *dev;
+
+   if (!file)
+   return;
+
+   dev = file->minor->dev;
+
+   DRM_DEBUG("pid = %d, device = 0x%lx, open_count = %d\n",
+ task_pid_nr(current),
+ 

[Intel-gfx] [RFC v2 4/8] drm/fb-helper: Ensure driver module is pinned in fb_open()

2018-01-03 Thread Noralf Trønnes
If struct fb_ops is defined in a library like cma, fb_open() and fbcon
takes a ref on the library instead of the driver module. Use
fb_ops.fb_open/fb_release to ensure that the driver module is pinned.

Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_fb_helper.c | 40 
 include/drm/drm_fb_helper.h | 13 +
 2 files changed, 53 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 035784ddd133..2c6adf1d80c2 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1207,6 +1207,46 @@ void drm_fb_helper_cfb_imageblit(struct fb_info *info,
 }
 EXPORT_SYMBOL(drm_fb_helper_cfb_imageblit);
 
+/**
+ * drm_fb_helper_fb_open - implementation for _ops.fb_open
+ * @info: fbdev registered by the helper
+ * @user: 1=userspace, 0=fbcon
+ *
+ * If _ops is wrapped in a library, pin the driver module.
+ */
+int drm_fb_helper_fb_open(struct fb_info *info, int user)
+{
+   struct drm_fb_helper *fb_helper = info->par;
+   struct drm_device *dev = fb_helper->dev;
+
+   if (info->fbops->owner != dev->driver->fops->owner) {
+   if (!try_module_get(dev->driver->fops->owner))
+   return -ENODEV;
+   }
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_fb_helper_fb_open);
+
+/**
+ * drm_fb_helper_fb_release - implementation for _ops.fb_release
+ * @info: fbdev registered by the helper
+ * @user: 1=userspace, 0=fbcon
+ *
+ * If _ops is wrapped in a library, unpin the driver module.
+ */
+int drm_fb_helper_fb_release(struct fb_info *info, int user)
+{
+   struct drm_fb_helper *fb_helper = info->par;
+   struct drm_device *dev = fb_helper->dev;
+
+   if (info->fbops->owner != dev->driver->fops->owner)
+   module_put(dev->driver->fops->owner);
+
+   return 0;
+}
+EXPORT_SYMBOL(drm_fb_helper_fb_release);
+
 /**
  * drm_fb_helper_set_suspend - wrapper around fb_set_suspend
  * @fb_helper: driver-allocated fbdev helper, can be NULL
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index b069433e7fc1..a593f01ff69e 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -297,6 +297,9 @@ void drm_fb_helper_cfb_copyarea(struct fb_info *info,
 void drm_fb_helper_cfb_imageblit(struct fb_info *info,
 const struct fb_image *image);
 
+int drm_fb_helper_fb_open(struct fb_info *info, int user);
+int drm_fb_helper_fb_release(struct fb_info *info, int user);
+
 void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend);
 void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
bool suspend);
@@ -473,6 +476,16 @@ static inline void drm_fb_helper_cfb_imageblit(struct 
fb_info *info,
 {
 }
 
+static inline int drm_fb_helper_fb_open(struct fb_info *info, int user)
+{
+   return -ENODEV;
+}
+
+static inline int drm_fb_helper_fb_release(struct fb_info *info, int user)
+{
+   return -ENODEV;
+}
+
 static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper,
 bool suspend)
 {
-- 
2.14.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [RFC v2 3/8] drm: Export some ioctl functions

2018-01-03 Thread Noralf Trønnes
Export the following functions so in-kernel users can allocate
dumb buffers:
- drm_file_alloc
- drm_file_free
- drm_prime_handle_to_fd_ioctl
- drm_mode_addfb2
- drm_mode_create_dumb_ioctl
- drm_dropmaster_ioctl

Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_auth.c  |  1 +
 drivers/gpu/drm/drm_crtc_internal.h |  4 
 drivers/gpu/drm/drm_dumb_buffers.c  |  1 +
 drivers/gpu/drm/drm_file.c  |  2 ++
 drivers/gpu/drm/drm_framebuffer.c   |  1 +
 drivers/gpu/drm/drm_internal.h  |  6 --
 drivers/gpu/drm/drm_ioctl.c |  1 +
 drivers/gpu/drm/drm_prime.c |  1 +
 include/drm/drm_auth.h  |  3 +++
 include/drm/drm_dumb_buffers.h  | 10 ++
 include/drm/drm_file.h  |  2 ++
 include/drm/drm_framebuffer.h   |  3 +++
 include/drm/drm_prime.h |  2 ++
 13 files changed, 27 insertions(+), 10 deletions(-)
 create mode 100644 include/drm/drm_dumb_buffers.h

diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c
index aad468d170a7..e35ed9ee0c5a 100644
--- a/drivers/gpu/drm/drm_auth.c
+++ b/drivers/gpu/drm/drm_auth.c
@@ -236,6 +236,7 @@ int drm_dropmaster_ioctl(struct drm_device *dev, void *data,
mutex_unlock(>master_mutex);
return ret;
 }
+EXPORT_SYMBOL(drm_dropmaster_ioctl);
 
 int drm_master_open(struct drm_file *file_priv)
 {
diff --git a/drivers/gpu/drm/drm_crtc_internal.h 
b/drivers/gpu/drm/drm_crtc_internal.h
index 9ebb8841778c..86422492ad00 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -63,8 +63,6 @@ int drm_mode_getresources(struct drm_device *dev,
 
 /* drm_dumb_buffers.c */
 /* IOCTLs */
-int drm_mode_create_dumb_ioctl(struct drm_device *dev,
-  void *data, struct drm_file *file_priv);
 int drm_mode_mmap_dumb_ioctl(struct drm_device *dev,
 void *data, struct drm_file *file_priv);
 int drm_mode_destroy_dumb_ioctl(struct drm_device *dev,
@@ -164,8 +162,6 @@ void drm_fb_release(struct drm_file *file_priv);
 /* IOCTL */
 int drm_mode_addfb(struct drm_device *dev,
   void *data, struct drm_file *file_priv);
-int drm_mode_addfb2(struct drm_device *dev,
-   void *data, struct drm_file *file_priv);
 int drm_mode_rmfb(struct drm_device *dev,
  void *data, struct drm_file *file_priv);
 int drm_mode_getfb(struct drm_device *dev,
diff --git a/drivers/gpu/drm/drm_dumb_buffers.c 
b/drivers/gpu/drm/drm_dumb_buffers.c
index 39ac15ce4702..199b279f7650 100644
--- a/drivers/gpu/drm/drm_dumb_buffers.c
+++ b/drivers/gpu/drm/drm_dumb_buffers.c
@@ -90,6 +90,7 @@ int drm_mode_create_dumb_ioctl(struct drm_device *dev,
 
return dev->driver->dumb_create(file_priv, dev, args);
 }
+EXPORT_SYMBOL(drm_mode_create_dumb_ioctl);
 
 /**
  * drm_mode_mmap_dumb_ioctl - create an mmap offset for a dumb backing storage 
buffer
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index d208faade27e..400d44437e93 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -180,6 +180,7 @@ struct drm_file *drm_file_alloc(struct drm_minor *minor)
 
return ERR_PTR(ret);
 }
+EXPORT_SYMBOL(drm_file_alloc);
 
 static void drm_events_release(struct drm_file *file_priv)
 {
@@ -273,6 +274,7 @@ void drm_file_free(struct drm_file *file)
put_pid(file->pid);
kfree(file);
 }
+EXPORT_SYMBOL(drm_file_free);
 
 static int drm_setup(struct drm_device * dev)
 {
diff --git a/drivers/gpu/drm/drm_framebuffer.c 
b/drivers/gpu/drm/drm_framebuffer.c
index 5a13ff29f4f0..0493977e6848 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -341,6 +341,7 @@ int drm_mode_addfb2(struct drm_device *dev,
 
return 0;
 }
+EXPORT_SYMBOL(drm_mode_addfb2);
 
 struct drm_mode_rmfb_work {
struct work_struct work;
diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h
index 40179c5fc6b8..7d62e412fbb8 100644
--- a/drivers/gpu/drm/drm_internal.h
+++ b/drivers/gpu/drm/drm_internal.h
@@ -26,8 +26,6 @@
 
 /* drm_file.c */
 extern struct mutex drm_global_mutex;
-struct drm_file *drm_file_alloc(struct drm_minor *minor);
-void drm_file_free(struct drm_file *file);
 void drm_lastclose(struct drm_device *dev);
 
 /* drm_pci.c */
@@ -37,8 +35,6 @@ void drm_pci_agp_destroy(struct drm_device *dev);
 int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
 
 /* drm_prime.c */
-int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
-struct drm_file *file_priv);
 int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
 struct drm_file *file_priv);
 
@@ -85,8 +81,6 @@ int drm_authmagic(struct drm_device *dev, void *data,
  struct drm_file *file_priv);
 int drm_setmaster_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);

[Intel-gfx] [RFC v2 7/8] drm/fb-helper: Add generic fbdev emulation

2018-01-03 Thread Noralf Trønnes
Add generic fbdev emulation which uses a drm_file to get a dumb_buffer
and drm_framebuffer. The buffer is exported and vmap/mmap called on
the dma-buf.

Signed-off-by: Noralf Trønnes 
---
 drivers/gpu/drm/drm_fb_helper.c | 301 +++-
 include/drm/drm_fb_helper.h |  33 +
 2 files changed, 333 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index f9dcc7a5761f..270ff6dc8045 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -30,12 +30,15 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1951,7 +1954,9 @@ static int drm_fb_helper_single_fb_probe(struct 
drm_fb_helper *fb_helper,
if (fb_helper->fbdev->fbops->fb_open == drm_fb_helper_fb_open)
atomic_set(_helper->open_count, 0);
 
-   strcpy(fb_helper->fb->comm, "[fbcon]");
+   if (fb_helper->fb)
+   strcpy(fb_helper->fb->comm, "[fbcon]");
+
return 0;
 }
 
@@ -2975,6 +2980,300 @@ void drm_fb_helper_output_poll_changed(struct 
drm_device *dev)
 }
 EXPORT_SYMBOL(drm_fb_helper_output_poll_changed);
 
+static struct fb_deferred_io drm_fb_helper_generic_defio = {
+   .delay  = HZ / 20,
+   .deferred_io= drm_fb_helper_deferred_io,
+};
+
+static int drm_fb_helper_generic_alloc_buf(struct drm_fb_helper *fb_helper)
+{
+   struct drm_fb_helper_surface_size *sizes = _helper->sizes;
+   struct drm_mode_create_dumb dumb_args = { 0 };
+   struct drm_prime_handle prime_args = { 0 };
+   struct drm_mode_fb_cmd2 fb_args = { 0 };
+   struct drm_device *dev = fb_helper->dev;
+   struct fb_info *fbi = fb_helper->fbdev;
+   struct drm_framebuffer *fb;
+   struct dma_buf *dma_buf;
+   struct drm_file *file;
+   void *vaddr;
+   int ret;
+
+   file = drm_file_alloc(dev->primary);
+   if (IS_ERR(file))
+   return PTR_ERR(file);
+
+   drm_dropmaster_ioctl(dev, NULL, file);
+
+   dumb_args.width = sizes->surface_width;
+   dumb_args.height = sizes->surface_height;
+   dumb_args.bpp = sizes->surface_bpp;
+   ret = drm_mode_create_dumb_ioctl(dev, _args, file);
+   if (ret)
+   goto err_free_file;
+
+   fb_args.width = dumb_args.width;
+   fb_args.height = dumb_args.height;
+   fb_args.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
+sizes->surface_depth);
+   fb_args.handles[0] = dumb_args.handle;
+   fb_args.pitches[0] = dumb_args.pitch;
+   ret = drm_mode_addfb2(dev, _args, file);
+   if (ret)
+   goto err_free_file;
+
+   fb = drm_framebuffer_lookup(dev, file, fb_args.fb_id);
+   if (!fb) {
+   ret = -ENOENT;
+   goto err_free_file;
+   }
+
+   /* drop the reference we picked up in framebuffer lookup */
+   drm_framebuffer_put(fb);
+
+   strcpy(fb->comm, "[fbcon]");
+
+   prime_args.handle = dumb_args.handle;
+   ret = drm_prime_handle_to_fd_ioctl(dev, _args, file);
+   if (ret)
+   goto err_free_file;
+
+   dma_buf = dma_buf_get(prime_args.fd);
+   if (WARN_ON(IS_ERR(dma_buf))) {
+   ret = PTR_ERR(dma_buf);
+   goto err_free_file;
+   }
+
+   vaddr = dma_buf_vmap(dma_buf);
+   if (!vaddr) {
+   ret = -ENOMEM;
+   goto err_put_dmabuf;
+   }
+
+   if (fb->funcs->dirty) {
+   fbi->fbdefio = _fb_helper_generic_defio;
+   fb_deferred_io_init(fbi);
+   }
+
+   fbi->screen_size = fb->height * fb->pitches[0];
+   fbi->fix.smem_len = fbi->screen_size;
+   fbi->screen_buffer = vaddr;
+
+   fb_helper->dma_buf = dma_buf;
+   fb_helper->file = file;
+
+   mutex_lock(_helper->lock);
+   fb_helper->fb = fb;
+   drm_setup_crtcs_fb(fb_helper);
+   mutex_unlock(_helper->lock);
+
+   /* First time setup */
+   if (!fbi->var.bits_per_pixel) {
+   struct fb_videomode mode;
+
+   drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth);
+   drm_fb_helper_fill_var(fbi, fb_helper, sizes->fb_width, 
sizes->fb_height);
+
+   /* Drop the mode added by register_framebuffer() */
+   fb_destroy_modelist(_helper->fbdev->modelist);
+
+   fb_var_to_videomode(, >var);
+   fb_add_videomode(, >modelist);
+   }
+
+   return 0;
+
+err_put_dmabuf:
+   dma_buf_put(dma_buf);
+err_free_file:
+   drm_file_free(file);
+
+   return ret;
+}
+
+static void drm_fb_helper_generic_free_buf(struct drm_fb_helper *fb_helper)
+{
+   mutex_lock(_helper->lock);
+   fb_helper->fb = NULL;
+   drm_setup_crtcs_fb(fb_helper);
+   

Re: [Intel-gfx] [PATCH v2 3/8] drm/i915/psr: Avoid initializing PSR if there is no sink support.

2018-01-03 Thread Pandiyan, Dhinakaran



On Wed, 2018-01-03 at 13:59 -0800, Rodrigo Vivi wrote:
> first of all sorry for not getting back sooner on this...
> 
> On Tue, Dec 19, 2017 at 09:40:01PM +, Pandiyan, Dhinakaran wrote:
> > 
> > 
> > 
> > On Tue, 2017-12-19 at 13:29 -0800, Rodrigo Vivi wrote:
> > > On Tue, Dec 19, 2017 at 05:26:54AM +, Dhinakaran Pandiyan wrote:
> > > > DPCD read for the eDP is complete by the time intel_psr_init() is
> > > > called, which means we can avoid initializing PSR structures and state
> > > > if there is no sink support.
> > > > 
> > > > Cc: Rodrigo Vivi 
> > > > Cc: Ville Syrjälä 
> > > > Signed-off-by: Dhinakaran Pandiyan 
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_debugfs.c | 7 ++-
> > > >  drivers/gpu/drm/i915/intel_psr.c| 9 +
> > > >  2 files changed, 15 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
> > > > b/drivers/gpu/drm/i915/i915_debugfs.c
> > > > index 64e5a263458c..1a7b28f62570 100644
> > > > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > > > @@ -2532,14 +2532,19 @@ static int i915_edp_psr_status(struct seq_file 
> > > > *m, void *data)
> > > > u32 stat[3];
> > > > enum pipe pipe;
> > > > bool enabled = false;
> > > > +   bool sink_support;
> > > >  
> > > > if (!HAS_PSR(dev_priv))
> > > > return -ENODEV;
> > > >  
> > > > +   sink_support = dev_priv->psr.sink_support;
> > > > +   seq_printf(m, "Sink_Support: %s\n", yesno(sink_support));
> > > > +   if (!sink_support)
> > > > +   return 0;
> > > > +
> > > > intel_runtime_pm_get(dev_priv);
> > > >  
> > > > mutex_lock(_priv->psr.lock);
> > > > -   seq_printf(m, "Sink_Support: %s\n", 
> > > > yesno(dev_priv->psr.sink_support));
> > > > seq_printf(m, "Enabled: %s\n", 
> > > > yesno((bool)dev_priv->psr.enabled));
> > > > seq_printf(m, "Active: %s\n", yesno(dev_priv->psr.active));
> > > > seq_printf(m, "Busy frontbuffer bits: 0x%03x\n",
> > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c 
> > > > b/drivers/gpu/drm/i915/intel_psr.c
> > > > index 76339cf387cb..095e0a5a8574 100644
> > > > --- a/drivers/gpu/drm/i915/intel_psr.c
> > > > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > > > @@ -503,6 +503,9 @@ void intel_psr_enable(struct intel_dp *intel_dp,
> > > > if (!crtc_state->has_psr)
> > > > return;
> > > >  
> > > > +   if (WARN_ON(!CAN_PSR(dev_priv)))
> > > > +   return;
> > > 
> > > hmm... I believe we will see this warning sooner than later...
> > > 
> > > has_psr is not the same as CAN_PSR.
> > 
> > has_psr should not be set in psr_compute_config() unless both source and
> > sink have PSR. So, the warn_on is if we mess up the state preparation.
> > > 
> > > also, btw I didn't like all this crtc_state has_psr x has_psr2. :/
> > > 
> > > probably this series could also unify that and clean it up.
> > > to many has_psr like cases.
> > > 
> > > > +
> > > > WARN_ON(dev_priv->drrs.dp);
> > > > mutex_lock(_priv->psr.lock);
> > > > if (dev_priv->psr.enabled) {
> > > > @@ -633,6 +636,9 @@ void intel_psr_disable(struct intel_dp *intel_dp,
> > > > if (!old_crtc_state->has_psr)
> > > > return;
> > > >  
> > > > +   if (WARN_ON(!CAN_PSR(dev_priv)))
> > > > +   return;
> > > > +
> > > > mutex_lock(_priv->psr.lock);
> > > > if (!dev_priv->psr.enabled) {
> > > > mutex_unlock(_priv->psr.lock);
> > > > @@ -913,6 +919,9 @@ void intel_psr_init(struct drm_i915_private 
> > > > *dev_priv)
> > > > dev_priv->psr_mmio_base = IS_HASWELL(dev_priv) ?
> > > > HSW_EDP_PSR_BASE : BDW_EDP_PSR_BASE;
> > > >  
> > > > +   if (!dev_priv->psr.sink_support)
> > > > +   return;
> > > > +
> > > 
> > > Why not use CAN_PSR here?
> > 
> > 
> > So that we have the right MMIO's in case we want to probe the HW with no
> > sink support. I wasn't what would happen if we reg_read() on PSR
> > registers without the correct MMIO base.
> 
> But isn't the goal of CAN_PSR to avoid any extra calls on platforms
> that either doesn't have support nor the panel? In this case we should
> never being touching any register.

We should not be writing to any PSR related registers if PSR cannot be
enabled. But I also think reading any hardware register should be
decoupled from a feature's enablement status. 


> > 
> > > 
> > > > /* Per platform default: all disabled. */
> > > > if (i915_modparams.enable_psr == -1)
> > > > i915_modparams.enable_psr = 0;
> > > > -- 
> > > > 2.11.0
> > > > 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t v11] tests/kms_frontbuffer_tracking: Including DRRS test coverage

2018-01-03 Thread Ramalingam C



On Thursday 04 January 2018 12:51 AM, Rodrigo Vivi wrote:

On Wed, Jan 03, 2018 at 03:02:07PM +, Lohith BS wrote:

Dynamic Refresh Rate Switch(DRRS) is used to switch the panel's
refresh rate to the lowest vrefresh supported by panel, when frame is
not flipped for more than a Sec.

In kernel, DRRS uses the front buffer tracking infrastructure.
Hence DRRS test coverage is added along with other frontbuffer tracking
based features such as FBC and PSR tests.

Here, we are testing DRRS with other features in all possible
combinations, in all required test cases, to capture any possible
regression.

v2: Addressed the comments and suggestions from Vlad, Marius.
 The signoff details from the earlier work are also included.

v3: Modified vblank rate calculation by using reply-sequence,
 provided by drmWaitVBlank, as suggested by Chris Wilson.

v4: As suggested from Chris Wilson and Daniel Vetter
 1) Avoided using pthread for calculating vblank refresh rate,
instead used drmWaitVBlank reply sequence.
 2) Avoided using kernel-specific info like transitional delays,
instead polling mechanism with timeout is used.
 3) Included edp-DRRS as a subtest in kms_frontbuffer_tracking.c,
instead of having a separate test.

v5: This patch adds DRRS as a new feature in the
 kms_frontbuffer_tracking IGT.
 DRRS switch to lower vrefresh rate is tested at slow-draw subtest.

 Note:
 1) Currently kernel doesn't have support to enable and disable
the DRRS feature dynamically(as in case of PSR). Hence if the
panel supports DRRS it will be enabled by default.

 This is in continuation of last patch
"https://patchwork.freedesktop.org/patch/162726/;

v6: This patch adds runtime enable and disable feature for testing DRRS

v7: This patch adds runtime enable and disable feature for testing DRRS
 through debugfs entry "i915_drrs_ctl".

v8: Commit message is updated to reflect current implementation.

v9: Addressed Paulo Zanoni comments.
 Check for DRRS_LOW at tests with OFFSCREEN + FBS_INDIVIDUAL.

v10: Corrected DRRS state expectation in suspend related subtests.

v11: Removing the global flag is_psr_drrs_combo [Rodrigo].

Signed-off-by: Lohith BS 
Signed-off-by: aknautiy 
---
  tests/kms_frontbuffer_tracking.c | 184 +--
  1 file changed, 175 insertions(+), 9 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 1601cab..7876a12 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -34,7 +34,7 @@
  
  
  IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and "

-"its related features: FBC and PSR");
+"its related features: FBC, PSR and DRRS");
  
  /*

   * One of the aspects of this test is that, for every subtest, we try 
different
@@ -105,8 +105,9 @@ struct test_mode {
FEATURE_NONE  = 0,
FEATURE_FBC   = 1,
FEATURE_PSR   = 2,
-   FEATURE_COUNT = 4,
-   FEATURE_DEFAULT = 4,
+   FEATURE_DRRS  = 4,
+   FEATURE_COUNT = 8,
+   FEATURE_DEFAULT = 8,
} feature;
  
  	/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and

@@ -156,6 +157,7 @@ struct rect {
  struct {
int fd;
int debugfs;
+   int drrs_debugfs_fd;
drmModeResPtr res;
drmModeConnectorPtr connectors[MAX_CONNECTORS];
drmModeEncoderPtr encoders[MAX_ENCODERS];
@@ -182,6 +184,13 @@ struct {
.can_test = false,
  };
  
+#define MAX_DRRS_STATUS_BUF_LEN 256

+
+struct {
+   bool can_test;
+} drrs = {
+   .can_test = false,
+};
  
  #define SINK_CRC_SIZE 12

  typedef struct {
@@ -825,6 +834,64 @@ static void psr_print_status(void)
igt_info("PSR status:\n%s\n", buf);
  }
  
+void drrs_set(unsigned int val)

+{
+   char buf[2];
+
+   igt_debug("Manually %sabling DRRS. %llu\n", val ? "en" : "dis", val);
+   snprintf(buf, sizeof(buf), "%d", val);
+   igt_assert_eq(write(drm.drrs_debugfs_fd,
+ buf, strlen(buf)), strlen(buf));
+}
+
+static bool is_drrs_high(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_HIGH_RR");
+}
+
+static bool is_drrs_low(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_LOW_RR");
+}
+
+static bool is_drrs_supported(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS Supported: Yes");
+}
+
+static bool is_drrs_inactive(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+
+   if (strstr(buf, "No active crtc found"))
+

Re: [Intel-gfx] [PATCH v2 3/8] drm/i915/psr: Avoid initializing PSR if there is no sink support.

2018-01-03 Thread Rodrigo Vivi

first of all sorry for not getting back sooner on this...

On Tue, Dec 19, 2017 at 09:40:01PM +, Pandiyan, Dhinakaran wrote:
> 
> 
> 
> On Tue, 2017-12-19 at 13:29 -0800, Rodrigo Vivi wrote:
> > On Tue, Dec 19, 2017 at 05:26:54AM +, Dhinakaran Pandiyan wrote:
> > > DPCD read for the eDP is complete by the time intel_psr_init() is
> > > called, which means we can avoid initializing PSR structures and state
> > > if there is no sink support.
> > > 
> > > Cc: Rodrigo Vivi 
> > > Cc: Ville Syrjälä 
> > > Signed-off-by: Dhinakaran Pandiyan 
> > > ---
> > >  drivers/gpu/drm/i915/i915_debugfs.c | 7 ++-
> > >  drivers/gpu/drm/i915/intel_psr.c| 9 +
> > >  2 files changed, 15 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
> > > b/drivers/gpu/drm/i915/i915_debugfs.c
> > > index 64e5a263458c..1a7b28f62570 100644
> > > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > > @@ -2532,14 +2532,19 @@ static int i915_edp_psr_status(struct seq_file 
> > > *m, void *data)
> > >   u32 stat[3];
> > >   enum pipe pipe;
> > >   bool enabled = false;
> > > + bool sink_support;
> > >  
> > >   if (!HAS_PSR(dev_priv))
> > >   return -ENODEV;
> > >  
> > > + sink_support = dev_priv->psr.sink_support;
> > > + seq_printf(m, "Sink_Support: %s\n", yesno(sink_support));
> > > + if (!sink_support)
> > > + return 0;
> > > +
> > >   intel_runtime_pm_get(dev_priv);
> > >  
> > >   mutex_lock(_priv->psr.lock);
> > > - seq_printf(m, "Sink_Support: %s\n", yesno(dev_priv->psr.sink_support));
> > >   seq_printf(m, "Enabled: %s\n", yesno((bool)dev_priv->psr.enabled));
> > >   seq_printf(m, "Active: %s\n", yesno(dev_priv->psr.active));
> > >   seq_printf(m, "Busy frontbuffer bits: 0x%03x\n",
> > > diff --git a/drivers/gpu/drm/i915/intel_psr.c 
> > > b/drivers/gpu/drm/i915/intel_psr.c
> > > index 76339cf387cb..095e0a5a8574 100644
> > > --- a/drivers/gpu/drm/i915/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > > @@ -503,6 +503,9 @@ void intel_psr_enable(struct intel_dp *intel_dp,
> > >   if (!crtc_state->has_psr)
> > >   return;
> > >  
> > > + if (WARN_ON(!CAN_PSR(dev_priv)))
> > > + return;
> > 
> > hmm... I believe we will see this warning sooner than later...
> > 
> > has_psr is not the same as CAN_PSR.
> 
> has_psr should not be set in psr_compute_config() unless both source and
> sink have PSR. So, the warn_on is if we mess up the state preparation.
> > 
> > also, btw I didn't like all this crtc_state has_psr x has_psr2. :/
> > 
> > probably this series could also unify that and clean it up.
> > to many has_psr like cases.
> > 
> > > +
> > >   WARN_ON(dev_priv->drrs.dp);
> > >   mutex_lock(_priv->psr.lock);
> > >   if (dev_priv->psr.enabled) {
> > > @@ -633,6 +636,9 @@ void intel_psr_disable(struct intel_dp *intel_dp,
> > >   if (!old_crtc_state->has_psr)
> > >   return;
> > >  
> > > + if (WARN_ON(!CAN_PSR(dev_priv)))
> > > + return;
> > > +
> > >   mutex_lock(_priv->psr.lock);
> > >   if (!dev_priv->psr.enabled) {
> > >   mutex_unlock(_priv->psr.lock);
> > > @@ -913,6 +919,9 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
> > >   dev_priv->psr_mmio_base = IS_HASWELL(dev_priv) ?
> > >   HSW_EDP_PSR_BASE : BDW_EDP_PSR_BASE;
> > >  
> > > + if (!dev_priv->psr.sink_support)
> > > + return;
> > > +
> > 
> > Why not use CAN_PSR here?
> 
> 
> So that we have the right MMIO's in case we want to probe the HW with no
> sink support. I wasn't what would happen if we reg_read() on PSR
> registers without the correct MMIO base.

But isn't the goal of CAN_PSR to avoid any extra calls on platforms
that either doesn't have support nor the panel? In this case we should
never being touching any register.

> 
> > 
> > >   /* Per platform default: all disabled. */
> > >   if (i915_modparams.enable_psr == -1)
> > >   i915_modparams.enable_psr = 0;
> > > -- 
> > > 2.11.0
> > > 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/psr: Kill psr.source_ok flag.

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/3] drm/i915/psr: Kill psr.source_ok flag.
URL   : https://patchwork.freedesktop.org/series/35965/
State : success

== Summary ==

Series 35965v1 series starting with [1/3] drm/i915/psr: Kill psr.source_ok flag.
https://patchwork.freedesktop.org/api/1.0/series/35965/revisions/1/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> PASS   (fi-elk-e7500) fdo#103989 +1
Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:439s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:438s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:381s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:494s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:275s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:492s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:493s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:476s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:465s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:525s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:405s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:414s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:425s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:460s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:428s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:510s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:469s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:515s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:577s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:443s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:520s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:539s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:507s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:511s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:447s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:544s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:417s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:571s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:485s

d26e7804b83cf7d3754323d02afa5ff04326d33d drm-tip: 2018y-01m-03d-17h-48m-30s UTC 
integration manifest
2920bf42bbad drm/i915/psr: Avoid initializing PSR if there is no sink support.
f10a2c213555 drm/i915/psr: CAN_PSR() macro to check for PSR source and sink 
support.
97f18fc1b7cb drm/i915/psr: Kill psr.source_ok flag.

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7603/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Alexandru Chirvasitu
All right, here's the dmesg from the kernel compiled from drm-tip (in
sync with upstream at the time of the compilation earlier today), with

CONFIG_DRM_I915_DEBUG_GEM=y

I crashed it by opening 20+ xterm windows. Doesn't always do it though
(tried this before).

On Wed, Jan 03, 2018 at 11:31:31AM -0500, Alexandru Chirvasitu wrote:
> Thank you for that!
> 
> I'd been getting used to seeing warnings to that effect, so got
> complacent and stopped checking for errors..
> 
> In any case, it's now compiled and installed, and I will report back
> with any new logs if / when another hang occurs.
> 
> On Wed, Jan 03, 2018 at 02:53:45PM +, Chris Wilson wrote:
> > Quoting Alexandru Chirvasitu (2018-01-03 14:48:26)
> > > Here's the log for the make bzImage and modules without ccache.
> > > 
> > > I ran it with j8 still because otherwise it would take very long, but
> > > if I run out of options I'll try plain too..
> > > 
> > > In the meantime I'd like to try some other configs; maybe specific
> > > drivers are messing me up.
> > > 
> > > I swear to god it was working all right yesterday..
> > 
> > drivers/gpu/drm/i915/intel_dpio_phy.c:442:1: error: the frame size of
> > 1168 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
> > 
> > Go into the kconfig compiler options and increase the limit or disable
> > the warning. See CONFIG_FRAME_WARN.
> > -Chris
[0.00] microcode: microcode updated early to revision 0x62, date = 
2017-04-27
[0.00] Linux version 4.15.0-rc6-drm-debug+ (root@axiomatic) (gcc 
version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5)) #1 SMP PREEMPT Wed Jan 
3 11:04:15 EST 2018
[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-rc6-drm-debug+ 
root=UUID=1e9f6fc3-400d-44b7-838c-93777e2f0662 ro loglevel=4 slub_debug=P 
page_poison=1
[0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point 
registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[0.00] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[0.00] x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
[0.00] x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
[0.00] x86/fpu: Enabled xstate features 0x1f, context size is 960 
bytes, using 'compacted' format.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009c3ff] usable
[0.00] BIOS-e820: [mem 0x0009c400-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000e-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x86ebbfff] usable
[0.00] BIOS-e820: [mem 0x86ebc000-0x871bbfff] ACPI NVS
[0.00] BIOS-e820: [mem 0x871bc000-0x880e2fff] usable
[0.00] BIOS-e820: [mem 0x880e3000-0x880e3fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x880e4000-0x880e4fff] reserved
[0.00] BIOS-e820: [mem 0x880e5000-0x8c227fff] usable
[0.00] BIOS-e820: [mem 0x8c228000-0x8cb97fff] reserved
[0.00] BIOS-e820: [mem 0x8cb98000-0x8cc67fff] usable
[0.00] BIOS-e820: [mem 0x8cc68000-0x8cfe1fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x8cfe2000-0x8d3fdfff] reserved
[0.00] BIOS-e820: [mem 0x8d3fe000-0x8d3fefff] usable
[0.00] BIOS-e820: [mem 0x8d3ff000-0x8fff] reserved
[0.00] BIOS-e820: [mem 0xe000-0xefff] reserved
[0.00] BIOS-e820: [mem 0xfe00-0xfe010fff] reserved
[0.00] BIOS-e820: [mem 0xfec0-0xfec00fff] reserved
[0.00] BIOS-e820: [mem 0xfed0-0xfed00fff] reserved
[0.00] BIOS-e820: [mem 0xfee0-0xfee00fff] reserved
[0.00] BIOS-e820: [mem 0xff00-0x] reserved
[0.00] BIOS-e820: [mem 0x0001-0x00086eff] usable
[0.00] NX (Execute Disable) protection: active
[0.00] random: fast init done
[0.00] SMBIOS 3.0.0 present.
[0.00] DMI: Notebook N24_25BU/N24_25BU, BIOS 
5.12 02/17/2017
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x86f000 max_arch_pfn = 0x4
[0.00] MTRR default type: write-back
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-B uncachable
[0.00]   C-F write-protect
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 

[Intel-gfx] [PATCH 3/3] drm/i915/psr: Avoid initializing PSR if there is no sink support.

2018-01-03 Thread Dhinakaran Pandiyan
DPCD read for the eDP is complete by the time intel_psr_init() is
called, which means we can avoid initializing PSR structures and state
if there is no sink support.

Cc: Rodrigo Vivi 
Cc: Ville Syrjälä 
Signed-off-by: Dhinakaran Pandiyan 
---
 drivers/gpu/drm/i915/i915_debugfs.c | 7 ++-
 drivers/gpu/drm/i915/intel_psr.c| 9 +
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index 6890340387b7..cc659b4b2a45 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2521,14 +2521,19 @@ static int i915_edp_psr_status(struct seq_file *m, void 
*data)
u32 stat[3];
enum pipe pipe;
bool enabled = false;
+   bool sink_support;
 
if (!HAS_PSR(dev_priv))
return -ENODEV;
 
+   sink_support = dev_priv->psr.sink_support;
+   seq_printf(m, "Sink_Support: %s\n", yesno(sink_support));
+   if (!sink_support)
+   return 0;
+
intel_runtime_pm_get(dev_priv);
 
mutex_lock(_priv->psr.lock);
-   seq_printf(m, "Sink_Support: %s\n", yesno(dev_priv->psr.sink_support));
seq_printf(m, "Enabled: %s\n", yesno((bool)dev_priv->psr.enabled));
seq_printf(m, "Active: %s\n", yesno(dev_priv->psr.active));
seq_printf(m, "Busy frontbuffer bits: 0x%03x\n",
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index df9b1d7baefb..863650366425 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -503,6 +503,9 @@ void intel_psr_enable(struct intel_dp *intel_dp,
if (!crtc_state->has_psr)
return;
 
+   if (WARN_ON(!CAN_PSR(dev_priv)))
+   return;
+
WARN_ON(dev_priv->drrs.dp);
mutex_lock(_priv->psr.lock);
if (dev_priv->psr.enabled) {
@@ -633,6 +636,9 @@ void intel_psr_disable(struct intel_dp *intel_dp,
if (!old_crtc_state->has_psr)
return;
 
+   if (WARN_ON(!CAN_PSR(dev_priv)))
+   return;
+
mutex_lock(_priv->psr.lock);
if (!dev_priv->psr.enabled) {
mutex_unlock(_priv->psr.lock);
@@ -913,6 +919,9 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
dev_priv->psr_mmio_base = IS_HASWELL(dev_priv) ?
HSW_EDP_PSR_BASE : BDW_EDP_PSR_BASE;
 
+   if (!dev_priv->psr.sink_support)
+   return;
+
/* Per platform default: all disabled. */
if (i915_modparams.enable_psr == -1)
i915_modparams.enable_psr = 0;
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/3] drm/i915/psr: CAN_PSR() macro to check for PSR source and sink support.

2018-01-03 Thread Dhinakaran Pandiyan
The global variable dev_priv->psr.sink_support is set if an eDP sink
supports PSR. Use this instead of redoing the check with is_edp_psr().
Combine source and sink support checks into a macro that can be used to
return early from psr_{invalidate, single_frame_update, flush}.

Cc: Rodrigo Vivi 
Signed-off-by: Dhinakaran Pandiyan 
Reviewed-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 drivers/gpu/drm/i915/intel_psr.c | 19 ---
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 30f791f89d64..48676e99316e 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1760,6 +1760,7 @@ static inline void 
intel_backlight_device_unregister(struct intel_connector *con
 
 
 /* intel_psr.c */
+#define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support)
 void intel_psr_enable(struct intel_dp *intel_dp,
  const struct intel_crtc_state *crtc_state);
 void intel_psr_disable(struct intel_dp *intel_dp,
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 17636dce1cb0..df9b1d7baefb 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -56,14 +56,6 @@
 #include "intel_drv.h"
 #include "i915_drv.h"
 
-static bool is_edp_psr(struct intel_dp *intel_dp)
-{
-   if (!intel_dp_is_edp(intel_dp))
-   return false;
-
-   return intel_dp->psr_dpcd[0] & DP_PSR_IS_SUPPORTED;
-}
-
 static bool vlv_is_psr_active_on_pipe(struct drm_device *dev, int pipe)
 {
struct drm_i915_private *dev_priv = to_i915(dev);
@@ -358,10 +350,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp,
_state->base.adjusted_mode;
int psr_setup_time;
 
-   if (!HAS_PSR(dev_priv))
-   return;
-
-   if (!is_edp_psr(intel_dp))
+   if (!CAN_PSR(dev_priv))
return;
 
if (!i915_modparams.enable_psr) {
@@ -794,7 +783,7 @@ void intel_psr_single_frame_update(struct drm_i915_private 
*dev_priv,
enum pipe pipe;
u32 val;
 
-   if (!HAS_PSR(dev_priv))
+   if (!CAN_PSR(dev_priv))
return;
 
/*
@@ -843,7 +832,7 @@ void intel_psr_invalidate(struct drm_i915_private *dev_priv,
struct drm_crtc *crtc;
enum pipe pipe;
 
-   if (!HAS_PSR(dev_priv))
+   if (!CAN_PSR(dev_priv))
return;
 
mutex_lock(_priv->psr.lock);
@@ -883,7 +872,7 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,
struct drm_crtc *crtc;
enum pipe pipe;
 
-   if (!HAS_PSR(dev_priv))
+   if (!CAN_PSR(dev_priv))
return;
 
mutex_lock(_priv->psr.lock);
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 1/3] drm/i915/psr: Kill psr.source_ok flag.

2018-01-03 Thread Dhinakaran Pandiyan
This flag has become redundant since
commit 4d90f2d507ab ("drm/i915: Start tracking PSR state in crtc state")
It is set at the same place as psr.enabled, which is also exposed via
debugfs.

Cc: Rodrigo Vivi 
Cc: Ville Syrjälä 
Signed-off-by: Dhinakaran Pandiyan 
Acked-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/i915_debugfs.c | 1 -
 drivers/gpu/drm/i915/i915_drv.h | 1 -
 drivers/gpu/drm/i915/intel_psr.c| 2 --
 3 files changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index 2bb63073d73f..6890340387b7 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2529,7 +2529,6 @@ static int i915_edp_psr_status(struct seq_file *m, void 
*data)
 
mutex_lock(_priv->psr.lock);
seq_printf(m, "Sink_Support: %s\n", yesno(dev_priv->psr.sink_support));
-   seq_printf(m, "Source_OK: %s\n", yesno(dev_priv->psr.source_ok));
seq_printf(m, "Enabled: %s\n", yesno((bool)dev_priv->psr.enabled));
seq_printf(m, "Active: %s\n", yesno(dev_priv->psr.active));
seq_printf(m, "Busy frontbuffer bits: 0x%03x\n",
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index caebd5825279..cb1b69e7f439 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -754,7 +754,6 @@ struct i915_drrs {
 struct i915_psr {
struct mutex lock;
bool sink_support;
-   bool source_ok;
struct intel_dp *enabled;
bool active;
struct delayed_work work;
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 2e32615eeada..17636dce1cb0 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -522,8 +522,6 @@ void intel_psr_enable(struct intel_dp *intel_dp,
}
 
dev_priv->psr.psr2_support = crtc_state->has_psr2;
-   dev_priv->psr.source_ok = true;
-
dev_priv->psr.busy_frontbuffer_bits = 0;
 
dev_priv->psr.setup_vsc(intel_dp, crtc_state);
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/glk: Disable Guc and HuC on GLK (rev4)

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm/i915/glk: Disable Guc and HuC on GLK (rev4)
URL   : https://patchwork.freedesktop.org/series/35381/
State : failure

== Summary ==

Warning: bzip CI_DRM_3595/shard-glkb2/results3.json.bz2 wasn't in correct JSON 
format
Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> DMESG-WARN (shard-hsw) fdo#104218
Test gem_mmap_wc:
Subgroup write-read-distinct:
pass   -> INCOMPLETE (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
pass   -> FAIL   (shard-snb) fdo#101623 +1
Test drv_suspend:
Subgroup debugfs-reader-hibernate:
skip   -> FAIL   (shard-hsw) fdo#103375 +1

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:2641 pass:1497 dwarn:2   dfail:0   fail:10  skip:1131 
time:9022s
shard-snbtotal:2713 pass:1309 dwarn:1   dfail:0   fail:12  skip:1391 
time:8109s
Blacklisted hosts:
shard-apltotal:2713 pass:1686 dwarn:1   dfail:0   fail:25  skip:1001 
time:13691s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7600/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/dmc: DMC 1.07 for Cannonlake (rev3)

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm/i915/dmc: DMC 1.07 for Cannonlake (rev3)
URL   : https://patchwork.freedesktop.org/series/35651/
State : failure

== Summary ==

Applying: drm/i915/dmc: DMC 1.07 for Cannonlake
error: sha1 information is lacking or useless 
(drivers/gpu/drm/i915/intel_csr.c).
error: could not build fake ancestor
Patch failed at 0001 drm/i915/dmc: DMC 1.07 for Cannonlake
The copy of the patch that failed is found in: .git/rebase-apply/patch
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 mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/dmc: DMC 1.07 for Cannonlake

2018-01-03 Thread Anusha Srivatsa
There is a new version of DMC available for CNL.

The release notes mentions:
1. Fix for the issue where DC_STATE was getting enabled
even when disabled by driver causing data corruption

v2: Since the firmware is  merged to linux-firmware.git,
add MODUE_FIRMWARE.

Cc: Rodrigo Vivi 
Signed-off-by: Anusha Srivatsa 
Reviewed-by: Rodrigo Vivi 
---
 drivers/gpu/drm/i915/intel_csr.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index f417101..0d7b3b6 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -37,8 +37,9 @@
 #define I915_CSR_GLK "i915/glk_dmc_ver1_04.bin"
 #define GLK_CSR_VERSION_REQUIRED   CSR_VERSION(1, 4)
 
-#define I915_CSR_CNL "i915/cnl_dmc_ver1_06.bin"
-#define CNL_CSR_VERSION_REQUIRED   CSR_VERSION(1, 6)
+#define I915_CSR_CNL "i915/cnl_dmc_ver1_07.bin"
+MODULE_FIRMWARE(I915_CSR_CNL);
+#define CNL_CSR_VERSION_REQUIRED   CSR_VERSION(1, 7)
 
 #define I915_CSR_KBL "i915/kbl_dmc_ver1_01.bin"
 MODULE_FIRMWARE(I915_CSR_KBL);
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for drm: i915: Fix audio issue on BXT

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm: i915: Fix audio issue on BXT
URL   : https://patchwork.freedesktop.org/series/35955/
State : success

== Summary ==

Warning: bzip CI_DRM_3595/shard-glkb2/results3.json.bz2 wasn't in correct JSON 
format
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
pass   -> FAIL   (shard-snb) fdo#101623 +1
Test gem_softpin:
Subgroup noreloc-s4:
skip   -> FAIL   (shard-snb) fdo#103375 +1

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:2713 pass:1538 dwarn:1   dfail:0   fail:10  skip:1164 
time:9386s
shard-snbtotal:2713 pass:1309 dwarn:1   dfail:0   fail:12  skip:1391 
time:8067s
Blacklisted hosts:
shard-apltotal:2713 pass:1687 dwarn:1   dfail:0   fail:24  skip:1001 
time:13759s
shard-kbltotal:2712 pass:1798 dwarn:9   dfail:1   fail:26  skip:877 
time:10676s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7599/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm: i915: Fix audio issue on BXT

2018-01-03 Thread Rodrigo Vivi
On Wed, Jan 03, 2018 at 08:31:10PM +, Pandiyan, Dhinakaran wrote:
> 
> On Thu, 2018-01-04 at 00:48 +0530, Gaurav K Singh wrote:
> > From: Gaurav Singh 
> > 
> > On Apollolake, with stress test warm reboot, audio card
> > was not getting enumerated after reboot. This was a
> 
> The problem looks similar to
> https://lists.freedesktop.org/archives/intel-gfx/2017-October/144495.html
> 
> although the proposed solutions are vastly different. I have Cc'd some
> more people. 
> 
> > spurious issue happening on Apollolake. HW codec and
> > HD audio controller link was going out of sync for which
> > there was a fix in i915 driver but was not getting invoked
> > for BXT. Extending this fix to BXT as well.
> > 
> > Tested on apollolake chromebook by stress test warm reboot
> > with 2500 iterations.
> > 
> > Signed-off-by: Gaurav K Singh 
> > ---
> >  drivers/gpu/drm/i915/intel_audio.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c 
> > b/drivers/gpu/drm/i915/intel_audio.c
> > index f1502a0188eb..c71c04e1c3f6 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -729,7 +729,7 @@ static void 
> > i915_audio_component_codec_wake_override(struct device *kdev,
> > struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
> > u32 tmp;
> >  
> > -   if (!IS_GEN9_BC(dev_priv))
> > +   if (!IS_GEN9_BC(dev_priv) && !IS_BROXTON(dev_priv))
> 
> IS_GEN9()? GLK might need this too.

if GLK need there is the possibility of CNL also needing it...
So not sure where to stop.

Also looking to the original patch that introduced this function,
commit '632f3ab95fe2 ("drm/i915/audio: add codec wakeup override
enabled/disable callback")'

it tells that the reason was:
"In SKL, HDMI/DP codec and PCH HD Audio Controller are in different p$
wells, so it's necessary to reset display audio codecs when power we$
otherwise display audio codecs will disappear when resume from low p$
state."

Is this the case here on BXT?

Another interesting thing I noticed on Spec when searching for this bit
was that this bit is related to an workaround on SKL/KBL/CFL... no mention
to BXT.

"This workaround is needed for an HW issue in SKL and KBL in which HW codec
and HD audio controller link was going out of sync."

Thanks,
Rodrigo.

> 
> 
> > return;
> >  
> > i915_audio_component_get_power(kdev);
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/5] drm/vblank: Do not update vblank counts if vblanks are already disabled.

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/5] drm/vblank: Do not update vblank counts if 
vblanks are already disabled.
URL   : https://patchwork.freedesktop.org/series/35959/
State : success

== Summary ==

Series 35959v1 series starting with [1/5] drm/vblank: Do not update vblank 
counts if vblanks are already disabled.
https://patchwork.freedesktop.org/api/1.0/series/35959/revisions/1/mbox/

Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:433s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:439s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:380s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:491s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:279s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:491s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:493s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:477s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:468s
fi-elk-e7500 total:224  pass:168  dwarn:9   dfail:1   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:521s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:410s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:423s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:474s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:430s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:478s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:507s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:464s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:515s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:586s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:444s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:521s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:539s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:505s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:486s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:443s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:542s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:414s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:577s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:478s

d26e7804b83cf7d3754323d02afa5ff04326d33d drm-tip: 2018y-01m-03d-17h-48m-30s UTC 
integration manifest
ce54eb2bad9e drm/i915: Use the vblank power domain disallow or disable DC 
states.
1028987b2353 drm/i915: Introduce a non-blocking power domain for vblank 
interrupts
5f157a49993f drm/i915: Enable vblanks after verifying power domain states.
556cdbf0cced drm/vblank: Restoring vblank counts after device runtime PM events.
8668247cf2d1 drm/vblank: Do not update vblank counts if vblanks are already 
disabled.

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7601/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 3/5] drm/i915: Enable vblanks after verifying power domain states.

2018-01-03 Thread Chris Wilson
Quoting Dhinakaran Pandiyan (2018-01-03 20:39:59)
> Since we want to allow for a non-blocking power domain for vblanks,
> the power domain use count and power well use count will not be updated
> atomically inside the power domain mutex (see next patch). This affects
> verifying if sum(power_domain_use_count) == power_well_use_count at
> init time. So do not enable vblanks until this verification is done.
> 
> Cc: Daniel Vetter 
> Cc: Ville Syrjälä 
> Cc: Rodrigo Vivi 
> Cc: Maarten Lankhorst 
> Signed-off-by: Dhinakaran Pandiyan 
> ---
>  drivers/gpu/drm/i915/intel_display.c | 24 
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index 0cd355978ab4..7bc874b8dac7 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14739,6 +14739,24 @@ static bool has_pch_trancoder(struct 
> drm_i915_private *dev_priv,
> (HAS_PCH_LPT_H(dev_priv) && pch_transcoder == PIPE_A);
>  }
>  
> +static void modeset_enable_vblanks(struct drm_i915_private *dev_priv)
> +{
> +   enum pipe pipe;
> +
> +   for_each_pipe(dev_priv, pipe) {

for_each_intel_crtc()
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 2/5] drm/vblank: Restoring vblank counts after device runtime PM events.

2018-01-03 Thread Chris Wilson
Quoting Dhinakaran Pandiyan (2018-01-03 20:39:58)
> The HW frame counter can get reset when devices enters low power
> states and this messes up any following vblank count updates. So, compute
> the missed vblank interrupts for that low power state duration using time
> stamps. This is similar to _crtc_vblank_on() except that it doesn't enable
> vblank interrupts because this function is expected to be called from
> the driver _enable_vblank() vfunc.
> 
> Cc: Daniel Vetter 
> Cc: Ville Syrjälä 
> Cc: Rodrigo Vivi 
> Signed-off-by: Dhinakaran Pandiyan 
> ---
>  drivers/gpu/drm/drm_vblank.c | 33 +
>  include/drm/drm_vblank.h |  1 +
>  2 files changed, 34 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 7eee82c06ed8..494e2cff6e55 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -1230,6 +1230,39 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc)
>  }
>  EXPORT_SYMBOL(drm_crtc_vblank_on);
>  
> +void drm_crtc_vblank_restore(struct drm_device *dev, unsigned int pipe)

drm_crtc_* should be taking the drm_crtc.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 1/5] drm/vblank: Do not update vblank counts if vblanks are already disabled.

2018-01-03 Thread Chris Wilson
Quoting Dhinakaran Pandiyan (2018-01-03 20:39:57)
> Updating the vblank counts requires register reads and these reads may not
> return meaningful values after the vblank interrupts are disabled as the
> device may go to low power state. An additional change would be to allow
> the driver to save the vblank counts before entering a low power state, but
> that's for the future.
> 
> Also, disable vblanks after reading the HW counter in the case where
> _crtc_vblank_off() is disabling vblanks.
> 
> Cc: Daniel Vetter 
> Cc: Ville Syrjälä 
> Cc: Rodrigo Vivi 
> Signed-off-by: Dhinakaran Pandiyan 
> ---
>  drivers/gpu/drm/drm_vblank.c | 23 +--
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 32d9bcf5be7f..7eee82c06ed8 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -347,23 +347,14 @@ void drm_vblank_disable_and_save(struct drm_device 
> *dev, unsigned int pipe)
> spin_lock_irqsave(>vblank_time_lock, irqflags);
>  
> /*
> -* Only disable vblank interrupts if they're enabled. This avoids
> -* calling the ->disable_vblank() operation in atomic context with the
> -* hardware potentially runtime suspended.
> -*/
> -   if (vblank->enabled) {
> -   __disable_vblank(dev, pipe);
> -   vblank->enabled = false;
> -   }
> -
> -   /*
> -* Always update the count and timestamp to maintain the
> +* Update the count and timestamp to maintain the
>  * appearance that the counter has been ticking all along until
>  * this time. This makes the count account for the entire time
>  * between drm_crtc_vblank_on() and drm_crtc_vblank_off().
>  */
> drm_update_vblank_count(dev, pipe, false);
> -
> +   __disable_vblank(dev, pipe);
> +   vblank->enabled = false;
> spin_unlock_irqrestore(>vblank_time_lock, irqflags);
>  }
>  
> @@ -1122,8 +1113,12 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc)
>   pipe, vblank->enabled, vblank->inmodeset);
>  
> /* Avoid redundant vblank disables without previous
> -* drm_crtc_vblank_on(). */
> -   if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset)
> +* drm_crtc_vblank_on() and only disable them if they're enabled. This
> +* avoids calling the ->disable_vblank() operation in atomic context
> +* with the hardware potentially runtime suspended.
> +*/
> +   if ((drm_core_check_feature(dev, DRIVER_ATOMIC) || 
> !vblank->inmodeset) &&
> +   vblank->enabled)

Outside of the spinlock protecting vblank->enabled.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 3/5] drm/i915: Enable vblanks after verifying power domain states.

2018-01-03 Thread Dhinakaran Pandiyan
Since we want to allow for a non-blocking power domain for vblanks,
the power domain use count and power well use count will not be updated
atomically inside the power domain mutex (see next patch). This affects
verifying if sum(power_domain_use_count) == power_well_use_count at
init time. So do not enable vblanks until this verification is done.

Cc: Daniel Vetter 
Cc: Ville Syrjälä 
Cc: Rodrigo Vivi 
Cc: Maarten Lankhorst 
Signed-off-by: Dhinakaran Pandiyan 
---
 drivers/gpu/drm/i915/intel_display.c | 24 
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 0cd355978ab4..7bc874b8dac7 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14739,6 +14739,24 @@ static bool has_pch_trancoder(struct drm_i915_private 
*dev_priv,
(HAS_PCH_LPT_H(dev_priv) && pch_transcoder == PIPE_A);
 }
 
+static void modeset_enable_vblanks(struct drm_i915_private *dev_priv)
+{
+   enum pipe pipe;
+
+   for_each_pipe(dev_priv, pipe) {
+   struct intel_crtc *crtc;
+
+   crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
+
+   /* restore vblank interrupts to correct state */
+   drm_crtc_vblank_reset(>base);
+
+   if (crtc->active)
+   drm_crtc_vblank_on(>base);
+   }
+}
+
+
 static void intel_sanitize_crtc(struct intel_crtc *crtc,
struct drm_modeset_acquire_ctx *ctx)
 {
@@ -14754,13 +14772,9 @@ static void intel_sanitize_crtc(struct intel_crtc 
*crtc,
   I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK);
}
 
-   /* restore vblank interrupts to correct state */
-   drm_crtc_vblank_reset(>base);
if (crtc->active) {
struct intel_plane *plane;
 
-   drm_crtc_vblank_on(>base);
-
/* Disable everything but the primary plane */
for_each_intel_plane_on_crtc(dev, crtc, plane) {
const struct intel_plane_state *plane_state =
@@ -15147,6 +15161,8 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
 
intel_power_domains_verify_state(dev_priv);
 
+   modeset_enable_vblanks(dev_priv);
+
intel_fbc_init_pipe_state(dev_priv);
 }
 
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/5] drm/vblank: Restoring vblank counts after device runtime PM events.

2018-01-03 Thread Dhinakaran Pandiyan
The HW frame counter can get reset when devices enters low power
states and this messes up any following vblank count updates. So, compute
the missed vblank interrupts for that low power state duration using time
stamps. This is similar to _crtc_vblank_on() except that it doesn't enable
vblank interrupts because this function is expected to be called from
the driver _enable_vblank() vfunc.

Cc: Daniel Vetter 
Cc: Ville Syrjälä 
Cc: Rodrigo Vivi 
Signed-off-by: Dhinakaran Pandiyan 
---
 drivers/gpu/drm/drm_vblank.c | 33 +
 include/drm/drm_vblank.h |  1 +
 2 files changed, 34 insertions(+)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 7eee82c06ed8..494e2cff6e55 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -1230,6 +1230,39 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc)
 }
 EXPORT_SYMBOL(drm_crtc_vblank_on);
 
+void drm_crtc_vblank_restore(struct drm_device *dev, unsigned int pipe)
+{
+   ktime_t t_vblank;
+   struct drm_vblank_crtc *vblank;
+   int framedur_ns;
+   u64 diff_ns;
+   u32 cur_vblank, diff = 1;
+   int count = DRM_TIMESTAMP_MAXRETRIES;
+
+   if (WARN_ON(pipe >= dev->num_crtcs))
+   return;
+
+   vblank = >vblank[pipe];
+   WARN_ONCE((drm_debug & DRM_UT_VBL) && !vblank->framedur_ns,
+ "Cannot compute missed vblanks without frame duration\n");
+   framedur_ns = vblank->framedur_ns;
+
+   do {
+   cur_vblank = __get_vblank_counter(dev, pipe);
+   drm_get_last_vbltimestamp(dev, pipe, _vblank, false);
+   } while (cur_vblank != __get_vblank_counter(dev, pipe) && --count > 0);
+
+   diff_ns = ktime_to_ns(ktime_sub(t_vblank, vblank->time));
+   if (framedur_ns)
+   diff = DIV_ROUND_CLOSEST_ULL(diff_ns, framedur_ns);
+
+
+   DRM_DEBUG_VBL("missed %d vblanks in %lld ns, frame duration=%d ns, 
hw_diff=%d\n",
+ diff, diff_ns, framedur_ns, cur_vblank - vblank->last);
+   store_vblank(dev, pipe, diff, t_vblank, cur_vblank);
+}
+EXPORT_SYMBOL(drm_crtc_vblank_restore);
+
 static void drm_legacy_vblank_pre_modeset(struct drm_device *dev,
  unsigned int pipe)
 {
diff --git a/include/drm/drm_vblank.h b/include/drm/drm_vblank.h
index 848b463a0af5..aafcbef91bd7 100644
--- a/include/drm/drm_vblank.h
+++ b/include/drm/drm_vblank.h
@@ -180,6 +180,7 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc);
 void drm_crtc_vblank_reset(struct drm_crtc *crtc);
 void drm_crtc_vblank_on(struct drm_crtc *crtc);
 u32 drm_crtc_accurate_vblank_count(struct drm_crtc *crtc);
+void drm_crtc_vblank_restore(struct drm_device *dev, unsigned int pipe);
 
 bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
   unsigned int pipe, int *max_error,
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 4/5] drm/i915: Introduce a non-blocking power domain for vblank interrupts

2018-01-03 Thread Dhinakaran Pandiyan
When DC states are enabled and PSR is active, the hardware enters DC5/DC6
states resulting in the frame counter resetting. The frame counter reset
mess up the vblank counting logic as the diff between the new frame
counter value and the previous is negative, and this negative diff gets
applied as an unsigned value to the vblank count. We cannot reject negative
diffs altogether because they can arise from legitimate frame counter
overflows when there is a long period with vblank disabled. So, this
approach allows for the driver to notice a DC state toggle between a vblank
disable and enable and fill in the missed vblanks.

But, in order to disable DC states when vblank interrupts are required,
the DC_OFF power well has to be disabled in an atomic context. So,
introduce a new VBLANK power domain that can be acquired and released in
atomic contexts with these changes -
1)  _vblank_get() and _vblank_put() methods skip the power_domain mutex
and use a spin lock for the DC power well.
2) power_domains->domain_use_count is converted to an atomic_t array so
that it can be updated outside of the power domain mutex.

v3: Squash domain_use_count atomic_t conversion (Maarten)
v2: Fix deadlock by switching irqsave spinlock.
Implement atomic version of get_if_enabled.
Modify power_domain_verify_state to check power well use count and
enabled status atomically.
Rewrite of intel_power_well_{get,put}

Cc: Maarten Lankhorst 
Cc: Daniel Vetter 
Cc: Ville Syrjälä 
Cc: Rodrigo Vivi 
Signed-off-by: Dhinakaran Pandiyan 
---
 drivers/gpu/drm/i915/i915_debugfs.c |   2 +-
 drivers/gpu/drm/i915/i915_drv.h |  19 +++-
 drivers/gpu/drm/i915/intel_display.h|   1 +
 drivers/gpu/drm/i915/intel_drv.h|   3 +
 drivers/gpu/drm/i915/intel_runtime_pm.c | 195 
 5 files changed, 199 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index d81cb2513069..5a7ce734de02 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2746,7 +2746,7 @@ static int i915_power_domain_info(struct seq_file *m, 
void *unused)
for_each_power_domain(power_domain, power_well->domains)
seq_printf(m, "  %-23s %d\n",
 intel_display_power_domain_str(power_domain),
-power_domains->domain_use_count[power_domain]);
+
atomic_read(_domains->domain_use_count[power_domain]));
}
 
mutex_unlock(_domains->lock);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index caebd5825279..61a635f03af7 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1032,6 +1032,23 @@ struct i915_power_well {
bool has_fuses:1;
} hsw;
};
+
+   /* Lock to serialize access to count, hw_enabled and ops, used for
+* power wells that have supports_atomix_ctx set to True.
+*/
+   spinlock_t lock;
+
+   /* Indicates that the get/put methods for this power well can be called
+* in atomic contexts, requires .ops to not sleep. This is valid
+* only for the DC_OFF power well currently.
+*/
+   bool supports_atomic_ctx;
+
+   /* DC_OFF power well was disabled since the last time vblanks were
+* disabled.
+*/
+   bool dc_off_disabled;
+
const struct i915_power_well_ops *ops;
 };
 
@@ -1045,7 +1062,7 @@ struct i915_power_domains {
int power_well_count;
 
struct mutex lock;
-   int domain_use_count[POWER_DOMAIN_NUM];
+   atomic_t domain_use_count[POWER_DOMAIN_NUM];
struct i915_power_well *power_wells;
 };
 
diff --git a/drivers/gpu/drm/i915/intel_display.h 
b/drivers/gpu/drm/i915/intel_display.h
index a0d2b6169361..3e9671ff6f79 100644
--- a/drivers/gpu/drm/i915/intel_display.h
+++ b/drivers/gpu/drm/i915/intel_display.h
@@ -172,6 +172,7 @@ enum intel_display_power_domain {
POWER_DOMAIN_AUX_C,
POWER_DOMAIN_AUX_D,
POWER_DOMAIN_GMBUS,
+   POWER_DOMAIN_VBLANK,
POWER_DOMAIN_MODESET,
POWER_DOMAIN_GT_IRQ,
POWER_DOMAIN_INIT,
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 30f791f89d64..164e62cb047b 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1797,6 +1797,9 @@ bool intel_display_power_get_if_enabled(struct 
drm_i915_private *dev_priv,
enum intel_display_power_domain domain);
 void intel_display_power_put(struct drm_i915_private *dev_priv,
 enum intel_display_power_domain domain);
+void intel_display_power_vblank_get(struct 

[Intel-gfx] [PATCH 5/5] drm/i915: Use the vblank power domain disallow or disable DC states.

2018-01-03 Thread Dhinakaran Pandiyan
Disable DC states before enabling vblank interrupts and conversely
enable DC states after disabling. Since the frame counter may have got
reset between disabling and enabling, use drm_crtc_vblank_restore() to
compute the missed vblanks.

Cc: Daniel Vetter 
Cc: Ville Syrjälä 
Cc: Rodrigo Vivi 
Signed-off-by: Dhinakaran Pandiyan 
---
 drivers/gpu/drm/i915/i915_irq.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 3517c6548e2c..88b4ceac55d0 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2963,6 +2963,11 @@ static int gen8_enable_vblank(struct drm_device *dev, 
unsigned int pipe)
 {
struct drm_i915_private *dev_priv = to_i915(dev);
unsigned long irqflags;
+   bool needs_restore = false;
+
+   intel_display_power_vblank_get(dev_priv, _restore);
+   if (needs_restore)
+   drm_crtc_vblank_restore(dev, pipe);
 
spin_lock_irqsave(_priv->irq_lock, irqflags);
bdw_enable_pipe_irq(dev_priv, pipe, GEN8_PIPE_VBLANK);
@@ -3015,6 +3020,7 @@ static void gen8_disable_vblank(struct drm_device *dev, 
unsigned int pipe)
spin_lock_irqsave(_priv->irq_lock, irqflags);
bdw_disable_pipe_irq(dev_priv, pipe, GEN8_PIPE_VBLANK);
spin_unlock_irqrestore(_priv->irq_lock, irqflags);
+   intel_display_power_vblank_put(dev_priv);
 }
 
 static void ibx_irq_reset(struct drm_i915_private *dev_priv)
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 1/5] drm/vblank: Do not update vblank counts if vblanks are already disabled.

2018-01-03 Thread Dhinakaran Pandiyan
Updating the vblank counts requires register reads and these reads may not
return meaningful values after the vblank interrupts are disabled as the
device may go to low power state. An additional change would be to allow
the driver to save the vblank counts before entering a low power state, but
that's for the future.

Also, disable vblanks after reading the HW counter in the case where
_crtc_vblank_off() is disabling vblanks.

Cc: Daniel Vetter 
Cc: Ville Syrjälä 
Cc: Rodrigo Vivi 
Signed-off-by: Dhinakaran Pandiyan 
---
 drivers/gpu/drm/drm_vblank.c | 23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index 32d9bcf5be7f..7eee82c06ed8 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -347,23 +347,14 @@ void drm_vblank_disable_and_save(struct drm_device *dev, 
unsigned int pipe)
spin_lock_irqsave(>vblank_time_lock, irqflags);
 
/*
-* Only disable vblank interrupts if they're enabled. This avoids
-* calling the ->disable_vblank() operation in atomic context with the
-* hardware potentially runtime suspended.
-*/
-   if (vblank->enabled) {
-   __disable_vblank(dev, pipe);
-   vblank->enabled = false;
-   }
-
-   /*
-* Always update the count and timestamp to maintain the
+* Update the count and timestamp to maintain the
 * appearance that the counter has been ticking all along until
 * this time. This makes the count account for the entire time
 * between drm_crtc_vblank_on() and drm_crtc_vblank_off().
 */
drm_update_vblank_count(dev, pipe, false);
-
+   __disable_vblank(dev, pipe);
+   vblank->enabled = false;
spin_unlock_irqrestore(>vblank_time_lock, irqflags);
 }
 
@@ -1122,8 +1113,12 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc)
  pipe, vblank->enabled, vblank->inmodeset);
 
/* Avoid redundant vblank disables without previous
-* drm_crtc_vblank_on(). */
-   if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset)
+* drm_crtc_vblank_on() and only disable them if they're enabled. This
+* avoids calling the ->disable_vblank() operation in atomic context
+* with the hardware potentially runtime suspended.
+*/
+   if ((drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) 
&&
+   vblank->enabled)
drm_vblank_disable_and_save(dev, pipe);
 
wake_up(>queue);
-- 
2.11.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/4] igt/gem_busy: Remove repeated use of 
igt_spin_batch_new
URL   : https://patchwork.freedesktop.org/series/35951/
State : success

== Summary ==

Warning: bzip CI_DRM_3595/shard-glkb2/results3.json.bz2 wasn't in correct JSON 
format
Test gem_tiled_swapping:
Subgroup non-threaded:
pass   -> INCOMPLETE (shard-hsw) fdo#104218
Test pm_rc6_residency:
Subgroup rc6-accuracy:
skip   -> PASS   (shard-snb)
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
pass   -> SKIP   (shard-snb) fdo#102365
Test gem_softpin:
Subgroup noreloc-s4:
skip   -> FAIL   (shard-snb) fdo#103375 +1
Test perf:
Subgroup polling:
pass   -> FAIL   (shard-hsw) fdo#102252

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hswtotal:2573 pass:1457 dwarn:1   dfail:0   fail:10  skip:1104 
time:8604s
shard-snbtotal:2713 pass:1311 dwarn:1   dfail:0   fail:10  skip:1391 
time:7833s
Blacklisted hosts:
shard-apltotal:2713 pass:1685 dwarn:1   dfail:1   fail:24  skip:1001 
time:13462s
shard-kbltotal:2713 pass:1795 dwarn:7   dfail:0   fail:29  skip:882 
time:10513s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_740/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm: i915: Fix audio issue on BXT

2018-01-03 Thread Pandiyan, Dhinakaran

On Thu, 2018-01-04 at 00:48 +0530, Gaurav K Singh wrote:
> From: Gaurav Singh 
> 
> On Apollolake, with stress test warm reboot, audio card
> was not getting enumerated after reboot. This was a

The problem looks similar to
https://lists.freedesktop.org/archives/intel-gfx/2017-October/144495.html

although the proposed solutions are vastly different. I have Cc'd some
more people. 

> spurious issue happening on Apollolake. HW codec and
> HD audio controller link was going out of sync for which
> there was a fix in i915 driver but was not getting invoked
> for BXT. Extending this fix to BXT as well.
> 
> Tested on apollolake chromebook by stress test warm reboot
> with 2500 iterations.
> 
> Signed-off-by: Gaurav K Singh 
> ---
>  drivers/gpu/drm/i915/intel_audio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_audio.c 
> b/drivers/gpu/drm/i915/intel_audio.c
> index f1502a0188eb..c71c04e1c3f6 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -729,7 +729,7 @@ static void 
> i915_audio_component_codec_wake_override(struct device *kdev,
>   struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
>   u32 tmp;
>  
> - if (!IS_GEN9_BC(dev_priv))
> + if (!IS_GEN9_BC(dev_priv) && !IS_BROXTON(dev_priv))

IS_GEN9()? GLK might need this too.


>   return;
>  
>   i915_audio_component_get_power(kdev);
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/glk: Disable Guc and HuC on GLK (rev4)

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm/i915/glk: Disable Guc and HuC on GLK (rev4)
URL   : https://patchwork.freedesktop.org/series/35381/
State : success

== Summary ==

Series 35381v4 drm/i915/glk: Disable Guc and HuC on GLK
https://patchwork.freedesktop.org/api/1.0/series/35381/revisions/4/mbox/

Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172 +1
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:434s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:437s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:383s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:504s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:484s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:496s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:481s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:467s
fi-elk-e7500 total:224  pass:168  dwarn:9   dfail:1   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:518s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:403s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:416s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:423s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:468s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:428s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:509s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:467s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:516s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:588s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:441s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:521s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:538s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:505s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:485s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:449s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:541s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:406s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:582s
fi-glk-dsi   total:288  pass:236  dwarn:2   dfail:4   fail:0   skip:46  
time:475s

d26e7804b83cf7d3754323d02afa5ff04326d33d drm-tip: 2018y-01m-03d-17h-48m-30s UTC 
integration manifest
e3a76b42fcf5 drm/i915/glk: Disable Guc and HuC on GLK

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7600/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: warning for igt/kms_flip: Do igt_require_gem() just once

2018-01-03 Thread Patchwork
== Series Details ==

Series: igt/kms_flip: Do igt_require_gem() just once
URL   : https://patchwork.freedesktop.org/series/35950/
State : warning

== Summary ==

Warning: bzip CI_DRM_3595/shard-glkb2/results3.json.bz2 wasn't in correct JSON 
format
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
pass   -> FAIL   (shard-snb) fdo#101623
Test drv_suspend:
Subgroup debugfs-reader-hibernate:
skip   -> FAIL   (shard-hsw) fdo#103375 +1
Test kms_plane_lowres:
Subgroup pipe-a-tiling-none:
pass   -> SKIP   (shard-snb)
Test pm_rc6_residency:
Subgroup rc6-accuracy:
skip   -> PASS   (shard-snb)

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:2713 pass:1538 dwarn:1   dfail:0   fail:10  skip:1164 
time:9396s
shard-snbtotal:2713 pass:1310 dwarn:1   dfail:0   fail:11  skip:1391 
time:8088s
Blacklisted hosts:
shard-apltotal:2599 pass:1616 dwarn:1   dfail:0   fail:28  skip:953 
time:12924s
shard-kbltotal:2677 pass:1763 dwarn:16  dfail:1   fail:28  skip:868 
time:10716s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_739/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for drm: i915: Fix audio issue on BXT

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm: i915: Fix audio issue on BXT
URL   : https://patchwork.freedesktop.org/series/35955/
State : success

== Summary ==

Series 35955v1 drm: i915: Fix audio issue on BXT
https://patchwork.freedesktop.org/api/1.0/series/35955/revisions/1/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:434s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:380s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:499s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:494s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:493s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:478s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:464s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:520s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:403s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:413s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:425s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:470s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:425s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:482s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:511s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:467s
fi-kbl-r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:513s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:445s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:539s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:501s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:490s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:542s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:412s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:571s
fi-glk-dsi   total:63   pass:55   dwarn:0   dfail:0   fail:0   skip:7  
fi-bdw-gvtdvm failed to collect. IGT log at Patchwork_7599/fi-bdw-gvtdvm/igt.log
fi-pnv-d510 failed to collect. IGT log at Patchwork_7599/fi-pnv-d510/igt.log

d26e7804b83cf7d3754323d02afa5ff04326d33d drm-tip: 2018y-01m-03d-17h-48m-30s UTC 
integration manifest
0e0a40f84c3d drm: i915: Fix audio issue on BXT

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7599/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.BAT: warning for drm/i915/glk: Disable Guc and HuC on GLK (rev4)

2018-01-03 Thread Patchwork
== Series Details ==

Series: drm/i915/glk: Disable Guc and HuC on GLK (rev4)
URL   : https://patchwork.freedesktop.org/series/35381/
State : warning

== Summary ==

Series 35381v4 drm/i915/glk: Disable Guc and HuC on GLK
https://patchwork.freedesktop.org/api/1.0/series/35381/revisions/4/mbox/

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass   -> DMESG-WARN (fi-hsw-4770r)
Subgroup basic-flip-vs-modeset:
pass   -> DMESG-WARN (fi-hsw-4770r)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172 +1

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:431s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:440s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:384s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:489s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:492s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:490s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:477s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:457s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:523s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:405s
fi-hsw-4770r total:288  pass:259  dwarn:2   dfail:0   fail:0   skip:27  
time:414s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:427s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:470s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:421s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:472s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:512s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:464s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:515s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:583s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:443s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:521s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:541s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:506s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:501s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:540s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:411s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:575s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:482s
fi-cnl-y failed to connect after reboot

d26e7804b83cf7d3754323d02afa5ff04326d33d drm-tip: 2018y-01m-03d-17h-48m-30s UTC 
integration manifest
779b2b713ee9 drm/i915/glk: Disable Guc and HuC on GLK

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7598/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t v11] tests/kms_frontbuffer_tracking: Including DRRS test coverage

2018-01-03 Thread Rodrigo Vivi
On Wed, Jan 03, 2018 at 03:02:07PM +, Lohith BS wrote:
> Dynamic Refresh Rate Switch(DRRS) is used to switch the panel's
> refresh rate to the lowest vrefresh supported by panel, when frame is
> not flipped for more than a Sec.
> 
> In kernel, DRRS uses the front buffer tracking infrastructure.
> Hence DRRS test coverage is added along with other frontbuffer tracking
> based features such as FBC and PSR tests.
> 
> Here, we are testing DRRS with other features in all possible
> combinations, in all required test cases, to capture any possible
> regression.
> 
> v2: Addressed the comments and suggestions from Vlad, Marius.
> The signoff details from the earlier work are also included.
> 
> v3: Modified vblank rate calculation by using reply-sequence,
> provided by drmWaitVBlank, as suggested by Chris Wilson.
> 
> v4: As suggested from Chris Wilson and Daniel Vetter
> 1) Avoided using pthread for calculating vblank refresh rate,
>instead used drmWaitVBlank reply sequence.
> 2) Avoided using kernel-specific info like transitional delays,
>instead polling mechanism with timeout is used.
> 3) Included edp-DRRS as a subtest in kms_frontbuffer_tracking.c,
>instead of having a separate test.
> 
> v5: This patch adds DRRS as a new feature in the
> kms_frontbuffer_tracking IGT.
> DRRS switch to lower vrefresh rate is tested at slow-draw subtest.
> 
> Note:
> 1) Currently kernel doesn't have support to enable and disable
>the DRRS feature dynamically(as in case of PSR). Hence if the
>panel supports DRRS it will be enabled by default.
> 
> This is in continuation of last patch
>   "https://patchwork.freedesktop.org/patch/162726/;
> 
> v6: This patch adds runtime enable and disable feature for testing DRRS
> 
> v7: This patch adds runtime enable and disable feature for testing DRRS
> through debugfs entry "i915_drrs_ctl".
> 
> v8: Commit message is updated to reflect current implementation.
> 
> v9: Addressed Paulo Zanoni comments.
> Check for DRRS_LOW at tests with OFFSCREEN + FBS_INDIVIDUAL.
> 
> v10: Corrected DRRS state expectation in suspend related subtests.
> 
> v11: Removing the global flag is_psr_drrs_combo [Rodrigo].
> 
> Signed-off-by: Lohith BS 
> Signed-off-by: aknautiy 
> ---
>  tests/kms_frontbuffer_tracking.c | 184 
> +--
>  1 file changed, 175 insertions(+), 9 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c 
> b/tests/kms_frontbuffer_tracking.c
> index 1601cab..7876a12 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -34,7 +34,7 @@
>  
>  
>  IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and "
> -  "its related features: FBC and PSR");
> +  "its related features: FBC, PSR and DRRS");
>  
>  /*
>   * One of the aspects of this test is that, for every subtest, we try 
> different
> @@ -105,8 +105,9 @@ struct test_mode {
>   FEATURE_NONE  = 0,
>   FEATURE_FBC   = 1,
>   FEATURE_PSR   = 2,
> - FEATURE_COUNT = 4,
> - FEATURE_DEFAULT = 4,
> + FEATURE_DRRS  = 4,
> + FEATURE_COUNT = 8,
> + FEATURE_DEFAULT = 8,
>   } feature;
>  
>   /* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and
> @@ -156,6 +157,7 @@ struct rect {
>  struct {
>   int fd;
>   int debugfs;
> + int drrs_debugfs_fd;
>   drmModeResPtr res;
>   drmModeConnectorPtr connectors[MAX_CONNECTORS];
>   drmModeEncoderPtr encoders[MAX_ENCODERS];
> @@ -182,6 +184,13 @@ struct {
>   .can_test = false,
>  };
>  
> +#define MAX_DRRS_STATUS_BUF_LEN 256
> +
> +struct {
> + bool can_test;
> +} drrs = {
> + .can_test = false,
> +};
>  
>  #define SINK_CRC_SIZE 12
>  typedef struct {
> @@ -825,6 +834,64 @@ static void psr_print_status(void)
>   igt_info("PSR status:\n%s\n", buf);
>  }
>  
> +void drrs_set(unsigned int val)
> +{
> + char buf[2];
> +
> + igt_debug("Manually %sabling DRRS. %llu\n", val ? "en" : "dis", val);
> + snprintf(buf, sizeof(buf), "%d", val);
> + igt_assert_eq(write(drm.drrs_debugfs_fd,
> +   buf, strlen(buf)), strlen(buf));
> +}
> +
> +static bool is_drrs_high(void)
> +{
> + char buf[MAX_DRRS_STATUS_BUF_LEN];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "DRRS_HIGH_RR");
> +}
> +
> +static bool is_drrs_low(void)
> +{
> + char buf[MAX_DRRS_STATUS_BUF_LEN];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "DRRS_LOW_RR");
> +}
> +
> +static bool is_drrs_supported(void)
> +{
> + char buf[MAX_DRRS_STATUS_BUF_LEN];
> +
> + debugfs_read("i915_drrs_status", buf);
> + return strstr(buf, "DRRS Supported: Yes");
> +}
> +
> +static bool is_drrs_inactive(void)
> +{
> + char 

[Intel-gfx] [PATCH] drm: i915: Fix audio issue on BXT

2018-01-03 Thread Gaurav K Singh
From: Gaurav Singh 

On Apollolake, with stress test warm reboot, audio card
was not getting enumerated after reboot. This was a
spurious issue happening on Apollolake. HW codec and
HD audio controller link was going out of sync for which
there was a fix in i915 driver but was not getting invoked
for BXT. Extending this fix to BXT as well.

Tested on apollolake chromebook by stress test warm reboot
with 2500 iterations.

Signed-off-by: Gaurav K Singh 
---
 drivers/gpu/drm/i915/intel_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c 
b/drivers/gpu/drm/i915/intel_audio.c
index f1502a0188eb..c71c04e1c3f6 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -729,7 +729,7 @@ static void i915_audio_component_codec_wake_override(struct 
device *kdev,
struct drm_i915_private *dev_priv = kdev_to_i915(kdev);
u32 tmp;
 
-   if (!IS_GEN9_BC(dev_priv))
+   if (!IS_GEN9_BC(dev_priv) && !IS_BROXTON(dev_priv))
return;
 
i915_audio_component_get_power(kdev);
-- 
1.9.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915/glk: Disable Guc and HuC on GLK

2018-01-03 Thread Anusha Srivatsa
Since the firmwares are not yet released to public repo,
disable them on Geminilake.

v2: Remove the firmware versions (Michal)

v3: Remove unwanted defines (Rodrigo)
Correct commit message (Michal)

Cc: Michal Wajdeczko 
Cc: Rodrigo Vivi 
Cc: 
Signed-off-by: Anusha Srivatsa 
Fixes: 90f192c8241e ("drm/i915/GuC/GLK: Load GuC on GLK")
Fixes: db5ba0d8931e ("drm/i915/GLK/HuC: Load HuC on GLK")
Reviewed-by: Michal Wajdeczko 
---
 drivers/gpu/drm/i915/intel_guc_fw.c |  9 -
 drivers/gpu/drm/i915/intel_huc.c| 11 ---
 2 files changed, 20 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c 
b/drivers/gpu/drm/i915/intel_guc_fw.c
index cbc51c9..3b09329 100644
--- a/drivers/gpu/drm/i915/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/intel_guc_fw.c
@@ -39,9 +39,6 @@
 #define KBL_FW_MAJOR 9
 #define KBL_FW_MINOR 39
 
-#define GLK_FW_MAJOR 10
-#define GLK_FW_MINOR 56
-
 #define GUC_FW_PATH(platform, major, minor) \
"i915/" __stringify(platform) "_guc_ver" __stringify(major) "_" 
__stringify(minor) ".bin"
 
@@ -54,8 +51,6 @@ MODULE_FIRMWARE(I915_BXT_GUC_UCODE);
 #define I915_KBL_GUC_UCODE GUC_FW_PATH(kbl, KBL_FW_MAJOR, KBL_FW_MINOR)
 MODULE_FIRMWARE(I915_KBL_GUC_UCODE);
 
-#define I915_GLK_GUC_UCODE GUC_FW_PATH(glk, GLK_FW_MAJOR, GLK_FW_MINOR)
-
 static void guc_fw_select(struct intel_uc_fw *guc_fw)
 {
struct intel_guc *guc = container_of(guc_fw, struct intel_guc, fw);
@@ -82,10 +77,6 @@ static void guc_fw_select(struct intel_uc_fw *guc_fw)
guc_fw->path = I915_KBL_GUC_UCODE;
guc_fw->major_ver_wanted = KBL_FW_MAJOR;
guc_fw->minor_ver_wanted = KBL_FW_MINOR;
-   } else if (IS_GEMINILAKE(dev_priv)) {
-   guc_fw->path = I915_GLK_GUC_UCODE;
-   guc_fw->major_ver_wanted = GLK_FW_MAJOR;
-   guc_fw->minor_ver_wanted = GLK_FW_MINOR;
} else {
DRM_WARN("%s: No firmware known for this platform!\n",
 intel_uc_fw_type_repr(guc_fw->type));
diff --git a/drivers/gpu/drm/i915/intel_huc.c b/drivers/gpu/drm/i915/intel_huc.c
index 974be3d..8ed0518 100644
--- a/drivers/gpu/drm/i915/intel_huc.c
+++ b/drivers/gpu/drm/i915/intel_huc.c
@@ -54,10 +54,6 @@
 #define KBL_HUC_FW_MINOR 00
 #define KBL_BLD_NUM 1810
 
-#define GLK_HUC_FW_MAJOR 02
-#define GLK_HUC_FW_MINOR 00
-#define GLK_BLD_NUM 1748
-
 #define HUC_FW_PATH(platform, major, minor, bld_num) \
"i915/" __stringify(platform) "_huc_ver" __stringify(major) "_" \
__stringify(minor) "_" __stringify(bld_num) ".bin"
@@ -74,9 +70,6 @@ MODULE_FIRMWARE(I915_BXT_HUC_UCODE);
KBL_HUC_FW_MINOR, KBL_BLD_NUM)
 MODULE_FIRMWARE(I915_KBL_HUC_UCODE);
 
-#define I915_GLK_HUC_UCODE HUC_FW_PATH(glk, GLK_HUC_FW_MAJOR, \
-   GLK_HUC_FW_MINOR, GLK_BLD_NUM)
-
 static void huc_fw_select(struct intel_uc_fw *huc_fw)
 {
struct intel_huc *huc = container_of(huc_fw, struct intel_huc, fw);
@@ -103,10 +96,6 @@ static void huc_fw_select(struct intel_uc_fw *huc_fw)
huc_fw->path = I915_KBL_HUC_UCODE;
huc_fw->major_ver_wanted = KBL_HUC_FW_MAJOR;
huc_fw->minor_ver_wanted = KBL_HUC_FW_MINOR;
-   } else if (IS_GEMINILAKE(dev_priv)) {
-   huc_fw->path = I915_GLK_HUC_UCODE;
-   huc_fw->major_ver_wanted = GLK_HUC_FW_MAJOR;
-   huc_fw->minor_ver_wanted = GLK_HUC_FW_MINOR;
} else {
DRM_WARN("%s: No firmware known for this platform!\n",
 intel_uc_fw_type_repr(huc_fw->type));
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: warning for igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations

2018-01-03 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations
URL   : https://patchwork.freedesktop.org/series/35949/
State : warning

== Summary ==

Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
fail   -> PASS   (shard-snb) fdo#101623 +1
Test kms_chv_cursor_fail:
Subgroup pipe-a-128x128-right-edge:
skip   -> PASS   (shard-hsw)
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> PASS   (shard-hsw) fdo#104218
Test kms_busy:
Subgroup basic-flip-b:
skip   -> PASS   (shard-hsw)
Test kms_draw_crc:
Subgroup draw-method-xrgb2101010-blt-untiled:
skip   -> PASS   (shard-hsw)
Test kms_cursor_legacy:
Subgroup cursor-vs-flip-atomic:
pass   -> SKIP   (shard-snb)
Test kms_cursor_crc:
Subgroup cursor-128x128-sliding:
skip   -> PASS   (shard-hsw)
Test kms_flip:
Subgroup flip-vs-dpms-off-vs-modeset-interruptible:
skip   -> PASS   (shard-hsw)

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218

shard-hswtotal:2713 pass:1538 dwarn:1   dfail:0   fail:10  skip:1164 
time:9375s
shard-snbtotal:2713 pass:1309 dwarn:1   dfail:0   fail:11  skip:1392 
time:8104s
Blacklisted hosts:
shard-apltotal:2713 pass:1683 dwarn:2   dfail:0   fail:26  skip:1002 
time:13748s
shard-kbltotal:2713 pass:1805 dwarn:1   dfail:0   fail:29  skip:878 
time:10976s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_738/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/4] igt/gem_busy: Remove repeated use of 
igt_spin_batch_new
URL   : https://patchwork.freedesktop.org/series/35951/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
58bd37d347d1369ecd272ff778057ee8004d6b15 kms_atomic_transition: Remove 
skip_on_unsupported_nonblocking_modeset.

with latest DRM-Tip kernel build CI_DRM_3595
d26e7804b83c drm-tip: 2018y-01m-03d-17h-48m-30s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass   -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:422s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:371s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:489s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:480s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:482s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:471s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:459s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:519s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:392s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:402s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:419s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:445s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:418s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:467s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:503s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:452s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:504s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:571s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:428s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:510s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:526s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:495s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:472s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:435s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:397s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:570s
fi-glk-dsi   total:288  pass:153  dwarn:1   dfail:4   fail:0   skip:130 
time:283s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_740/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: failure for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev6)

2018-01-03 Thread Patchwork
== Series Details ==

Series: tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev6)
URL   : https://patchwork.freedesktop.org/series/32888/
State : failure

== Summary ==

Test kms_frontbuffer_tracking:
Subgroup fbc-rgb101010-draw-mmap-gtt:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-primscrn-shrfb-pgflip-blt:
pass   -> FAIL   (shard-snb) fdo#101623 +59
Subgroup fbc-1p-offscren-pri-shrfb-draw-mmap-wc:
pass   -> FAIL   (shard-snb) fdo#103167 +42
Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-wc:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-primscrn-cur-indfb-onoff:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-primscrn-spr-indfb-onoff:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-primscrn-cur-indfb-draw-mmap-cpu:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-rgb101010-draw-blt:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-offscren-pri-indfb-draw-mmap-wc:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-offscren-pri-shrfb-draw-mmap-gtt:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-primscrn-spr-indfb-draw-pwrite:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-suspend:
pass   -> FAIL   (shard-hsw) fdo#103540
Subgroup fbc-1p-primscrn-pri-indfb-draw-mmap-wc:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-rgb101010-draw-pwrite:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-rgb565-draw-mmap-cpu:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-tilingchange:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-primscrn-pri-indfb-draw-pwrite:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Subgroup fbc-1p-offscren-pri-shrfb-draw-mmap-cpu:
pass   -> FAIL   (shard-snb)
pass   -> FAIL   (shard-hsw)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass   -> SKIP   (shard-snb) fdo#103375
Test kms_draw_crc:
Subgroup draw-method-xrgb2101010-blt-untiled:
skip   -> PASS   (shard-hsw)
Test kms_flip:
Subgroup flip-vs-dpms-off-vs-modeset-interruptible:
skip   -> PASS   (shard-hsw)
Test kms_chv_cursor_fail:
Subgroup pipe-a-128x128-right-edge:
skip   -> PASS   (shard-hsw)
Test kms_busy:
Subgroup basic-flip-b:
skip   -> PASS   (shard-hsw)
Test kms_cursor_crc:
Subgroup cursor-128x128-sliding:
skip   -> PASS   (shard-hsw)

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hswtotal:3256 pass:1458 dwarn:1   dfail:0   fail:79  skip:1717 
time:8960s
shard-snbtotal:3283 pass:1242 dwarn:1   dfail:0   fail:79  skip:1961 
time:7956s
Blacklisted hosts:
shard-apltotal:3261 pass:1594 dwarn:1   dfail:0   fail:95  skip:1570 
time:13183s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_737/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for igt/kms_flip: Do igt_require_gem() just once

2018-01-03 Thread Patchwork
== Series Details ==

Series: igt/kms_flip: Do igt_require_gem() just once
URL   : https://patchwork.freedesktop.org/series/35950/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
58bd37d347d1369ecd272ff778057ee8004d6b15 kms_atomic_transition: Remove 
skip_on_unsupported_nonblocking_modeset.

with latest DRM-Tip kernel build CI_DRM_3595
d26e7804b83c drm-tip: 2018y-01m-03d-17h-48m-30s UTC integration manifest

No testlist changes.

Test gem_exec_reloc:
Subgroup basic-write-cpu:
incomplete -> PASS   (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172 +1
Subgroup suspend-read-crc-pipe-b:
pass   -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
pass   -> DMESG-WARN (fi-skl-6700hq) fdo#101144

fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:440s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:448s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:382s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:498s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:278s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:499s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:493s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:485s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:464s
fi-elk-e7500 total:224  pass:168  dwarn:9   dfail:1   fail:0   skip:45 
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:523s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:409s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:416s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:432s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:468s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:424s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:483s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:523s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:469s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:506s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:583s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:447s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:521s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:541s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:510s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:489s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:443s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:418s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:582s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:495s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_739/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [RFC] drm/i915: Add a new modparam for customized ring multiplier

2018-01-03 Thread Yaodong Li



You are thinking of plugging into intel_pstate to make it smarter for ia freq 
transitions?

Yep. This seems a correct step to give some automatic support instead of 
parameter/hardcoded multiplier.

Does this mean we should use cpufreq/intel_pstate based approach instead 
of the current modparam solution for Gen9?


Some concerns and questions about intel_pstate approach:
a) Currently, we cannot get the accurate pstate/target freq value from 
cpufreq in intel_pstate active mode since
 these values won't be exported to cpufreq layer, so if we won't 
change intel_pstate code then we only can get

 the max cpu freq of a new policy.
b) intel_pstate policy is attached to each logic cpu, which means we 
will receive policy/freq transition notification
    for each logic cpu freq change. One question is how we are going to 
decide the freq of the ring? just use the max

    cpu freq reported?
c) With the intel_pstate approach we may still run into thermal 
throttling, in this case, can a certain cooling device

    be triggered to lower the cpu freq?

Thanks and Regards,
-Jackie

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt 3/4] igt/kms_flip: Do igt_require_gem() just once

2018-01-03 Thread Chris Wilson
Since igt_spin_batch_new() will do a stalling GEM check, it is not
advisable to use it within loops. Perform the igt_require_gem() upfront
and then use __igt_spin_batch_new() inside the test loop.

Signed-off-by: Chris Wilson 
---
 tests/kms_flip.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 39ee68d23..2899f20e6 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -692,15 +692,15 @@ static unsigned int run_test_step(struct test_output *o)
o->current_fb_id = !o->current_fb_id;
 
if (o->flags & TEST_WITH_DUMMY_BCS) {
-   spin_bcs = igt_spin_batch_new(drm_fd, 0, I915_EXEC_BLT,
- 
o->fb_info[o->current_fb_id].gem_handle);
+   spin_bcs = __igt_spin_batch_new(drm_fd, 0, I915_EXEC_BLT,
+   
o->fb_info[o->current_fb_id].gem_handle);
igt_spin_batch_set_timeout(spin_bcs,
   NSEC_PER_SEC);
}
 
if (o->flags & TEST_WITH_DUMMY_RCS) {
-   spin_rcs = igt_spin_batch_new(drm_fd, 0, I915_EXEC_RENDER,
- 
o->fb_info[o->current_fb_id].gem_handle);
+   spin_rcs = __igt_spin_batch_new(drm_fd, 0, I915_EXEC_RENDER,
+   
o->fb_info[o->current_fb_id].gem_handle);
igt_spin_batch_set_timeout(spin_rcs,
   NSEC_PER_SEC);
}
@@ -1099,6 +1099,9 @@ static unsigned event_loop(struct test_output *o, 
unsigned duration_ms)
igt_hang_t hang;
int count = 0;
 
+   if (o->flags & (TEST_WITH_DUMMY_BCS | TEST_WITH_DUMMY_RCS))
+   igt_require_gem(drm_fd);
+
memset(, 0, sizeof(hang));
if (o->flags & TEST_HANG_ONCE)
hang = hang_gpu(drm_fd);
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt 1/4] igt/gem_busy: Remove repeated use of igt_spin_batch_new

2018-01-03 Thread Chris Wilson
igt_spin_batch_new() includes a throttling check that GEM works, which
breaks trying to create multiple spin batches, use
__igt_spin_batch_new() instead, after verifying GEM works.

Signed-off-by: Chris Wilson 
---
 tests/gem_busy.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/gem_busy.c b/tests/gem_busy.c
index 4ba232411..c349c2919 100644
--- a/tests/gem_busy.c
+++ b/tests/gem_busy.c
@@ -459,17 +459,17 @@ static void close_race(int fd)
igt_assert(sched_setscheduler(getpid(), SCHED_RR, ) == 0);
 
for (i = 0; i < nhandles; i++) {
-   spin[i] = igt_spin_batch_new(fd, 0,
-engines[rand() % nengine], 
0);
+   spin[i] = __igt_spin_batch_new(fd, 0,
+  engines[rand() % 
nengine], 0);
handles[i] = spin[i]->handle;
}
 
igt_until_timeout(20) {
for (i = 0; i < nhandles; i++) {
igt_spin_batch_free(fd, spin[i]);
-   spin[i] = igt_spin_batch_new(fd, 0,
-engines[rand() % 
nengine],
-0);
+   spin[i] = __igt_spin_batch_new(fd, 0,
+  engines[rand() % 
nengine],
+  0);
handles[i] = spin[i]->handle;
__sync_synchronize();
}
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt 2/4] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations

2018-01-03 Thread Chris Wilson
Each call to igt_spin_batch_new_fence will do a stalling check to verify
that GEM is functional before submitting the spinning batch. In a loop,
this means that we may end up waiting for our earlier spinning
batches...

Signed-off-by: Chris Wilson 
---
 tests/perf_pmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 85ce17394..45e2f6148 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -833,7 +833,8 @@ test_interrupts(int gem_fd)
 
/* Queue spinning batches. */
for (int i = 0; i < target; i++) {
-   spin[i] = igt_spin_batch_new_fence(gem_fd, 0, I915_EXEC_RENDER);
+   spin[i] = __igt_spin_batch_new_fence(gem_fd,
+0, I915_EXEC_RENDER);
if (i == 0) {
fence_fd = spin[i]->out_fence;
} else {
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt 4/4] lib/gem: Reset the global seqno at the start of each test

2018-01-03 Thread Chris Wilson
When we require GEM, reset the global seqno. This gives each test a
clean slate to work with, and avoids left-over state from previous tests
impacting on the next. In particular, somes tests may be setting up long
sequence of stalling batches not expecting to hit a seqno wraparound
(leftover from, for example, gem_exec_whisper), causing long GPU hangs
and incompletes in CI if they do.

Signed-off-by: Chris Wilson 
---
 lib/ioctl_wrappers.c | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 118dcefe7..39e8469e3 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -52,6 +52,7 @@
 #include "intel_chipset.h"
 #include "intel_io.h"
 #include "igt_debugfs.h"
+#include "igt_sysfs.h"
 #include "config.h"
 
 #ifdef HAVE_VALGRIND
@@ -1411,7 +1412,8 @@ void igt_require_gem(int fd)
 
igt_require_intel(fd);
 
-   /* We only want to use the throttle-ioctl for its -EIO reporting
+   /*
+* We only want to use the throttle-ioctl for its -EIO reporting
 * of a wedged device, not for actually waiting on outstanding
 * requests! So create a new drm_file for the device that is clean.
 */
@@ -1419,6 +1421,18 @@ void igt_require_gem(int fd)
fd = open(path, O_RDWR);
igt_assert_lte(0, fd);
 
+   /*
+* Reset the global seqno at the start of each test. This ensures that
+* the test will not wrap unless it explicitly sets up seqno wrapping
+* itself, which avoids accidentally hanging when setting up long
+* sequences of batches.
+*/
+   err = igt_debugfs_dir(fd);
+   if (err != -1) {
+   igt_sysfs_printf(err, "i915_next_seqno", "1");
+   close(err);
+   }
+
err = 0;
if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE))
err = -errno;
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Grab power domain in skl_pipe_wm_get_hw_state()

2018-01-03 Thread Pandiyan, Dhinakaran
On Tue, 2018-01-02 at 18:33 +, Pandiyan, Dhinakaran wrote:
> On Tue, 2017-12-19 at 13:16 +0100, Maarten Lankhorst wrote:
> > This should get rid of unclaimed register debug warnings, if
> > it still happens we should put this in a intel_crtc->active check..
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104172
> 
> 
> The bugzilla indicates this is a regression from 
> "drm/i915: Restore GT performance in headless mode with DMC loaded",
> which seems a bit odd to me. That patch should not have disabled a power
> well which was enabled before. If anything, it should fix unclaimed
> register accesses. 
> 
The comments in the bug report don't really confirm that the unclaimed
register access is a regression from "drm/i915: Restore GT performance
in headless mode with DMC loaded".

> 
> 
> > Signed-off-by: Maarten Lankhorst 
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c | 10 +++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c 
> > b/drivers/gpu/drm/i915/intel_pm.c
> > index ab6f1b770891..52d157c00535 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -5477,6 +5477,11 @@ void skl_pipe_wm_get_hw_state(struct drm_crtc *crtc,
> > int level, max_level;
> > enum plane_id plane_id;
> > uint32_t val;
> > +   enum intel_display_power_domain power_domain;
> > +
> > +   power_domain = POWER_DOMAIN_PIPE(pipe);
> > +   if (!intel_display_power_get_if_enabled(dev_priv, power_domain))
> > +   return;
> >  
> > max_level = ilk_wm_max_level(dev_priv);
> >  
> > @@ -5500,10 +5505,9 @@ void skl_pipe_wm_get_hw_state(struct drm_crtc *crtc,
> > skl_wm_level_from_reg_val(val, >trans_wm);
> > }
> >  
> > -   if (!intel_crtc->active)
> > -   return;
> > -
> 
> Doing a power_domain_get_if_enabled() before reading the register seems
> like the right thing to do, but is power_get_if_enabled() expected to be
> correct at this point? The reason I ask is,
> modeset_get_crtc_power_domains() is called after skl_wm_get_hw_state().
> So, doesn't that mean the pipe power domain might not have been acquired
> even if the CRTC is active.
To answer my own question, POWER_DOMAIN_INIT should have taken care of
this. So, this looks good to me.

> 
> 
> 
> > out->linetime = I915_READ(PIPE_WM_LINETIME(pipe));

This looks okay too, but can you confirm updating this field for
inactive CRTCs is not a problem? With that, 
Reviewed-by: Dhinakaran Pandiyan 

> > +
> > +   intel_display_power_put(dev_priv, power_domain);
> >  }
> >  
> >  void skl_wm_get_hw_state(struct drm_device *dev)
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/kms_flip: Do igt_require_gem() just once

2018-01-03 Thread Chris Wilson
Since igt_spin_batch_new() will do a stalling GEM check, it is not
advisable to use it within loops. Perform the igt_require_gem() upfront
and then use __igt_spin_batch_new() inside the test loop.

Signed-off-by: Chris Wilson 
---
 tests/kms_flip.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index fb4fe6514..1d73d3a6d 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -692,15 +692,15 @@ static unsigned int run_test_step(struct test_output *o)
o->current_fb_id = !o->current_fb_id;
 
if (o->flags & TEST_WITH_DUMMY_BCS) {
-   spin_bcs = igt_spin_batch_new(drm_fd, 0, I915_EXEC_BLT,
- 
o->fb_info[o->current_fb_id].gem_handle);
+   spin_bcs = __igt_spin_batch_new(drm_fd, 0, I915_EXEC_BLT,
+   
o->fb_info[o->current_fb_id].gem_handle);
igt_spin_batch_set_timeout(spin_bcs,
   NSEC_PER_SEC);
}
 
if (o->flags & TEST_WITH_DUMMY_RCS) {
-   spin_rcs = igt_spin_batch_new(drm_fd, 0, I915_EXEC_RENDER,
- 
o->fb_info[o->current_fb_id].gem_handle);
+   spin_rcs = __igt_spin_batch_new(drm_fd, 0, I915_EXEC_RENDER,
+   
o->fb_info[o->current_fb_id].gem_handle);
igt_spin_batch_set_timeout(spin_rcs,
   NSEC_PER_SEC);
}
@@ -1112,6 +1112,9 @@ static unsigned event_loop(struct test_output *o, 
unsigned duration_ms)
igt_hang_t hang;
int count = 0;
 
+   if (o->flags & (TEST_WITH_DUMMY_BCS | TEST_WITH_DUMMY_RCS))
+   igt_require_gem(drm_fd);
+
memset(, 0, sizeof(hang));
if (o->flags & TEST_HANG_ONCE)
hang = hang_gpu(drm_fd);
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations

2018-01-03 Thread Patchwork
== Series Details ==

Series: igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations
URL   : https://patchwork.freedesktop.org/series/35949/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
58bd37d347d1369ecd272ff778057ee8004d6b15 kms_atomic_transition: Remove 
skip_on_unsupported_nonblocking_modeset.

with latest DRM-Tip kernel build CI_DRM_3594
c7b14d3fc187 drm-tip: 2018y-01m-03d-14h-04m-27s UTC integration manifest

No testlist changes.

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:437s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:441s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:382s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:496s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:277s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:499s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:498s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:490s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:468s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 
time:262s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:526s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:406s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:419s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:430s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:462s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:429s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:476s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:515s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:463s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:521s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:587s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:442s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:521s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:548s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:509s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:496s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:448s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:548s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:416s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:579s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:481s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_738/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Assert we do not try to wait on an invalid seqno

2018-01-03 Thread Chris Wilson
Quoting Michał Winiarski (2018-01-03 16:29:18)
> On Tue, Jan 02, 2018 at 07:25:00PM +, Chris Wilson wrote:
> > We should never insert the invalid seqno into the wait tree, so assert
> > we do not.
> > 
> > Signed-off-by: Chris Wilson 
> 
> Reviewed-by: Michał Winiarski 

Ta, and pushed.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt] igt/perf_pmu: Skip GEM checks for repeated spin_batch allocations

2018-01-03 Thread Chris Wilson
Each call to igt_spin_batch_new_fence will do a stalling check to verify
that GEM is functional before submitting the spinning batch. In a loop,
this means that we may end up waiting for our earlier spinning
batches...

Signed-off-by: Chris Wilson 
---
 tests/perf_pmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 85ce17394..45e2f6148 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -833,7 +833,8 @@ test_interrupts(int gem_fd)
 
/* Queue spinning batches. */
for (int i = 0; i < target; i++) {
-   spin[i] = igt_spin_batch_new_fence(gem_fd, 0, I915_EXEC_RENDER);
+   spin[i] = __igt_spin_batch_new_fence(gem_fd,
+0, I915_EXEC_RENDER);
if (i == 0) {
fence_fd = spin[i]->out_fence;
} else {
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✗ Fi.CI.IGT: warning for series starting with [1/2] igt/gem_busy: Remove repeated use of igt_spin_batch_new

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] igt/gem_busy: Remove repeated use of 
igt_spin_batch_new
URL   : https://patchwork.freedesktop.org/series/35942/
State : warning

== Summary ==

Test kms_flip:
Subgroup blt-wf_vblank-vs-modeset-interruptible:
pass   -> SKIP   (shard-snb) fdo#104218 +2
Subgroup blt-wf_vblank-vs-modeset:
pass   -> SKIP   (shard-snb)
pass   -> SKIP   (shard-hsw)
Subgroup vblank-vs-modeset-suspend:
pass   -> SKIP   (shard-snb) fdo#102365
Subgroup blt-wf_vblank-vs-dpms:
pass   -> SKIP   (shard-snb)
Subgroup rcs-wf_vblank-vs-modeset-interruptible:
pass   -> SKIP   (shard-snb)
pass   -> SKIP   (shard-hsw) fdo#102614 +1
Subgroup blt-wf_vblank-vs-dpms-interruptible:
pass   -> SKIP   (shard-snb)
Test perf_pmu:
Subgroup interrupts:
pass   -> SKIP   (shard-snb)
pass   -> SKIP   (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
pass   -> FAIL   (shard-snb) fdo#101623
Test kms_cursor_crc:
Subgroup cursor-64x64-suspend:
pass   -> SKIP   (shard-hsw) fdo#103540
Test gem_mmap_wc:
Subgroup write-read-distinct:
incomplete -> PASS   (shard-hsw)

fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540

shard-hswtotal:2713 pass:1531 dwarn:1   dfail:0   fail:10  skip:1171 
time:8788s
shard-snbtotal:2713 pass:1303 dwarn:1   dfail:0   fail:11  skip:1398 
time:7601s
Blacklisted hosts:
shard-apltotal:2701 pass:1664 dwarn:1   dfail:0   fail:28  skip:1006 
time:12639s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_736/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Assert we do not try to wait on an invalid seqno

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 07:25:00PM +, Chris Wilson wrote:
> We should never insert the invalid seqno into the wait tree, so assert
> we do not.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c 
> b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> index 6cfffa68f71a..bb985bfc279c 100644
> --- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
> @@ -396,6 +396,8 @@ static bool __intel_engine_add_wait(struct 
> intel_engine_cs *engine,
>   bool first, armed;
>   u32 seqno;
>  
> + GEM_BUG_ON(!wait->seqno);
> +
>   /* Insert the request into the retirement ordered list
>* of waiters by walking the rbtree. If we are the oldest
>* seqno in the tree (the first to be retired), then
> -- 
> 2.15.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Alexandru Chirvasitu
Thank you for that!

I'd been getting used to seeing warnings to that effect, so got
complacent and stopped checking for errors..

In any case, it's now compiled and installed, and I will report back
with any new logs if / when another hang occurs.

On Wed, Jan 03, 2018 at 02:53:45PM +, Chris Wilson wrote:
> Quoting Alexandru Chirvasitu (2018-01-03 14:48:26)
> > Here's the log for the make bzImage and modules without ccache.
> > 
> > I ran it with j8 still because otherwise it would take very long, but
> > if I run out of options I'll try plain too..
> > 
> > In the meantime I'd like to try some other configs; maybe specific
> > drivers are messing me up.
> > 
> > I swear to god it was working all right yesterday..
> 
> drivers/gpu/drm/i915/intel_dpio_phy.c:442:1: error: the frame size of
> 1168 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
> 
> Go into the kconfig compiler options and increase the limit or disable
> the warning. See CONFIG_FRAME_WARN.
> -Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t v10] tests/kms_frontbuffer_tracking: Including DRRS test coverage

2018-01-03 Thread Bs, Lohith

Hi Rodrigo,

Thank you for your valuable comments, the same has been addressed and a 
new patch had been pushed with the changes.


Request you to have a look at the new patch-set[v11] and provide your 
comments if any.



On 1/3/2018 2:04 AM, Rodrigo Vivi wrote:

On Mon, Jan 01, 2018 at 01:45:32PM +, Lohith BS wrote:

Dynamic Refresh Rate Switch(DRRS) is used to switch the panel's
refresh rate to the lowest vrefresh supported by panel, when frame is
not flipped for more than a Sec.

In kernel, DRRS uses the front buffer tracking infrastructure.
Hence DRRS test coverage is added along with other frontbuffer tracking
based features such as FBC and PSR tests.

Here, we are testing DRRS with other features in all possible
combinations, in all required test cases, to capture any possible
regression.

v2: Addressed the comments and suggestions from Vlad, Marius.
 The signoff details from the earlier work are also included.

v3: Modified vblank rate calculation by using reply-sequence,
 provided by drmWaitVBlank, as suggested by Chris Wilson.

v4: As suggested from Chris Wilson and Daniel Vetter
 1) Avoided using pthread for calculating vblank refresh rate,
instead used drmWaitVBlank reply sequence.
 2) Avoided using kernel-specific info like transitional delays,
instead polling mechanism with timeout is used.
 3) Included edp-DRRS as a subtest in kms_frontbuffer_tracking.c,
instead of having a separate test.

v5: This patch adds DRRS as a new feature in the
 kms_frontbuffer_tracking IGT.
 DRRS switch to lower vrefresh rate is tested at slow-draw subtest.

 Note:
 1) Currently kernel doesn't have support to enable and disable
the DRRS feature dynamically(as in case of PSR). Hence if the
panel supports DRRS it will be enabled by default.

 This is in continuation of last patch
"https://patchwork.freedesktop.org/patch/162726/;

v6: This patch adds runtime enable and disable feature for testing DRRS

v7: This patch adds runtime enable and disable feature for testing DRRS
 through debugfs entry "i915_drrs_ctl".

v8: Commit message is updated to reflect current implementation.

v9: Addressed Paulo Zanoni comments.
 Check for DRRS_LOW at tests with OFFSCREEN + FBS_INDIVIDUAL.

v10: Corrected DRRS state expectation in suspend related subtests.

Signed-off-by: Lohith BS 
Signed-off-by: aknautiy 
---
  tests/kms_frontbuffer_tracking.c | 188 +--
  1 file changed, 179 insertions(+), 9 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 1601cab..1039c9e 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -34,7 +34,7 @@
  
  
  IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and "

-"its related features: FBC and PSR");
+"its related features: FBC, PSR and DRRS");
  
  /*

   * One of the aspects of this test is that, for every subtest, we try 
different
@@ -105,8 +105,9 @@ struct test_mode {
FEATURE_NONE  = 0,
FEATURE_FBC   = 1,
FEATURE_PSR   = 2,
-   FEATURE_COUNT = 4,
-   FEATURE_DEFAULT = 4,
+   FEATURE_DRRS  = 4,
+   FEATURE_COUNT = 8,
+   FEATURE_DEFAULT = 8,
} feature;
  
  	/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and

@@ -156,6 +157,7 @@ struct rect {
  struct {
int fd;
int debugfs;
+   int drrs_debugfs_fd;
drmModeResPtr res;
drmModeConnectorPtr connectors[MAX_CONNECTORS];
drmModeEncoderPtr encoders[MAX_ENCODERS];
@@ -182,6 +184,15 @@ struct {
.can_test = false,
  };
  
+#define MAX_DRRS_STATUS_BUF_LEN 256

+
+struct {
+   bool can_test;
+   bool is_psr_drrs_combo;

Why do you need this is_psr_drrs_combo at all?


+} drrs = {
+   .can_test = false,
+   .is_psr_drrs_combo = false,
+};
  
  #define SINK_CRC_SIZE 12

  typedef struct {
@@ -825,6 +836,64 @@ static void psr_print_status(void)
igt_info("PSR status:\n%s\n", buf);
  }
  
+void drrs_set(unsigned int val)

+{
+   char buf[2];
+
+   igt_debug("Manually %sabling DRRS. %llu\n", val ? "en" : "dis", val);
+   snprintf(buf, sizeof(buf), "%d", val);
+   igt_assert_eq(write(drm.drrs_debugfs_fd,
+ buf, strlen(buf)), strlen(buf));
+}
+
+static bool is_drrs_high(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_HIGH_RR");
+}
+
+static bool is_drrs_low(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_LOW_RR");
+}
+
+static bool is_drrs_supported(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   

[Intel-gfx] ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev6)

2018-01-03 Thread Patchwork
== Series Details ==

Series: tests/kms_frontbuffer_tracking: Idleness DRRS coverage (rev6)
URL   : https://patchwork.freedesktop.org/series/32888/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
58bd37d347d1369ecd272ff778057ee8004d6b15 kms_atomic_transition: Remove 
skip_on_unsupported_nonblocking_modeset.

with latest DRM-Tip kernel build CI_DRM_3594
c7b14d3fc187 drm-tip: 2018y-01m-03d-14h-04m-27s UTC integration manifest

Testlist changes:
+++ 570 lines
--- 0 lines

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:435s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:443s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:393s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:505s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:494s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:494s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:483s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:470s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 
time:264s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:525s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:418s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:426s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:473s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:430s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:482s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:511s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:466s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:514s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:588s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:458s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:524s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:542s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:510s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:510s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:449s
fi-snb-2520m total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:543s
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:413s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:572s
fi-glk-dsi   total:288  pass:257  dwarn:0   dfail:0   fail:1   skip:30  
time:501s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_737/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW

2018-01-03 Thread Bartlomiej Zolnierkiewicz
On Tuesday, December 19, 2017 10:15:07 AM Joe Perches wrote:
> Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
> 
> Done with perl script:
> 
> $ git grep -w --name-only DEVICE_ATTR | \
>   xargs perl -i -e 'local $/; while (<>) { 
> s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S_IWUSR|\s*S_IWUSR\s*\|\s*S_IRUGO\s*|\s*0644\s*)\)?\s*,\s*\1_show\s*,\s*\1_store\s*\)/DEVICE_ATTR_RW(\1)/g;
>  print;}'
> 
> Signed-off-by: Joe Perches 
> ---
>  arch/s390/kernel/topology.c  |  3 +--
>  arch/tile/kernel/sysfs.c |  2 +-
>  drivers/gpu/drm/i915/i915_sysfs.c|  6 ++---
>  drivers/platform/x86/compal-laptop.c | 18 +--
>  drivers/s390/cio/device.c|  2 +-
>  drivers/scsi/lpfc/lpfc_attr.c| 43 
> 
>  drivers/thermal/thermal_sysfs.c  |  9 
>  drivers/tty/serial/sh-sci.c  |  2 +-
>  drivers/usb/host/xhci-dbgcap.c   |  2 +-
>  drivers/usb/phy/phy-tahvo.c  |  2 +-
>  drivers/video/fbdev/auo_k190x.c  |  4 ++--
>  drivers/video/fbdev/w100fb.c |  4 ++--
>  lib/test_firmware.c  | 14 +---
>  lib/test_kmod.c  | 14 +---
>  sound/soc/omap/mcbsp.c   |  4 ++--
>  15 files changed, 49 insertions(+), 80 deletions(-)

For fbdev changes:

Acked-by: Bartlomiej Zolnierkiewicz 

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R Institute Poland
Samsung Electronics

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t v11] tests/kms_frontbuffer_tracking: Including DRRS test coverage

2018-01-03 Thread Lohith BS
Dynamic Refresh Rate Switch(DRRS) is used to switch the panel's
refresh rate to the lowest vrefresh supported by panel, when frame is
not flipped for more than a Sec.

In kernel, DRRS uses the front buffer tracking infrastructure.
Hence DRRS test coverage is added along with other frontbuffer tracking
based features such as FBC and PSR tests.

Here, we are testing DRRS with other features in all possible
combinations, in all required test cases, to capture any possible
regression.

v2: Addressed the comments and suggestions from Vlad, Marius.
The signoff details from the earlier work are also included.

v3: Modified vblank rate calculation by using reply-sequence,
provided by drmWaitVBlank, as suggested by Chris Wilson.

v4: As suggested from Chris Wilson and Daniel Vetter
1) Avoided using pthread for calculating vblank refresh rate,
   instead used drmWaitVBlank reply sequence.
2) Avoided using kernel-specific info like transitional delays,
   instead polling mechanism with timeout is used.
3) Included edp-DRRS as a subtest in kms_frontbuffer_tracking.c,
   instead of having a separate test.

v5: This patch adds DRRS as a new feature in the
kms_frontbuffer_tracking IGT.
DRRS switch to lower vrefresh rate is tested at slow-draw subtest.

Note:
1) Currently kernel doesn't have support to enable and disable
   the DRRS feature dynamically(as in case of PSR). Hence if the
   panel supports DRRS it will be enabled by default.

This is in continuation of last patch
"https://patchwork.freedesktop.org/patch/162726/;

v6: This patch adds runtime enable and disable feature for testing DRRS

v7: This patch adds runtime enable and disable feature for testing DRRS
through debugfs entry "i915_drrs_ctl".

v8: Commit message is updated to reflect current implementation.

v9: Addressed Paulo Zanoni comments.
Check for DRRS_LOW at tests with OFFSCREEN + FBS_INDIVIDUAL.

v10: Corrected DRRS state expectation in suspend related subtests.

v11: Removing the global flag is_psr_drrs_combo [Rodrigo].

Signed-off-by: Lohith BS 
Signed-off-by: aknautiy 
---
 tests/kms_frontbuffer_tracking.c | 184 +--
 1 file changed, 175 insertions(+), 9 deletions(-)

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 1601cab..7876a12 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -34,7 +34,7 @@
 
 
 IGT_TEST_DESCRIPTION("Test the Kernel's frontbuffer tracking mechanism and "
-"its related features: FBC and PSR");
+"its related features: FBC, PSR and DRRS");
 
 /*
  * One of the aspects of this test is that, for every subtest, we try different
@@ -105,8 +105,9 @@ struct test_mode {
FEATURE_NONE  = 0,
FEATURE_FBC   = 1,
FEATURE_PSR   = 2,
-   FEATURE_COUNT = 4,
-   FEATURE_DEFAULT = 4,
+   FEATURE_DRRS  = 4,
+   FEATURE_COUNT = 8,
+   FEATURE_DEFAULT = 8,
} feature;
 
/* Possible pixel formats. We just use FORMAT_DEFAULT for most tests and
@@ -156,6 +157,7 @@ struct rect {
 struct {
int fd;
int debugfs;
+   int drrs_debugfs_fd;
drmModeResPtr res;
drmModeConnectorPtr connectors[MAX_CONNECTORS];
drmModeEncoderPtr encoders[MAX_ENCODERS];
@@ -182,6 +184,13 @@ struct {
.can_test = false,
 };
 
+#define MAX_DRRS_STATUS_BUF_LEN 256
+
+struct {
+   bool can_test;
+} drrs = {
+   .can_test = false,
+};
 
 #define SINK_CRC_SIZE 12
 typedef struct {
@@ -825,6 +834,64 @@ static void psr_print_status(void)
igt_info("PSR status:\n%s\n", buf);
 }
 
+void drrs_set(unsigned int val)
+{
+   char buf[2];
+
+   igt_debug("Manually %sabling DRRS. %llu\n", val ? "en" : "dis", val);
+   snprintf(buf, sizeof(buf), "%d", val);
+   igt_assert_eq(write(drm.drrs_debugfs_fd,
+ buf, strlen(buf)), strlen(buf));
+}
+
+static bool is_drrs_high(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_HIGH_RR");
+}
+
+static bool is_drrs_low(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS_LOW_RR");
+}
+
+static bool is_drrs_supported(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+   return strstr(buf, "DRRS Supported: Yes");
+}
+
+static bool is_drrs_inactive(void)
+{
+   char buf[MAX_DRRS_STATUS_BUF_LEN];
+
+   debugfs_read("i915_drrs_status", buf);
+
+   if (strstr(buf, "No active crtc found"))
+   return true;
+   if (strstr(buf, "Idleness DRRS: Disabled"))
+   return true;
+   if (strstr(buf, "DRRS Supported : No"))
+

Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Chris Wilson
Quoting Alexandru Chirvasitu (2018-01-03 14:48:26)
> Here's the log for the make bzImage and modules without ccache.
> 
> I ran it with j8 still because otherwise it would take very long, but
> if I run out of options I'll try plain too..
> 
> In the meantime I'd like to try some other configs; maybe specific
> drivers are messing me up.
> 
> I swear to god it was working all right yesterday..

drivers/gpu/drm/i915/intel_dpio_phy.c:442:1: error: the frame size of
1168 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Go into the kconfig compiler options and increase the limit or disable
the warning. See CONFIG_FRAME_WARN.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Chris Wilson
Quoting Alexandru Chirvasitu (2018-01-03 14:03:40)
> 
> On Wed, Jan 03, 2018 at 01:47:56PM +, Chris Wilson wrote:
> > Quoting Alexandru Chirvasitu (2018-01-03 13:46:42)
> > > I've cloned your
> > > 
> > > https://anongit.freedesktop.org/git/drm-tip.git
> > > 
> > > and am now trying to build it (just the master; I haven't tried
> > > previous commits). The build fails at the modules stage with
> > > 
> > > Makefile:1015: recipe for target 'drivers' failed
> > > make: *** [drivers] Error 2
> > > 
> > > What is the earliest commit I can try to build so it will still
> > > include the config options you mention?
> > > 
> > > I'm sure I'm just missing something obvious..
> > 
> > Make sure you have the drm-tip branch.
> 
> That's the one. `git branch` returns drm-tip. 
> 
> > It should compile fine, if not
> > show the last few lines that tell us what the actual error is.
> 
> When I run a script that makes bzImage and modules and then tries to
> install, I get multiple errors to the effect that the modules to be
> installed cannot be found:
> 
>   INSTALL sound/synth/snd-util-mem.ko
> cp: cannot stat 'sound/synth/snd-util-mem.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/synth/snd-util-mem.ko':
>  No such file
>   INSTALL sound/usb/6fire/snd-usb-6fire.ko
> cp: cannot stat 'sound/usb/6fire/snd-usb-6fire.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/6fire/snd-usb-6fire.ko':
>  No such file
>   INSTALL sound/usb/caiaq/snd-usb-caiaq.ko
> cp: cannot stat 'sound/usb/caiaq/snd-usb-caiaq.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/caiaq/snd-usb-caiaq.ko':
>  No such file
>   INSTALL sound/usb/hiface/snd-usb-hiface.ko
> cp: cannot stat 'sound/usb/hiface/snd-usb-hiface.ko': No such file or 
> directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/hiface/snd-usb-hiface.ko':
>  No such file
>   INSTALL sound/usb/line6/snd-usb-line6.ko
> cp: cannot stat 'sound/usb/line6/snd-usb-line6.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-line6.ko':
>  No such file
>   INSTALL sound/usb/line6/snd-usb-pod.ko
> cp: cannot stat 'sound/usb/line6/snd-usb-pod.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-pod.ko':
>  No such file
>   INSTALL sound/usb/line6/snd-usb-podhd.ko
> cp: cannot stat 'sound/usb/line6/snd-usb-podhd.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-podhd.ko':
>  No such file
>   INSTALL sound/usb/line6/snd-usb-toneport.ko
> cp: cannot stat 'sound/usb/line6/snd-usb-toneport.ko': No such file or 
> directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-toneport.ko':
>  No such file
>   INSTALL sound/usb/line6/snd-usb-variax.ko
> cp: cannot stat 'sound/usb/line6/snd-usb-variax.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-variax.ko':
>  No such file
>   INSTALL sound/usb/misc/snd-ua101.ko
> cp: cannot stat 'sound/usb/misc/snd-ua101.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/misc/snd-ua101.ko':
>  No such file
>   INSTALL sound/usb/snd-usb-audio.ko
> cp: cannot stat 'sound/usb/snd-usb-audio.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/snd-usb-audio.ko':
>  No such file
>   INSTALL sound/usb/snd-usbmidi-lib.ko
> cp: cannot stat 'sound/usb/snd-usbmidi-lib.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/snd-usbmidi-lib.ko':
>  No such file
>   INSTALL sound/usb/usx2y/snd-usb-us122l.ko
> cp: cannot stat 'sound/usb/usx2y/snd-usb-us122l.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/usx2y/snd-usb-us122l.ko':
>  No such file
>   INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
> cp: cannot stat 'sound/usb/usx2y/snd-usb-usx2y.ko': No such file or directory
> strip: 
> '/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/usx2y/snd-usb-usx2y.ko':
>  No such file
>   INSTALL sound/x86/snd-hdmi-lpe-audio.ko
> cp: cannot stat 'sound/x86/snd-hdmi-lpe-audio.ko': No such file or directory
> strip: 
> 

Re: [Intel-gfx] ✗ Fi.CI.IGT: warning for series starting with [v2,1/2] drm/i915/guc : Decoupling ADS and logs from submission

2018-01-03 Thread Chris Wilson
Quoting Patchwork (2018-01-02 22:40:48)
> == Series Details ==
> 
> Series: series starting with [v2,1/2] drm/i915/guc : Decoupling ADS and logs 
> from submission
> URL   : https://patchwork.freedesktop.org/series/35913/
> State : warning
> 
> == Summary ==
> 
> Test kms_frontbuffer_tracking:
> Subgroup fbc-1p-primscrn-pri-indfb-draw-mmap-gtt:
> skip   -> PASS   (shard-hsw) fdo#101623 +1
> Subgroup fbc-1p-primscrn-cur-indfb-onoff:
> pass   -> SKIP   (shard-snb)
> Test kms_flip:
> Subgroup blt-wf_vblank-vs-modeset:
> skip   -> PASS   (shard-hsw)
> Subgroup dpms-off-confusion-interruptible:
> skip   -> PASS   (shard-hsw)
> Subgroup vblank-vs-dpms-suspend:
> pass   -> INCOMPLETE (shard-hsw) fdo#103540
> Test drm_read:
> Subgroup short-buffer-block:
> skip   -> PASS   (shard-hsw)
> Test kms_vblank:
> Subgroup wait-busy:
> skip   -> PASS   (shard-hsw)
> Test pm_rpm:
> Subgroup modeset-stress-extra-wait:
> skip   -> PASS   (shard-hsw)
> Test kms_plane:
> Subgroup plane-position-hole-dpms-pipe-c-planes:
> incomplete -> PASS   (shard-hsw)
> Test perf:
> Subgroup polling:
> fail   -> PASS   (shard-hsw) fdo#102252
> Test gem_tiled_swapping:
> Subgroup non-threaded:
> incomplete -> PASS   (shard-snb) fdo#104218 +1
> Test kms_draw_crc:
> Subgroup draw-method-xrgb-mmap-wc-untiled:
> pass   -> SKIP   (shard-snb)
> Subgroup draw-method-xrgb-blt-untiled:
> pass   -> SKIP   (shard-snb)
> 
> fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
> fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
> fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
> fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
> 
> shard-hswtotal:2646 pass:1507 dwarn:1   dfail:0   fail:12  skip:1125 
> time:9153s
> shard-snbtotal:2713 pass:1305 dwarn:1   dfail:0   fail:12  skip:1395 
> time:8116s
> Blacklisted hosts:
> shard-apltotal:2713 pass:1681 dwarn:1   dfail:0   fail:30  skip:1001 
> time:13679s
> shard-kbltotal:2713 pass:1802 dwarn:2   dfail:0   fail:31  skip:878 
> time:10993s

And pushed, thanks for the patches.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Alexandru Chirvasitu

On Wed, Jan 03, 2018 at 01:47:56PM +, Chris Wilson wrote:
> Quoting Alexandru Chirvasitu (2018-01-03 13:46:42)
> > I've cloned your
> > 
> > https://anongit.freedesktop.org/git/drm-tip.git
> > 
> > and am now trying to build it (just the master; I haven't tried
> > previous commits). The build fails at the modules stage with
> > 
> > Makefile:1015: recipe for target 'drivers' failed
> > make: *** [drivers] Error 2
> > 
> > What is the earliest commit I can try to build so it will still
> > include the config options you mention?
> > 
> > I'm sure I'm just missing something obvious..
> 
> Make sure you have the drm-tip branch.

That's the one. `git branch` returns drm-tip. 

> It should compile fine, if not
> show the last few lines that tell us what the actual error is.

When I run a script that makes bzImage and modules and then tries to
install, I get multiple errors to the effect that the modules to be
installed cannot be found:

  INSTALL sound/synth/snd-util-mem.ko
cp: cannot stat 'sound/synth/snd-util-mem.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/synth/snd-util-mem.ko':
 No such file
  INSTALL sound/usb/6fire/snd-usb-6fire.ko
cp: cannot stat 'sound/usb/6fire/snd-usb-6fire.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/6fire/snd-usb-6fire.ko':
 No such file
  INSTALL sound/usb/caiaq/snd-usb-caiaq.ko
cp: cannot stat 'sound/usb/caiaq/snd-usb-caiaq.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/caiaq/snd-usb-caiaq.ko':
 No such file
  INSTALL sound/usb/hiface/snd-usb-hiface.ko
cp: cannot stat 'sound/usb/hiface/snd-usb-hiface.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/hiface/snd-usb-hiface.ko':
 No such file
  INSTALL sound/usb/line6/snd-usb-line6.ko
cp: cannot stat 'sound/usb/line6/snd-usb-line6.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-line6.ko':
 No such file
  INSTALL sound/usb/line6/snd-usb-pod.ko
cp: cannot stat 'sound/usb/line6/snd-usb-pod.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-pod.ko':
 No such file
  INSTALL sound/usb/line6/snd-usb-podhd.ko
cp: cannot stat 'sound/usb/line6/snd-usb-podhd.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-podhd.ko':
 No such file
  INSTALL sound/usb/line6/snd-usb-toneport.ko
cp: cannot stat 'sound/usb/line6/snd-usb-toneport.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-toneport.ko':
 No such file
  INSTALL sound/usb/line6/snd-usb-variax.ko
cp: cannot stat 'sound/usb/line6/snd-usb-variax.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/line6/snd-usb-variax.ko':
 No such file
  INSTALL sound/usb/misc/snd-ua101.ko
cp: cannot stat 'sound/usb/misc/snd-ua101.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/misc/snd-ua101.ko':
 No such file
  INSTALL sound/usb/snd-usb-audio.ko
cp: cannot stat 'sound/usb/snd-usb-audio.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/snd-usb-audio.ko':
 No such file
  INSTALL sound/usb/snd-usbmidi-lib.ko
cp: cannot stat 'sound/usb/snd-usbmidi-lib.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/snd-usbmidi-lib.ko':
 No such file
  INSTALL sound/usb/usx2y/snd-usb-us122l.ko
cp: cannot stat 'sound/usb/usx2y/snd-usb-us122l.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/usx2y/snd-usb-us122l.ko':
 No such file
  INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
cp: cannot stat 'sound/usb/usx2y/snd-usb-usx2y.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/usb/usx2y/snd-usb-usx2y.ko':
 No such file
  INSTALL sound/x86/snd-hdmi-lpe-audio.ko
cp: cannot stat 'sound/x86/snd-hdmi-lpe-audio.ko': No such file or directory
strip: 
'/axiomatic/data/users/achirvas/lnx//lib/modules/4.15.0-rc6-x-void-noslb+/kernel/sound/x86/snd-hdmi-lpe-audio.ko':
 No such file
  INSTALL virt/lib/irqbypass.ko


On the other hand, when I run `make bzImage modules` it stops abruptly
with the two lines I sent. Here's the final segment I can see on the
screen:


  LD [M]  

Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Chris Wilson
Quoting Alexandru Chirvasitu (2018-01-03 13:46:42)
> I've cloned your
> 
> https://anongit.freedesktop.org/git/drm-tip.git
> 
> and am now trying to build it (just the master; I haven't tried
> previous commits). The build fails at the modules stage with
> 
> Makefile:1015: recipe for target 'drivers' failed
> make: *** [drivers] Error 2
> 
> What is the earliest commit I can try to build so it will still
> include the config options you mention?
> 
> I'm sure I'm just missing something obvious..

Make sure you have the drm-tip branch. It should compile fine, if not
show the last few lines that tell us what the actual error is.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] igt/gem_busy: Remove repeated use of igt_spin_batch_new

2018-01-03 Thread Patchwork
== Series Details ==

Series: series starting with [1/2] igt/gem_busy: Remove repeated use of 
igt_spin_batch_new
URL   : https://patchwork.freedesktop.org/series/35942/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
58bd37d347d1369ecd272ff778057ee8004d6b15 kms_atomic_transition: Remove 
skip_on_unsupported_nonblocking_modeset.

with latest DRM-Tip kernel build CI_DRM_3592
5ef43bcb8d54 drm-tip: 2018y-01m-03d-12h-57m-22s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test kms_chamelium:
Subgroup dp-crc-fast:
dmesg-fail -> PASS   (fi-kbl-7500u) fdo#103841
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
pass   -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_psr_sink_crc:
Subgroup psr_basic:
dmesg-warn -> PASS   (fi-skl-6700hq) fdo#101144

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:427s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:426s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:369s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:487s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:479s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:484s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:477s
fi-elk-e7500 total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 
time:263s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:516s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:400s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:398s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:414s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:454s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:421s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:465s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:498s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:454s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:498s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:572s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:436s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:507s
fi-skl-6700hqtotal:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:531s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:497s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:488s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:433s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:401s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:565s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:602s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:469s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_736/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Alexandru Chirvasitu
I've cloned your

https://anongit.freedesktop.org/git/drm-tip.git

and am now trying to build it (just the master; I haven't tried
previous commits). The build fails at the modules stage with

Makefile:1015: recipe for target 'drivers' failed
make: *** [drivers] Error 2

What is the earliest commit I can try to build so it will still
include the config options you mention?

I'm sure I'm just missing something obvious..

On Wed, Jan 03, 2018 at 12:49:10PM +, Chris Wilson wrote:
> Quoting Alexandru Chirvasitu (2018-01-03 00:14:38)
> > For comparison, here's another one produced by the same kernel, on the
> > same laptop, but a different hard drive.
> > 
> > The OS was installed on a USB stick that I'd boot the laptop off
> > of. Recently I started getting lags when copying to / from the stick,
> > so I moved the OS to an external SSD.
> > 
> > Everything else stayed the same, and booting the same kernel resulted
> > in the same type of freeze. 
> 
> I still have no explanation for how the use-after-free is possible here.
> The list iteration and destruction are both guarded by the struct_mutex.
> 
> However, we have just pushed some extra assertions into drm-tip,
> https://cgit.freedesktop.org/drm-tip If you could please compile and
> test a kernel built using that branch and enable
> CONFIG_DRM_I915_DEBUG_GEM (which depends on CONFIG_DRM_I915_WERROR). I'm
> hoping that will catch the culprit in the act.
> -Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt 1/2] igt/gem_busy: Remove repeated use of igt_spin_batch_new

2018-01-03 Thread Chris Wilson
igt_spin_batch_new() includes a throttling check that GEM works, which
breaks trying to create multiple spin batches, use
__igt_spin_batch_new() instead, after verifying GEM works.

Signed-off-by: Chris Wilson 
---
 tests/gem_busy.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/gem_busy.c b/tests/gem_busy.c
index 4ba232411..c349c2919 100644
--- a/tests/gem_busy.c
+++ b/tests/gem_busy.c
@@ -459,17 +459,17 @@ static void close_race(int fd)
igt_assert(sched_setscheduler(getpid(), SCHED_RR, ) == 0);
 
for (i = 0; i < nhandles; i++) {
-   spin[i] = igt_spin_batch_new(fd, 0,
-engines[rand() % nengine], 
0);
+   spin[i] = __igt_spin_batch_new(fd, 0,
+  engines[rand() % 
nengine], 0);
handles[i] = spin[i]->handle;
}
 
igt_until_timeout(20) {
for (i = 0; i < nhandles; i++) {
igt_spin_batch_free(fd, spin[i]);
-   spin[i] = igt_spin_batch_new(fd, 0,
-engines[rand() % 
nengine],
-0);
+   spin[i] = __igt_spin_batch_new(fd, 0,
+  engines[rand() % 
nengine],
+  0);
handles[i] = spin[i]->handle;
__sync_synchronize();
}
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH igt 2/2] lib/gem: Reset the global seqno at the start of each test

2018-01-03 Thread Chris Wilson
When we require GEM, reset the global seqno. This gives each test a
clean slate to work with, and avoids left-over state from previous tests
impacting on the next. In particular, somes tests may be setting up long
sequence of stalling batches not expecting to hit a seqno wraparound
(leftover from, for example, gem_exec_whisper), causing long GPU hangs
and incompletes in CI if they do.

Signed-off-by: Chris Wilson 
---
 lib/ioctl_wrappers.c | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 118dcefe7..39e8469e3 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -52,6 +52,7 @@
 #include "intel_chipset.h"
 #include "intel_io.h"
 #include "igt_debugfs.h"
+#include "igt_sysfs.h"
 #include "config.h"
 
 #ifdef HAVE_VALGRIND
@@ -1411,7 +1412,8 @@ void igt_require_gem(int fd)
 
igt_require_intel(fd);
 
-   /* We only want to use the throttle-ioctl for its -EIO reporting
+   /*
+* We only want to use the throttle-ioctl for its -EIO reporting
 * of a wedged device, not for actually waiting on outstanding
 * requests! So create a new drm_file for the device that is clean.
 */
@@ -1419,6 +1421,18 @@ void igt_require_gem(int fd)
fd = open(path, O_RDWR);
igt_assert_lte(0, fd);
 
+   /*
+* Reset the global seqno at the start of each test. This ensures that
+* the test will not wrap unless it explicitly sets up seqno wrapping
+* itself, which avoids accidentally hanging when setting up long
+* sequences of batches.
+*/
+   err = igt_debugfs_dir(fd);
+   if (err != -1) {
+   igt_sysfs_printf(err, "i915_next_seqno", "1");
+   close(err);
+   }
+
err = 0;
if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE))
err = -errno;
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2018-01-03 Thread Chris Wilson
Quoting Alexandru Chirvasitu (2018-01-03 00:14:38)
> For comparison, here's another one produced by the same kernel, on the
> same laptop, but a different hard drive.
> 
> The OS was installed on a USB stick that I'd boot the laptop off
> of. Recently I started getting lags when copying to / from the stick,
> so I moved the OS to an external SSD.
> 
> Everything else stayed the same, and booting the same kernel resulted
> in the same type of freeze. 

I still have no explanation for how the use-after-free is possible here.
The list iteration and destruction are both guarded by the struct_mutex.

However, we have just pushed some extra assertions into drm-tip,
https://cgit.freedesktop.org/drm-tip If you could please compile and
test a kernel built using that branch and enable
CONFIG_DRM_I915_DEBUG_GEM (which depends on CONFIG_DRM_I915_WERROR). I'm
hoping that will catch the culprit in the act.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 09/19] drm/i915: Assert all signalers we depended on did indeed signal

2018-01-03 Thread Chris Wilson
Quoting Michał Winiarski (2018-01-03 11:40:19)
> On Tue, Jan 02, 2018 at 03:12:25PM +, Chris Wilson wrote:
> > Back up our comment that all signalers should have been signaled before
> > we ourselves were retired with an assert to that effect.
> > 
> > Signed-off-by: Chris Wilson 
> > Cc: Joonas Lahtinen 
> 
> Reviewed-by: Michał Winiarski 

Next batch pushed to get the extra assertions, thanks.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 09/19] drm/i915: Assert all signalers we depended on did indeed signal

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:25PM +, Chris Wilson wrote:
> Back up our comment that all signalers should have been signaled before
> we ourselves were retired with an assert to that effect.
> 
> Signed-off-by: Chris Wilson 
> Cc: Joonas Lahtinen 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/i915_gem_request.c | 9 -
>  drivers/gpu/drm/i915/i915_gem_request.h | 6 ++
>  drivers/gpu/drm/i915/intel_lrc.c| 9 ++---
>  3 files changed, 16 insertions(+), 8 deletions(-)
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.

2018-01-03 Thread Maarten Lankhorst
Op 03-01-18 om 10:50 schreef Lofstedt, Marta:
> Reviewed-by: Marta Lofstedt 
Thanks, pushed.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 10/19] drm/i915/execlists: Assert there are no simple cycles in the dependencies

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:26PM +, Chris Wilson wrote:
> The dependency chain must be an acyclic graph. This is checked by the
> swfence, but for sanity, also do a simple check that we do not corrupt
> our list iteration in execlists_schedule() by a shallow dependency
> cycle.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 11 ---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c 
> b/drivers/gpu/drm/i915/intel_lrc.c
> index 007aec9d95c9..8c9d6cef2482 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1006,7 +1006,8 @@ static void execlists_schedule(struct 
> drm_i915_gem_request *request, int prio)
>   stack.signaler = >priotree;
>   list_add(_link, );
>  
> - /* Recursively bump all dependent priorities to match the new request.
> + /*
> +  * Recursively bump all dependent priorities to match the new request.
>*
>* A naive approach would be to use recursion:
>* static void update_priorities(struct i915_priotree *pt, prio) {
> @@ -1026,12 +1027,15 @@ static void execlists_schedule(struct 
> drm_i915_gem_request *request, int prio)
>   list_for_each_entry_safe(dep, p, , dfs_link) {
>   struct i915_priotree *pt = dep->signaler;
>  
> - /* Within an engine, there can be no cycle, but we may
> + /*
> +  * Within an engine, there can be no cycle, but we may
>* refer to the same dependency chain multiple times
>* (redundant dependencies are not eliminated) and across
>* engines.
>*/
>   list_for_each_entry(p, >signalers_list, signal_link) {
> + GEM_BUG_ON(p == dep); /* no cycles! */
> +
>   if 
> (i915_gem_request_completed(priotree_to_request(p->signaler)))
>   continue;
>  
> @@ -1043,7 +1047,8 @@ static void execlists_schedule(struct 
> drm_i915_gem_request *request, int prio)
>   list_safe_reset_next(dep, p, dfs_link);
>   }
>  
> - /* If we didn't need to bump any existing priorities, and we haven't
> + /*
> +  * If we didn't need to bump any existing priorities, and we haven't
>* yet submitted this request (i.e. there is no potential race with
>* execlists_submit_request()), we can set our own priority and skip
>* acquiring the engine locks.
> -- 
> 2.15.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 18/19] drm/i915/execlists: Tidy enabling execlists

2018-01-03 Thread Chris Wilson
Quoting Michał Winiarski (2018-01-03 09:55:39)
> On Tue, Jan 02, 2018 at 03:12:34PM +, Chris Wilson wrote:
> > Move the register settings for enabling execlists into its own function
> > for clarity.
> > 
> > Signed-off-by: Chris Wilson 
> 
> Reviewed-by: Michał Winiarski 

Pushed the 3 code motion so we can debate the dubious merits of the
execlists "bugfix" in isolation.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 11/19] drm/i915/execlists: Reduce list_for_each_safe+list_safe_reset_next

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:27PM +, Chris Wilson wrote:
> After staring at the list_for_each_safe macros for a bit, our current
> invocation of list_safe_reset_next in execlists_schedule() simply
> reduces to list_for_each.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c 
> b/drivers/gpu/drm/i915/intel_lrc.c
> index 8c9d6cef2482..ffc20d7b754e 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1024,7 +1024,7 @@ static void execlists_schedule(struct 
> drm_i915_gem_request *request, int prio)
>* end result is a topological list of requests in reverse order, the
>* last element in the list is the request we must execute first.
>*/
> - list_for_each_entry_safe(dep, p, , dfs_link) {
> + list_for_each_entry(dep, , dfs_link) {
>   struct i915_priotree *pt = dep->signaler;
>  
>   /*
> @@ -1043,8 +1043,6 @@ static void execlists_schedule(struct 
> drm_i915_gem_request *request, int prio)
>   if (prio > READ_ONCE(p->signaler->priority))
>   list_move_tail(>dfs_link, );
>   }
> -
> - list_safe_reset_next(dep, p, dfs_link);
>   }
>  
>   /*
> -- 
> 2.15.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.IGT: success for kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.

2018-01-03 Thread Patchwork
== Series Details ==

Series: kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.
URL   : https://patchwork.freedesktop.org/series/35934/
State : success

== Summary ==

Test kms_flip:
Subgroup blt-wf_vblank-vs-modeset:
skip   -> PASS   (shard-hsw)
Subgroup dpms-off-confusion-interruptible:
skip   -> PASS   (shard-hsw)
Subgroup vblank-vs-suspend-interruptible:
notrun -> INCOMPLETE (shard-hsw) fdo#100368
Test kms_vblank:
Subgroup wait-busy:
skip   -> PASS   (shard-hsw)
Test pm_rpm:
Subgroup modeset-stress-extra-wait:
skip   -> PASS   (shard-hsw)
Test kms_atomic_transition:
Subgroup 1x-modeset-transitions-nonblocking-fencing:
fail   -> PASS   (shard-snb) fdo#104471 +3
Test kms_plane:
Subgroup plane-position-hole-dpms-pipe-c-planes:
incomplete -> PASS   (shard-hsw) fdo#104152
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
pass   -> FAIL   (shard-snb) fdo#101623 +1
Test drm_read:
Subgroup short-buffer-block:
skip   -> PASS   (shard-hsw)
Test gem_tiled_swapping:
Subgroup non-threaded:
incomplete -> PASS   (shard-snb) fdo#104218 +1
Test gem_eio:
Subgroup in-flight-contexts:
pass   -> DMESG-WARN (shard-snb) fdo#104058

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104471 https://bugs.freedesktop.org/show_bug.cgi?id=104471
fdo#104152 https://bugs.freedesktop.org/show_bug.cgi?id=104152
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104218 https://bugs.freedesktop.org/show_bug.cgi?id=104218
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058

shard-hswtotal:2657 pass:1513 dwarn:1   dfail:0   fail:11  skip:1131 
time:9126s
shard-snbtotal:2713 pass:1309 dwarn:2   dfail:0   fail:11  skip:1391 
time:8119s
Blacklisted hosts:
shard-apltotal:2713 pass:1681 dwarn:1   dfail:0   fail:30  skip:1001 
time:13833s
shard-kbltotal:2713 pass:1805 dwarn:1   dfail:0   fail:28  skip:879 
time:11179s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_735/shards.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 15/19] drm/i915: Hold rpm wakeref for modifying the global seqno

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:31PM +, Chris Wilson wrote:
> To modify the global seqno may require rewriting a few registers, which
> requires us to hold the rpm wakeref. We must therefore take it around
> the call to i915_gem_set_global_seqno() in debugfs, on behalf of the
> user.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
> b/drivers/gpu/drm/i915/i915_debugfs.c
> index d81cb2513069..2bb63073d73f 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -988,7 +988,10 @@ i915_next_seqno_set(void *data, u64 val)
>   if (ret)
>   return ret;
>  
> + intel_runtime_pm_get(dev_priv);
>   ret = i915_gem_set_global_seqno(dev, val);
> + intel_runtime_pm_put(dev_priv);
> +
>   mutex_unlock(>struct_mutex);
>  
>   return ret;
> -- 
> 2.15.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 16/19] drm/i915/execlists: Clear context-switch interrupt earlier in the reset

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:32PM +, Chris Wilson wrote:
> Move the clearing of the CS-interrupt into the engine reset phase,
> before the current init-hw phase. This helps clarify that we clear the
> pending interrupts prior to any restarting of the execlists.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 33 +
>  1 file changed, 21 insertions(+), 12 deletions(-)
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 17/19] drm/i915/execlists: Record elsp offset during engine setup

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:33PM +, Chris Wilson wrote:
> Currently, we record the elsp register offset inside init-hw but we only
> need to do it once during engine setup (after we know the mmio
> iomapping).
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 18/19] drm/i915/execlists: Tidy enabling execlists

2018-01-03 Thread Michał Winiarski
On Tue, Jan 02, 2018 at 03:12:34PM +, Chris Wilson wrote:
> Move the register settings for enabling execlists into its own function
> for clarity.
> 
> Signed-off-by: Chris Wilson 

Reviewed-by: Michał Winiarski 

-Michał

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 22 ++
>  1 file changed, 14 insertions(+), 8 deletions(-)
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] ✓ Fi.CI.BAT: success for kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.

2018-01-03 Thread Patchwork
== Series Details ==

Series: kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.
URL   : https://patchwork.freedesktop.org/series/35934/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
d86d53b072b50172309abf21ecb521bd70c5fc73 tests/kms_cursor_legacy: Rework the 
2x-*-vs-cursor-* tests.

with latest DRM-Tip kernel build CI_DRM_3588
df8878303090 drm-tip: 2018y-01m-02d-15h-31m-30s UTC integration manifest

No testlist changes.

Test debugfs_test:
Subgroup read_all_entries:
dmesg-warn -> FAIL   (fi-elk-e7500) fdo#103989 +2
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
dmesg-warn -> PASS   (fi-kbl-r) fdo#104172 +1
Subgroup suspend-read-crc-pipe-b:
pass   -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  
time:437s
fi-bdw-gvtdvmtotal:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:443s
fi-blb-e6850 total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  
time:379s
fi-bsw-n3050 total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  
time:500s
fi-bwr-2160  total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 
time:276s
fi-bxt-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:496s
fi-bxt-j4205 total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:500s
fi-byt-j1900 total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  
time:482s
fi-byt-n2820 total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  
time:472s
fi-elk-e7500 total:224  pass:168  dwarn:9   dfail:0   fail:1   skip:45 
fi-gdg-551   total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 
time:263s
fi-glk-1 total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  
time:523s
fi-hsw-4770  total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:404s
fi-hsw-4770r total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  
time:418s
fi-ilk-650   total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  
time:424s
fi-ivb-3520m total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  
time:474s
fi-ivb-3770  total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  
time:431s
fi-kbl-7500u total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  
time:479s
fi-kbl-7560u total:288  pass:268  dwarn:1   dfail:0   fail:0   skip:19  
time:509s
fi-kbl-7567u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:467s
fi-kbl-r total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:513s
fi-pnv-d510  total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  
time:594s
fi-skl-6260u total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:447s
fi-skl-6600u total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  
time:520s
fi-skl-6700hqtotal:288  pass:261  dwarn:1   dfail:0   fail:0   skip:26  
time:543s
fi-skl-6700k2total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  
time:507s
fi-skl-6770hqtotal:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  
time:489s
fi-skl-gvtdvmtotal:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  
time:445s
fi-snb-2520m total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600  total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  
time:412s
Blacklisted hosts:
fi-cfl-s2total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:581s
fi-cnl-y total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  
time:614s
fi-glk-dsi   total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  
time:476s

== Logs ==

For more details see: 
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_735/issues.html
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH i-g-t] kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.

2018-01-03 Thread Lofstedt, Marta
Reviewed-by: Marta Lofstedt 

> -Original Message-
> From: Intel-gfx [mailto:intel-gfx-boun...@lists.freedesktop.org] On Behalf
> Of Maarten Lankhorst
> Sent: Wednesday, January 3, 2018 11:19 AM
> To: intel-gfx@lists.freedesktop.org
> Subject: [Intel-gfx] [PATCH i-g-t] kms_atomic_transition: Remove
> skip_on_unsupported_nonblocking_modeset.
> 
> This weas a workaround to gracefully skip on i915 before nonblocking
> modeset support was added, but this is no longer needed. Remove the
> code, since it's safe to always assume such support is enabled.
> 
> Signed-off-by: Maarten Lankhorst 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104471
> ---
>  tests/kms_atomic_transition.c | 47 
> ---
>  1 file changed, 47 deletions(-)
> 
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index 54581ed7cd96..798639393421 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -148,33 +148,6 @@ wm_setup_plane(igt_display_t *display, enum pipe
> pipe,
>   }
>  }
> 
> -static bool skip_on_unsupported_nonblocking_modeset(igt_display_t
> *display) -{
> - enum pipe pipe;
> - int ret;
> -
> - /*
> -  * Make sure we only skip when the suggested configuration is
> -  * unsupported by committing it first with TEST_ONLY, if it's
> -  * unsupported -EINVAL is returned. If the second commit
> returns
> -  * -EINVAL, it's from not being able to support nonblocking
> modeset.
> -  */
> - igt_display_commit_atomic(display,
> DRM_MODE_ATOMIC_TEST_ONLY |
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> -
> - ret = igt_display_try_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET |
> DRM_MODE_ATOMIC_NONBLOCK, NULL);
> -
> - if (ret == -EINVAL)
> - return true;
> -
> - igt_assert_eq(ret, 0);
> -
> - /* Force the next state to update all crtc's, to synchronize with
> the nonblocking modeset. */
> - for_each_pipe(display, pipe)
> - igt_pipe_refresh(display, pipe, false);
> -
> - return false;
> -}
> -
>  static void ev_page_flip(int fd, unsigned seq, unsigned tv_sec, unsigned
> tv_usec, void *user_data)  {
>   igt_debug("Retrieved vblank seq: %u on unk\n", seq); @@ -
> 421,7 +394,6 @@ run_transition_test(igt_display_t *display, enum pipe pipe,
> igt_output_t *output
>   igt_pipe_t *pipe_obj = >pipes[pipe];
>   uint32_t iter_max = 1 << pipe_obj->n_planes, i;
>   struct plane_parms parms[pipe_obj->n_planes];
> - bool skip_test = false;
>   unsigned flags = 0;
>   int ret;
> 
> @@ -448,10 +420,6 @@ run_transition_test(igt_display_t *display, enum
> pipe pipe, igt_output_t *output
>   wm_setup_plane(display, pipe, 0, NULL, false);
> 
>   if (flags & DRM_MODE_ATOMIC_ALLOW_MODESET) {
> - skip_test = nonblocking &&
> skip_on_unsupported_nonblocking_modeset(display);
> - if (skip_test)
> - goto cleanup;
> -
>   igt_output_set_pipe(output, PIPE_NONE);
> 
>   igt_display_commit2(display,
> COMMIT_ATOMIC); @@ -594,8 +562,6 @@ cleanup:
>   igt_remove_fb(display->drm_fd, );
>   igt_remove_fb(display->drm_fd, _fb);
>   igt_remove_fb(display->drm_fd, _fb);
> - if (skip_test)
> - igt_skip("Atomic nonblocking modesets are not
> supported.\n");
>  }
> 
>  static void commit_display(igt_display_t *display, unsigned event_mask,
> bool nonblocking) @@ -719,7 +685,6 @@ static void
> run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
>   igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
>   igt_output_t *output;
>   unsigned width = 0, height = 0;
> - bool skip_test = false;
> 
>   for_each_connected_output(display, output) {
>   drmModeModeInfo *mode =
> igt_output_get_mode(output); @@ -763,13 +728,6 @@ static void
> run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
>   igt_plane_set_fb(plane, NULL);
>   }
> 
> - /*
> -  * When i915 supports nonblocking modeset, this if branch can
> be removed.
> -  * It's only purpose is to ensure nonblocking modeset works.
> -  */
> - if (nonblocking && (skip_test =
> skip_on_unsupported_nonblocking_modeset(display)))
> - goto cleanup;
> -
>   igt_display_commit2(display, COMMIT_ATOMIC);
> 
>   for (i = 0; i < iter_max; i++) {
> @@ -832,7 +790,6 @@ static void run_modeset_tests(igt_display_t *display,
> int howmany, bool nonblock
>   }
>   }
> 
> -cleanup:
>   set_combinations(display, 0, NULL);
>   igt_display_commit2(display, COMMIT_ATOMIC);
> 
> @@ -842,10 +799,6 @@ cleanup:
> 
>   igt_remove_fb(display->drm_fd, [1]);
>   igt_remove_fb(display->drm_fd, [0]);
> -
> - if (skip_test)
> - igt_skip("Atomic nonblocking modesets are not
> supported.\n");
> -
>  }

Re: [Intel-gfx] [PATCH v2] drm/i915: Try EDID bitbanging on HDMI after failed read

2018-01-03 Thread Stefan Brüns
On Wednesday, January 3, 2018 8:14:47 AM CET Jani Nikula wrote:
> On Tue, 02 Jan 2018, Chris Wilson  wrote:
> > Quoting Rodrigo Vivi (2018-01-02 19:12:18)
> > 
> >> On Sun, Dec 31, 2017 at 10:34:54PM +, Stefan Brüns wrote:
> >> > + edid = drm_get_edid(connector, i2c);
> >> > +
> >> > + if (!edid && !intel_gmbus_is_forced_bit(i2c)) {
> >> > + DRM_DEBUG_KMS("HDMI GMBUS EDID read failed, retry using
> >> > GPIO bit-banging\n"); + intel_gmbus_force_bit(i2c, true);
> >> > + edid = drm_get_edid(connector, i2c);
> >> > + intel_gmbus_force_bit(i2c, false);
> >> > + }
> >> 
> >> Approach seems fine for this case.
> >> I just wonder what would be the risks of forcing this bit and edid read
> >> when nothing is present on the other end?> 
> > Should be no more risky than using GMBUS as the bit-banging is the
> > underlying HW protocol; it should just be adding an extra delay to
> > the disconnected probe. Offset against the chance that it fixes
> > detection of borderline devices.
> > 
> > I would say that given the explanation above, the question is why not
> > apply it universally? (Bonus points for including the explanation as
> > comments.)
> 
> I'm wondering, is gmbus too fast for the adapters, does gmbus generally
> have different timing for the ack/nak as described in the commit message
> than bit banging, or are the adapters just plain buggy? Do we have any
> control over gmbus timings (don't have the time to peruse the bpsec just
> now)?

I have seen two different behaviours, one on the ~2009 GM965, the other on the 
~2013 Haswell. The Haswell provides a 250..500ns hold time, the other does 
not.

There is a flag in the GMBUS0 register, GMBUS_HOLD_EXT, "300ns hold time, rsvd 
on Pineview". The driver does not set this flag. Possibly it is always set/
implied on the Haswell (which is post-Pineview), and should be set for 
anything older than Pineview.

There is another odd fact with the GM965, according to the register setting it 
should run at 100 kBit/s, but it only runs at 30 kBit/s. The Haswell runs at 
100 kBit/s, as specified. As there are also idle periods ever 8 bytes, the 
EDID read takes 270ms before it fails.

The bitbanging code, running at 45 kBit/s (2 * 20us per clock cycle plus 
overhead) on the other hand just needs 58 ms, but keeps one core busy 
(udelay).


Unfortunately I currently have no older system than the Haswell available, so 
I can not check if the GMBUS_HOLD_EXT flag has any effect.

Kind regards,

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019

signature.asc
Description: This is a digitally signed message part.
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH i-g-t] kms_atomic_transition: Remove skip_on_unsupported_nonblocking_modeset.

2018-01-03 Thread Maarten Lankhorst
This weas a workaround to gracefully skip on i915 before nonblocking
modeset support was added, but this is no longer needed. Remove the
code, since it's safe to always assume such support is enabled.

Signed-off-by: Maarten Lankhorst 
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104471
---
 tests/kms_atomic_transition.c | 47 ---
 1 file changed, 47 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 54581ed7cd96..798639393421 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -148,33 +148,6 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
}
 }
 
-static bool skip_on_unsupported_nonblocking_modeset(igt_display_t *display)
-{
-   enum pipe pipe;
-   int ret;
-
-   /*
-* Make sure we only skip when the suggested configuration is
-* unsupported by committing it first with TEST_ONLY, if it's
-* unsupported -EINVAL is returned. If the second commit returns
-* -EINVAL, it's from not being able to support nonblocking modeset.
-*/
-   igt_display_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY | 
DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
-
-   ret = igt_display_try_commit_atomic(display, 
DRM_MODE_ATOMIC_ALLOW_MODESET | DRM_MODE_ATOMIC_NONBLOCK, NULL);
-
-   if (ret == -EINVAL)
-   return true;
-
-   igt_assert_eq(ret, 0);
-
-   /* Force the next state to update all crtc's, to synchronize with the 
nonblocking modeset. */
-   for_each_pipe(display, pipe)
-   igt_pipe_refresh(display, pipe, false);
-
-   return false;
-}
-
 static void ev_page_flip(int fd, unsigned seq, unsigned tv_sec, unsigned 
tv_usec, void *user_data)
 {
igt_debug("Retrieved vblank seq: %u on unk\n", seq);
@@ -421,7 +394,6 @@ run_transition_test(igt_display_t *display, enum pipe pipe, 
igt_output_t *output
igt_pipe_t *pipe_obj = >pipes[pipe];
uint32_t iter_max = 1 << pipe_obj->n_planes, i;
struct plane_parms parms[pipe_obj->n_planes];
-   bool skip_test = false;
unsigned flags = 0;
int ret;
 
@@ -448,10 +420,6 @@ run_transition_test(igt_display_t *display, enum pipe 
pipe, igt_output_t *output
wm_setup_plane(display, pipe, 0, NULL, false);
 
if (flags & DRM_MODE_ATOMIC_ALLOW_MODESET) {
-   skip_test = nonblocking && 
skip_on_unsupported_nonblocking_modeset(display);
-   if (skip_test)
-   goto cleanup;
-
igt_output_set_pipe(output, PIPE_NONE);
 
igt_display_commit2(display, COMMIT_ATOMIC);
@@ -594,8 +562,6 @@ cleanup:
igt_remove_fb(display->drm_fd, );
igt_remove_fb(display->drm_fd, _fb);
igt_remove_fb(display->drm_fd, _fb);
-   if (skip_test)
-   igt_skip("Atomic nonblocking modesets are not supported.\n");
 }
 
 static void commit_display(igt_display_t *display, unsigned event_mask, bool 
nonblocking)
@@ -719,7 +685,6 @@ static void run_modeset_tests(igt_display_t *display, int 
howmany, bool nonblock
igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
igt_output_t *output;
unsigned width = 0, height = 0;
-   bool skip_test = false;
 
for_each_connected_output(display, output) {
drmModeModeInfo *mode = igt_output_get_mode(output);
@@ -763,13 +728,6 @@ static void run_modeset_tests(igt_display_t *display, int 
howmany, bool nonblock
igt_plane_set_fb(plane, NULL);
}
 
-   /*
-* When i915 supports nonblocking modeset, this if branch can be 
removed.
-* It's only purpose is to ensure nonblocking modeset works.
-*/
-   if (nonblocking && (skip_test = 
skip_on_unsupported_nonblocking_modeset(display)))
-   goto cleanup;
-
igt_display_commit2(display, COMMIT_ATOMIC);
 
for (i = 0; i < iter_max; i++) {
@@ -832,7 +790,6 @@ static void run_modeset_tests(igt_display_t *display, int 
howmany, bool nonblock
}
}
 
-cleanup:
set_combinations(display, 0, NULL);
igt_display_commit2(display, COMMIT_ATOMIC);
 
@@ -842,10 +799,6 @@ cleanup:
 
igt_remove_fb(display->drm_fd, [1]);
igt_remove_fb(display->drm_fd, [0]);
-
-   if (skip_test)
-   igt_skip("Atomic nonblocking modesets are not supported.\n");
-
 }
 
 static void run_modeset_transition(igt_display_t *display, int 
requested_outputs, bool nonblocking, bool fencing)
-- 
2.15.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx