[PATCH] drm/amdgpu: dma_fence finished signaled by unexpected callback

2018-12-21 Thread wentalou
When 2 rings met timeout at same time, triggered job_timedout separately. Each job_timedout called gpu_recover, but one of gpu_recover locked by another's mutex_lock. Bad jod’s callback should be removed by dma_fence_remove_callback but locked inside mutex_lock. So dma_fence_remove_callback

Re: [PATCH v5 1/2] drm/sched: Refactor ring mirror list handling.

2018-12-21 Thread Grodzovsky, Andrey
On 12/21/2018 01:37 PM, Christian König wrote: > Am 20.12.18 um 20:23 schrieb Andrey Grodzovsky: >> Decauple sched threads stop and start and ring mirror >> list handling from the policy of what to do about the >> guilty jobs. >> When stoppping the sched thread and detaching sched fences >> from

Re: [PATCH 3/3] drm/amd: validate user GEM object size

2018-12-21 Thread kbuild test robot
Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.20-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 8:26 a.m., Emily Deng wrote: > When the bo is used to set mode, the bo need to be pinned. > > Signed-off-by: Emily Deng > > [...] > > @@ -235,6 +222,47 @@ static bool dce_virtual_crtc_mode_fixup(struct drm_crtc > *crtc, > static int dce_virtual_crtc_set_base(struct drm_crtc

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 8:26 a.m., Emily Deng wrote: > When the bo is used to set mode, the bo need to be pinned. On second thought, why does the BO need to be pinned? When using the display hardware, the BO needs to be pinned to prevent it from being moved while the hardware is scanning out from it, but

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 9:45 a.m., Deng, Emily wrote: >> -Original Message- >> From: Michel Dänzer >> Sent: Friday, December 21, 2018 4:38 PM >> To: Deng, Emily >> Cc: amd-gfx@lists.freedesktop.org >> Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo >> >> On 2018-12-21 8:26

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 10:32 a.m., Deng, Emily wrote: >> -Original Message- >> From: Michel Dänzer >> Sent: Friday, December 21, 2018 5:28 PM >> To: Deng, Emily >> Cc: amd-gfx@lists.freedesktop.org >> Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo >> >> On 2018-12-21 10:17

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 11:15 a.m., Deng, Emily wrote: >> -Original Message- >> From: Michel Dänzer >> Sent: Friday, December 21, 2018 6:08 PM >> To: Deng, Emily >> Cc: amd-gfx@lists.freedesktop.org >> Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo >> >> On 2018-12-21 10:55

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: Michel Dänzer >Sent: Friday, December 21, 2018 5:28 PM >To: Deng, Emily >Cc: amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >On 2018-12-21 10:17 a.m., Deng, Emily wrote: >>> From: amd-gfx On Behalf Of >>>

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: amd-gfx On Behalf Of Deng, >Emily >Sent: Friday, December 21, 2018 5:41 PM >To: Michel Dänzer >Cc: amd-gfx@lists.freedesktop.org >Subject: RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >>-Original Message- >>From: Michel Dänzer >>Sent:

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: Michel Dänzer >Sent: Friday, December 21, 2018 6:08 PM >To: Deng, Emily >Cc: amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >On 2018-12-21 10:55 a.m., Deng, Emily wrote: >>> -Original Message- >>>

Re: [PATCH 1/3] drm/amd: fix race in page flip job

2018-12-21 Thread Michel Dänzer
On 2018-12-21 4:10 a.m., Yu Zhao wrote: > Fix race between page flip job submission and completion. We invoke > page_flip callback to submit page flip job to GPU first and then set > pflip_status. If GPU fires page flip done irq in between, its handler > won't see the correct pflip_status thus

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 10:17 a.m., Deng, Emily wrote: >> From: amd-gfx On Behalf Of Deng, >> Emily >>> From: Michel Dänzer >>> On 2018-12-21 9:45 a.m., Deng, Emily wrote: > From: Michel Dänzer > On 2018-12-21 8:26 a.m., Emily Deng wrote: >> When the bo is used to set mode, the bo need to be

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: Michel Dänzer >Sent: Friday, December 21, 2018 4:38 PM >To: Deng, Emily >Cc: amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >On 2018-12-21 8:26 a.m., Emily Deng wrote: >> When the bo is used to set mode,

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Michel Dänzer
On 2018-12-21 4:10 a.m., Yu Zhao wrote: > Userspace may request pitch alignment that is not supported by GPU. > Some requests 32, but GPU ignores it and uses default 64 when cpp is > 4. If GEM object is allocated based on the smaller alignment, GPU > DMA will go out of bound. > > For GPU that

Re: [PATCH 3/3] drm/amd: validate user GEM object size

2018-12-21 Thread Michel Dänzer
On 2018-12-21 4:10 a.m., Yu Zhao wrote: > When creating frame buffer, userspace may request to attach to a > previously allocated GEM object that is smaller than what GPU > requires. Validation must be done to prevent out-of-bound DMA, > which could not only corrupt memory but also reveal

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: Michel Dänzer >Sent: Friday, December 21, 2018 4:52 PM >To: Deng, Emily >Cc: amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >On 2018-12-21 9:45 a.m., Deng, Emily wrote: >>> -Original Message- >>>

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Michel Dänzer
On 2018-12-21 10:55 a.m., Deng, Emily wrote: >> -Original Message- >> From: amd-gfx On Behalf Of Deng, >> Emily >> Sent: Friday, December 21, 2018 5:41 PM >> To: Michel Dänzer >> Cc: amd-gfx@lists.freedesktop.org >> Subject: RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo >>

[PATCH 3/3] drm/amd: validate user GEM object size

2018-12-21 Thread Yu Zhao
When creating frame buffer, userspace may request to attach to a previously allocated GEM object that is smaller than what GPU requires. Validation must be done to prevent out-of-bound DMA, which could not only corrupt memory but also reveal sensitive data. This fix is not done in a common code

[PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Yu Zhao
Userspace may request pitch alignment that is not supported by GPU. Some requests 32, but GPU ignores it and uses default 64 when cpp is 4. If GEM object is allocated based on the smaller alignment, GPU DMA will go out of bound. For GPU that does frame buffer compression, DMA writing out of bound

[PATCH 1/3] drm/amd: fix race in page flip job

2018-12-21 Thread Yu Zhao
Fix race between page flip job submission and completion. We invoke page_flip callback to submit page flip job to GPU first and then set pflip_status. If GPU fires page flip done irq in between, its handler won't see the correct pflip_status thus will refuse to notify the job completion. The job

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Michel Dänzer
On 2018-12-21 4:10 a.m., Yu Zhao wrote: > Userspace may request pitch alignment that is not supported by GPU. > Some requests 32, but GPU ignores it and uses default 64 when cpp is > 4. If GEM object is allocated based on the smaller alignment, GPU > DMA will go out of bound. > > For GPU that

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: amd-gfx On Behalf Of Deng, >Emily >Sent: Friday, December 21, 2018 5:10 PM >To: Michel Dänzer >Cc: amd-gfx@lists.freedesktop.org >Subject: RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >>-Original Message- >>From: Michel Dänzer >>Sent:

RE: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Deng, Emily
>-Original Message- >From: Michel Dänzer >Sent: Friday, December 21, 2018 5:37 PM >To: Deng, Emily >Cc: amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo > >On 2018-12-21 10:32 a.m., Deng, Emily wrote: >>> -Original Message- >>>

Re: [PATCH] drm/amdgpu/gmc: fix compiler errors [-Werror,-Wmissing-braces]

2018-12-21 Thread Michel Dänzer
On 2018-12-20 3:01 p.m., S, Shirish wrote: > Initializing structures with { } is known to be problematic since > it doesn't necessararily initializes all bytes, in case of padding, > causing random failures when structures are memcmp(). > > This patch fixes the structure initialisation compiler

Re: [PATCH] drm: return false in drm_arch_can_wc_memory() for ARM

2018-12-21 Thread Alex Deucher
On Fri, Dec 21, 2018 at 9:16 AM Liviu Dudau wrote: > > On Thu, Dec 20, 2018 at 04:36:19PM +0100, Daniel Vetter wrote: > > On Thu, Dec 20, 2018 at 09:56:57AM -0500, Alex Deucher wrote: > > > I'm not familiar enough with ARM to know if write combining > > > is actually an architectural limitation

Re: [PATCH] drm: return false in drm_arch_can_wc_memory() for ARM

2018-12-21 Thread Liviu Dudau
On Thu, Dec 20, 2018 at 04:36:19PM +0100, Daniel Vetter wrote: > On Thu, Dec 20, 2018 at 09:56:57AM -0500, Alex Deucher wrote: > > I'm not familiar enough with ARM to know if write combining > > is actually an architectural limitation or if it's an issue > > with the PCIe IPs used on various

Re: [PATCH] drm/amdgpu/gmc: fix compiler errors [-Werror,-Wmissing-braces]

2018-12-21 Thread Koenig, Christian
Am 21.12.18 um 12:18 schrieb Michel Dänzer: > On 2018-12-20 3:01 p.m., S, Shirish wrote: >> Initializing structures with { } is known to be problematic since >> it doesn't necessararily initializes all bytes, in case of padding, >> causing random failures when structures are memcmp(). >> >> This

Re: [PATCH 3/3] drm/amd: validate user GEM object size

2018-12-21 Thread kbuild test robot
Hi Yu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.20-rc7 next-20181221] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Christian König
Am 21.12.18 um 10:09 schrieb Deng, Emily: -Original Message- From: Michel Dänzer Sent: Friday, December 21, 2018 4:52 PM To: Deng, Emily Cc: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo On 2018-12-21 9:45 a.m., Deng, Emily wrote:

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Alex Deucher
On Fri, Dec 21, 2018 at 1:15 PM Christian König wrote: > > Am 21.12.18 um 10:09 schrieb Deng, Emily: > >> -Original Message- > >> From: Michel Dänzer > >> Sent: Friday, December 21, 2018 4:52 PM > >> To: Deng, Emily > >> Cc: amd-gfx@lists.freedesktop.org > >> Subject: Re: [PATCH]

Re: [PATCH] drm/amdgpu/virtual_dce: Need to pin the fb's bo

2018-12-21 Thread Koenig, Christian
Am 21.12.18 um 19:19 schrieb Alex Deucher: > On Fri, Dec 21, 2018 at 1:15 PM Christian König > wrote: >> Am 21.12.18 um 10:09 schrieb Deng, Emily: -Original Message- From: Michel Dänzer Sent: Friday, December 21, 2018 4:52 PM To: Deng, Emily Cc:

Re: [PATCH] drm/amd/powerplay/polaris10_smumgr: Remove duplicate

2018-12-21 Thread Alex Deucher
Already fixed here: https://cgit.freedesktop.org/drm/drm/commit/?id=7e07834c12b96214e95a473f7b14fc03b20e2e7a Thanks, Alex On Fri, Dec 21, 2018 at 9:59 AM Brajeswar Ghosh wrote: > > Remove ppatomctrl.h which is included more than once > > Signed-off-by: Brajeswar Ghosh > --- >

Re: [PATCH v5 1/2] drm/sched: Refactor ring mirror list handling.

2018-12-21 Thread Christian König
Am 20.12.18 um 20:23 schrieb Andrey Grodzovsky: Decauple sched threads stop and start and ring mirror list handling from the policy of what to do about the guilty jobs. When stoppping the sched thread and detaching sched fences from non signaled HW fenes wait for all signaled HW fences to

Re: [PATCH] drm/amd/powerplay: Remove duplicate header

2018-12-21 Thread Souptick Joarder
On Fri, Dec 21, 2018 at 2:49 PM Brajeswar Ghosh wrote: > > Remove hwmgr_ppt.h which is included more than once > > Signed-off-by: Brajeswar Ghosh > --- Acked-by: Souptick Joarder > drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git

[PATCH] drm/amd/powerplay/polaris10_smumgr: Remove duplicate

2018-12-21 Thread Brajeswar Ghosh
Remove ppatomctrl.h which is included more than once Signed-off-by: Brajeswar Ghosh --- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c

[PATCH] drm/amd/powerplay: Remove duplicate header

2018-12-21 Thread Brajeswar Ghosh
Remove hwmgr_ppt.h which is included more than once Signed-off-by: Brajeswar Ghosh --- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h index

Re: [PATCH] drm: return false in drm_arch_can_wc_memory() for ARM

2018-12-21 Thread Eric Anholt
Alex Deucher writes: > On Fri, Dec 21, 2018 at 9:16 AM Liviu Dudau wrote: >> >> On Thu, Dec 20, 2018 at 04:36:19PM +0100, Daniel Vetter wrote: >> > On Thu, Dec 20, 2018 at 09:56:57AM -0500, Alex Deucher wrote: >> > > I'm not familiar enough with ARM to know if write combining >> > > is actually

Re: [PATCH] drm/amdgpu: Add new VegaM pci id

2018-12-21 Thread Liu, Leo
Reviewed-by: Leo Liu On 12/21/18 11:36 AM, Alex Deucher wrote: > ping? > > On Thu, Dec 20, 2018 at 10:10 AM Alex Deucher wrote: >> Add a new pci id. >> >> Signed-off-by: Alex Deucher >> Cc: sta...@vger.kernel.org >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + >> 1 file changed, 1

Re: [PATCH] drm/amdgpu: dma_fence finished signaled by unexpected callback

2018-12-21 Thread Grodzovsky, Andrey
I believe this issue would be resolved by my pending  in review patch set, specifically 'drm/sched: Refactor ring mirror list handling.' since already on the first TO handler it will go over all the rings including the second timed out ring and will remove all call backs including the bad job

[PATCH xf86-video-ati 11/13] Use drmIoctl in drmmode_show_cursor

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer This should be functionally equivalent to what drmModeSetCursor(2) do behind the scenes, but allows for new tricks in following changes. (Ported from amdgpu commit b344e1559e936046ef02c777fc4f6bcefa3830bc) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 21

[PATCH xf86-video-ati 02/13] Skip gamma correction of cursor data if premultiplied R/G/B > alpha

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer The un-premultiplied R/G/B values would overflow the gamma LUT, so just pass through the data unchanged, and leave it up to the HW how to interpret such weird premultiplied alpha pixels. Bugzilla: https://bugs.freedesktop.org/108355 (Ported from amdgpu commit

[PATCH xf86-video-ati 10/13] Drop RADEONInfoRec::cursor_bo array

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer Not needed or even useful for anything. (Ported from amdgpu commit e95044e45350870fa7e237860e89ade91ac03550) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 9 - src/drmmode_display.h | 1 - src/radeon.h | 1 - src/radeon_kms.c | 21

[PATCH xf86-video-ati 07/13] Perform scanout buffer update immediately if drmmode_wait_vblank fails

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer Otherwise the damaged screen contents may never be displayed in that case. (Ported from amdgpu commit 500fadb16285146e91f62fce3a0ce1360ca684ba) Signed-off-by: Michel Dänzer --- src/radeon_kms.c | 29 +++-- 1 file changed, 19 insertions(+), 10

[PATCH xf86-video-ati 06/13] Move deferred vblank events to separate drm_vblank_deferred list

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer It was still possible for nested xorg_list_for_each_entry_safe loops to occur over the drm_vblank_signalled list, which could mess up that list. Moving deferred events to a separate list allows processing the drm_vblank_signalled list without xorg_list_for_each_entry_safe.

[PATCH xf86-video-ati 08/13] Cancel pending scanout update in drmmode_crtc_scanout_update

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer drmmode_crtc_scanout_update does the equivalent of a scanout update, so no need to do it again. This might also avoid issues if there's a pending scanout update at this point. (Ported from amdgpu commit 4e7a24ac5a64e402146953ec5850d13c05742116) Signed-off-by: Michel Dänzer

[PATCH xf86-video-ati 05/13] Explicitly keep track of whether a DRM event is for a flip or not

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer When an async flip is performed, and TearFree is enabled on the CRTC used for timing, we schedule a vblank event for completing the page flip. The DRM event queuing code treated this event like a vblank event, but it needs to be treated like a page flip event. (Ported from

[PATCH xf86-video-ati 01/13] Detect and fix up non-premultiplied cursor data

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer X server >= 1.18 already had code for this, but it only caught cases where some pixels have 0 for alpha and non-0 for a non-alpha component. Turns out some apps (e.g. the Civilization VI game) use non-premultiplied cursor data which doesn't have such pixels, but can still

[PATCH xf86-video-ati 12/13] Update cursor position in drmmode_show_cursor if hotspot changed

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer The cursor position is updated to be consistent with the new hotspot in the same ioctl call. (Ported from amdgpu commit b04697de5270e8e45744a7025c24df1f454a4cf0) Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 75 +--

[PATCH xf86-video-ati 04/13] Use drm_abort_one in drm_queue_handler

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer At this point, we've already established that e->handler is NULL, no need to check again in drm_queue_handle_one. This also makes it clearer what's happening. (Ported from amdgpu commit eda571222f5a6be47f8897e82d85199bb9d95251) Signed-off-by: Michel Dänzer ---

[PATCH xf86-video-ati 00/13] Porting outstanding changes from amdgpu

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer These are the outstanding applicable changes ported from xf86-video-amdgpu. Michel Dänzer (13): Detect and fix up non-premultiplied cursor data Skip gamma correction of cursor data if premultiplied R/G/B > alpha glamor: Can work at depth >= 15 with current xserver Git

[PATCH xf86-video-ati 03/13] glamor: Can work at depth >= 15 with current xserver Git master

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer (Ported from amdgpu commit 0734cdf544ffd3f2ac8749ad0e4bf43f8a5cea50) Signed-off-by: Michel Dänzer --- src/radeon_bo_helper.c | 2 ++ src/radeon_glamor.c| 9 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/radeon_bo_helper.c

[PATCH xf86-video-ati 13/13] Use two HW cursor buffers per CRTC

2018-12-21 Thread Michel Dänzer
From: Michel Dänzer Switch to the other buffer when xf86_config->cursor changes. Avoids these issues possible when re-using the same buffer: * The HW may intermittently display a mix of the old and new cursor images. * If the hotspot changes, the HW may intermittently display the new cursor

Re: [PATCH 2/3] drm/amd: validate user pitch alignment

2018-12-21 Thread Yu Zhao
On Fri, Dec 21, 2018 at 10:07:26AM +0100, Michel Dänzer wrote: > On 2018-12-21 4:10 a.m., Yu Zhao wrote: > > Userspace may request pitch alignment that is not supported by GPU. > > Some requests 32, but GPU ignores it and uses default 64 when cpp is > > 4. If GEM object is allocated based on the

[PATCH v2 1/2] drm/amd: validate user pitch alignment

2018-12-21 Thread Yu Zhao
Userspace may request pitch alignment that is not supported by GPU. Some requests 32, but GPU ignores it and uses default 64 when cpp is 4. If GEM object is allocated based on the smaller alignment, GPU DMA will go out of bound. For GPU that does frame buffer compression, DMA writing out of bound

[PATCH v2 2/2] drm/amd: validate user GEM object size

2018-12-21 Thread Yu Zhao
When creating frame buffer, userspace may request to attach to a previously allocated GEM object that is smaller than what GPU requires. Validation must be done to prevent out-of-bound DMA, which could not only corrupt memory but also reveal sensitive data. This fix is not done in a common code