Re: [Intel-gfx] [PATCH v2] drm: forward declare struct drm_file in drm_syncobj.h

2018-12-30 Thread Laurent Pinchart
Hi Jani,

Thank you for the patch.

On Friday, 28 December 2018 10:28:15 EET Jani Nikula wrote:
> Make it easier to drop drmP.h includes. Switch from "" to <> includes
> while at it.
> 
> v2: forward declare instead of including drm_file.h (Daniel)

Reviewed-by: Laurent Pinchart 

but with the same comments as for the previous patches.

> Cc: Sam Ravnborg 
> Cc: Daniel Vetter 
> Cc: Laurent Pinchart 
> Reviewed-by: Daniel Vetter 
> Signed-off-by: Jani Nikula 
> ---
>  include/drm/drm_syncobj.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h
> index 7c6ed845c70d..0311c9fdbd2f 100644
> --- a/include/drm/drm_syncobj.h
> +++ b/include/drm/drm_syncobj.h
> @@ -26,7 +26,9 @@
>  #ifndef __DRM_SYNCOBJ_H__
>  #define __DRM_SYNCOBJ_H__
> 
> -#include "linux/dma-fence.h"
> +#include 
> +
> +struct drm_file;
> 
>  /**
>   * struct drm_syncobj - sync object.

-- 
Regards,

Laurent Pinchart



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


Re: [Intel-gfx] [PATCH 4/6] drm: include types.h from drm_hdcp.h

2018-12-30 Thread Laurent Pinchart
Hi Jani,

Thank you for the patch.

On Thursday, 27 December 2018 14:56:39 EET Jani Nikula wrote:
> Make it easier to drop drmP.h includes.

Same comment as for the previous patches, let's explain the reason.

"drm_hdcp.h uses kernel integer types, make it self-contained by including 
linux/kernel.h. This prepares for dropping drmP.h from files including 
drm_hdcp.h."

Reviewed-by: Laurent Pinchart 

> Cc: Sam Ravnborg 
> Cc: Daniel Vetter 
> Cc: Laurent Pinchart 
> Signed-off-by: Jani Nikula 
> ---
>  include/drm/drm_hdcp.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
> index a6de09c5e47f..d6dfef8cff6a 100644
> --- a/include/drm/drm_hdcp.h
> +++ b/include/drm/drm_hdcp.h
> @@ -9,6 +9,8 @@
>  #ifndef _DRM_HDCP_H_INCLUDED_
>  #define _DRM_HDCP_H_INCLUDED_
> 
> +#include 
> +
>  /* Period of hdcp checks (to ensure we're still authenticated) */
>  #define DRM_HDCP_CHECK_PERIOD_MS (128 * 16)

-- 
Regards,

Laurent Pinchart



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


Re: [Intel-gfx] [PATCH 3/6] drm: include idr.h from drm_file.h

2018-12-30 Thread Laurent Pinchart
Hi Jani,

Thank you for the patch.

On Thursday, 27 December 2018 14:56:38 EET Jani Nikula wrote:
> Make it easier to drop drmP.h includes.

How about explaining why idr.h is needed ?

"drm_file.h embeds idr structures in DRM-specific structures. Include the 
corresponding header to make drm_file.h self-contained."

Reviewed-by: Laurent Pinchart 

> Cc: Sam Ravnborg 
> Cc: Daniel Vetter 
> Cc: Laurent Pinchart 
> Signed-off-by: Jani Nikula 
> ---
>  include/drm/drm_file.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
> index 84ac79219e4c..6710b612e2f6 100644
> --- a/include/drm/drm_file.h
> +++ b/include/drm/drm_file.h
> @@ -32,6 +32,7 @@
> 
>  #include 
>  #include 
> +#include 
> 
>  #include 

-- 
Regards,

Laurent Pinchart



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


Re: [Intel-gfx] [PATCH v2] drm: un-inline drm_legacy_findmap()

2018-12-30 Thread Laurent Pinchart
Hi Jani,

Thank you for the patch.

On Friday, 28 December 2018 15:04:46 EET Jani Nikula wrote:
> Also include drm_hashtab.h and add struct drm_device forward declaration
> in drm_legacy.h to make it more self-contained. Make it easier to drop
> drmP.h includes.
> 
> v2: avoid including drm_device.h by un-inlining (Daniel)

It would be nice to explain why you de-inline the function (I assume because 
it's a bit too large).

Reviewed-by: Laurent Pinchart 

> Cc: Sam Ravnborg 
> Cc: Daniel Vetter 
> Cc: Laurent Pinchart 
> Signed-off-by: Jani Nikula 
> ---
>  drivers/gpu/drm/drm_bufs.c | 11 +++
>  include/drm/drm_legacy.h   | 14 --
>  2 files changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
> index d7d10cabb9bb..a39ab2193bfe 100644
> --- a/drivers/gpu/drm/drm_bufs.c
> +++ b/drivers/gpu/drm/drm_bufs.c
> @@ -377,6 +377,17 @@ int drm_legacy_addmap(struct drm_device *dev,
> resource_size_t offset, }
>  EXPORT_SYMBOL(drm_legacy_addmap);
> 
> +struct drm_local_map *drm_legacy_findmap(struct drm_device *dev,
> +  unsigned int token)
> +{
> + struct drm_map_list *_entry;
> + list_for_each_entry(_entry, >maplist, head)
> + if (_entry->user_token == token)
> + return _entry->map;
> + return NULL;
> +}
> +EXPORT_SYMBOL(drm_legacy_findmap);
> +
>  /**
>   * Ioctl to specify a range of memory that is available for mapping by a
>   * non-root process.
> diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h
> index 8fad66f88e4f..3e99ab69c122 100644
> --- a/include/drm/drm_legacy.h
> +++ b/include/drm/drm_legacy.h
> @@ -2,6 +2,9 @@
>  #define __DRM_DRM_LEGACY_H__
> 
>  #include 
> +#include 
> +
> +struct drm_device;
> 
>  /*
>   * Legacy driver interfaces for the Direct Rendering Manager
> @@ -156,6 +159,7 @@ struct drm_map_list {
>  int drm_legacy_addmap(struct drm_device *d, resource_size_t offset,
> unsigned int size, enum drm_map_type type,
> enum drm_map_flags flags, struct drm_local_map **map_p);
> +struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, unsigned
> int token); void drm_legacy_rmmap(struct drm_device *d, struct
> drm_local_map *map); int drm_legacy_rmmap_locked(struct drm_device *d,
> struct drm_local_map *map); void drm_legacy_master_rmmaps(struct drm_device
> *dev,
> @@ -194,14 +198,4 @@ void drm_legacy_ioremap(struct drm_local_map *map,
> struct drm_device *dev); void drm_legacy_ioremap_wc(struct drm_local_map
> *map, struct drm_device *dev); void drm_legacy_ioremapfree(struct
> drm_local_map *map, struct drm_device *dev);
> 
> -static inline struct drm_local_map *drm_legacy_findmap(struct drm_device
> *dev, -  unsigned int 
> token)
> -{
> - struct drm_map_list *_entry;
> - list_for_each_entry(_entry, >maplist, head)
> - if (_entry->user_token == token)
> - return _entry->map;
> - return NULL;
> -}
> -
>  #endif /* __DRM_DRM_LEGACY_H__ */


-- 
Regards,

Laurent Pinchart



___
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: Reorder set_property_atomic to avoid returning with an active ww_ctx

2018-12-30 Thread Patchwork
== Series Details ==

Series: drm: Reorder set_property_atomic to avoid returning with an active 
ww_ctx
URL   : https://patchwork.freedesktop.org/series/54547/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5349_full -> Patchwork_11169_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Known issues


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

### IGT changes ###

 Issues hit 

  * igt@gem_ctx_isolation@vecs0-s3:
- shard-skl:  PASS -> INCOMPLETE [fdo#104108] / [fdo#107773]

  * igt@gem_fence_thrash@bo-write-verify-threaded-x:
- shard-hsw:  PASS -> INCOMPLETE [fdo#103540]

  * igt@kms_chv_cursor_fail@pipe-c-128x128-bottom-edge:
- shard-skl:  PASS -> FAIL [fdo#104671] +1

  * igt@kms_cursor_crc@cursor-128x128-random:
- shard-apl:  PASS -> FAIL [fdo#103232] +2

  * igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-apl:  PASS -> FAIL [fdo#103191] / [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x64-random:
- shard-iclb: NOTRUN -> FAIL [fdo#103232]

  * igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-skl:  PASS -> INCOMPLETE [fdo#104108]

  * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-hsw:  PASS -> FAIL [fdo#105767]

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-gtt:
- shard-apl:  PASS -> FAIL [fdo#103167]

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-pwrite:
- shard-skl:  NOTRUN -> FAIL [fdo#105682]

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-iclb: PASS -> FAIL [fdo#103167] +3

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c-frame-sequence:
- shard-skl:  PASS -> FAIL [fdo#103191] / [fdo#107362]

  * igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-iclb: NOTRUN -> FAIL [fdo#108948]

  * igt@kms_plane@pixel-format-pipe-c-planes-source-clamping:
- shard-skl:  NOTRUN -> DMESG-WARN [fdo#106885]

  * igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-skl:  NOTRUN -> FAIL [fdo#108145]

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl:  PASS -> FAIL [fdo#107815]

  * igt@kms_plane_multiple@atomic-pipe-c-tiling-x:
- shard-iclb: PASS -> FAIL [fdo#103166]

  * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
- shard-iclb: PASS -> DMESG-WARN [fdo#107724]

  * igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl:  PASS -> DMESG-WARN [fdo#105604]

  * igt@kms_setmode@basic:
- shard-kbl:  PASS -> FAIL [fdo#99912]

  * igt@kms_sysfs_edid_timing:
- shard-iclb: PASS -> FAIL [fdo#100047]

  * igt@perf_pmu@rc6-runtime-pm:
- shard-iclb: PASS -> FAIL [fdo#105010]

  * igt@pm_rpm@gem-mmap-cpu:
- shard-skl:  PASS -> INCOMPLETE [fdo#107807]

  * igt@pm_rpm@universal-planes-dpms:
- shard-iclb: PASS -> DMESG-WARN [fdo#108654]

  
 Possible fixes 

  * igt@gem_userptr_blits@readonly-unsync:
- shard-iclb: TIMEOUT [fdo#108887] -> PASS

  * igt@i915_suspend@forcewake:
- shard-skl:  INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS

  * igt@kms_atomic_transition@plane-all-modeset-transition-internal-panels:
- shard-iclb: DMESG-WARN [fdo#107724] -> PASS +11

  * igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-iclb: DMESG-WARN [fdo#107956] -> PASS

  * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-snb:  DMESG-WARN [fdo#107956] -> SKIP

  * igt@kms_cursor_crc@cursor-128x42-random:
- shard-apl:  FAIL [fdo#103232] -> PASS +1

  * igt@kms_draw_crc@draw-method-xrgb-render-ytiled:
- shard-iclb: FAIL [fdo#103232] -> PASS

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
- shard-apl:  FAIL [fdo#103167] -> PASS +1

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-gtt:
- shard-iclb: DMESG-FAIL [fdo#107724] -> PASS +2

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: FAIL [fdo#103167] -> PASS +3

  * igt@kms_plane@plane-panning-top-left-pipe-b-planes:
- shard-iclb: DMESG-WARN [fdo#107724] / [fdo#108336] -> PASS +2

  * igt@pm_rpm@pm-caching:
- shard-skl:  INCOMPLETE [fdo#107807] -> PASS

  
 Warnings 

  * igt@i915_selftest@live_contexts:
- shard-iclb: INCOMPLETE [fdo#108315] -> DMESG-FAIL [fdo#108569]

  * igt@kms_content_protection@atomic:
- shard-apl:  INCOMPLETE [fdo#103927] -> FAIL [fdo#108597]

  * igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-iclb: DMESG-FAIL [fdo#103232] / [fdo#107724] -> FAIL 
[fdo#103232]

  
  [fdo#100047]: 

[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Reorder set_property_atomic to avoid returning with an active ww_ctx

2018-12-30 Thread Patchwork
== Series Details ==

Series: drm: Reorder set_property_atomic to avoid returning with an active 
ww_ctx
URL   : https://patchwork.freedesktop.org/series/54547/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_5349 -> Patchwork_11169


Summary
---

  **SUCCESS**

  No regressions found.

  External URL: 
https://patchwork.freedesktop.org/api/1.0/series/54547/revisions/1/mbox/

Known issues


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

### IGT changes ###

 Possible fixes 

  * igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u:   FAIL [fdo#108767] -> PASS

  * igt@prime_vgem@basic-fence-flip:
- fi-kbl-7567u:   FAIL [fdo#104008] -> PASS

  
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767


Participating hosts (46 -> 36)
--

  Missing(10): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u 
fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-pnv-d510 fi-kbl-7560u fi-bdw-samus 


Build changes
-

* Linux: CI_DRM_5349 -> Patchwork_11169

  CI_DRM_5349: 28f592191f34b55d93b2e8e94f2815be0f6c7598 @ 
git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4754: a176905d46d072300ba57f29ac2b98a0228e0e2d @ 
git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_11169: a4cc80e8183b69481cbb7ebb4fd9a44418959fdf @ 
git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

a4cc80e8183b drm: Reorder set_property_atomic to avoid returning with an active 
ww_ctx

== Logs ==

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


[Intel-gfx] [PATCH] drm: Reorder set_property_atomic to avoid returning with an active ww_ctx

2018-12-30 Thread Chris Wilson
Delay the drm_modeset_acquire_init() until after we check for an
allocation failure so that we can return immediately upon error without
having to unwind.

WARNING: lock held when returning to user space!
4.20.0+ #174 Not tainted

syz-executor556/8153 is leaving the kernel with locks still held!
1 lock held by syz-executor556/8153:
  #0: 5100c85c (crtc_ww_class_acquire){+.+.}, at:
set_property_atomic+0xb3/0x330 drivers/gpu/drm/drm_mode_object.c:462

Reported-by: syzbot+6ea337c427f5083eb...@syzkaller.appspotmail.com
Fixes: 144a7999d633 ("drm: Handle properties in the core for atomic drivers")
Signed-off-by: Chris Wilson 
Cc: Daniel Vetter 
Cc: Maarten Lankhorst 
Cc: Sean Paul 
Cc: David Airlie 
Cc:  # v4.14+
---
 drivers/gpu/drm/drm_mode_object.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_mode_object.c 
b/drivers/gpu/drm/drm_mode_object.c
index bb1dd46496cd..a9005c1c2384 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -459,12 +459,13 @@ static int set_property_atomic(struct drm_mode_object 
*obj,
struct drm_modeset_acquire_ctx ctx;
int ret;
 
-   drm_modeset_acquire_init(, 0);
-
state = drm_atomic_state_alloc(dev);
if (!state)
return -ENOMEM;
+
+   drm_modeset_acquire_init(, 0);
state->acquire_ctx = 
+
 retry:
if (prop == state->dev->mode_config.dpms_property) {
if (obj->type != DRM_MODE_OBJECT_CONNECTOR) {
-- 
2.20.1

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