* [PATCH] xen, fbfront: add support for specifying size via xenstore
@ 2017-03-23 12:53 Juergen Gross
2017-03-23 14:13 ` Boris Ostrovsky
2017-04-05 8:18 ` Juergen Gross
0 siblings, 2 replies; 5+ messages in thread
From: Juergen Gross @ 2017-03-23 12:53 UTC (permalink / raw)
To: linux-kernel, xen-devel, linux-fbdev
Cc: b.zolnierkie, boris.ostrovsky, Juergen Gross
Today xen-fbfront supports specifying the display size via module
parameters only. Add support for specifying the size via Xenstore in
order to enable doing this easily via the domain's Xen configuration.
Add an error message in case the configured display size conflicts
with video memory size.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
drivers/video/fbdev/xen-fbfront.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
index 3ee309c..46f6396 100644
--- a/drivers/video/fbdev/xen-fbfront.c
+++ b/drivers/video/fbdev/xen-fbfront.c
@@ -18,6 +18,8 @@
* frame buffer.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/console.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -380,10 +382,18 @@ static int xenfb_probe(struct xenbus_device *dev,
video[KPARAM_MEM] = val;
}
+ video[KPARAM_WIDTH] = xenbus_read_unsigned(dev->otherend, "width",
+ video[KPARAM_WIDTH]);
+ video[KPARAM_HEIGHT] = xenbus_read_unsigned(dev->otherend, "height",
+ video[KPARAM_HEIGHT]);
+
/* If requested res does not fit in available memory, use default */
fb_size = video[KPARAM_MEM] * 1024 * 1024;
if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8
> fb_size) {
+ pr_warn("display parameters %d,%d,%d invalid, use defaults\n",
+ video[KPARAM_MEM], video[KPARAM_WIDTH],
+ video[KPARAM_HEIGHT]);
video[KPARAM_WIDTH] = XENFB_WIDTH;
video[KPARAM_HEIGHT] = XENFB_HEIGHT;
fb_size = XENFB_DEFAULT_FB_LEN;
--
2.10.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xen, fbfront: add support for specifying size via xenstore
2017-03-23 12:53 [PATCH] xen, fbfront: add support for specifying size via xenstore Juergen Gross
@ 2017-03-23 14:13 ` Boris Ostrovsky
2017-04-07 14:54 ` Bartlomiej Zolnierkiewicz
2017-04-05 8:18 ` Juergen Gross
1 sibling, 1 reply; 5+ messages in thread
From: Boris Ostrovsky @ 2017-03-23 14:13 UTC (permalink / raw)
To: Juergen Gross, linux-kernel, xen-devel, linux-fbdev; +Cc: b.zolnierkie
On 03/23/2017 08:53 AM, Juergen Gross wrote:
> Today xen-fbfront supports specifying the display size via module
> parameters only. Add support for specifying the size via Xenstore in
> order to enable doing this easily via the domain's Xen configuration.
>
> Add an error message in case the configured display size conflicts
> with video memory size.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen, fbfront: add support for specifying size via xenstore
2017-03-23 12:53 [PATCH] xen, fbfront: add support for specifying size via xenstore Juergen Gross
2017-03-23 14:13 ` Boris Ostrovsky
@ 2017-04-05 8:18 ` Juergen Gross
2017-04-05 14:29 ` Bartlomiej Zolnierkiewicz
1 sibling, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2017-04-05 8:18 UTC (permalink / raw)
To: linux-kernel, xen-devel, linux-fbdev, b.zolnierkie; +Cc: boris.ostrovsky
On 23/03/17 13:53, Juergen Gross wrote:
> Today xen-fbfront supports specifying the display size via module
> parameters only. Add support for specifying the size via Xenstore in
> order to enable doing this easily via the domain's Xen configuration.
>
> Add an error message in case the configured display size conflicts
> with video memory size.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Bartlomiej, any comments? Can you please take this patch or should I
carry it through the Xen tree?
Juergen
> ---
> drivers/video/fbdev/xen-fbfront.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c
> index 3ee309c..46f6396 100644
> --- a/drivers/video/fbdev/xen-fbfront.c
> +++ b/drivers/video/fbdev/xen-fbfront.c
> @@ -18,6 +18,8 @@
> * frame buffer.
> */
>
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> #include <linux/console.h>
> #include <linux/kernel.h>
> #include <linux/errno.h>
> @@ -380,10 +382,18 @@ static int xenfb_probe(struct xenbus_device *dev,
> video[KPARAM_MEM] = val;
> }
>
> + video[KPARAM_WIDTH] = xenbus_read_unsigned(dev->otherend, "width",
> + video[KPARAM_WIDTH]);
> + video[KPARAM_HEIGHT] = xenbus_read_unsigned(dev->otherend, "height",
> + video[KPARAM_HEIGHT]);
> +
> /* If requested res does not fit in available memory, use default */
> fb_size = video[KPARAM_MEM] * 1024 * 1024;
> if (video[KPARAM_WIDTH] * video[KPARAM_HEIGHT] * XENFB_DEPTH / 8
> > fb_size) {
> + pr_warn("display parameters %d,%d,%d invalid, use defaults\n",
> + video[KPARAM_MEM], video[KPARAM_WIDTH],
> + video[KPARAM_HEIGHT]);
> video[KPARAM_WIDTH] = XENFB_WIDTH;
> video[KPARAM_HEIGHT] = XENFB_HEIGHT;
> fb_size = XENFB_DEFAULT_FB_LEN;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen, fbfront: add support for specifying size via xenstore
2017-04-05 8:18 ` Juergen Gross
@ 2017-04-05 14:29 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-05 14:29 UTC (permalink / raw)
To: Juergen Gross; +Cc: linux-kernel, xen-devel, linux-fbdev, boris.ostrovsky
On Wednesday, April 05, 2017 10:18:43 AM Juergen Gross wrote:
> On 23/03/17 13:53, Juergen Gross wrote:
> > Today xen-fbfront supports specifying the display size via module
> > parameters only. Add support for specifying the size via Xenstore in
> > order to enable doing this easily via the domain's Xen configuration.
> >
> > Add an error message in case the configured display size conflicts
> > with video memory size.
> >
> > Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Bartlomiej, any comments? Can you please take this patch or should I
> carry it through the Xen tree?
Looks fine to me, I will queue it for 4.12 on Friday.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen, fbfront: add support for specifying size via xenstore
2017-03-23 14:13 ` Boris Ostrovsky
@ 2017-04-07 14:54 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-04-07 14:54 UTC (permalink / raw)
To: Boris Ostrovsky, Juergen Gross; +Cc: linux-kernel, xen-devel, linux-fbdev
Hi,
On Thursday, March 23, 2017 10:13:44 AM Boris Ostrovsky wrote:
> On 03/23/2017 08:53 AM, Juergen Gross wrote:
> > Today xen-fbfront supports specifying the display size via module
> > parameters only. Add support for specifying the size via Xenstore in
> > order to enable doing this easily via the domain's Xen configuration.
> >
> > Add an error message in case the configured display size conflicts
> > with video memory size.
> >
> > Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Patch queued for 4.12, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-07 14:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-23 12:53 [PATCH] xen, fbfront: add support for specifying size via xenstore Juergen Gross
2017-03-23 14:13 ` Boris Ostrovsky
2017-04-07 14:54 ` Bartlomiej Zolnierkiewicz
2017-04-05 8:18 ` Juergen Gross
2017-04-05 14:29 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).