All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xen,input: xen-kbdfront pointing device resolution support
@ 2017-03-21 17:19 ` Juergen Gross
  0 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-03-21 17:19 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov, Juergen Gross

As my patch tying the resolution of the xen pointing device to that of
the framebuffer wasn't accepted add support for different resolutions
via a module parameter.

Another possibility would be to set parameters via Xenstore, but this
is broken (patch 2 fixes that) and not yet supported by Xen tools.

Juergen Gross (2):
  xen,input: add xen-kbdfront module parameter for setting resolution
  xen,input: repair xen-kbdfront resolution setting via xenstore

 drivers/input/misc/xen-kbdfront.c | 42 ++++++++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 14 deletions(-)

-- 
2.10.2

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/2] xen, input: xen-kbdfront pointing device resolution support
@ 2017-03-21 17:19 ` Juergen Gross
  0 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-03-21 17:19 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input; +Cc: Juergen Gross, dmitry.torokhov

As my patch tying the resolution of the xen pointing device to that of
the framebuffer wasn't accepted add support for different resolutions
via a module parameter.

Another possibility would be to set parameters via Xenstore, but this
is broken (patch 2 fixes that) and not yet supported by Xen tools.

Juergen Gross (2):
  xen,input: add xen-kbdfront module parameter for setting resolution
  xen,input: repair xen-kbdfront resolution setting via xenstore

 drivers/input/misc/xen-kbdfront.c | 42 ++++++++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 14 deletions(-)

-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/2] xen,input: add xen-kbdfront module parameter for setting resolution
  2017-03-21 17:19 ` [PATCH 0/2] xen, input: " Juergen Gross
@ 2017-03-21 17:19   ` Juergen Gross
  -1 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-03-21 17:19 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov, Juergen Gross

Add a parameter for setting the resolution of xen-kbdfront in order to
be able to cope with a (virtual) frame buffer of arbitrary resolution.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index 3900875..2df5678 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -41,6 +41,12 @@ struct xenkbd_info {
 	char phys[32];
 };
 
+enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
+static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
+module_param_array(size, int, NULL, 0444);
+MODULE_PARM_DESC(size,
+	"Pointing device width, height in pixels (default 800,600)");
+
 static int xenkbd_remove(struct xenbus_device *);
 static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
 static void xenkbd_disconnect_backend(struct xenkbd_info *);
@@ -174,8 +180,8 @@ static int xenkbd_probe(struct xenbus_device *dev,
 
 	if (abs) {
 		__set_bit(EV_ABS, ptr->evbit);
-		input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
-		input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
+		input_set_abs_params(ptr, ABS_X, 0, size[KPARAM_WIDTH], 0, 0);
+		input_set_abs_params(ptr, ABS_Y, 0, size[KPARAM_HEIGHT], 0, 0);
 	} else {
 		input_set_capability(ptr, EV_REL, REL_X);
 		input_set_capability(ptr, EV_REL, REL_Y);
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
@ 2017-03-21 17:19   ` Juergen Gross
  0 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-03-21 17:19 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input; +Cc: Juergen Gross, dmitry.torokhov

Add a parameter for setting the resolution of xen-kbdfront in order to
be able to cope with a (virtual) frame buffer of arbitrary resolution.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index 3900875..2df5678 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -41,6 +41,12 @@ struct xenkbd_info {
 	char phys[32];
 };
 
+enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
+static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
+module_param_array(size, int, NULL, 0444);
+MODULE_PARM_DESC(size,
+	"Pointing device width, height in pixels (default 800,600)");
+
 static int xenkbd_remove(struct xenbus_device *);
 static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
 static void xenkbd_disconnect_backend(struct xenkbd_info *);
@@ -174,8 +180,8 @@ static int xenkbd_probe(struct xenbus_device *dev,
 
 	if (abs) {
 		__set_bit(EV_ABS, ptr->evbit);
-		input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
-		input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
+		input_set_abs_params(ptr, ABS_X, 0, size[KPARAM_WIDTH], 0, 0);
+		input_set_abs_params(ptr, ABS_Y, 0, size[KPARAM_HEIGHT], 0, 0);
 	} else {
 		input_set_capability(ptr, EV_REL, REL_X);
 		input_set_capability(ptr, EV_REL, REL_Y);
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/2] xen,input: repair xen-kbdfront resolution setting via xenstore
  2017-03-21 17:19 ` [PATCH 0/2] xen, input: " Juergen Gross
@ 2017-03-21 17:19   ` Juergen Gross
  -1 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-03-21 17:19 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov, Juergen Gross, stable

Setting the pointing device resolution via Xenstore isn't working
reliably: in case XenbusStateInitWait has been missed the resolution
settings won't be read. Correct this.

Cc: stable@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/input/misc/xen-kbdfront.c | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index 2df5678..7585fa4 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -312,11 +312,27 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
 	info->gref = -1;
 }
 
+static void xenkbd_set_connected(struct xenbus_device *dev)
+{
+	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
+	int ret;
+
+	if (xenbus_read_unsigned(info->xbdev->otherend,
+				 "feature-abs-pointer", 0)) {
+		ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
+				   "request-abs-pointer", "1");
+		if (ret)
+			pr_warn("xenkbd: can't request abs-pointer");
+	}
+
+	xenbus_switch_state(dev, XenbusStateConnected);
+}
+
 static void xenkbd_backend_changed(struct xenbus_device *dev,
 				   enum xenbus_state backend_state)
 {
 	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
-	int ret, val;
+	int val;
 
 	switch (backend_state) {
 	case XenbusStateInitialising:
@@ -327,16 +343,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
 		break;
 
 	case XenbusStateInitWait:
-InitWait:
-		if (xenbus_read_unsigned(info->xbdev->otherend,
-					 "feature-abs-pointer", 0)) {
-			ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
-					   "request-abs-pointer", "1");
-			if (ret)
-				pr_warning("xenkbd: can't request abs-pointer");
-		}
-
-		xenbus_switch_state(dev, XenbusStateConnected);
+		xenkbd_set_connected(dev);
 		break;
 
 	case XenbusStateConnected:
@@ -346,7 +353,8 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
 		 * get Connected twice here.
 		 */
 		if (dev->state != XenbusStateConnected)
-			goto InitWait; /* no InitWait seen yet, fudge it */
+			/* No InitWait seen yet, fudge it. */
+			xenkbd_set_connected(dev);
 
 		/* Set input abs params to match backend screen res */
 		if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/2] xen, input: repair xen-kbdfront resolution setting via xenstore
@ 2017-03-21 17:19   ` Juergen Gross
  0 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-03-21 17:19 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input
  Cc: Juergen Gross, dmitry.torokhov, stable

Setting the pointing device resolution via Xenstore isn't working
reliably: in case XenbusStateInitWait has been missed the resolution
settings won't be read. Correct this.

Cc: stable@vger.kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 drivers/input/misc/xen-kbdfront.c | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index 2df5678..7585fa4 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -312,11 +312,27 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
 	info->gref = -1;
 }
 
+static void xenkbd_set_connected(struct xenbus_device *dev)
+{
+	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
+	int ret;
+
+	if (xenbus_read_unsigned(info->xbdev->otherend,
+				 "feature-abs-pointer", 0)) {
+		ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
+				   "request-abs-pointer", "1");
+		if (ret)
+			pr_warn("xenkbd: can't request abs-pointer");
+	}
+
+	xenbus_switch_state(dev, XenbusStateConnected);
+}
+
 static void xenkbd_backend_changed(struct xenbus_device *dev,
 				   enum xenbus_state backend_state)
 {
 	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
-	int ret, val;
+	int val;
 
 	switch (backend_state) {
 	case XenbusStateInitialising:
@@ -327,16 +343,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
 		break;
 
 	case XenbusStateInitWait:
-InitWait:
-		if (xenbus_read_unsigned(info->xbdev->otherend,
-					 "feature-abs-pointer", 0)) {
-			ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
-					   "request-abs-pointer", "1");
-			if (ret)
-				pr_warning("xenkbd: can't request abs-pointer");
-		}
-
-		xenbus_switch_state(dev, XenbusStateConnected);
+		xenkbd_set_connected(dev);
 		break;
 
 	case XenbusStateConnected:
@@ -346,7 +353,8 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
 		 * get Connected twice here.
 		 */
 		if (dev->state != XenbusStateConnected)
-			goto InitWait; /* no InitWait seen yet, fudge it */
+			/* No InitWait seen yet, fudge it. */
+			xenkbd_set_connected(dev);
 
 		/* Set input abs params to match backend screen res */
 		if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
-- 
2.10.2


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/2] xen,input: xen-kbdfront pointing device resolution support
  2017-03-21 17:19 ` [PATCH 0/2] xen, input: " Juergen Gross
                   ` (3 preceding siblings ...)
  (?)
@ 2017-04-04 11:58 ` Juergen Gross
  2017-04-07 13:45   ` [Xen-devel] [PATCH 0/2] xen, input: " Oleksandr Andrushchenko
  2017-04-07 13:45   ` Oleksandr Andrushchenko
  -1 siblings, 2 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-04 11:58 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input, dmitry.torokhov

On 21/03/17 18:19, Juergen Gross wrote:
> As my patch tying the resolution of the xen pointing device to that of
> the framebuffer wasn't accepted add support for different resolutions
> via a module parameter.
> 
> Another possibility would be to set parameters via Xenstore, but this
> is broken (patch 2 fixes that) and not yet supported by Xen tools.
> 
> Juergen Gross (2):
>   xen,input: add xen-kbdfront module parameter for setting resolution
>   xen,input: repair xen-kbdfront resolution setting via xenstore
> 
>  drivers/input/misc/xen-kbdfront.c | 42 ++++++++++++++++++++++++++-------------
>  1 file changed, 28 insertions(+), 14 deletions(-)
> 

Ping?


Juergen

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/2] xen, input: xen-kbdfront pointing device resolution support
  2017-03-21 17:19 ` [PATCH 0/2] xen, input: " Juergen Gross
                   ` (2 preceding siblings ...)
  (?)
@ 2017-04-04 11:58 ` Juergen Gross
  -1 siblings, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-04 11:58 UTC (permalink / raw)
  To: linux-kernel, xen-devel, linux-input, dmitry.torokhov

On 21/03/17 18:19, Juergen Gross wrote:
> As my patch tying the resolution of the xen pointing device to that of
> the framebuffer wasn't accepted add support for different resolutions
> via a module parameter.
> 
> Another possibility would be to set parameters via Xenstore, but this
> is broken (patch 2 fixes that) and not yet supported by Xen tools.
> 
> Juergen Gross (2):
>   xen,input: add xen-kbdfront module parameter for setting resolution
>   xen,input: repair xen-kbdfront resolution setting via xenstore
> 
>  drivers/input/misc/xen-kbdfront.c | 42 ++++++++++++++++++++++++++-------------
>  1 file changed, 28 insertions(+), 14 deletions(-)
> 

Ping?


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 0/2] xen, input: xen-kbdfront pointing device resolution support
  2017-04-04 11:58 ` [PATCH 0/2] xen,input: " Juergen Gross
@ 2017-04-07 13:45   ` Oleksandr Andrushchenko
  2017-04-07 13:45   ` Oleksandr Andrushchenko
  1 sibling, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-07 13:45 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input, dmitry.torokhov

Hi, all and ping2

I am also interested in the destiny of this patch

as I am planning to base multi-touch support on it

Dmitry, I would appreciate if you could review the patch

as it is hanging around for quite a while now

Thank you,
Oleksandr

On 04/04/2017 02:58 PM, Juergen Gross wrote:
> On 21/03/17 18:19, Juergen Gross wrote:
>> As my patch tying the resolution of the xen pointing device to that of
>> the framebuffer wasn't accepted add support for different resolutions
>> via a module parameter.
>>
>> Another possibility would be to set parameters via Xenstore, but this
>> is broken (patch 2 fixes that) and not yet supported by Xen tools.
>>
>> Juergen Gross (2):
>>    xen,input: add xen-kbdfront module parameter for setting resolution
>>    xen,input: repair xen-kbdfront resolution setting via xenstore
>>
>>   drivers/input/misc/xen-kbdfront.c | 42 ++++++++++++++++++++++++++-------------
>>   1 file changed, 28 insertions(+), 14 deletions(-)
>>
> Ping?
>
>
> Juergen
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/2] xen, input: xen-kbdfront pointing device resolution support
  2017-04-04 11:58 ` [PATCH 0/2] xen,input: " Juergen Gross
  2017-04-07 13:45   ` [Xen-devel] [PATCH 0/2] xen, input: " Oleksandr Andrushchenko
@ 2017-04-07 13:45   ` Oleksandr Andrushchenko
  1 sibling, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-07 13:45 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input, dmitry.torokhov

Hi, all and ping2

I am also interested in the destiny of this patch

as I am planning to base multi-touch support on it

Dmitry, I would appreciate if you could review the patch

as it is hanging around for quite a while now

Thank you,
Oleksandr

On 04/04/2017 02:58 PM, Juergen Gross wrote:
> On 21/03/17 18:19, Juergen Gross wrote:
>> As my patch tying the resolution of the xen pointing device to that of
>> the framebuffer wasn't accepted add support for different resolutions
>> via a module parameter.
>>
>> Another possibility would be to set parameters via Xenstore, but this
>> is broken (patch 2 fixes that) and not yet supported by Xen tools.
>>
>> Juergen Gross (2):
>>    xen,input: add xen-kbdfront module parameter for setting resolution
>>    xen,input: repair xen-kbdfront resolution setting via xenstore
>>
>>   drivers/input/misc/xen-kbdfront.c | 42 ++++++++++++++++++++++++++-------------
>>   1 file changed, 28 insertions(+), 14 deletions(-)
>>
> Ping?
>
>
> Juergen
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-03-21 17:19   ` [PATCH 1/2] xen, input: " Juergen Gross
  (?)
  (?)
@ 2017-04-10 13:44   ` Oleksandr Andrushchenko
  2017-04-10 13:50     ` Juergen Gross
  2017-04-10 13:50     ` [Xen-devel] " Juergen Gross
  -1 siblings, 2 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 13:44 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov

Hi, Juergen!

On 03/21/2017 07:19 PM, Juergen Gross wrote:
> Add a parameter for setting the resolution of xen-kbdfront in order to
> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>   drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
> index 3900875..2df5678 100644
> --- a/drivers/input/misc/xen-kbdfront.c
> +++ b/drivers/input/misc/xen-kbdfront.c
> @@ -41,6 +41,12 @@ struct xenkbd_info {
>   	char phys[32];
>   };
>   
> +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
> +module_param_array(size, int, NULL, 0444);
is this by intention that you use 0444 here?
It means read-only, thus one cannot change these,
so what is the point of the module parameters then?
> +MODULE_PARM_DESC(size,
> +	"Pointing device width, height in pixels (default 800,600)");
> +
>   static int xenkbd_remove(struct xenbus_device *);
>   static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
>   static void xenkbd_disconnect_backend(struct xenkbd_info *);
> @@ -174,8 +180,8 @@ static int xenkbd_probe(struct xenbus_device *dev,
>   
>   	if (abs) {
>   		__set_bit(EV_ABS, ptr->evbit);
> -		input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
> -		input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
> +		input_set_abs_params(ptr, ABS_X, 0, size[KPARAM_WIDTH], 0, 0);
> +		input_set_abs_params(ptr, ABS_Y, 0, size[KPARAM_HEIGHT], 0, 0);
>   	} else {
>   		input_set_capability(ptr, EV_REL, REL_X);
>   		input_set_capability(ptr, EV_REL, REL_Y);
Thank you,
Oleksandr

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-03-21 17:19   ` [PATCH 1/2] xen, input: " Juergen Gross
  (?)
@ 2017-04-10 13:44   ` Oleksandr Andrushchenko
  -1 siblings, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 13:44 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov

Hi, Juergen!

On 03/21/2017 07:19 PM, Juergen Gross wrote:
> Add a parameter for setting the resolution of xen-kbdfront in order to
> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>   drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
> index 3900875..2df5678 100644
> --- a/drivers/input/misc/xen-kbdfront.c
> +++ b/drivers/input/misc/xen-kbdfront.c
> @@ -41,6 +41,12 @@ struct xenkbd_info {
>   	char phys[32];
>   };
>   
> +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
> +module_param_array(size, int, NULL, 0444);
is this by intention that you use 0444 here?
It means read-only, thus one cannot change these,
so what is the point of the module parameters then?
> +MODULE_PARM_DESC(size,
> +	"Pointing device width, height in pixels (default 800,600)");
> +
>   static int xenkbd_remove(struct xenbus_device *);
>   static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
>   static void xenkbd_disconnect_backend(struct xenkbd_info *);
> @@ -174,8 +180,8 @@ static int xenkbd_probe(struct xenbus_device *dev,
>   
>   	if (abs) {
>   		__set_bit(EV_ABS, ptr->evbit);
> -		input_set_abs_params(ptr, ABS_X, 0, XENFB_WIDTH, 0, 0);
> -		input_set_abs_params(ptr, ABS_Y, 0, XENFB_HEIGHT, 0, 0);
> +		input_set_abs_params(ptr, ABS_X, 0, size[KPARAM_WIDTH], 0, 0);
> +		input_set_abs_params(ptr, ABS_Y, 0, size[KPARAM_HEIGHT], 0, 0);
>   	} else {
>   		input_set_capability(ptr, EV_REL, REL_X);
>   		input_set_capability(ptr, EV_REL, REL_Y);
Thank you,
Oleksandr

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 13:44   ` [Xen-devel] " Oleksandr Andrushchenko
  2017-04-10 13:50     ` Juergen Gross
@ 2017-04-10 13:50     ` Juergen Gross
  2017-04-10 14:00       ` Oleksandr Andrushchenko
  2017-04-10 14:00       ` [Xen-devel] " Oleksandr Andrushchenko
  1 sibling, 2 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-10 13:50 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov

On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
> Hi, Juergen!
> 
> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>> Add a parameter for setting the resolution of xen-kbdfront in order to
>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>   drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/misc/xen-kbdfront.c
>> b/drivers/input/misc/xen-kbdfront.c
>> index 3900875..2df5678 100644
>> --- a/drivers/input/misc/xen-kbdfront.c
>> +++ b/drivers/input/misc/xen-kbdfront.c
>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>       char phys[32];
>>   };
>>   +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>> +module_param_array(size, int, NULL, 0444);
> is this by intention that you use 0444 here?
> It means read-only, thus one cannot change these,
> so what is the point of the module parameters then?

You can see the settings in sysfs.

The values are settable via boot parameter.


Juergen

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 13:44   ` [Xen-devel] " Oleksandr Andrushchenko
@ 2017-04-10 13:50     ` Juergen Gross
  2017-04-10 13:50     ` [Xen-devel] " Juergen Gross
  1 sibling, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-10 13:50 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov

On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
> Hi, Juergen!
> 
> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>> Add a parameter for setting the resolution of xen-kbdfront in order to
>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>>   drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/misc/xen-kbdfront.c
>> b/drivers/input/misc/xen-kbdfront.c
>> index 3900875..2df5678 100644
>> --- a/drivers/input/misc/xen-kbdfront.c
>> +++ b/drivers/input/misc/xen-kbdfront.c
>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>       char phys[32];
>>   };
>>   +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>> +module_param_array(size, int, NULL, 0444);
> is this by intention that you use 0444 here?
> It means read-only, thus one cannot change these,
> so what is the point of the module parameters then?

You can see the settings in sysfs.

The values are settable via boot parameter.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 13:50     ` [Xen-devel] " Juergen Gross
  2017-04-10 14:00       ` Oleksandr Andrushchenko
@ 2017-04-10 14:00       ` Oleksandr Andrushchenko
  2017-04-10 14:11         ` Juergen Gross
  2017-04-10 14:11         ` Juergen Gross
  1 sibling, 2 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 14:00 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov



On 04/10/2017 04:50 PM, Juergen Gross wrote:
> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>> Hi, Juergen!
>>
>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>> Add a parameter for setting the resolution of xen-kbdfront in order to
>>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>>    drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>    1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>> b/drivers/input/misc/xen-kbdfront.c
>>> index 3900875..2df5678 100644
>>> --- a/drivers/input/misc/xen-kbdfront.c
>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>        char phys[32];
>>>    };
>>>    +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>> +module_param_array(size, int, NULL, 0444);
>> is this by intention that you use 0444 here?
>> It means read-only, thus one cannot change these,
>> so what is the point of the module parameters then?
> You can see the settings in sysfs.
this is good so we can see actual width/height
used by the pv driver
> The values are settable via boot parameter.
but then, if one has other values set in XenStore,
these will/may be overridden, making it inconsistent,
e.g. values loaded at start as module parameters
(*size* array) is not going to be updated on
XenbusStateInitWait/XenbusStateConnected. So, we'll
end up with wrong parameters shown via sysfs
one more question is why do we need module parameters
if the same can be read from XenStore?

>
> Juergen
Thank you,
Oleksandr

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 13:50     ` [Xen-devel] " Juergen Gross
@ 2017-04-10 14:00       ` Oleksandr Andrushchenko
  2017-04-10 14:00       ` [Xen-devel] " Oleksandr Andrushchenko
  1 sibling, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 14:00 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov



On 04/10/2017 04:50 PM, Juergen Gross wrote:
> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>> Hi, Juergen!
>>
>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>> Add a parameter for setting the resolution of xen-kbdfront in order to
>>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>>    drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>    1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>> b/drivers/input/misc/xen-kbdfront.c
>>> index 3900875..2df5678 100644
>>> --- a/drivers/input/misc/xen-kbdfront.c
>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>        char phys[32];
>>>    };
>>>    +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>> +module_param_array(size, int, NULL, 0444);
>> is this by intention that you use 0444 here?
>> It means read-only, thus one cannot change these,
>> so what is the point of the module parameters then?
> You can see the settings in sysfs.
this is good so we can see actual width/height
used by the pv driver
> The values are settable via boot parameter.
but then, if one has other values set in XenStore,
these will/may be overridden, making it inconsistent,
e.g. values loaded at start as module parameters
(*size* array) is not going to be updated on
XenbusStateInitWait/XenbusStateConnected. So, we'll
end up with wrong parameters shown via sysfs
one more question is why do we need module parameters
if the same can be read from XenStore?

>
> Juergen
Thank you,
Oleksandr

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 14:00       ` [Xen-devel] " Oleksandr Andrushchenko
@ 2017-04-10 14:11         ` Juergen Gross
  2017-04-10 14:18           ` Oleksandr Andrushchenko
  2017-04-10 14:18           ` Oleksandr Andrushchenko
  2017-04-10 14:11         ` Juergen Gross
  1 sibling, 2 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-10 14:11 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov

On 10/04/17 16:00, Oleksandr Andrushchenko wrote:
> 
> 
> On 04/10/2017 04:50 PM, Juergen Gross wrote:
>> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>>> Hi, Juergen!
>>>
>>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>>> Add a parameter for setting the resolution of xen-kbdfront in order to
>>>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> ---
>>>>    drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>>    1 file changed, 8 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>>> b/drivers/input/misc/xen-kbdfront.c
>>>> index 3900875..2df5678 100644
>>>> --- a/drivers/input/misc/xen-kbdfront.c
>>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>>        char phys[32];
>>>>    };
>>>>    +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>>> +module_param_array(size, int, NULL, 0444);
>>> is this by intention that you use 0444 here?
>>> It means read-only, thus one cannot change these,
>>> so what is the point of the module parameters then?
>> You can see the settings in sysfs.
> this is good so we can see actual width/height
> used by the pv driver
>> The values are settable via boot parameter.
> but then, if one has other values set in XenStore,
> these will/may be overridden, making it inconsistent,
> e.g. values loaded at start as module parameters
> (*size* array) is not going to be updated on
> XenbusStateInitWait/XenbusStateConnected. So, we'll
> end up with wrong parameters shown via sysfs
> one more question is why do we need module parameters
> if the same can be read from XenStore?

Because up to now nobody is setting the Xenstore values. This is
something I'm planning to do for Xen 4.10. Up to then we need a
workaround.

But you are right: The module parameters should be updated with
the values read from Xenstore.


Juergen

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 14:00       ` [Xen-devel] " Oleksandr Andrushchenko
  2017-04-10 14:11         ` Juergen Gross
@ 2017-04-10 14:11         ` Juergen Gross
  1 sibling, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-10 14:11 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov

On 10/04/17 16:00, Oleksandr Andrushchenko wrote:
> 
> 
> On 04/10/2017 04:50 PM, Juergen Gross wrote:
>> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>>> Hi, Juergen!
>>>
>>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>>> Add a parameter for setting the resolution of xen-kbdfront in order to
>>>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> ---
>>>>    drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>>    1 file changed, 8 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>>> b/drivers/input/misc/xen-kbdfront.c
>>>> index 3900875..2df5678 100644
>>>> --- a/drivers/input/misc/xen-kbdfront.c
>>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>>        char phys[32];
>>>>    };
>>>>    +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>>> +module_param_array(size, int, NULL, 0444);
>>> is this by intention that you use 0444 here?
>>> It means read-only, thus one cannot change these,
>>> so what is the point of the module parameters then?
>> You can see the settings in sysfs.
> this is good so we can see actual width/height
> used by the pv driver
>> The values are settable via boot parameter.
> but then, if one has other values set in XenStore,
> these will/may be overridden, making it inconsistent,
> e.g. values loaded at start as module parameters
> (*size* array) is not going to be updated on
> XenbusStateInitWait/XenbusStateConnected. So, we'll
> end up with wrong parameters shown via sysfs
> one more question is why do we need module parameters
> if the same can be read from XenStore?

Because up to now nobody is setting the Xenstore values. This is
something I'm planning to do for Xen 4.10. Up to then we need a
workaround.

But you are right: The module parameters should be updated with
the values read from Xenstore.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 14:11         ` Juergen Gross
@ 2017-04-10 14:18           ` Oleksandr Andrushchenko
  2017-04-11  8:54             ` Juergen Gross
  2017-04-11  8:54             ` [Xen-devel] " Juergen Gross
  2017-04-10 14:18           ` Oleksandr Andrushchenko
  1 sibling, 2 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 14:18 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov

On 04/10/2017 05:11 PM, Juergen Gross wrote:
> On 10/04/17 16:00, Oleksandr Andrushchenko wrote:
>>
>> On 04/10/2017 04:50 PM, Juergen Gross wrote:
>>> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>>>> Hi, Juergen!
>>>>
>>>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>>>> Add a parameter for setting the resolution of xen-kbdfront in order to
>>>>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>> ---
>>>>>     drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>>>     1 file changed, 8 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>>>> b/drivers/input/misc/xen-kbdfront.c
>>>>> index 3900875..2df5678 100644
>>>>> --- a/drivers/input/misc/xen-kbdfront.c
>>>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>>>         char phys[32];
>>>>>     };
>>>>>     +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>>>> +module_param_array(size, int, NULL, 0444);
>>>> is this by intention that you use 0444 here?
>>>> It means read-only, thus one cannot change these,
>>>> so what is the point of the module parameters then?
>>> You can see the settings in sysfs.
>> this is good so we can see actual width/height
>> used by the pv driver
>>> The values are settable via boot parameter.
>> but then, if one has other values set in XenStore,
>> these will/may be overridden, making it inconsistent,
>> e.g. values loaded at start as module parameters
>> (*size* array) is not going to be updated on
>> XenbusStateInitWait/XenbusStateConnected. So, we'll
>> end up with wrong parameters shown via sysfs
>> one more question is why do we need module parameters
>> if the same can be read from XenStore?
> Because up to now nobody is setting the Xenstore values. This is
> something I'm planning to do for Xen 4.10.
ah, good to know. btw, if you are about to add
width/height for the pointer device will you also add
the same for multi-touch?
>   Up to then we need a
> workaround.
>
> But you are right: The module parameters should be updated with
> the values read from Xenstore.
>
>
> Juergen

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 14:11         ` Juergen Gross
  2017-04-10 14:18           ` Oleksandr Andrushchenko
@ 2017-04-10 14:18           ` Oleksandr Andrushchenko
  1 sibling, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 14:18 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input; +Cc: dmitry.torokhov

On 04/10/2017 05:11 PM, Juergen Gross wrote:
> On 10/04/17 16:00, Oleksandr Andrushchenko wrote:
>>
>> On 04/10/2017 04:50 PM, Juergen Gross wrote:
>>> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>>>> Hi, Juergen!
>>>>
>>>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>>>> Add a parameter for setting the resolution of xen-kbdfront in order to
>>>>> be able to cope with a (virtual) frame buffer of arbitrary resolution.
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>> ---
>>>>>     drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>>>     1 file changed, 8 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>>>> b/drivers/input/misc/xen-kbdfront.c
>>>>> index 3900875..2df5678 100644
>>>>> --- a/drivers/input/misc/xen-kbdfront.c
>>>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>>>         char phys[32];
>>>>>     };
>>>>>     +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>>>> +module_param_array(size, int, NULL, 0444);
>>>> is this by intention that you use 0444 here?
>>>> It means read-only, thus one cannot change these,
>>>> so what is the point of the module parameters then?
>>> You can see the settings in sysfs.
>> this is good so we can see actual width/height
>> used by the pv driver
>>> The values are settable via boot parameter.
>> but then, if one has other values set in XenStore,
>> these will/may be overridden, making it inconsistent,
>> e.g. values loaded at start as module parameters
>> (*size* array) is not going to be updated on
>> XenbusStateInitWait/XenbusStateConnected. So, we'll
>> end up with wrong parameters shown via sysfs
>> one more question is why do we need module parameters
>> if the same can be read from XenStore?
> Because up to now nobody is setting the Xenstore values. This is
> something I'm planning to do for Xen 4.10.
ah, good to know. btw, if you are about to add
width/height for the pointer device will you also add
the same for multi-touch?
>   Up to then we need a
> workaround.
>
> But you are right: The module parameters should be updated with
> the values read from Xenstore.
>
>
> Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 2/2] xen, input: repair xen-kbdfront resolution setting via xenstore
  2017-03-21 17:19   ` [PATCH 2/2] xen, input: " Juergen Gross
  (?)
@ 2017-04-10 14:20   ` Oleksandr Andrushchenko
  -1 siblings, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 14:20 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov, stable

On 03/21/2017 07:19 PM, Juergen Gross wrote:
> Setting the pointing device resolution via Xenstore isn't working
> reliably: in case XenbusStateInitWait has been missed the resolution
> settings won't be read. Correct this.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>   drivers/input/misc/xen-kbdfront.c | 32 ++++++++++++++++++++------------
>   1 file changed, 20 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
> index 2df5678..7585fa4 100644
> --- a/drivers/input/misc/xen-kbdfront.c
> +++ b/drivers/input/misc/xen-kbdfront.c
> @@ -312,11 +312,27 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
>   	info->gref = -1;
>   }
>   
> +static void xenkbd_set_connected(struct xenbus_device *dev)
> +{
> +	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
> +	int ret;
> +
> +	if (xenbus_read_unsigned(info->xbdev->otherend,
> +				 "feature-abs-pointer", 0)) {
> +		ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
> +				   "request-abs-pointer", "1");
> +		if (ret)
> +			pr_warn("xenkbd: can't request abs-pointer");
> +	}
> +
> +	xenbus_switch_state(dev, XenbusStateConnected);
> +}
> +
>   static void xenkbd_backend_changed(struct xenbus_device *dev,
>   				   enum xenbus_state backend_state)
>   {
>   	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
> -	int ret, val;
> +	int val;
>   
>   	switch (backend_state) {
>   	case XenbusStateInitialising:
> @@ -327,16 +343,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
>   		break;
>   
>   	case XenbusStateInitWait:
> -InitWait:
> -		if (xenbus_read_unsigned(info->xbdev->otherend,
> -					 "feature-abs-pointer", 0)) {
> -			ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
> -					   "request-abs-pointer", "1");
> -			if (ret)
> -				pr_warning("xenkbd: can't request abs-pointer");
> -		}
> -
> -		xenbus_switch_state(dev, XenbusStateConnected);
> +		xenkbd_set_connected(dev);
>   		break;
>   
>   	case XenbusStateConnected:
> @@ -346,7 +353,8 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
>   		 * get Connected twice here.
>   		 */
>   		if (dev->state != XenbusStateConnected)
> -			goto InitWait; /* no InitWait seen yet, fudge it */
> +			/* No InitWait seen yet, fudge it. */
> +			xenkbd_set_connected(dev);
>   
>   		/* Set input abs params to match backend screen res */
>   		if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/2] xen, input: repair xen-kbdfront resolution setting via xenstore
  2017-03-21 17:19   ` [PATCH 2/2] xen, input: " Juergen Gross
  (?)
  (?)
@ 2017-04-10 14:20   ` Oleksandr Andrushchenko
  -1 siblings, 0 replies; 24+ messages in thread
From: Oleksandr Andrushchenko @ 2017-04-10 14:20 UTC (permalink / raw)
  To: Juergen Gross, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov, stable

On 03/21/2017 07:19 PM, Juergen Gross wrote:
> Setting the pointing device resolution via Xenstore isn't working
> reliably: in case XenbusStateInitWait has been missed the resolution
> settings won't be read. Correct this.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>   drivers/input/misc/xen-kbdfront.c | 32 ++++++++++++++++++++------------
>   1 file changed, 20 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
> index 2df5678..7585fa4 100644
> --- a/drivers/input/misc/xen-kbdfront.c
> +++ b/drivers/input/misc/xen-kbdfront.c
> @@ -312,11 +312,27 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
>   	info->gref = -1;
>   }
>   
> +static void xenkbd_set_connected(struct xenbus_device *dev)
> +{
> +	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
> +	int ret;
> +
> +	if (xenbus_read_unsigned(info->xbdev->otherend,
> +				 "feature-abs-pointer", 0)) {
> +		ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
> +				   "request-abs-pointer", "1");
> +		if (ret)
> +			pr_warn("xenkbd: can't request abs-pointer");
> +	}
> +
> +	xenbus_switch_state(dev, XenbusStateConnected);
> +}
> +
>   static void xenkbd_backend_changed(struct xenbus_device *dev,
>   				   enum xenbus_state backend_state)
>   {
>   	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
> -	int ret, val;
> +	int val;
>   
>   	switch (backend_state) {
>   	case XenbusStateInitialising:
> @@ -327,16 +343,7 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
>   		break;
>   
>   	case XenbusStateInitWait:
> -InitWait:
> -		if (xenbus_read_unsigned(info->xbdev->otherend,
> -					 "feature-abs-pointer", 0)) {
> -			ret = xenbus_write(XBT_NIL, info->xbdev->nodename,
> -					   "request-abs-pointer", "1");
> -			if (ret)
> -				pr_warning("xenkbd: can't request abs-pointer");
> -		}
> -
> -		xenbus_switch_state(dev, XenbusStateConnected);
> +		xenkbd_set_connected(dev);
>   		break;
>   
>   	case XenbusStateConnected:
> @@ -346,7 +353,8 @@ static void xenkbd_backend_changed(struct xenbus_device *dev,
>   		 * get Connected twice here.
>   		 */
>   		if (dev->state != XenbusStateConnected)
> -			goto InitWait; /* no InitWait seen yet, fudge it */
> +			/* No InitWait seen yet, fudge it. */
> +			xenkbd_set_connected(dev);
>   
>   		/* Set input abs params to match backend screen res */
>   		if (xenbus_scanf(XBT_NIL, info->xbdev->otherend,
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Xen-devel] [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 14:18           ` Oleksandr Andrushchenko
  2017-04-11  8:54             ` Juergen Gross
@ 2017-04-11  8:54             ` Juergen Gross
  1 sibling, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-11  8:54 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov

On 10/04/17 16:18, Oleksandr Andrushchenko wrote:
> On 04/10/2017 05:11 PM, Juergen Gross wrote:
>> On 10/04/17 16:00, Oleksandr Andrushchenko wrote:
>>>
>>> On 04/10/2017 04:50 PM, Juergen Gross wrote:
>>>> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>>>>> Hi, Juergen!
>>>>>
>>>>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>>>>> Add a parameter for setting the resolution of xen-kbdfront in
>>>>>> order to
>>>>>> be able to cope with a (virtual) frame buffer of arbitrary
>>>>>> resolution.
>>>>>>
>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>> ---
>>>>>>     drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>>>>     1 file changed, 8 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>>>>> b/drivers/input/misc/xen-kbdfront.c
>>>>>> index 3900875..2df5678 100644
>>>>>> --- a/drivers/input/misc/xen-kbdfront.c
>>>>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>>>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>>>>         char phys[32];
>>>>>>     };
>>>>>>     +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>>>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>>>>> +module_param_array(size, int, NULL, 0444);
>>>>> is this by intention that you use 0444 here?
>>>>> It means read-only, thus one cannot change these,
>>>>> so what is the point of the module parameters then?
>>>> You can see the settings in sysfs.
>>> this is good so we can see actual width/height
>>> used by the pv driver
>>>> The values are settable via boot parameter.
>>> but then, if one has other values set in XenStore,
>>> these will/may be overridden, making it inconsistent,
>>> e.g. values loaded at start as module parameters
>>> (*size* array) is not going to be updated on
>>> XenbusStateInitWait/XenbusStateConnected. So, we'll
>>> end up with wrong parameters shown via sysfs
>>> one more question is why do we need module parameters
>>> if the same can be read from XenStore?
>> Because up to now nobody is setting the Xenstore values. This is
>> something I'm planning to do for Xen 4.10.
> ah, good to know. btw, if you are about to add
> width/height for the pointer device will you also add
> the same for multi-touch?

My plan is to add a way to set the resolution of the graphical
console. This will set framebuffer and pointing device resolution in
Xenstore. In case the pointing device is multi-touch the setting
should be done for that device, too.


Juergen

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 1/2] xen, input: add xen-kbdfront module parameter for setting resolution
  2017-04-10 14:18           ` Oleksandr Andrushchenko
@ 2017-04-11  8:54             ` Juergen Gross
  2017-04-11  8:54             ` [Xen-devel] " Juergen Gross
  1 sibling, 0 replies; 24+ messages in thread
From: Juergen Gross @ 2017-04-11  8:54 UTC (permalink / raw)
  To: Oleksandr Andrushchenko, linux-kernel, xen-devel, linux-input
  Cc: dmitry.torokhov

On 10/04/17 16:18, Oleksandr Andrushchenko wrote:
> On 04/10/2017 05:11 PM, Juergen Gross wrote:
>> On 10/04/17 16:00, Oleksandr Andrushchenko wrote:
>>>
>>> On 04/10/2017 04:50 PM, Juergen Gross wrote:
>>>> On 10/04/17 15:44, Oleksandr Andrushchenko wrote:
>>>>> Hi, Juergen!
>>>>>
>>>>> On 03/21/2017 07:19 PM, Juergen Gross wrote:
>>>>>> Add a parameter for setting the resolution of xen-kbdfront in
>>>>>> order to
>>>>>> be able to cope with a (virtual) frame buffer of arbitrary
>>>>>> resolution.
>>>>>>
>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>> ---
>>>>>>     drivers/input/misc/xen-kbdfront.c | 10 ++++++++--
>>>>>>     1 file changed, 8 insertions(+), 2 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>>>>> b/drivers/input/misc/xen-kbdfront.c
>>>>>> index 3900875..2df5678 100644
>>>>>> --- a/drivers/input/misc/xen-kbdfront.c
>>>>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>>>>> @@ -41,6 +41,12 @@ struct xenkbd_info {
>>>>>>         char phys[32];
>>>>>>     };
>>>>>>     +enum { KPARAM_WIDTH, KPARAM_HEIGHT, KPARAM_CNT };
>>>>>> +static int size[KPARAM_CNT] = { XENFB_WIDTH, XENFB_HEIGHT };
>>>>>> +module_param_array(size, int, NULL, 0444);
>>>>> is this by intention that you use 0444 here?
>>>>> It means read-only, thus one cannot change these,
>>>>> so what is the point of the module parameters then?
>>>> You can see the settings in sysfs.
>>> this is good so we can see actual width/height
>>> used by the pv driver
>>>> The values are settable via boot parameter.
>>> but then, if one has other values set in XenStore,
>>> these will/may be overridden, making it inconsistent,
>>> e.g. values loaded at start as module parameters
>>> (*size* array) is not going to be updated on
>>> XenbusStateInitWait/XenbusStateConnected. So, we'll
>>> end up with wrong parameters shown via sysfs
>>> one more question is why do we need module parameters
>>> if the same can be read from XenStore?
>> Because up to now nobody is setting the Xenstore values. This is
>> something I'm planning to do for Xen 4.10.
> ah, good to know. btw, if you are about to add
> width/height for the pointer device will you also add
> the same for multi-touch?

My plan is to add a way to set the resolution of the graphical
console. This will set framebuffer and pointing device resolution in
Xenstore. In case the pointing device is multi-touch the setting
should be done for that device, too.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2017-04-11  8:54 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 17:19 [PATCH 0/2] xen,input: xen-kbdfront pointing device resolution support Juergen Gross
2017-03-21 17:19 ` [PATCH 0/2] xen, input: " Juergen Gross
2017-03-21 17:19 ` [PATCH 1/2] xen,input: add xen-kbdfront module parameter for setting resolution Juergen Gross
2017-03-21 17:19   ` [PATCH 1/2] xen, input: " Juergen Gross
2017-04-10 13:44   ` Oleksandr Andrushchenko
2017-04-10 13:44   ` [Xen-devel] " Oleksandr Andrushchenko
2017-04-10 13:50     ` Juergen Gross
2017-04-10 13:50     ` [Xen-devel] " Juergen Gross
2017-04-10 14:00       ` Oleksandr Andrushchenko
2017-04-10 14:00       ` [Xen-devel] " Oleksandr Andrushchenko
2017-04-10 14:11         ` Juergen Gross
2017-04-10 14:18           ` Oleksandr Andrushchenko
2017-04-11  8:54             ` Juergen Gross
2017-04-11  8:54             ` [Xen-devel] " Juergen Gross
2017-04-10 14:18           ` Oleksandr Andrushchenko
2017-04-10 14:11         ` Juergen Gross
2017-03-21 17:19 ` [PATCH 2/2] xen,input: repair xen-kbdfront resolution setting via xenstore Juergen Gross
2017-03-21 17:19   ` [PATCH 2/2] xen, input: " Juergen Gross
2017-04-10 14:20   ` [Xen-devel] " Oleksandr Andrushchenko
2017-04-10 14:20   ` Oleksandr Andrushchenko
2017-04-04 11:58 ` [PATCH 0/2] xen, input: xen-kbdfront pointing device resolution support Juergen Gross
2017-04-04 11:58 ` [PATCH 0/2] xen,input: " Juergen Gross
2017-04-07 13:45   ` [Xen-devel] [PATCH 0/2] xen, input: " Oleksandr Andrushchenko
2017-04-07 13:45   ` Oleksandr Andrushchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.