From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerome Glisse Subject: Re: [PATCH 2/2] drm/radeon: allow zero sized BOs for fences Date: Thu, 7 Aug 2014 11:01:22 -0400 Message-ID: <20140807150121.GA2545@gmail.com> References: <1407421833-3309-1-git-send-email-deathsimple@vodafone.de> <1407421833-3309-2-git-send-email-deathsimple@vodafone.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-qg0-f53.google.com (mail-qg0-f53.google.com [209.85.192.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 97BBE6E7B3 for ; Thu, 7 Aug 2014 08:01:29 -0700 (PDT) Received: by mail-qg0-f53.google.com with SMTP id q107so4596631qgd.12 for ; Thu, 07 Aug 2014 08:01:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1407421833-3309-2-git-send-email-deathsimple@vodafone.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Christian =?iso-8859-1?Q?K=F6nig?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Thu, Aug 07, 2014 at 04:30:33PM +0200, Christian K=F6nig wrote: > From: Christian K=F6nig Can we get proper change log with motivation for doing that, use case, why it can not be done any other ways ... Change log is invaluable information and empty change log is the worst thing ever. > = > Signed-off-by: Christian K=F6nig > --- > drivers/gpu/drm/radeon/radeon_drv.c | 3 ++- > drivers/gpu/drm/radeon/radeon_object.c | 2 +- > drivers/gpu/drm/radeon/radeon_vm.c | 3 +++ > 3 files changed, 6 insertions(+), 2 deletions(-) > = > diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon= /radeon_drv.c > index a773830..f788170 100644 > --- a/drivers/gpu/drm/radeon/radeon_drv.c > +++ b/drivers/gpu/drm/radeon/radeon_drv.c > @@ -84,9 +84,10 @@ > * 2.39.0 - Add INFO query for number of active CUs > * 2.40.0 - Add RADEON_GEM_GTT_WC/UC, flush HDP cache before submitting > * CS to GPU > + * 2.41.0 - Allow zero sized BOs > */ > #define KMS_DRIVER_MAJOR 2 > -#define KMS_DRIVER_MINOR 40 > +#define KMS_DRIVER_MINOR 41 > #define KMS_DRIVER_PATCHLEVEL 0 > int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); > int radeon_driver_unload_kms(struct drm_device *dev); > diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/rad= eon/radeon_object.c > index 480c87d..9dd670e 100644 > --- a/drivers/gpu/drm/radeon/radeon_object.c > +++ b/drivers/gpu/drm/radeon/radeon_object.c > @@ -154,7 +154,7 @@ int radeon_bo_create(struct radeon_device *rdev, > = > size =3D ALIGN(size, PAGE_SIZE); > = > - if (kernel) { > + if (kernel || size =3D=3D 0) { > type =3D ttm_bo_type_kernel; > } else if (sg) { > type =3D ttm_bo_type_sg; > diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/= radeon_vm.c > index ccae4d9..a80f856 100644 > --- a/drivers/gpu/drm/radeon/radeon_vm.c > +++ b/drivers/gpu/drm/radeon/radeon_vm.c > @@ -877,6 +877,9 @@ int radeon_vm_bo_update(struct radeon_device *rdev, > uint32_t flags; > int r; > = > + if (bo_va->bo && radeon_bo_size(bo_va->bo) =3D=3D 0) > + return 0; > + > if (!bo_va->it.start) { > dev_err(rdev->dev, "bo %p don't has a mapping in vm %p\n", > bo_va->bo, vm); > -- = > 1.9.1 > = > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel