Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Gerd Hoffmann
> > How about using > > > > #define drm_simple_encoder_init(dev, type, name, ...) \ > > drm_encoder_init(dev, drm_simple_encoder_funcs_cleanup, type, name, > > __VA_ARGS__) > > > > instead ? > I guess you want to save a few lines in the implementation of > drm_simple_encoder_init() (?)

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Noralf Trønnes
Den 07.02.2020 09.41, skrev Thomas Zimmermann: > The simple-encoder helpers initialize an encoder with an empty > implementation. This covers the requirements of most of the existing > DRM drivers. A call to drm_simple_encoder_create() allocates and > initializes an encoder instance, a call to d

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Ville Syrjälä
On Fri, Feb 07, 2020 at 02:37:20PM +0100, Daniel Vetter wrote: > On Fri, Feb 07, 2020 at 09:41:31AM +0100, Thomas Zimmermann wrote: > > The simple-encoder helpers initialize an encoder with an empty > > implementation. This covers the requirements of most of the existing > > DRM drivers. A call to

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Daniel Vetter
On Fri, Feb 07, 2020 at 09:41:31AM +0100, Thomas Zimmermann wrote: > The simple-encoder helpers initialize an encoder with an empty > implementation. This covers the requirements of most of the existing > DRM drivers. A call to drm_simple_encoder_create() allocates and > initializes an encoder inst

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Thomas Zimmermann
Hi Am 07.02.20 um 14:37 schrieb Daniel Vetter: > On Fri, Feb 07, 2020 at 09:41:31AM +0100, Thomas Zimmermann wrote: >> The simple-encoder helpers initialize an encoder with an empty >> implementation. This covers the requirements of most of the existing >> DRM drivers. A call to drm_simple_encoder

Re: [Spice-devel] [PATCH] drm/qxl: add drm_driver.release callback.

2020-02-07 Thread Thomas Zimmermann
Hi Am 07.02.20 um 13:14 schrieb Gerd Hoffmann: > Move final cleanups to qxl_drm_release() callback. > Add drm_atomic_helper_shutdown() call to qxl_pci_remove(). > > Reorder calls in qxl_device_fini(). Cleaning up gem & ttm > might trigger qxl commands, so we should do that before > releaseing co

Re: [Spice-devel] [PATCH] drm/qxl: add drm_driver.release callback.

2020-02-07 Thread Daniel Vetter
On Fri, Feb 07, 2020 at 01:14:05PM +0100, Gerd Hoffmann wrote: > Move final cleanups to qxl_drm_release() callback. > Add drm_atomic_helper_shutdown() call to qxl_pci_remove(). > > Reorder calls in qxl_device_fini(). Cleaning up gem & ttm > might trigger qxl commands, so we should do that before

Re: [Spice-devel] how disable auto enter last user windows desktop

2020-02-07 Thread Frediano Ziglio
> hi, all, > When use spice windows vm, when I first connect spice://xxx.xxx.xxx:5901, > windows need user name and password to login, then I input user name and > password and logon。 > but I disconnect and then connect spice://xxx.xxx.xxx:5901 again, then it > does not need user name and password

[Spice-devel] [PATCH] drm/qxl: add drm_driver.release callback.

2020-02-07 Thread Gerd Hoffmann
Move final cleanups to qxl_drm_release() callback. Add drm_atomic_helper_shutdown() call to qxl_pci_remove(). Reorder calls in qxl_device_fini(). Cleaning up gem & ttm might trigger qxl commands, so we should do that before releaseing command rings. Signed-off-by: Gerd Hoffmann --- drivers/gpu

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Thomas Zimmermann
Hi Gerd Am 07.02.20 um 11:33 schrieb Gerd Hoffmann: >> +static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = { >> +.destroy = drm_encoder_cleanup, >> +}; >> + >> +/** >> + * drm_simple_encoder_init - Init a preallocated encoder >> + * @dev: drm device >> + * @funcs: callbac

Re: [Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Gerd Hoffmann
> +static const struct drm_encoder_funcs drm_simple_encoder_funcs_cleanup = { > + .destroy = drm_encoder_cleanup, > +}; > + > +/** > + * drm_simple_encoder_init - Init a preallocated encoder > + * @dev: drm device > + * @funcs: callbacks for this encoder > + * @encoder_type: user visible type o

[Spice-devel] [PATCH 5/6] drm/qxl: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_dis

[Spice-devel] [PATCH 1/6] drm: Move initialization of encoder into an internal function

2020-02-07 Thread Thomas Zimmermann
Moving encoder init code into an internal function, so it can be reused. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_encoder.c | 78 +++ 1 file changed, 52 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/dr

[Spice-devel] [PATCH 2/6] drm: Add drm_simple_encoder_{init, create}()

2020-02-07 Thread Thomas Zimmermann
The simple-encoder helpers initialize an encoder with an empty implementation. This covers the requirements of most of the existing DRM drivers. A call to drm_simple_encoder_create() allocates and initializes an encoder instance, a call to drm_simple_encoder_init() initializes a pre-allocated insta

[Spice-devel] [PATCH 4/6] drm/mgag200: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The mgag200 driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h | 7 --- drivers/gpu/drm/mgag200/mgag200_mode.c | 60 +- 2 files changed, 2 inse

[Spice-devel] [PATCH 0/6] drm: Provide a simple encoder

2020-02-07 Thread Thomas Zimmermann
Many DRM drivers implement an encoder with an empty implementation. This patchset adds drm_simple_encoder_init() and drm_simple_encoder_create(), which can be used by drivers instead. Except for the destroy callback, the simple encoder's implementation is empty. The patchset also converts 4 encode

[Spice-devel] [PATCH 3/6] drm/ast: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast/ast_mode.c | 25 - 2 files changed, 9 insertions(+), 22 dele

[Spice-devel] [PATCH 6/6] drm/simple-pipe: Use simple encoder

2020-02-07 Thread Thomas Zimmermann
The simple-pipe helpers use an empty implementation for the encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_simple_kms_helper.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_simp

[Spice-devel] how disable auto enter last user windows desktop

2020-02-07 Thread franklin zhou
hi, all, When use spice windows vm, when I first connect spice://xxx.xxx.xxx:5901, windows need user name and password to login, then I input user name and password and logon。 but I disconnect and then connect spice://xxx.xxx.xxx:5901 again, then it does not need user name and password, it di