All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path
@ 2017-12-07 22:00 Chris Wilson
  2017-12-07 22:06 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Chris Wilson @ 2017-12-07 22:00 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

When intel_modeset_setup_plane_state() fails drop the local framebuffer
reference before jumping to the error, otherwise we leak the framebuffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1f7e312d0d0d..1ba570614dbe 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9940,11 +9940,10 @@ int intel_get_load_detect_pipe(struct drm_connector *connector,
 	}
 
 	ret = intel_modeset_setup_plane_state(state, crtc, mode, fb, 0, 0);
+	drm_framebuffer_put(fb);
 	if (ret)
 		goto fail;
 
-	drm_framebuffer_put(fb);
-
 	ret = drm_atomic_set_mode_for_crtc(&crtc_state->base, mode);
 	if (ret)
 		goto fail;
-- 
2.15.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-07 22:00 [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path Chris Wilson
@ 2017-12-07 22:06 ` Chris Wilson
  2017-12-07 22:20 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2017-12-07 22:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: Maarten

Quoting Chris Wilson (2017-12-07 22:00:25)
> When intel_modeset_setup_plane_state() fails drop the local framebuffer
> reference before jumping to the error, otherwise we leak the framebuffer.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>

I believe,
Fixes: edde361711ef ("drm/i915: Use atomic state to obtain load detection crtc, v3.")
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-07 22:00 [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path Chris Wilson
  2017-12-07 22:06 ` Chris Wilson
@ 2017-12-07 22:20 ` Patchwork
  2017-12-07 22:26   ` Chris Wilson
  2017-12-08  0:56 ` ✗ Fi.CI.IGT: warning " Patchwork
  2017-12-08 11:14 ` [PATCH] " Ville Syrjälä
  3 siblings, 1 reply; 8+ messages in thread
From: Patchwork @ 2017-12-07 22:20 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Drop fb reference on load_detect_pipe failure path
URL   : https://patchwork.freedesktop.org/series/35057/
State : success

== Summary ==

Series 35057v1 drm/i915: Drop fb reference on load_detect_pipe failure path
https://patchwork.freedesktop.org/api/1.0/series/35057/revisions/1/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
Test kms_frontbuffer_tracking:
        Subgroup basic:
                pass       -> FAIL       (fi-glk-1) fdo#103167

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

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:441s
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:515s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:504s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:507s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:487s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:478s
fi-elk-e7500     total:224  pass:163  dwarn:15  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:269s
fi-glk-1         total:288  pass:259  dwarn:0   dfail:0   fail:1   skip:28  time:532s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:386s
fi-hsw-4770r     total:288  pass:224  dwarn:0   dfail:0   fail:0   skip:64  time:259s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:396s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:481s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:446s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:485s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:530s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:478s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:529s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:590s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:453s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:542s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:566s
fi-skl-6700k     total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:519s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:504s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:446s
fi-snb-2520m     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:562s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:413s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:616s
fi-cnl-y         total:219  pass:198  dwarn:0   dfail:0   fail:0   skip:20 
fi-glk-dsi       total:288  pass:175  dwarn:1   dfail:4   fail:0   skip:108 time:334s

fb6aa7cd0d6bfa86efb7a87938733f1272414690 drm-tip: 2017y-12m-07d-17h-43m-29s UTC integration manifest
6ff9ad96149a drm/i915: Drop fb reference on load_detect_pipe failure path

== Logs ==

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ✓ Fi.CI.BAT: success for drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-07 22:20 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-12-07 22:26   ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2017-12-07 22:26 UTC (permalink / raw)
  To: Patchwork; +Cc: intel-gfx

Quoting Patchwork (2017-12-07 22:20:31)
> == Series Details ==
> 
> Series: drm/i915: Drop fb reference on load_detect_pipe failure path
> URL   : https://patchwork.freedesktop.org/series/35057/
> State : success
> 
> == Summary ==
> 
> Series 35057v1 drm/i915: Drop fb reference on load_detect_pipe failure path
> https://patchwork.freedesktop.org/api/1.0/series/35057/revisions/1/mbox/
> 
> Test debugfs_test:
>         Subgroup read_all_entries:
>                 dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
> Test kms_frontbuffer_tracking:
>         Subgroup basic:
>                 pass       -> FAIL       (fi-glk-1) fdo#103167

No impact on the gdg fb leak. Maybe better luck for the others?
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* ✗ Fi.CI.IGT: warning for drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-07 22:00 [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path Chris Wilson
  2017-12-07 22:06 ` Chris Wilson
  2017-12-07 22:20 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-12-08  0:56 ` Patchwork
  2017-12-08 11:14 ` [PATCH] " Ville Syrjälä
  3 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2017-12-08  0:56 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Drop fb reference on load_detect_pipe failure path
URL   : https://patchwork.freedesktop.org/series/35057/
State : warning

== Summary ==

Test kms_flip:
        Subgroup flip-vs-modeset-vs-hang:
                pass       -> DMESG-WARN (shard-snb)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-b:
                incomplete -> PASS       (shard-hsw)
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                fail       -> PASS       (shard-snb) fdo#101623
Test gem_tiled_swapping:
        Subgroup non-threaded:
                pass       -> INCOMPLETE (shard-hsw) fdo#104009
Test drv_module_reload:
        Subgroup basic-reload:
                pass       -> DMESG-WARN (shard-snb) fdo#102848

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

shard-hsw        total:2658 pass:1522 dwarn:1   dfail:0   fail:9   skip:1125 time:9077s
shard-snb        total:2679 pass:1306 dwarn:3   dfail:0   fail:12  skip:1358 time:8109s
Blacklisted hosts:
shard-apl        total:2679 pass:1679 dwarn:1   dfail:0   fail:21  skip:977 time:13722s
shard-kbl        total:2620 pass:1761 dwarn:1   dfail:0   fail:23  skip:834 time:10777s

== Logs ==

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-07 22:00 [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path Chris Wilson
                   ` (2 preceding siblings ...)
  2017-12-08  0:56 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2017-12-08 11:14 ` Ville Syrjälä
  2017-12-08 11:31   ` Chris Wilson
  3 siblings, 1 reply; 8+ messages in thread
From: Ville Syrjälä @ 2017-12-08 11:14 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, intel-gfx

On Thu, Dec 07, 2017 at 10:00:25PM +0000, Chris Wilson wrote:
> When intel_modeset_setup_plane_state() fails drop the local framebuffer
> reference before jumping to the error, otherwise we leak the framebuffer.

Or we could just
https://patchwork.freedesktop.org/patch/165486/

This is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
nonetheless.

> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1f7e312d0d0d..1ba570614dbe 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9940,11 +9940,10 @@ int intel_get_load_detect_pipe(struct drm_connector *connector,
>  	}
>  
>  	ret = intel_modeset_setup_plane_state(state, crtc, mode, fb, 0, 0);
> +	drm_framebuffer_put(fb);
>  	if (ret)
>  		goto fail;
>  
> -	drm_framebuffer_put(fb);
> -
>  	ret = drm_atomic_set_mode_for_crtc(&crtc_state->base, mode);
>  	if (ret)
>  		goto fail;
> -- 
> 2.15.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-08 11:14 ` [PATCH] " Ville Syrjälä
@ 2017-12-08 11:31   ` Chris Wilson
  2017-12-08 11:49     ` Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2017-12-08 11:31 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Daniel Vetter, intel-gfx

Quoting Ville Syrjälä (2017-12-08 11:14:17)
> On Thu, Dec 07, 2017 at 10:00:25PM +0000, Chris Wilson wrote:
> > When intel_modeset_setup_plane_state() fails drop the local framebuffer
> > reference before jumping to the error, otherwise we leak the framebuffer.
> 
> Or we could just
> https://patchwork.freedesktop.org/patch/165486/

Why not both! :)
 
> This is
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> nonetheless.

Ta, less controversial patch for more, grand improvement for you :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path
  2017-12-08 11:31   ` Chris Wilson
@ 2017-12-08 11:49     ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2017-12-08 11:49 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Daniel Vetter, intel-gfx

Quoting Chris Wilson (2017-12-08 11:31:01)
> Quoting Ville Syrjälä (2017-12-08 11:14:17)
> > On Thu, Dec 07, 2017 at 10:00:25PM +0000, Chris Wilson wrote:
> > > When intel_modeset_setup_plane_state() fails drop the local framebuffer
> > > reference before jumping to the error, otherwise we leak the framebuffer.
> > 
> > Or we could just
> > https://patchwork.freedesktop.org/patch/165486/
> 
> Why not both! :)
>  
> > This is
> > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > nonetheless.
> 
> Ta, less controversial patch for more, grand improvement for you :)

And pushed, thanks for the review. Let's have a gander at the more
intelligent load-detect patch. :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-08 11:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07 22:00 [PATCH] drm/i915: Drop fb reference on load_detect_pipe failure path Chris Wilson
2017-12-07 22:06 ` Chris Wilson
2017-12-07 22:20 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-07 22:26   ` Chris Wilson
2017-12-08  0:56 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-12-08 11:14 ` [PATCH] " Ville Syrjälä
2017-12-08 11:31   ` Chris Wilson
2017-12-08 11:49     ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.