Hi Michel, Have pushed patch that should fix issue you are facing. Please check. Regards, Shirish S -----Original Message----- From: S, Shirish Sent: Tuesday, October 24, 2017 6:48 PM To: Michel Dänzer <michel at daenzer.net>; S, Shirish <Shirish.S at amd.com> Cc: amd-gfx at lists.freedesktop.org Subject: Re: [PATCH 2/2] drm/amd/display: cleanup addReq and fix fb_location Interesting, am not facing this issue. Do you have atomic operations enabled? I think its not hence you are facing this issue. Perhaps can you try enabling it and then check. However, will it appropriate to use amdgpu_bo_pin() instead of amdgpu_bo_gpu_offset()? As i notice same being used in dce_v11_0.c for non-atomic scenarios. Regards, Shirish S On 10/24/2017 4:31 PM, Michel Dänzer wrote: > Hi Shirish, > > > On 24/10/17 08:25 AM, S, Shirish wrote: >> From: Shirish S <shirish.s at amd.com> >> >> The addReq attribute sent to fill_plane_attributes_from_fb() is always false, hence fb_location is never set properly causing issues in rendereing on underlay. >> >> This patch cleans up the addReq attribute and hence fixes the issue. >> >> Signed-off-by: Shirish S <shirish.s at amd.com> >> Reviewed-by: Alex Deucher <alexander.deucher at amd.com> > This change caused the warning below on my system. I think the problem > is that amdgpu_bo_gpu_offset is called before the BO is pinned, so the > GPU address is still subject to change. > > > Oct 24 12:15:47 kaveri kernel: [ 10.899104] WARNING: CPU: 10 PID: 1432 at drivers/gpu/drm//amd/amdgpu/amdgpu_object.c:988 amdgpu_bo_gpu_offset+0x25e/0x380 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899105] Modules linked in: lz4 lz4_compress cpufreq_powersave cpufreq_userspace cpufreq_conservative binfmt_misc nls_ascii nls_cp437 vfat fat edac_mce_amd kvm irqbypass crct10dif_pclmul amdkfd(O) amdgpu(O) crc32_pclmul snd_hda_codec_realtek ghash_clmulni_intel efi_pstore radeon(O) pcbc snd_hda_codec_generic snd_hda_codec_hdmi chash ttm(O) snd_hda_intel drm_kms_helper(O) snd_hda_codec snd_hda_core aesni_intel drm(O) snd_hwdep snd_pcm r8169 aes_x86_64 i2c_algo_bit crypto_simd snd_timer glue_helper wmi_bmof ppdev fb_sys_fops sp5100_tco syscopyarea sysfillrect cryptd pcspkr efivars sysimgblt sg mii mfd_core snd ccp i2c_piix4 rng_core soundcore wmi parport_pc parport i2c_designware_platform i2c_designware_core button acpi_cpufreq tcp_bbr sch_fq sunrpc nct6775 hwmon_vid efivarfs ip_tables x_tables > Oct 24 12:15:47 kaveri kernel: [ 10.899148] autofs4 ext4 crc16 mbcache jbd2 fscrypto raid10 raid1 raid0 multipath linear md_mod dm_mod sd_mod evdev hid_generic usbhid hid ahci xhci_pci libahci crc32c_intel xhci_hcd libata usbcore scsi_mod shpchp gpio_amdpt gpio_generic > Oct 24 12:15:47 kaveri kernel: [ 10.899168] CPU: 10 PID: 1432 Comm: Xorg Tainted: G W O 4.13.0-rc5+ #29 > Oct 24 12:15:47 kaveri kernel: [ 10.899169] Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 TOMAHAWK (MS-7A34), BIOS 1.80 09/13/2017 > Oct 24 12:15:47 kaveri kernel: [ 10.899171] task: ffff88039c57ae80 task.stack: ffff8803a9310000 > Oct 24 12:15:47 kaveri kernel: [ 10.899191] RIP: 0010:amdgpu_bo_gpu_offset+0x25e/0x380 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899192] RSP: 0018:ffff8803a9317348 EFLAGS: 00010246 > Oct 24 12:15:47 kaveri kernel: [ 10.899194] RAX: dffffc0000000000 RBX: ffff880383793300 RCX: 1ffff10075262e6e > Oct 24 12:15:47 kaveri kernel: [ 10.899195] RDX: 1ffff100706f26b6 RSI: 0000000000000000 RDI: ffff8803837935b0 > Oct 24 12:15:47 kaveri kernel: [ 10.899197] RBP: ffff8803a93173d8 R08: 1ffff10071a20524 R09: ffff88039938b210 > Oct 24 12:15:47 kaveri kernel: [ 10.899198] R10: ffff8803a9316fa8 R11: 1ffff100738af72b R12: ffff8803837933b4 > Oct 24 12:15:47 kaveri kernel: [ 10.899199] R13: 1ffff10075262e6e R14: 1ffff10075262e6a R15: ffff88039c57ae80 > Oct 24 12:15:47 kaveri kernel: [ 10.899201] FS: 00007fc7cf49c240(0000) GS:ffff8803ae680000(0000) knlGS:0000000000000000 > Oct 24 12:15:47 kaveri kernel: [ 10.899202] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > Oct 24 12:15:47 kaveri kernel: [ 10.899204] CR2: 00000016739c8028 CR3: 0000000388f0a000 CR4: 00000000003406e0 > Oct 24 12:15:47 kaveri kernel: [ 10.899205] Call Trace: > Oct 24 12:15:47 kaveri kernel: [ 10.899228] ? dc_create_plane_state+0x93/0x200 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899248] ? amdgpu_bo_fence+0x70/0x70 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899270] ? enable_surface_flip_reporting+0x60/0x60 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899301] amdgpu_dm_connector_funcs_reset+0x4b33/0x8bf0 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899332] ? amdgpu_dm_connector_funcs_reset+0x3f90/0x8bf0 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899354] ? dc_stream_release+0x97/0xc0 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899384] ? dm_drm_plane_destroy_state+0x3778/0x4180 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899387] ? memcpy+0x45/0x50 > Oct 24 12:15:47 kaveri kernel: [ 10.899410] ? dc_resource_state_copy_construct+0x2fe/0x430 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899433] ? dc_create_state+0x6e/0x110 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899460] amdgpu_dm_connector_funcs_reset+0x783e/0x8bf0 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899468] ? drm_modeset_lock+0xf5/0x470 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899475] ? drm_dev_printk+0x1d0/0x1d0 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899500] ? amdgpu_dm_connector_funcs_reset+0x6db0/0x8bf0 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899507] ? drm_connector_list_iter_next+0x1f2/0x510 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899514] ? __drm_mode_object_find+0xd6/0x270 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899521] ? drm_mode_object_put+0x50/0x50 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899529] ? drm_mode_get_tile_group+0x260/0x260 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899537] drm_atomic_check_only+0xbe0/0x1b00 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899546] ? drm_atomic_add_affected_connectors+0x310/0x310 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899551] ? drm_atomic_helper_best_encoder+0xe0/0xef0 [drm_kms_helper] > Oct 24 12:15:47 kaveri kernel: [ 10.899575] ? amdgpu_dm_connector_mode_valid+0x4643/0x4680 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899584] drm_atomic_commit+0x3c/0x100 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899588] drm_atomic_helper_set_config+0xbe/0x100 [drm_kms_helper] > Oct 24 12:15:47 kaveri kernel: [ 10.899595] drm_crtc_cleanup+0x70d/0xad0 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899602] drm_mode_setcrtc+0xa0b/0x1110 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899604] ? kfree+0x94/0x1a0 > Oct 24 12:15:47 kaveri kernel: [ 10.899612] ? drm_mode_getcrtc+0x790/0x790 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899619] ? drm_mode_gamma_set_ioctl+0x459/0x590 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899626] ? drm_mode_crtc_set_gamma_size+0x210/0x210 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899629] ? __check_object_size+0x22e/0x560 > Oct 24 12:15:47 kaveri kernel: [ 10.899636] ? drm_mode_getcrtc+0x790/0x790 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899642] drm_ioctl_kernel+0x1ce/0x350 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899648] ? drm_ioctl_permit+0x2c0/0x2c0 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899669] ? remove_vma+0x125/0x170 > Oct 24 12:15:47 kaveri kernel: [ 10.899671] ? kasan_check_write+0x14/0x20 > Oct 24 12:15:47 kaveri kernel: [ 10.899677] drm_ioctl+0x79a/0x17e0 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899684] ? drm_mode_getcrtc+0x790/0x790 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899695] ? ata_sff_pio_task+0x322/0x490 [libata] > Oct 24 12:15:47 kaveri kernel: [ 10.899707] ? drm_ioctl_kernel+0x350/0x350 [drm] > Oct 24 12:15:47 kaveri kernel: [ 10.899729] amdgpu_drm_ioctl+0xd8/0x61d0 [amdgpu] > Oct 24 12:15:47 kaveri kernel: [ 10.899735] do_vfs_ioctl+0x197/0x1490 > Oct 24 12:15:47 kaveri kernel: [ 10.899741] ? kmem_cache_free+0x7a/0x1e0 > Oct 24 12:15:47 kaveri kernel: [ 10.899746] ? ioctl_preallocate+0x2c0/0x2c0 > Oct 24 12:15:47 kaveri kernel: [ 10.899751] ? __fget_light+0x2be/0x410 > Oct 24 12:15:47 kaveri kernel: [ 10.899755] ? up_read+0x30/0x30 > Oct 24 12:15:47 kaveri kernel: [ 10.899760] ? iterate_fd+0x2e0/0x2e0 > Oct 24 12:15:47 kaveri kernel: [ 10.899766] ? SyS_futex+0x271/0x430 > Oct 24 12:15:47 kaveri kernel: [ 10.899771] ? do_futex+0x23c0/0x23c0 > Oct 24 12:15:47 kaveri kernel: [ 10.899777] ? __do_page_fault+0x43a/0xa00 > Oct 24 12:15:47 kaveri kernel: [ 10.899781] SyS_ioctl+0x79/0x90 > Oct 24 12:15:47 kaveri kernel: [ 10.899788] entry_SYSCALL_64_fastpath+0x1e/0xa9 > Oct 24 12:15:47 kaveri kernel: [ 10.899794] RIP: 0033:0x7fc7ccebfdc7 > Oct 24 12:15:47 kaveri kernel: [ 10.899796] RSP: 002b:00007ffe17dda4a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 > Oct 24 12:15:47 kaveri kernel: [ 10.899802] RAX: ffffffffffffffda RBX: 000000000000006b RCX: 00007fc7ccebfdc7 > Oct 24 12:15:47 kaveri kernel: [ 10.899804] RDX: 00007ffe17dda4e0 RSI: 00000000c06864a2 RDI: 000000000000000c > Oct 24 12:15:47 kaveri kernel: [ 10.899807] RBP: 0000000000002710 R08: 0000000000000000 R09: 000000167381a340 > Oct 24 12:15:47 kaveri kernel: [ 10.899810] R10: 00007ffe17dda5c0 R11: 0000000000000246 R12: 0000000000002010 > Oct 24 12:15:47 kaveri kernel: [ 10.899812] R13: 00007fc7cd176b58 R14: 00000016739c6010 R15: 00007fc7cd176b00 > Oct 24 12:15:47 kaveri kernel: [ 10.899821] Code: 02 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 eb 00 00 00 f6 83 b0 02 00 00 20 0f 85 6d ff ff ff <0f> ff e9 66 ff ff ff 48 8d bb f8 00 00 00 48 b8 00 00 00 00 00 > > >