Re: [PATCH 5/7] drm/gem: Remove BUG_ON in drm_gem_private_object_init

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

 



On Fri, 17 Feb 2023 at 12:23, Christian König
<ckoenig.leichtzumerken@xxxxxxxxx> wrote:
>
> From: Somalapuram Amaranath <Amaranath.Somalapuram@xxxxxxx>
>
> ttm_resource can allocate size in bytes to support less than page size.
>
> Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@xxxxxxx>
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> Link: https://patchwork.freedesktop.org/patch/msgid/20230208090106.9659-1-Amaranath.Somalapuram@xxxxxxx
> ---
>  drivers/gpu/drm/drm_gem.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> index aa15c52ae182..5a3ca3363f82 100644
> --- a/drivers/gpu/drm/drm_gem.c
> +++ b/drivers/gpu/drm/drm_gem.c
> @@ -152,8 +152,6 @@ EXPORT_SYMBOL(drm_gem_object_init);
>  void drm_gem_private_object_init(struct drm_device *dev,
>                                  struct drm_gem_object *obj, size_t size)
>  {
> -       BUG_ON((size & (PAGE_SIZE - 1)) != 0);
> -

There are also some comments in drm_gem_{get, put}_pages referring to
this exact BUG_ON(), which could do with updating now.

>         obj->dev = dev;
>         obj->filp = NULL;
>
> --
> 2.34.1
>




[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