Re: [PATCH 1/2] drm/amdgpu: Fix error handling in amdgpu_flip_work_func.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.03.2016 05:31, Mario Kleiner wrote:
> The patch e1d09dc0ccc6: "drm/amdgpu: Don't hang in
> amdgpu_flip_work_func on disabled crtc." from Feb 19, 2016, leads to
> the following static checker warning, as reported by Dan Carpenter in
> https://lists.freedesktop.org/archives/dri-devel/2016-February/101987.html
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:127 amdgpu_flip_work_func()	warn: should this be 'repcnt == -1'
> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'spin_lock:&crtc->dev->event_lock'
> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:136 amdgpu_flip_work_func() error: double unlock 'irqsave:flags'
> 
> This patch fixes both reported problems:
> 
> Change post-decrement of repcnt to pre-decrement, so
> it can't underflow anymore, but still performs up to
> three repetitions - three is the maximum one could
> expect in practice.
> 
> Move the spin_unlock_irqrestore to where it actually
> belongs.
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Mario Kleiner <mario.kleiner.de@xxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx> # 4.4+
> Cc: Michel Dänzer <michel.daenzer@xxxxxxx>
> Cc: Alex Deucher <alexander.deucher@xxxxxxx>

Both patches are

Reviewed-by: Michel Dänzer <michel.daenzer@xxxxxxx>


Alex, these should go into 4.5 if at all possible.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux