Bug 66436 - [IVB/HSW Bisected]igt/prime_self_import/with_one_bo aborted
Summary: [IVB/HSW Bisected]igt/prime_self_import/with_one_bo aborted
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Daniel Vetter
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-01 03:21 UTC by lu hua
Modified: 2017-10-06 14:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fix up handle_to_fd return value (1.43 KB, patch)
2013-07-01 08:11 UTC, Daniel Vetter
no flags Details | Splinter Review

Description lu hua 2013-07-01 03:21:13 UTC
System Environment:
--------------------------
Arch:           x86_64
Platform:       ivybridge/haswell
Libdrm:		(master)libdrm-2.4.45-13-g378bb47a784a3808c9b256fe7a52e10a4fcabf92
Mesa:		(master)adf8afa168fe9fe2e4a2b35afc3003040d05273f
Xserver:	(master)xorg-server-1.14.99.1-130-g77e51d5bbb97eb5c9d9dbff9a7c44d7e53620e68
Xf86_video_intel:(master)2.21.10-67-g3a787da7e888da7e9943be94bd1cb177fe1495ab
Cairo:		(master)7b8fc77bb974fbd4fbc697405a8b6aec748bb7f2
Libva:		(staging)e9e685fe752b9865ba9e28cb63e18ce3f8aed2a0
Libva_intel_driver:(staging)bb24c8a81e512d19aad0359d81f7247e6f20cc29 
Kernel:	(drm-intel-nightly) 03d25b4548499254d66f1ee0bae8b796097a41ed

Bug detailed description:
-------------------------
It aborted on ivybridge/haswell with drm-intel-next-queued kernel.It works well on drm-intel-fixes kernel.
Bisect shows:da34242e5e0638312130f5bd5d2d277afbc6f806 is the first bad commit.
commit da34242e5e0638312130f5bd5d2d277afbc6f806
Author:     YoungJun Cho <yj44.cho@samsung.com>
AuthorDate: Wed Jun 26 10:21:42 2013 +0900
Commit:     Dave Airlie <airlied@redhat.com>
CommitDate: Fri Jun 28 14:43:04 2013 +1000

    drm/prime: add return check for dma_buf_fd

    The dma_buf_fd() can return error when it fails to prepare fd,
    so the dma_buf needs to be put.

    Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
    Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
    Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

output:
prime_handle_to_fd:560 failed, ret=5, errno=0
Aborted (core dumped)

dmesg:
[  916.441187] [drm:i915_driver_open],
[  916.441199] [drm:intel_crtc_cursor_set], cursor off
[  916.441201] [drm:intel_crtc_set_config], [CRTC:3] [FB:35] #connectors=1 (x y) (0 0)
[  916.441205] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  916.441207] [drm:intel_modeset_affected_pipes], set mode pipe masks: modeset: 1, prepare: 1, disable: 0
[  916.441209] [drm:connected_sink_compute_bpp], [CONNECTOR:9:VGA-1] checking for sink bpp constrains
[  916.441211] [drm:ironlake_check_fdi_lanes], checking fdi config on pipe A, lanes 2
[  916.441212] [drm:intel_modeset_pipe_config], plane bpp: 24, pipe bpp: 24, dithering: 0
[  916.441213] [drm:intel_dump_pipe_config], [CRTC:3][modeset] config for pipe A
[  916.441215] [drm:intel_dump_pipe_config], cpu_transcoder: A
[  916.441215] [drm:intel_dump_pipe_config], pipe bpp: 24, dithering: 0
[  916.441216] [drm:intel_dump_pipe_config], fdi/pch: 1, lanes: 2, gmch_m: 6920601, gmch_n: 8388608, link_m: 288358, link_n: 524288, tu: 64
[  916.441218] [drm:intel_dump_pipe_config], requested mode:
[  916.441219] [drm:drm_mode_debug_printmodeline], Modeline 0:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x48 0x5
[  916.441221] [drm:intel_dump_pipe_config], adjusted mode:
[  916.441222] [drm:drm_mode_debug_printmodeline], Modeline 0:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x48 0x5
[  916.441224] [drm:intel_dump_pipe_config], gmch pfit: control: 0x00000000, ratios: 0x00000000, lvds border: 0x00000000
[  916.441225] [drm:intel_dump_pipe_config], pch pfit: pos: 0x00000000, size: 0x00000000
[  916.441226] [drm:intel_dump_pipe_config], ips: 0
[  916.441230] [drm:intel_ddi_put_crtc_pll], Disabling SPLL
[  916.441231] [drm:intel_ddi_pll_mode_set], Using SPLL on pipe A
[  916.441263] [drm:ironlake_update_plane], Writing base 00094000 00000000 0 0 7680
[  916.441268] [drm:intel_crtc_mode_set], [ENCODER:10:DAC-10] set [MODE:0:1920x1080]
[  916.442168] [drm:hsw_fdi_link_train], FDI link training done on step 0
[  916.493562] [drm:ironlake_wait_for_vblank], vblank wait timed out
[  916.545550] [drm:ironlake_wait_for_vblank], vblank wait timed out
[  916.547505] [drm:lpt_program_iclkip], iCLKIP clock: found settings for 148500KHz refresh rate: auxdiv=0, divsel=10, phasedir=0, phaseinc=b
[  916.565547] [drm:intel_connector_check_state], [CONNECTOR:9:VGA-1]
[  916.565552] [drm:check_encoder_state], [ENCODER:10:DAC-10]
[  916.565554] [drm:check_encoder_state], [ENCODER:11:TMDS-11]
[  916.565555] [drm:check_encoder_state], [ENCODER:16:TMDS-16]
[  916.565556] [drm:check_encoder_state], [ENCODER:19:TMDS-19]
[  916.565557] [drm:check_crtc_state], [CRTC:3]
[  916.565569] [drm:check_crtc_state], [CRTC:5]
[  916.565571] [drm:check_crtc_state], [CRTC:7]
[  916.565574] [drm:intel_crtc_cursor_set], cursor off
[  916.565575] [drm:intel_crtc_set_config], [CRTC:5] [NOFB]
[  916.565577] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  916.565579] [drm:intel_crtc_cursor_set], cursor off
[  916.565580] [drm:intel_crtc_set_config], [CRTC:7] [NOFB]
[  916.565581] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  916.565600] [drm:i915_driver_open],
[  916.565729] [drm:i915_driver_open],
[  916.565737] [drm:i915_driver_open],
[  916.581517] [drm:i915_driver_open],
[  916.581522] [drm:i915_driver_open],
[  916.588638] [drm:intel_crtc_cursor_set], cursor off
[  916.588641] [drm:intel_crtc_set_config], [CRTC:3] [FB:35] #connectors=1 (x y) (0 0)
[  916.588644] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  916.588646] [drm:intel_crtc_cursor_set], cursor off
[  916.588647] [drm:intel_crtc_set_config], [CRTC:5] [NOFB]
[  916.588648] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]
[  916.588649] [drm:intel_crtc_cursor_set], cursor off
[  916.588650] [drm:intel_crtc_set_config], [CRTC:7] [NOFB]
[  916.588651] [drm:intel_modeset_stage_output_state], [CONNECTOR:9:VGA-1] to [CRTC:3]

Reproduce steps:
----------------
1. ./prime_self_import --run-subtest with_one_bo
Comment 1 Daniel Vetter 2013-07-01 08:11:40 UTC
Created attachment 81783 [details] [review]
fix up handle_to_fd return value

Please test the attached patch, thanks.
Comment 2 lu hua 2013-07-02 02:24:10 UTC
(In reply to comment #1)
> Created attachment 81783 [details] [review] [review]
> fix up handle_to_fd return value
> 
> Please test the attached patch, thanks.

Fixed by this patch.
Comment 3 Daniel Vetter 2013-07-04 09:35:45 UTC
Fix is merged into drm-next, which is now included in -nightly (but not yet in one of the intel branches):

commit 4a88f73f14f6d6c94616538427e1235a6d0a5885
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Jul 2 09:18:39 2013 +0200

    drm/prime: fix up handle_to_fd ioctl return value
Comment 4 lu hua 2013-07-05 02:44:38 UTC
It also happens on drm-intel-fixes 446f8d81ca2d9cefb614e87f2fabcc996a9e4e7e.
Comment 5 Daniel Vetter 2013-07-05 06:43:52 UTC
(In reply to comment #4)
> It also happens on drm-intel-fixes 446f8d81ca2d9cefb614e87f2fabcc996a9e4e7e.

This is expected.

Like I've said in comment #3 the patch is only merged into drm-next. Therefore you can only validate on drm-intel-nightly, drm-intel-fixes and drm-intel-next-queued are still broken.
Comment 6 lu hua 2013-07-08 06:45:28 UTC
Verified.Fixed.
Comment 7 Elizabeth 2017-10-06 14:45:25 UTC
Closing old verified.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.