Re: [Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-22 Thread Daniel Vetter
On Wed, Jul 21, 2021 at 10:23:56AM -0500, Jason Ekstrand wrote:
> If we have a failure, decrement the reference count so that the next
> call to ttm_global_init() will actually do something instead of assume
> everything is all set up.
> 
> Signed-off-by: Jason Ekstrand 
> Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
> Reviewed-by: Christian König 

This one is already in drm-misc-fixes.
-Daniel

> ---
>  drivers/gpu/drm/ttm/ttm_device.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ttm/ttm_device.c 
> b/drivers/gpu/drm/ttm/ttm_device.c
> index 5f31acec3ad76..519deea8e39b7 100644
> --- a/drivers/gpu/drm/ttm/ttm_device.c
> +++ b/drivers/gpu/drm/ttm/ttm_device.c
> @@ -100,6 +100,8 @@ static int ttm_global_init(void)
>   debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
>   >bo_count);
>  out:
> + if (ret)
> + --ttm_glob_use_count;
>   mutex_unlock(_global_mutex);
>   return ret;
>  }
> -- 
> 2.31.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-21 Thread Jason Ekstrand
If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.

Signed-off-by: Jason Ekstrand 
Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
Reviewed-by: Christian König 
---
 drivers/gpu/drm/ttm/ttm_device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 5f31acec3ad76..519deea8e39b7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -100,6 +100,8 @@ static int ttm_global_init(void)
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
>bo_count);
 out:
+   if (ret)
+   --ttm_glob_use_count;
mutex_unlock(_global_mutex);
return ret;
 }
-- 
2.31.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-21 Thread Christian König

Am 21.07.21 um 11:06 schrieb Daniel Vetter:

On Wed, Jul 21, 2021 at 8:36 AM Christian König
 wrote:

Am 20.07.21 um 20:13 schrieb Jason Ekstrand:

If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.

Signed-off-by: Jason Ekstrand 
Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
Reviewed-by: Christian König 

I've just pushed this to drm-misc-fixes.

Did you see patch 5/6 here which is also touching ttm?


Nope, neither with my AMD nor with my GMail account.

Looks like something is wrong with the distribution of mails over the 
mailing list for a few days now.


Going to double check patchwork.

Christian.


-Daniel


Thanks,
Christian.


---
   drivers/gpu/drm/ttm/ttm_device.c | 2 ++
   1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 5f31acec3ad76..519deea8e39b7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -100,6 +100,8 @@ static int ttm_global_init(void)
   debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
   >bo_count);
   out:
+ if (ret)
+ --ttm_glob_use_count;
   mutex_unlock(_global_mutex);
   return ret;
   }

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fintel-gfxdata=04%7C01%7Cchristian.koenig%40amd.com%7C05ff233273a54b987b6b08d94c26d0ac%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637624551867495341%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=70RYQ49Q58VED5jMpJ%2FW9Vy5imUndghFS0tQWIeD7dk%3Dreserved=0





___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-21 Thread Christian König

Am 20.07.21 um 20:13 schrieb Jason Ekstrand:

If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.

Signed-off-by: Jason Ekstrand 
Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
Reviewed-by: Christian König 


I've just pushed this to drm-misc-fixes.

Thanks,
Christian.


---
  drivers/gpu/drm/ttm/ttm_device.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 5f31acec3ad76..519deea8e39b7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -100,6 +100,8 @@ static int ttm_global_init(void)
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
>bo_count);
  out:
+   if (ret)
+   --ttm_glob_use_count;
mutex_unlock(_global_mutex);
return ret;
  }


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-21 Thread Daniel Vetter
On Wed, Jul 21, 2021 at 11:08 AM Christian König
 wrote:
> Am 21.07.21 um 11:06 schrieb Daniel Vetter:
> > On Wed, Jul 21, 2021 at 8:36 AM Christian König
> >  wrote:
> >> Am 20.07.21 um 20:13 schrieb Jason Ekstrand:
> >>> If we have a failure, decrement the reference count so that the next
> >>> call to ttm_global_init() will actually do something instead of assume
> >>> everything is all set up.
> >>>
> >>> Signed-off-by: Jason Ekstrand 
> >>> Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
> >>> Reviewed-by: Christian König 
> >> I've just pushed this to drm-misc-fixes.
> > Did you see patch 5/6 here which is also touching ttm?
>
> Nope, neither with my AMD nor with my GMail account.
>
> Looks like something is wrong with the distribution of mails over the
> mailing list for a few days now.

Ping admins on #freedesktop on oftc, they can usually chase where
mails are stuck. It works all fine for me, but I've seen you complain
that you didn't get all the msm patches too, so figured better I
highlight in case it's lost.

> Going to double check patchwork.

https://lore.kernel.org/dri-devel/20210720181357.2760720-6-ja...@jlekstrand.net/

Cheers, Daniel

>
> Christian.
>
> > -Daniel
> >
> >> Thanks,
> >> Christian.
> >>
> >>> ---
> >>>drivers/gpu/drm/ttm/ttm_device.c | 2 ++
> >>>1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/drivers/gpu/drm/ttm/ttm_device.c 
> >>> b/drivers/gpu/drm/ttm/ttm_device.c
> >>> index 5f31acec3ad76..519deea8e39b7 100644
> >>> --- a/drivers/gpu/drm/ttm/ttm_device.c
> >>> +++ b/drivers/gpu/drm/ttm/ttm_device.c
> >>> @@ -100,6 +100,8 @@ static int ttm_global_init(void)
> >>>debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
> >>>>bo_count);
> >>>out:
> >>> + if (ret)
> >>> + --ttm_glob_use_count;
> >>>mutex_unlock(_global_mutex);
> >>>return ret;
> >>>}
> >> ___
> >> Intel-gfx mailing list
> >> Intel-gfx@lists.freedesktop.org
> >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fintel-gfxdata=04%7C01%7Cchristian.koenig%40amd.com%7C05ff233273a54b987b6b08d94c26d0ac%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637624551867495341%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000sdata=70RYQ49Q58VED5jMpJ%2FW9Vy5imUndghFS0tQWIeD7dk%3Dreserved=0
> >
> >
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-21 Thread Daniel Vetter
On Wed, Jul 21, 2021 at 8:36 AM Christian König
 wrote:
> Am 20.07.21 um 20:13 schrieb Jason Ekstrand:
> > If we have a failure, decrement the reference count so that the next
> > call to ttm_global_init() will actually do something instead of assume
> > everything is all set up.
> >
> > Signed-off-by: Jason Ekstrand 
> > Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
> > Reviewed-by: Christian König 
>
> I've just pushed this to drm-misc-fixes.

Did you see patch 5/6 here which is also touching ttm?
-Daniel

>
> Thanks,
> Christian.
>
> > ---
> >   drivers/gpu/drm/ttm/ttm_device.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/ttm/ttm_device.c 
> > b/drivers/gpu/drm/ttm/ttm_device.c
> > index 5f31acec3ad76..519deea8e39b7 100644
> > --- a/drivers/gpu/drm/ttm/ttm_device.c
> > +++ b/drivers/gpu/drm/ttm/ttm_device.c
> > @@ -100,6 +100,8 @@ static int ttm_global_init(void)
> >   debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
> >   >bo_count);
> >   out:
> > + if (ret)
> > + --ttm_glob_use_count;
> >   mutex_unlock(_global_mutex);
> >   return ret;
> >   }
>
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-20 Thread Jason Ekstrand
If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.

Signed-off-by: Jason Ekstrand 
Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
Reviewed-by: Christian König 
---
 drivers/gpu/drm/ttm/ttm_device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 5f31acec3ad76..519deea8e39b7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -100,6 +100,8 @@ static int ttm_global_init(void)
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
>bo_count);
 out:
+   if (ret)
+   --ttm_glob_use_count;
mutex_unlock(_global_mutex);
return ret;
 }
-- 
2.31.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-19 Thread Christian König

Am 19.07.21 um 20:30 schrieb Jason Ekstrand:

If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.

Signed-off-by: Jason Ekstrand 
Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
Cc: Christian König 


Good catch, path is Reviewed-by: Christian König 


---
  drivers/gpu/drm/ttm/ttm_device.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 5f31acec3ad76..519deea8e39b7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -100,6 +100,8 @@ static int ttm_global_init(void)
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
>bo_count);
  out:
+   if (ret)
+   --ttm_glob_use_count;
mutex_unlock(_global_mutex);
return ret;
  }


___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 4/6] drm/ttm: Force re-init if ttm_global_init() fails

2021-07-19 Thread Jason Ekstrand
If we have a failure, decrement the reference count so that the next
call to ttm_global_init() will actually do something instead of assume
everything is all set up.

Signed-off-by: Jason Ekstrand 
Fixes: 62b53b37e4b1 ("drm/ttm: use a static ttm_bo_global instance")
Cc: Christian König 
---
 drivers/gpu/drm/ttm/ttm_device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c
index 5f31acec3ad76..519deea8e39b7 100644
--- a/drivers/gpu/drm/ttm/ttm_device.c
+++ b/drivers/gpu/drm/ttm/ttm_device.c
@@ -100,6 +100,8 @@ static int ttm_global_init(void)
debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
>bo_count);
 out:
+   if (ret)
+   --ttm_glob_use_count;
mutex_unlock(_global_mutex);
return ret;
 }
-- 
2.31.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx