fbif: Add offset in resize event
cover fbif: Add offset in resize event
Hello,
The following two patches add an additional offset part in the FB resize event.
Samuel
fbfront: Add offset in resize event
Also support depth change.
tools/ioemu/hw/xenfb.c +6 -2
@@ -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 */
xen/include/public/io/fbif.h +1 -0
@@ -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
Quoted 1 line · Samuel Thibault, le Wed 26 Mar 2008 11:10:23 +0000, a écrit :
fbfront: Add offset in resize event
Oops, that is fbback of source
Samuel
Quoted 1 line · Samuel Thibault
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.
Quoted 1 line
Also support depth change.
This part arguably fixes a bug in Pat's patch.
Quoted 1 line
Signed-off-by Samuel Thibault <[email protected]>
Looks good.
Quoted 6 lines · Markus Armbruster
Quoted 2 lines · Samuel Thibault
fbfront: Add offset in resize event
Quoted 10 lines
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.Quoted 2 lines
Also support depth change.
This part arguably fixes a bug in Pat's patch.
Oops
Quoted 10 lines
Quoted 2 lines
Signed-off-by Samuel Thibault <[email protected]>Looks good.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Looks good to me as well.
fbfront: Add offset in resize event
drivers/xen/fbfront/xenfb.c +1 -0
@@ -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 ;
include/xen/interface/io/fbif.h +1 -0
@@ -63,6 +63,7 @@ struct xenfb_resizeint32_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
Quoted 1 line · Samuel Thibault, le Wed 26 Mar 2008 11:10:51 +0000, a écrit :
fbfront: Add offset in resize event
Quoted 4 lines · Samuel Thibault
Quoted 1 line · Samuel Thibault, le Wed 26 Mar 2008 11:10:51 +0000, a écrit :
fbfront: Add offset in resize event
Signed-off-by Samuel Thibault <[email protected]>
Okay.
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
Quoted 11 lines · Samuel Thibault
Hello,
The following two patches add an additional offset part in the FB resize event.
Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · 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
Quoted 7 lines · Samuel Thibault
Quoted 3 lines · 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
Quoted 5 lines · Keir Fraser
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
Correct.
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.