From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758681AbcFAPXk (ORCPT ); Wed, 1 Jun 2016 11:23:40 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:34819 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758623AbcFAPXi convert rfc822-to-8bit (ORCPT ); Wed, 1 Jun 2016 11:23:38 -0400 Date: Wed, 1 Jun 2016 12:23:29 -0300 From: Gustavo Padovan To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, daniel@ffwll.ch, chris@chris-wilson.co.uk Subject: Re: [PATCH 01/11] dma-buf/fence: make fence context 64 bit v2 Message-ID: <20160601152329.GE11486@joana> Mail-Followup-To: Gustavo Padovan , Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, daniel@ffwll.ch, chris@chris-wilson.co.uk References: <1464786612-5010-1-git-send-email-deathsimple@vodafone.de> <1464786612-5010-2-git-send-email-deathsimple@vodafone.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1464786612-5010-2-git-send-email-deathsimple@vodafone.de> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-06-01 Christian König : > From: Christian König > > Fence contexts are created on the fly (for example) by the GPU scheduler used > in the amdgpu driver as a result of an userspace request. Because of this > userspace could in theory force a wrap around of the 32bit context number > if it doesn't behave well. > > Avoid this by increasing the context number to 64bits. This way even when > userspace manages to allocate a billion contexts per second it takes more > than 500 years for the context number to wrap around. > > v2: fix printf formats as well. > > Signed-off-by: Christian König > --- > drivers/dma-buf/fence.c | 8 ++++---- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c | 2 +- > drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 +- > drivers/gpu/drm/nouveau/nouveau_fence.h | 3 ++- > drivers/gpu/drm/qxl/qxl_release.c | 2 +- > drivers/gpu/drm/radeon/radeon.h | 2 +- > drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- > drivers/staging/android/sync.h | 3 ++- > include/linux/fence.h | 13 +++++++------ > 10 files changed, 21 insertions(+), 18 deletions(-) Reviewed-by: Gustavo Padovan Gustavo