Samuel Thibault
2008-Mar-26 11:09 UTC
[Xen-devel] [PATCH 0/2] fbif: Add offset in resize event
Hello, The following two patches add an additional offset part in the FB resize event. Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Mar-26 11:10 UTC
[Xen-devel] Re: [PATCH 0/2] fbif: Add offset in resize event
fbfront: Add offset in resize event Also support depth change. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> diff -r 966c04d42e94 tools/ioemu/hw/xenfb.c --- a/tools/ioemu/hw/xenfb.c Wed Mar 26 09:12:57 2008 +0000 +++ b/tools/ioemu/hw/xenfb.c Wed Mar 26 11:05:07 2008 +0000 @@ -56,6 +56,7 @@ int depth; /* colour depth of guest framebuffer */ int width; /* pixel width of guest framebuffer */ int height; /* pixel height of guest framebuffer */ + int offset; /* offset of the framebuffer */ int abs_pointer_wanted; /* Whether guest supports absolute pointer */ int button_state; /* Last seen pointer button state */ char protocol[64]; /* frontend protocol */ @@ -519,11 +520,13 @@ case XENFB_TYPE_RESIZE: xenfb->width = event->resize.width; xenfb->height = event->resize.height; + xenfb->depth = event->resize.depth; xenfb->row_stride = event->resize.stride; + xenfb->offset = event->resize.offset; dpy_colourdepth(xenfb->ds, xenfb->depth); dpy_resize(xenfb->ds, xenfb->width, xenfb->height, xenfb->row_stride); if (xenfb->ds->shared_buf) - dpy_setdata(xenfb->ds, xenfb->pixels); + dpy_setdata(xenfb->ds, xenfb->pixels + xenfb->offset); xenfb_invalidate(xenfb); break; } @@ -1105,6 +1108,7 @@ #define BLT(SRC_T,DST_T,RSB,GSB,BSB,RDB,GDB,BDB) \ for (line = y ; line < (y+h) ; line++) { \ SRC_T *src = (SRC_T *)(xenfb->pixels \ + + xenfb->offset \ + (line * xenfb->row_stride) \ + (x * xenfb->depth / 8)); \ DST_T *dst = (DST_T *)(xenfb->ds->data \ @@ -1147,7 +1151,7 @@ if (xenfb->depth == xenfb->ds->depth) { /* Perfect match can use fast path */ for (line = y ; line < (y+h) ; line++) { memcpy(xenfb->ds->data + (line * xenfb->ds->linesize) + (x * xenfb->ds->depth / 8), - xenfb->pixels + (line * xenfb->row_stride) + (x * xenfb->depth / 8), + xenfb->pixels + xenfb->offset + (line * xenfb->row_stride) + (x * xenfb->depth / 8), w * xenfb->depth / 8); } } else { /* Mismatch requires slow pixel munging */ --- a/xen/include/public/io/fbif.h Wed Mar 26 09:12:57 2008 +0000 +++ b/xen/include/public/io/fbif.h Wed Mar 26 11:05:08 2008 +0000 @@ -63,6 +63,7 @@ int32_t height; /* height in pixels */ int32_t stride; /* stride in bytes */ int32_t depth; /* depth in bits */ + int32_t offset; /* offset of the framebuffer in bytes */ }; #define XENFB_OUT_EVENT_SIZE 40 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Mar-26 11:10 UTC
[Xen-devel] Re: [PATCH 2/2] fbif: Add offset in resize event
fbfront: Add offset in resize event diff -r 1327b9dcc63a drivers/xen/fbfront/xenfb.c --- a/drivers/xen/fbfront/xenfb.c Wed Mar 26 09:07:52 2008 +0000 +++ b/drivers/xen/fbfront/xenfb.c Wed Mar 26 11:08:36 2008 +0000 @@ -504,6 +504,7 @@ static int xenfb_set_par(struct fb_info xenfb_info->resize.height = info->var.yres; xenfb_info->resize.stride = info->fix.line_length; xenfb_info->resize.depth = info->var.bits_per_pixel; + xenfb_info->resize.offset = 0; xenfb_info->resize_dpy = 1; spin_unlock_irqrestore(&xenfb_info->resize_lock, flags); return 0; diff -r 1327b9dcc63a include/xen/interface/io/fbif.h --- a/include/xen/interface/io/fbif.h Wed Mar 26 09:07:52 2008 +0000 +++ b/include/xen/interface/io/fbif.h Wed Mar 26 11:08:36 2008 +0000 @@ -63,6 +63,7 @@ struct xenfb_resize int32_t height; /* height in pixels */ int32_t stride; /* stride in bytes */ int32_t depth; /* depth in bits */ + int32_t offset; /* offset of the framebuffer in bytes */ }; #define XENFB_OUT_EVENT_SIZE 40 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Mar-26 11:11 UTC
[Xen-devel] Re: [PATCH 1/2] fbif: Add offset in resize event
Samuel Thibault, le Wed 26 Mar 2008 11:10:23 +0000, a écrit :> fbfront: Add offset in resize eventOops, that is fbback of source Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Mar-26 11:12 UTC
[Xen-devel] Re: [PATCH 2/2] fbif: Add offset in resize event
Samuel Thibault, le Wed 26 Mar 2008 11:10:51 +0000, a écrit :> fbfront: Add offset in resize eventSigned-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Mar-26 11:16 UTC
Re: [Xen-devel] [PATCH 0/2] fbif: Add offset in resize event
Looks like we should slip these in quickly if they are acceptable, as the new field is not backward compatible with the original patchset from Pat Campbell? -- Keir On 26/3/08 11:09, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:> Hello, > > The following two patches add an additional offset part in the FB resize > event. > > Samuel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Samuel Thibault
2008-Mar-26 11:24 UTC
Re: [Xen-devel] [PATCH 0/2] fbif: Add offset in resize event
Keir Fraser, le Wed 26 Mar 2008 11:16:55 +0000, a écrit :> Looks like we should slip these in quickly if they are acceptable, as the > new field is not backward compatible with the original patchset from Pat > Campbell?Yes. Actually I thought Pat would have already integrated that his patch. Samuel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2008-Mar-26 11:26 UTC
Re: [Xen-devel] [PATCH 0/2] fbif: Add offset in resize event
On 26/3/08 11:24, "Samuel Thibault" <samuel.thibault@eu.citrix.com> wrote:> Keir Fraser, le Wed 26 Mar 2008 11:16:55 +0000, a écrit : >> Looks like we should slip these in quickly if they are acceptable, as the >> new field is not backward compatible with the original patchset from Pat >> Campbell? > > Yes. > Actually I thought Pat would have already integrated that his patch.A couple of days delay won''t matter. I''ll wait for ack or comments from Pat and Markus. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Markus Armbruster
2008-Mar-26 13:21 UTC
Re: [Xen-devel] Re: [PATCH 0/2] fbif: Add offset in resize event
Samuel Thibault <samuel.thibault@eu.citrix.com> writes:> fbfront: Add offset in resize eventfbback, as you already noted. However, we''ve used variations of pvfb: in changelogs so far, for front- and backend. Best to stick to that.> Also support depth change.This part arguably fixes a bug in Pat''s patch.> Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>Looks good. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Markus Armbruster
2008-Mar-26 13:22 UTC
Re: [Xen-devel] Re: [PATCH 2/2] fbif: Add offset in resize event
Samuel Thibault <samuel.thibault@eu.citrix.com> writes:> Samuel Thibault, le Wed 26 Mar 2008 11:10:51 +0000, a écrit : >> fbfront: Add offset in resize event > > Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>Okay. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Markus Armbruster
2008-Mar-26 13:25 UTC
Re: [Xen-devel] [PATCH 0/2] fbif: Add offset in resize event
Keir Fraser <keir.fraser@eu.citrix.com> writes:> Looks like we should slip these in quickly if they are acceptable, as the > new field is not backward compatible with the original patchset from Pat > Campbell? > > -- KeirCorrect. I guess we should zero the complete union xenfb_out_event; it can make compatible extensions easier. I''ll do that in the pvops frontend. I don''t intend to touch the non-pvops kernel anymore. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Pat Campbell
2008-Mar-26 13:29 UTC
Re: [Xen-devel] Re: [PATCH 0/2] fbif: Add offset in resize event
Markus Armbruster wrote:> Samuel Thibault <samuel.thibault@eu.citrix.com> writes: > > >> fbfront: Add offset in resize event >> > > fbback, as you already noted. However, we''ve used variations of pvfb: > in changelogs so far, for front- and backend. Best to stick to that. > > >> Also support depth change. >> > > This part arguably fixes a bug in Pat''s patch. > >Oops>> Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com> >> > > Looks good. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >Looks good to me as well. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Maybe Matching Threads
- [PATCH] ioemu: fix xenfb slow case update
- [RFC] PVFB: Add refresh period to XenStore parameters?
- [PATCH 0/2] xen pvfb: Para-virtual framebuffer, keyboard and pointer
- [PATCH 0/2] xen pvfb: Para-virtual framebuffer, keyboard and pointer
- [PATCH 0/2] xen pvfb: Para-virtual framebuffer, keyboard and pointer