All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-fbdev@vger.kernel.org, b.zolnierkie@samsung.com
Cc: boris.ostrovsky@oracle.com
Subject: Re: [PATCH] xen, fbfront: add support for specifying size via xenstore
Date: Wed, 5 Apr 2017 10:18:43 +0200	[thread overview]
Message-ID: <30c4d7f4-044e-9eff-bda9-fa9f5486e66f@suse.com> (raw)
In-Reply-To: <20170323125304.11891-1-jgross@suse.com>

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;
> 

WARNING: multiple messages have this Message-ID (diff)
From: Juergen Gross <jgross@suse.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-fbdev@vger.kernel.org, b.zolnierkie@samsung.com
Cc: boris.ostrovsky@oracle.com
Subject: Re: [PATCH] xen, fbfront: add support for specifying size via xenstore
Date: Wed, 05 Apr 2017 08:18:43 +0000	[thread overview]
Message-ID: <30c4d7f4-044e-9eff-bda9-fa9f5486e66f@suse.com> (raw)
In-Reply-To: <20170323125304.11891-1-jgross@suse.com>

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;
> 


  parent reply	other threads:[~2017-04-05  8:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 12:53 [PATCH] xen, fbfront: add support for specifying size via xenstore Juergen Gross
2017-03-23 12:53 ` Juergen Gross
2017-03-23 14:13 ` Boris Ostrovsky
2017-03-23 14:13   ` Boris Ostrovsky
2017-03-23 14:13   ` Boris Ostrovsky
2017-04-07 14:54   ` Bartlomiej Zolnierkiewicz
2017-04-07 14:54     ` Bartlomiej Zolnierkiewicz
2017-04-07 14:54   ` Bartlomiej Zolnierkiewicz
2017-04-05  8:18 ` Juergen Gross [this message]
2017-04-05  8:18   ` Juergen Gross
2017-04-05 14:29   ` Bartlomiej Zolnierkiewicz
2017-04-05 14:29     ` Bartlomiej Zolnierkiewicz
2017-04-05 14:29     ` Bartlomiej Zolnierkiewicz
2017-04-05  8:18 ` Juergen Gross
  -- strict thread matches above, loose matches on Subject: below --
2017-03-23 12:53 Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30c4d7f4-044e-9eff-bda9-fa9f5486e66f@suse.com \
    --to=jgross@suse.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.