Re: [PATCH] drm/amdgpu: Add GDS clearing workaround in later init for gfx9

2019-06-08 Thread Christian König
Yeah, that would be a good idea as well. Additional to that I suggest to update GDS_VMID0_BASE/_SIZE with direct register writes instead of PM4 packets. Christian. Am 07.06.19 um 22:16 schrieb Shamis, Leonid: James, Do you set GDS_VMID0_BASE to 0?.. I don't see it in your patch. Regards,

Re: [PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported()

2019-06-08 Thread Koenig, Christian
Yes, that is undefined behavior what you do here. See here as well https://stackoverflow.com/questions/11270492/what-does-the-c-standard-say-about-bitshifting-more-bits-than-the-width-of-type. Christian. Am 08.06.19 um 14:27 schrieb Pan, Xinhui: do you mean that something like 1<<65 might be a

Re: [PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported()

2019-06-08 Thread Pan, Xinhui
do you mean that something like 1<<65 might be a none zero value? From: Dan Carpenter Sent: Saturday, June 8, 2019 5:23:57 PM To: Deucher, Alexander; Pan, Xinhui Cc: Koenig, Christian; Zhou, David(ChunMing); David Airlie; Daniel Vetter; Quan, Evan; Zhu, James;

[PATCH] drm/amdgpu: Fix bounds checking in amdgpu_ras_is_supported()

2019-06-08 Thread Dan Carpenter
The "block" variable can be set by the user through debugfs, so it can be quite large which leads to shift wrapping here. This means we report a "block" as supported when it's not, and that leads to array overflows later on. This bug is not really a security issue in real life, because debugfs

[PATCH v1 7/7] drm/radeon: drop use of drmP.h (2/2)

2019-06-08 Thread Sam Ravnborg
Drop use of drmP.h in remaining .c files. To ease review a little the drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/radeon/atombios_crtc.c

[PATCH v1 6/7] drm/radeon: drop use of drmP.h (1/2)

2019-06-08 Thread Sam Ravnborg
Drop use of drmP.h in all .c files named radeon*c. To ease review a little drmP.h removal was divided in two commits. Signed-off-by: Sam Ravnborg Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/radeon/radeon_acpi.c

[PATCH v1 0/7] drm/radeon: drop obsolete header files

2019-06-08 Thread Sam Ravnborg
This patchset contains updates to two header files in include/drm/. The header files caused build errors due to missing dependencies. Fixed this so others will not be hit by the same. The header file drm_os_linux.h is deprecated and should no longer be used. For radeon it was a simple 1:1

[PATCH v1 3/7] drm/radeon: drop dependency on drm_os_linux.h

2019-06-08 Thread Sam Ravnborg
The drm_os_linux.h header file is deprecated. Drop all uses of symbols from this file. All macros are just opencoded. A few adjustments to include files was required as the obsolete drm_os_linux.h included these headers. Signed-off-by: Sam Ravnborg Cc: Alex Deucher Cc: "Christian König" Cc:

[PATCH v1 4/7] drm/radeon: drop drmP.h from header files

2019-06-08 Thread Sam Ravnborg
To ease conversion of .c files drop include of drmP.h from all header files. And fix-up build errors caused by this. Signed-off-by: Sam Ravnborg Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/radeon/atom.c |

[PATCH v1 1/7] drm: drm_crtc.h self-contained

2019-06-08 Thread Sam Ravnborg
While removing drmP.h from drm/radeon a few files ended up including drm_crtc.h as the first file. This failed build due to a missing dependency in drm_crtc.h. Add the missing include file. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie

[PATCH v1 5/7] drm/radeon: prepare header files for drmP.h removal

2019-06-08 Thread Sam Ravnborg
While removing drmP.h from all .c files the list of header files are also sorted alphabetically. To allow this adjust the header files to pull in the dependencies they needed to allow this. Signed-off-by: Sam Ravnborg Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc:

[PATCH v1 2/7] drm: drm_debugfs.h self-contained

2019-06-08 Thread Sam Ravnborg
While removing drmP.h from drm/radeon a few files ended up including drm_debugfs.h as the first file. This failed build due to missing dependencies in drm_debugfs.h. Add the missing include files. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David