Re: [Spice-devel] [PATCH] drm/qxl: properly handle device init failures

2021-02-09 Thread Tong Zhang
Hi Gerd, I tested the patch on drm-misc-next and it fixed the issue. Thanks, - Tong > On Feb 9, 2021, at 7:16 AM, Gerd Hoffmann wrote: > > On Mon, Feb 08, 2021 at 12:07:01PM -0500, Tong Zhang wrote: >> Does this patch fix an issue raised previously? Or should they be used >&g

Re: [Spice-devel] [PATCH] drm/qxl: properly handle device init failures

2021-02-08 Thread Tong Zhang
ically do not try release resources which where > not allocated in the first place. > > Cc: Tong Zhang > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 3 +++ > drivers/gpu/drm/qxl/qxl_kms.c | 4 > 2 files changed, 7 insertions(+) >

Re: [Spice-devel] [PATCH] drm/qxl: properly handle device init failures

2021-02-08 Thread Tong Zhang
- Tong > On Feb 8, 2021, at 5:41 AM, Gerd Hoffmann wrote: > > Specifically do not try release resources which where > not allocated in the first place. > > Cc: Tong Zhang > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 3 +++ > drivers/gp

Re: [Spice-devel] [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"

2021-02-07 Thread Tong Zhang
t;> Patch is broken, it effectively makes qxl_drm_release() a nop >> because on normal driver shutdown qxl_drm_release() is called >> *after* drm_dev_unregister(). >> Cc: Tong Zhang >> Signed-off-by: Gerd Hoffmann >> --- >> drivers/gpu/drm/qxl/qxl_drv.c | 2 -

Re: [Spice-devel] [PATCH v2] drm/qxl: do not run release if qxl failed to init

2021-02-07 Thread Tong Zhang
On Feb 5, 2021, at 2:43 AM, Gerd Hoffmann wrote: > > On Thu, Feb 04, 2021 at 11:30:50AM -0500, Tong Zhang wrote: >> if qxl_device_init() fail, drm device will not be registered, >> in this case, do not run qxl_drm_release() > > How do you trigger this? > This can b

Re: [Spice-devel] [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"

2021-02-07 Thread Tong Zhang
> On Feb 4, 2021, at 2:06 PM, Thomas Zimmermann wrote: > > Hi Tong > >> I have posted an updated patch. >> The new patch use the following logic >> +if (!qdev->ddev.mode_config.funcs) >> + return; > > This is again just papering over the issue. Better don't call > qxl_drm_release()

[Spice-devel] [PATCH v2] drm/qxl: do not run release if qxl failed to init

2021-02-04 Thread Tong Zhang
: 7fa3f68bf300 R11: 0246 R12: 01e939e0 [5.273550] R13: R14: 01e93bd0 R15: 0001 [5.273928] == Signed-off-by: Tong Zhang --- v2: use qdev->ddev.mode_config.fu

[Spice-devel] [PATCH v1] drm/qxl: do not run release if qxl failed to init

2021-02-02 Thread Tong Zhang
: 7fa3f68bf300 R11: 0246 R12: 01e939e0 [5.273550] R13: R14: 01e93bd0 R15: 0001 [5.273928] == Signed-off-by: Tong Zhang --- drivers/gpu/drm/qxl/qxl_drv.c | 2 ++ 1