Re: [PATCH 1/7] drm/amdgpu: cleanup job header
On 07/13/2018 11:19 PM, Christian König wrote: Move job related defines, structure and function declarations to amdgpu_job.h Signed-off-by: Christian König The series is Reviewed-by: Junwei Zhang One more cleanup is on the way. Jerry --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 46 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 74 + 2 files changed, 75 insertions(+), 45 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_job.h diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 8eaba0f4db10..a60555f8e6fd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -73,6 +73,7 @@ #include "amdgpu_virt.h" #include "amdgpu_gart.h" #include "amdgpu_debugfs.h" +#include "amdgpu_job.h" /* * Modules parameters. @@ -600,17 +601,6 @@ struct amdgpu_ib { extern const struct drm_sched_backend_ops amdgpu_sched_ops; -int amdgpu_job_alloc(struct amdgpu_device *adev, unsigned num_ibs, -struct amdgpu_job **job, struct amdgpu_vm *vm); -int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size, -struct amdgpu_job **job); - -void amdgpu_job_free_resources(struct amdgpu_job *job); -void amdgpu_job_free(struct amdgpu_job *job); -int amdgpu_job_submit(struct amdgpu_job *job, struct amdgpu_ring *ring, - struct drm_sched_entity *entity, void *owner, - struct dma_fence **f); - /* * Queue manager */ @@ -1050,40 +1040,6 @@ struct amdgpu_cs_parser { struct drm_syncobj **post_dep_syncobjs; }; -#define AMDGPU_PREAMBLE_IB_PRESENT (1 << 0) /* bit set means command submit involves a preamble IB */ -#define AMDGPU_PREAMBLE_IB_PRESENT_FIRST(1 << 1) /* bit set means preamble IB is first presented in belonging context */ -#define AMDGPU_HAVE_CTX_SWITCH (1 << 2) /* bit set means context switch occured */ - -struct amdgpu_job { - struct drm_sched_jobbase; - struct amdgpu_device*adev; - struct amdgpu_vm*vm; - struct amdgpu_ring *ring; - struct amdgpu_sync sync; - struct amdgpu_sync sched_sync; - struct amdgpu_ib*ibs; - struct dma_fence*fence; /* the hw fence */ - uint32_tpreamble_status; - uint32_tnum_ibs; - void*owner; - uint64_tfence_ctx; /* the fence_context this job uses */ - boolvm_needs_flush; - uint64_tvm_pd_addr; - unsignedvmid; - unsignedpasid; - uint32_tgds_base, gds_size; - uint32_tgws_base, gws_size; - uint32_toa_base, oa_size; - uint32_tvram_lost_counter; - - /* user fence handling */ - uint64_tuf_addr; - uint64_tuf_sequence; - -}; -#define to_amdgpu_job(sched_job) \ - container_of((sched_job), struct amdgpu_job, base) - static inline u32 amdgpu_get_ib_value(struct amdgpu_cs_parser *p, uint32_t ib_idx, int idx) { diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h new file mode 100644 index ..35bb93254eb2 --- /dev/null +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h @@ -0,0 +1,74 @@ +/* + * Copyright 2018 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ +#ifndef __AMDGPU_JOB_H__ +#define __AMDGPU_JOB_H__ + +/* bit set means command submit involves a preamble IB */ +#define AMDGPU_PREAMBLE_IB_PRESENT (1 << 0) +/* bit set means preamble IB is first presented in belonging context */ +#define
[PATCH] drm/scheduler: add NULL pointer check for run queue
To check rq pointer before adding entity into it. That avoids NULL pointer access in some case. Suggested-by: Christian König Signed-off-by: Junwei Zhang --- drivers/gpu/drm/scheduler/gpu_scheduler.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c index 16bf446..5e5268d 100644 --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c @@ -91,6 +91,10 @@ static void drm_sched_rq_add_entity(struct drm_sched_rq *rq, { if (!list_empty(>list)) return; + if (!rq) { + DRM_ERROR("rq is NULL!\n"); + return; + } spin_lock(>lock); list_add_tail(>list, >entities); spin_unlock(>lock); -- 1.9.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH xf86-video-amdgpu] Hardcode "non-desktop" RandR property name
Thanks, looks good for me. Reviewed-by: Qiang Yu Regards, Qiang From: amd-gfx on behalf of Michel Dänzer Sent: Friday, July 13, 2018 4:41:51 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH xf86-video-amdgpu] Hardcode "non-desktop" RandR property name From: Michel Dänzer It's a bit silly to require current randrproto just for this definition, which can't really change anyway. Suggested-by: Qiang Yu Signed-off-by: Michel Dänzer --- configure.ac | 2 +- src/drmmode_display.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f4633e370..1ab5a7ae2 100644 --- a/configure.ac +++ b/configure.ac @@ -64,7 +64,7 @@ AC_ARG_WITH(xorg-module-dir, [moduledir="$libdir/xorg/modules"]) # Store the list of server defined optional extensions in REQUIRED_MODULES -XORG_DRIVER_CHECK_EXT(RANDR, [randrproto >= 1.6.0]) +XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index f6cafccdc..ccf333662 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -2634,7 +2634,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r #if XF86_CRTC_VERSION >= 8 i = koutput_get_prop_idx(pAMDGPUEnt->fd, koutput, DRM_MODE_PROP_RANGE, -RR_PROPERTY_NON_DESKTOP); +"non-desktop"); if (i >= 0) nonDesktop = koutput->prop_values[i] != 0; #endif -- 2.18.0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] RFC: drm/amd/display: enable ABGR and XBGR formats (v2)
From: Mauro Rossi (v1) {A,X}BGR code paths are added in amdgpu_dm, by using an fb_format already listed in dc/dc_hw_types.h (SURFACE_PIXEL_FORMAT_GRPH_ABGR), and in dce 8.0, 10.0 and 11.0, i.e. Bonaire and later. GRPH_FORMAT_ARGB is used due to lack of specific GRPH_FORMAT_ABGR (v2) support for {A,X}BGR in atombios_crtc (now in dce4 path, to be refined) to initialize frame buffer device and avoid following dmesg error: "[drm] Cannot find any crtc or sizes" Tested with oreo-x86 (hwcomposer.drm + gralloc.gbm + mesa-dev/radv) SurfaceFlinger can now select RGBA_ format for HWC_FRAMEBUFFER_TARGET No major regression or crash observed so far, but some android 2D overlay may be affected by color artifacts. Kind feedback requested. Signed-off-by: Mauro Rossi --- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c| 9 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c| 9 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 8 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ drivers/gpu/drm/radeon/atombios_crtc.c| 8 5 files changed, 40 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c index 022f303463fc..d4280d2e7737 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v10_0.c @@ -2005,6 +2005,15 @@ static int dce_v10_0_crtc_do_set_base(struct drm_crtc *crtc, /* Greater 8 bpc fb needs to bypass hw-lut to retain precision */ bypass_lut = true; break; + case DRM_FORMAT_XBGR: + case DRM_FORMAT_ABGR: + fb_format = REG_SET_FIELD(0, GRPH_CONTROL, GRPH_DEPTH, 2); + fb_format = REG_SET_FIELD(fb_format, GRPH_CONTROL, GRPH_FORMAT, 0); /* Hack */ +#ifdef __BIG_ENDIAN + fb_swap = REG_SET_FIELD(fb_swap, GRPH_SWAP_CNTL, GRPH_ENDIAN_SWAP, + ENDIAN_8IN32); +#endif + break; default: DRM_ERROR("Unsupported screen format %s\n", drm_get_format_name(target_fb->format->format, _name)); diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 800a9f36ab4f..d48ee8f2e192 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -2044,6 +2044,15 @@ static int dce_v11_0_crtc_do_set_base(struct drm_crtc *crtc, /* Greater 8 bpc fb needs to bypass hw-lut to retain precision */ bypass_lut = true; break; + case DRM_FORMAT_XBGR: + case DRM_FORMAT_ABGR: + fb_format = REG_SET_FIELD(0, GRPH_CONTROL, GRPH_DEPTH, 2); + fb_format = REG_SET_FIELD(fb_format, GRPH_CONTROL, GRPH_FORMAT, 0); /* Hack */ +#ifdef __BIG_ENDIAN + fb_swap = REG_SET_FIELD(fb_swap, GRPH_SWAP_CNTL, GRPH_ENDIAN_SWAP, + ENDIAN_8IN32); +#endif + break; default: DRM_ERROR("Unsupported screen format %s\n", drm_get_format_name(target_fb->format->format, _name)); diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c index 012e0a9ae0ff..0e2fc1ac475f 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c @@ -1929,6 +1929,14 @@ static int dce_v8_0_crtc_do_set_base(struct drm_crtc *crtc, /* Greater 8 bpc fb needs to bypass hw-lut to retain precision */ bypass_lut = true; break; + case DRM_FORMAT_XBGR: + case DRM_FORMAT_ABGR: + fb_format = ((GRPH_DEPTH_32BPP << GRPH_CONTROL__GRPH_DEPTH__SHIFT) | +(GRPH_FORMAT_ARGB << GRPH_CONTROL__GRPH_FORMAT__SHIFT)); /* Hack */ +#ifdef __BIG_ENDIAN + fb_swap = (GRPH_ENDIAN_8IN32 << GRPH_SWAP_CNTL__GRPH_ENDIAN_SWAP__SHIFT); +#endif + break; default: DRM_ERROR("Unsupported screen format %s\n", drm_get_format_name(target_fb->format->format, _name)); diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 63c67346d316..6c10fa291150 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1824,6 +1824,10 @@ static int fill_plane_attributes_from_fb(struct amdgpu_device *adev, case DRM_FORMAT_ABGR2101010: plane_state->format = SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010; break; + case DRM_FORMAT_XBGR: + case DRM_FORMAT_ABGR: + plane_state->format = SURFACE_PIXEL_FORMAT_GRPH_ABGR; + break; case DRM_FORMAT_NV21: plane_state->format =
RE: [PATCH 7/7] drm/amdgpu: minor cleanup in amdgpu_job.c
Series is Acked-by: Chunming Zhou -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Friday, July 13, 2018 11:20 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH 7/7] drm/amdgpu: minor cleanup in amdgpu_job.c Remove superflous NULL check, fix coding style a bit, shorten error messages. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index bd708b726003..024efb7ea6d6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -33,7 +33,7 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job) struct amdgpu_ring *ring = to_amdgpu_ring(s_job->sched); struct amdgpu_job *job = to_amdgpu_job(s_job); - DRM_ERROR("ring %s timeout, last signaled seq=%u, last emitted seq=%u\n", + DRM_ERROR("ring %s timeout, signaled seq=%u, emitted seq=%u\n", job->base.sched->name, atomic_read(>fence_drv.last_seq), ring->fence_drv.sync_seq); @@ -161,16 +161,17 @@ static struct dma_fence *amdgpu_job_dependency(struct drm_sched_job *sched_job, struct amdgpu_ring *ring = to_amdgpu_ring(s_entity->sched); struct amdgpu_job *job = to_amdgpu_job(sched_job); struct amdgpu_vm *vm = job->vm; + struct dma_fence *fence; bool explicit = false; int r; - struct dma_fence *fence = amdgpu_sync_get_fence(>sync, ); + fence = amdgpu_sync_get_fence(>sync, ); if (fence && explicit) { if (drm_sched_dependency_optimized(fence, s_entity)) { r = amdgpu_sync_fence(ring->adev, >sched_sync, fence, false); if (r) - DRM_ERROR("Error adding fence to sync (%d)\n", r); + DRM_ERROR("Error adding fence (%d)\n", r); } } @@ -194,10 +195,6 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job) struct amdgpu_job *job; int r; - if (!sched_job) { - DRM_ERROR("job is null\n"); - return NULL; - } job = to_amdgpu_job(sched_job); finished = >base.s_fence->finished; -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: Error on boot with Raven Ridge
Now with the latest kernel from staging-next branch [ 13.244876] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 13.244877] Bluetooth: BNEP filters: protocol multicast [ 13.244882] Bluetooth: BNEP socket layer initialized [ 14.709064] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready [ 15.282470] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready [ 15.282533] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 15.722052] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready [ 15.722118] Bridge firewalling registered [ 15.833492] IPv6: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready [ 16.021385] fuse init (API version 7.27) [ 16.317799] Initializing XFRM netlink socket [ 16.413054] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready [ 20.588915] Bluetooth: RFCOMM TTY layer initialized [ 20.588925] Bluetooth: RFCOMM socket layer initialized [ 20.588934] Bluetooth: RFCOMM ver 1.11 [ 22.388724] core[1379]: segfault at 0 ip 00441058 sp 7fffd2f0 error 4 [ 22.388730] Code: 40 00 31 c0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 55 48 89 f5 53 48 89 fb 48 83 ec 08 e8 8f ec fd ff 89 c7 e8 f8 f0 fd ff <48> 8b 30 48 89 ea 48 89 df e8 fa eb fd ff 48 83 c4 08 b8 01 00 00 On Sun, Jul 15, 2018 at 8:02 PM Bráulio Bhavamitra wrote: > Although it is reported on dmesg, the system still boots normally > > [8.253073] amdgpu: [powerplay] dpm has been enabled > [8.253210] [drm] DM_PPLIB: 40 in kHz > [8.253211] [drm] DM_PPLIB: 933000 in kHz > [8.253212] [drm] DM_PPLIB: 1067000 in kHz > [8.253380] WARNING: CPU: 6 PID: 361 at > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1355 > dcn_bw_update_from_pplib+0x16b/0x280 [amdgpu] > [8.253381] Modules linked in: ext4 mbcache jbd2 fscrypto joydev > mousedev amdkfd amd_iommu_v2 amdgpu(+) arc4 r8822be(C) uvcvideo btusb btrtl > btbcm btintel videobuf2_vmalloc videobuf2_memops hid_sensor_accel_3d > hid_sensor_magn_3d videobuf2_v4l2 chash hid_sensor_rotation > hid_sensor_incl_3d hid_sensor_gyro_3d bluetooth videobuf2_common gpu_sched > hid_sensor_trigger industrialio_triggered_buffer videodev i2c_algo_bit > kfifo_buf hid_sensor_iio_common ecdh_generic industrialio media crc16 ttm > mac80211 drm_kms_helper hp_wmi edac_mce_amd snd_hda_codec_realtek > sparse_keymap snd_hda_codec_generic drm wmi_bmof snd_hda_codec_hdmi kvm_amd > snd_hda_intel ccp snd_hda_codec rng_core cfg80211 snd_hda_core snd_hwdep > kvm snd_pcm snd_timer psmouse agpgart snd syscopyarea sysfillrect irqbypass > rtsx_pci_ms sysimgblt input_leds > [8.253444] fb_sys_fops rfkill memstick soundcore sp5100_tco k10temp > hp_accel lis3lv02d i2c_piix4 battery ac rtc_cmos wmi input_polldev > led_class i2c_hid evdev acpi_cpufreq pinctrl_amd mac_hid i2c_scmi > hp_wireless vboxnetflt(O) vboxnetadp(O) vboxpci(O) vboxdrv(O) msr sg > crypto_user ip_tables x_tables dm_crypt dm_mod btrfs libcrc32c > crc32c_generic xor zstd_decompress zstd_compress xxhash hid_sensor_hub > hid_generic usbhid hid raid6_pq sd_mod crct10dif_pclmul crc32_pclmul > crc32c_intel ghash_clmulni_intel pcbc rtsx_pci_sdmmc serio_raw atkbd libps2 > mmc_core ahci libahci aesni_intel xhci_pci aes_x86_64 libata crypto_simd > xhci_hcd cryptd glue_helper usbcore scsi_mod usb_common rtsx_pci i8042 > serio lz4 lz4_compress > [8.253511] CPU: 6 PID: 361 Comm: systemd-udevd Tainted: G C O > 4.18.0-1-custom+ #7 > [8.253512] Hardware name: HP HP ENVY x360 Convertible 15m-bq1xx/83C6, > BIOS F.17 03/29/2018 > [8.253630] RIP: 0010:dcn_bw_update_from_pplib+0x16b/0x280 [amdgpu] > [8.253631] Code: d8 ca d8 f1 d9 5a 50 8b 44 fc 14 49 8b 94 24 70 01 00 > 00 48 89 04 24 df 2c 24 d8 f1 db 42 78 de c9 de ca de f9 d9 5a 4c eb 02 > <0f> 0b 48 89 da be 04 00 00 00 48 89 ef e8 13 5b fe ff 84 c0 0f 84 > [8.253675] RSP: 0018:9bc383b037b8 EFLAGS: 00010246 > [8.253678] RAX: 0001 RBX: 9bc383b03818 RCX: > > [8.253679] RDX: RSI: 0004 RDI: > > [8.253681] RBP: 918c85651a40 R08: 0001 R09: > 039f > [8.253683] R10: 0004 R11: R12: > 918c733ae000 > [8.253684] R13: 918c73293300 R14: 918c733ae000 R15: > > [8.253687] FS: 77f85d40() GS:918c8ab8() > knlGS: > [8.253688] CS: 0010 DS: ES: CR0: 80050033 > [8.253690] CR2: 77a28000 CR3: 000505f02000 CR4: > 003406e0 > [8.253692] Call Trace: > [8.253817] dcn10_create_resource_pool+0x756/0x990 [amdgpu] > [8.253933] dc_create_resource_pool+0x42/0x180 [amdgpu] > [8.253940] ? __kmalloc+0x1aa/0x230 > [8.254053] ? dal_gpio_service_create+0x7c/0x110 [amdgpu] > [8.254165] dc_create+0x228/0x650 [amdgpu] > [8.254273] ? amdgpu_cgs_create_device+0x23/0x50
Error on boot with Raven Ridge
Although it is reported on dmesg, the system still boots normally [8.253073] amdgpu: [powerplay] dpm has been enabled [8.253210] [drm] DM_PPLIB: 40 in kHz [8.253211] [drm] DM_PPLIB: 933000 in kHz [8.253212] [drm] DM_PPLIB: 1067000 in kHz [8.253380] WARNING: CPU: 6 PID: 361 at drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1355 dcn_bw_update_from_pplib+0x16b/0x280 [amdgpu] [8.253381] Modules linked in: ext4 mbcache jbd2 fscrypto joydev mousedev amdkfd amd_iommu_v2 amdgpu(+) arc4 r8822be(C) uvcvideo btusb btrtl btbcm btintel videobuf2_vmalloc videobuf2_memops hid_sensor_accel_3d hid_sensor_magn_3d videobuf2_v4l2 chash hid_sensor_rotation hid_sensor_incl_3d hid_sensor_gyro_3d bluetooth videobuf2_common gpu_sched hid_sensor_trigger industrialio_triggered_buffer videodev i2c_algo_bit kfifo_buf hid_sensor_iio_common ecdh_generic industrialio media crc16 ttm mac80211 drm_kms_helper hp_wmi edac_mce_amd snd_hda_codec_realtek sparse_keymap snd_hda_codec_generic drm wmi_bmof snd_hda_codec_hdmi kvm_amd snd_hda_intel ccp snd_hda_codec rng_core cfg80211 snd_hda_core snd_hwdep kvm snd_pcm snd_timer psmouse agpgart snd syscopyarea sysfillrect irqbypass rtsx_pci_ms sysimgblt input_leds [8.253444] fb_sys_fops rfkill memstick soundcore sp5100_tco k10temp hp_accel lis3lv02d i2c_piix4 battery ac rtc_cmos wmi input_polldev led_class i2c_hid evdev acpi_cpufreq pinctrl_amd mac_hid i2c_scmi hp_wireless vboxnetflt(O) vboxnetadp(O) vboxpci(O) vboxdrv(O) msr sg crypto_user ip_tables x_tables dm_crypt dm_mod btrfs libcrc32c crc32c_generic xor zstd_decompress zstd_compress xxhash hid_sensor_hub hid_generic usbhid hid raid6_pq sd_mod crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel pcbc rtsx_pci_sdmmc serio_raw atkbd libps2 mmc_core ahci libahci aesni_intel xhci_pci aes_x86_64 libata crypto_simd xhci_hcd cryptd glue_helper usbcore scsi_mod usb_common rtsx_pci i8042 serio lz4 lz4_compress [8.253511] CPU: 6 PID: 361 Comm: systemd-udevd Tainted: G C O 4.18.0-1-custom+ #7 [8.253512] Hardware name: HP HP ENVY x360 Convertible 15m-bq1xx/83C6, BIOS F.17 03/29/2018 [8.253630] RIP: 0010:dcn_bw_update_from_pplib+0x16b/0x280 [amdgpu] [8.253631] Code: d8 ca d8 f1 d9 5a 50 8b 44 fc 14 49 8b 94 24 70 01 00 00 48 89 04 24 df 2c 24 d8 f1 db 42 78 de c9 de ca de f9 d9 5a 4c eb 02 <0f> 0b 48 89 da be 04 00 00 00 48 89 ef e8 13 5b fe ff 84 c0 0f 84 [8.253675] RSP: 0018:9bc383b037b8 EFLAGS: 00010246 [8.253678] RAX: 0001 RBX: 9bc383b03818 RCX: [8.253679] RDX: RSI: 0004 RDI: [8.253681] RBP: 918c85651a40 R08: 0001 R09: 039f [8.253683] R10: 0004 R11: R12: 918c733ae000 [8.253684] R13: 918c73293300 R14: 918c733ae000 R15: [8.253687] FS: 77f85d40() GS:918c8ab8() knlGS: [8.253688] CS: 0010 DS: ES: CR0: 80050033 [8.253690] CR2: 77a28000 CR3: 000505f02000 CR4: 003406e0 [8.253692] Call Trace: [8.253817] dcn10_create_resource_pool+0x756/0x990 [amdgpu] [8.253933] dc_create_resource_pool+0x42/0x180 [amdgpu] [8.253940] ? __kmalloc+0x1aa/0x230 [8.254053] ? dal_gpio_service_create+0x7c/0x110 [amdgpu] [8.254165] dc_create+0x228/0x650 [amdgpu] [8.254273] ? amdgpu_cgs_create_device+0x23/0x50 [amdgpu] [8.254385] dm_hw_init+0xc8/0x130 [amdgpu] [8.254496] amdgpu_device_init.cold.15+0x1041/0x1253 [amdgpu] [8.254585] amdgpu_driver_load_kms+0x86/0x2c0 [amdgpu] [8.254607] drm_dev_register+0x109/0x140 [drm] [8.254693] amdgpu_pci_probe+0x13c/0x1c0 [amdgpu] [8.254699] ? _raw_spin_unlock_irqrestore+0x20/0x40 [8.254704] local_pci_probe+0x41/0x90 [8.254709] pci_device_probe+0x189/0x1a0 [8.254715] driver_probe_device+0x2b9/0x460 [8.254719] __driver_attach+0xdd/0x110 [8.254722] ? driver_probe_device+0x460/0x460 [8.254725] bus_for_each_dev+0x76/0xc0 [8.254729] bus_add_driver+0x152/0x230 [8.254732] ? 0xc124 [8.254735] driver_register+0x6b/0xb0 [8.254738] ? 0xc124 [8.254742] do_one_initcall+0x46/0x1f5 [8.254746] ? kmem_cache_alloc_trace+0x181/0x1d0 [8.254751] ? do_init_module+0x22/0x210 [8.254755] do_init_module+0x5a/0x210 [8.254759] load_module+0x2295/0x24b0 [8.254766] ? vmap_page_range_noflush+0x243/0x320 [8.254772] ? __se_sys_init_module+0x10c/0x170 [8.254776] __se_sys_init_module+0x10c/0x170 [8.254781] do_syscall_64+0x5b/0x170 [8.254786] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [8.254789] RIP: 0033:0x778f6f3a [8.254789] Code: 48 8b 0d 19 cf 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e6 ce 2b 00 f7 d8 64 89 01 48 [
Crash report from dmesg after suspend/resume
Everything still works. [36725.271678] BUG: unable to handle kernel NULL pointer dereference at [36725.271688] PGD 0 P4D 0 [36725.271697] Oops: 0002 [#1] PREEMPT SMP NOPTI [36725.271704] CPU: 6 PID: 27625 Comm: amdgpu_cs:0 Tainted: GWC O 4.18.0-1-custom+ #7 [36725.271708] Hardware name: HP HP ENVY x360 Convertible 15m-bq1xx/83C6, BIOS F.17 03/29/2018 [36725.271720] RIP: 0010:_raw_spin_lock+0x1a/0x40 [36725.271724] Code: e8 fb d7 97 ff 66 90 5b c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 53 48 89 fb bf 01 00 00 00 e8 4d 28 95 ff 31 c0 ba 01 00 00 00 0f b1 13 85 c0 75 02 5b c3 89 c6 48 8 9 df e8 c2 d7 97 ff 66 90 [36725.271778] RSP: 0018:9bc388d6fb18 EFLAGS: 00010246 [36725.271783] RAX: RBX: RCX: 0001 [36725.271786] RDX: 0001 RSI: 918b55c492d8 RDI: 0001 [36725.271790] RBP: 918b55c492f0 R08: R09: 9189dfa75700 [36725.271794] R10: 918c717b2800 R11: R12: [36725.271797] R13: 918c717b67d8 R14: 05a0 R15: [36725.271803] FS: 7fffcfb7b700() GS:918c8ab8() knlGS: [36725.271807] CS: 0010 DS: ES: CR0: 80050033 [36725.271811] CR2: CR3: 000352ff2000 CR4: 003406e0 [36725.271815] Call Trace: [36725.271831] drm_sched_entity_push_job+0x122/0x150 [gpu_sched] [36725.271918] amdgpu_cs_ioctl+0x1469/0x1af0 [amdgpu] [36725.272004] ? amdgpu_cs_find_mapping+0x110/0x110 [amdgpu] [36725.272025] drm_ioctl_kernel+0xa7/0xf0 [drm] [36725.272044] drm_ioctl+0x30e/0x3c0 [drm] [36725.272111] ? amdgpu_cs_find_mapping+0x110/0x110 [amdgpu] [36725.272166] amdgpu_drm_ioctl+0x49/0x80 [amdgpu] [36725.272174] do_vfs_ioctl+0xa4/0x620 [36725.272181] ksys_ioctl+0x60/0x90 [36725.272186] __x64_sys_ioctl+0x16/0x20 [36725.272192] do_syscall_64+0x5b/0x170 [36725.272198] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [36725.272203] RIP: 0033:0x736e2667 [36725.272205] Code: 00 00 90 48 8b 05 e9 67 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b9 6 7 2c 00 f7 d8 64 89 01 48 [36725.272253] RSP: 002b:7fffcfb7abd8 EFLAGS: 0246 ORIG_RAX: 0010 [36725.272258] RAX: ffda RBX: 7fffcfb7acc8 RCX: 736e2667 [36725.272262] RDX: 7fffcfb7ac40 RSI: c0186444 RDI: 000b [36725.272266] RBP: 7fffcfb7ac40 R08: 7fffcfb7acf0 R09: 0010 [36725.272269] R10: 7fffcfb7acf0 R11: 0246 R12: c0186444 [36725.272272] R13: 000b R14: 0002 R15: [36725.272278] Modules linked in: ccm rfcomm fuse ipt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype ipta ble_filter xt_conntrack nf_nat nf_conntrack br_netfilter bridge stp llc bnep ext4 mbcache jbd2 fscrypto joydev mousedev amdkfd amd_iommu_v2 amdgpu arc4 r8822be(C) uvcvideo btusb btrtl btbcm btintel videobuf2_vmalloc videobuf2_memops hid_sensor_accel_3d hid_sensor_magn_3d videobuf2_v4l2 chash hid_sensor_rotation hid_sensor_incl_3d hid_sensor_gyro_3d bluetooth videobuf2_common gpu_sched hid_sensor_trigger industrialio_triggered_buffer videodev i2c_algo_bit kfifo_buf hid_sensor_iio_common ecdh_generic industrialio media crc16 ttm mac80211 drm_kms_helper hp_wmi eda c_mce_amd snd_hda_codec_realtek sparse_keymap snd_hda_codec_generic [36725.272352] drm wmi_bmof snd_hda_codec_hdmi kvm_amd snd_hda_intel ccp snd_hda_codec rng_core cfg80211 snd_hda_core snd_hwdep kvm snd_pcm snd_timer psmouse agpgart snd syscopyarea sysfil lrect irqbypass rtsx_pci_ms sysimgblt input_leds fb_sys_fops rfkill memstick soundcore sp5100_tco k10temp hp_accel lis3lv02d i2c_piix4 battery ac rtc_cmos wmi input_polldev led_class i2c_hi d evdev acpi_cpufreq pinctrl_amd mac_hid i2c_scmi hp_wireless vboxnetflt(O) vboxnetadp(O) vboxpci(O) vboxdrv(O) msr sg crypto_user ip_tables x_tables dm_crypt dm_mod btrfs libcrc32c crc32c_ generic xor zstd_decompress zstd_compress xxhash hid_sensor_hub hid_generic usbhid hid raid6_pq sd_mod crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel pcbc rtsx_pci_sdmmc ser io_raw atkbd libps2 mmc_core ahci libahci aesni_intel [36725.272440] xhci_pci aes_x86_64 libata crypto_simd xhci_hcd cryptd glue_helper usbcore scsi_mod usb_common rtsx_pci i8042 serio lz4 lz4_compress [36725.272460] CR2: [36725.272465] ---[ end trace 9134c6e0a3766f31 ]--- [36725.272473] RIP: 0010:_raw_spin_lock+0x1a/0x40 [36725.272476] Code: e8 fb d7 97 ff 66 90 5b c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 53 48 89 fb bf 01 00 00 00 e8 4d 28 95 ff 31 c0 ba 01 00 00 00 0f b1 13 85 c0 75 02 5b c3 89 c6 48 8 9 df e8 c2 d7 97 ff 66 90 [36725.272535] RSP: 0018:9bc388d6fb18 EFLAGS: 00010246 [36725.272539] RAX: RBX: RCX:
Re: 答复: 答复: [alsa-devel] 答复: [PATCH] vgaswitchroo: set audio client id according to bound gpu client id
On Sat, Jul 14, 2018 at 12:31 PM, Takashi Iwai wrote: > On Sat, 14 Jul 2018 14:03:26 +0200, > jimqu wrote: >> >> >> >> 在 2018/7/13 23:07, Takashi Iwai 写道: >> > On Wed, 11 Jul 2018 13:12:01 +0200, >> > Takashi Iwai wrote: >> >> And the forced runtime PM is still an issue, and this would need the >> >> other notification mechanism than the HD-audio unsolicited event as >> >> AMD HDMI controller doesn't honor the HD-audio WAKEEN bit. >> > Since we had a nice "hack week" in this week at SUSE, I spent some >> > time to write some patches for the support of the direct hotplug >> > notification / ELD query between HD-audio and radeon/amdgpu. It >> > re-utilizes the audio component framework for i915 but in a slightly >> > more flexible way. >> > >> > The patches are found in topic/hda-acomp branch of my sound.git tree: >> >git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git >> > >> > The following commits are relevant: >> >drm/i915: Split audio component to a generic type >> >ALSA: hda/i915: Allow delayed i915 audio component binding >> >ALSA: hda/i915: Associate audio component with devres >> >ALSA: hda: Make audio component support more generic >> >ALSA: hda/hdmi: Allow audio component for AMD/ATI HDMI >> >ALSA: hda/hdmi: Use single mutex unlock in error paths >> >drm/radeon: Add audio component support >> >drm/amdgpu: Add audio component support >> > >> > The branch should be cleanly pullable onto the latest 4.18-rc. >> > >> > I couldn't test amdgpu but the test with a radeon driver on an old >> > laptop seemed working through a very quick test. >> > >> > Please give it a try. >> >> That is really wonderful work. I will check it on our AMD >> platform. > > Thanks, it'll be great if you can check whether the current code works > or not. I'd love to push the stuff for 4.19. Hopefully I'll start > submitting the preparation patches in the next week. > > Basically this also opens the door of the similar capability for > nouveau, and I guess it's also trivial enough. > >> BTW, For display, AMD has moved to use DC to support new >> asics. so there also need a patch for amdgpu in DC code. > > Could you give a more hint? I'll try adapt the code if such a change > is already in upstream tree. The new code is in drivers/gpu/drm/amd/display. Alex ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx