[Spice-devel] [PATHCH win-qxl 2/8] display: fix broken debug in checked
Alon Levy
alevy at redhat.com
Fri Apr 8 06:08:21 PDT 2011
On Fri, Apr 08, 2011 at 11:13:47AM +0200, Hans de Goede wrote:
> Hmm,
>
> you also change how WAIT_FOR_EVENT get called but
> don't change the macro ? Also I would prefer for the
> WAIT_FOR_EVENT changes to get broken out into a different patch.
>
ok, self NACK, I shouldn't push that TODO - I'll merge the WAIT_FOR_EVENT
part fix (which is what it is, no call change, just breakage after the previous
patch.., my bad) and just remove the assert parts that don't make sense.
> Last some more verbose commit message would be nice (and the same
> for the separate WAIT_FOR_EVENT changes patch.
>
> Regards,
>
> Hans
>
>
> On 04/07/2011 06:10 PM, Alon Levy wrote:
> >---
> > display/driver.c | 5 +++++
> > display/quic.c | 4 ++++
> > display/res.c | 18 +++++++++---------
> > 3 files changed, 18 insertions(+), 9 deletions(-)
> >
> >diff --git a/display/driver.c b/display/driver.c
> >index dbe6978..182343d 100644
> >--- a/display/driver.c
> >+++ b/display/driver.c
> >@@ -1074,9 +1074,12 @@ FIX FlotaToFixed(FLOATL val, FLOATL scale)
> > static BOOL GetCosmeticAttr(PDev *pdev, QXLDrawable *drawable, QXLLineAttr *q_line_attr,
> > LINEATTRS *line_attr)
> > {
> >+ // TODO - broken, undeclared identifier LINE_CAP_ROUND and the rest
> >+#if 0
> > ASSERT(pdev, LINE_CAP_ROUND == ENDCAP_ROUND&& LINE_CAP_SQUARE == ENDCAP_SQUARE&&
> > LINE_CAP_BUTT == ENDCAP_BUTT&& LINE_JOIN_ROUND == JOIN_ROUND&&
> > LINE_JOIN_BEVEL == JOIN_BEVEL&& LINE_JOIN_MITER == JOIN_MITER);
> >+#endif
> >
> > q_line_attr->join_style = JOIN_MITER;
> > q_line_attr->end_style = ENDCAP_BUTT;
> >@@ -1089,8 +1092,10 @@ static BOOL GetCosmeticAttr(PDev *pdev, QXLDrawable *drawable, QXLLineAttr *q_li
> > FIX *end;
> > UINT32 nseg;
> >
> >+#if 0
> > ASSERT(pdev, LA_STYLED == LINE_STYLED);
> > ASSERT(pdev, LA_STARTGAP == LINE_START_WITH_GAP);
> >+#endif
> > q_line_attr->flags = (UINT8)(line_attr->fl& (LA_STYLED | LA_STARTGAP));
> > nseg = (line_attr->fl& LA_ALTERNATE) ? 2 : line_attr->cstyle;
> > if ( nseg> 100) {
> >diff --git a/display/quic.c b/display/quic.c
> >index 2c23d9a..5dc66d4 100644
> >--- a/display/quic.c
> >+++ b/display/quic.c
> >@@ -63,6 +63,10 @@
> >
> > #define ABS(a) ((a)>= 0 ? (a) : -(a))
> >
> >+#ifdef ASSERT
> >+#undef ASSERT
> >+#endif
> >+
> > #ifdef DEBUG
> >
> > #define ASSERT(usr, x) \
> >diff --git a/display/res.c b/display/res.c
> >index 21047c0..5dc6e10 100644
> >--- a/display/res.c
> >+++ b/display/res.c
> >@@ -174,13 +174,13 @@ static void WaitForCursorRing(PDev* pdev)
> > {
> > LARGE_INTEGER timeout; // 1 => 100 nanoseconds
> > timeout.QuadPart = -1 * (1000 * 1000 * 10); //negative => relative // 1s
> >- WAIT_FOR_EVENT(pdev->cursor_event,&timeout);
> >+ WAIT_FOR_EVENT(pdev, pdev->cursor_event,&timeout);
> > if (SPICE_RING_IS_FULL(pdev->cursor_ring)) {
> > DEBUG_PRINT((pdev, 0, "%s: 0x%lx: timeout\n", __FUNCTION__, pdev));
> > }
> > }
> > #else
> >- WAIT_FOR_EVENT(pdev->cursor_event, NULL);
> >+ WAIT_FOR_EVENT(pdev, pdev->cursor_event, NULL);
> > #endif //DBG
> > }
> > }
> >@@ -202,13 +202,13 @@ static void WaitForCmdRing(PDev* pdev)
> > {
> > LARGE_INTEGER timeout; // 1 => 100 nanoseconds
> > timeout.QuadPart = -1 * (1000 * 1000 * 10); //negative => relative // 1s
> >- WAIT_FOR_EVENT(pdev->display_event,&timeout);
> >+ WAIT_FOR_EVENT(pdev, pdev->display_event,&timeout);
> > if (SPICE_RING_IS_FULL(pdev->cmd_ring)) {
> > DEBUG_PRINT((pdev, 0, "%s: 0x%lx: timeout\n", __FUNCTION__, pdev));
> > }
> > }
> > #else
> >- WAIT_FOR_EVENT(pdev->display_event, NULL);
> >+ WAIT_FOR_EVENT(pdev, pdev->display_event, NULL);
> > #endif //DBG
> > }
> > }
> >@@ -627,7 +627,7 @@ QXLSurfaceCmd *SurfaceCmd(PDev *pdev, UINT8 type, UINT32 surface_id)
> > {
> > QXLSurfaceCmd *surface_cmd;
> >
> >- ASSERT(pdev, pdev&& area);
> >+ ASSERT(pdev, pdev);
> >
> > surface_cmd = GetSurfaceCmd(pdev);
> > surface_cmd->surface_id = surface_id;
> >@@ -2141,7 +2141,7 @@ BOOL QXLGetBitmap(PDev *pdev, QXLDrawable *drawable, QXLPHYSICAL *image_phys, SU
> > alloc_size = sizeof(Resource) + sizeof(InternalImage);
> > image_res = AllocMem(pdev, MSPACE_TYPE_DEVRAM, alloc_size);
> >
> >- ONDBG(pdev->num_bits_pages++);
> >+ ONDBG(pdev->Res->num_bits_pages++);
> > image_res->refs = 1;
> > image_res->free = FreeSurfaceImage;
> >
> >@@ -2307,7 +2307,7 @@ BOOL QXLGetAlphaBitmap(PDev *pdev, QXLDrawable *drawable, QXLPHYSICAL *image_phy
> > alloc_size = sizeof(Resource) + sizeof(InternalImage);
> > image_res = AllocMem(pdev, MSPACE_TYPE_DEVRAM, alloc_size);
> >
> >- ONDBG(pdev->num_bits_pages++);
> >+ ONDBG(pdev->Res->num_bits_pages++);
> > image_res->refs = 1;
> > image_res->free = FreeSurfaceImage;
> >
> >@@ -2512,13 +2512,13 @@ void UpdateArea(PDev *pdev, RECTL *area, UINT32 surface_id)
> > {
> > LARGE_INTEGER timeout; // 1 => 100 nanoseconds
> > timeout.QuadPart = -1 * (1000 * 1000 * 10); //negative => relative // 1s
> >- WAIT_FOR_EVENT(pdev->display_event,&timeout);
> >+ WAIT_FOR_EVENT(pdev, pdev->display_event,&timeout);
> > if (*pdev->dev_update_id != pdev->Res->update_id) {
> > DEBUG_PRINT((pdev, 0, "%s: 0x%lx: timeout\n", __FUNCTION__, pdev));
> > }
> > }
> > #else
> >- WAIT_FOR_EVENT(pdev->display_event, NULL);
> >+ WAIT_FOR_EVENT(pdev, pdev->display_event, NULL);
> > #endif // DEBUG
> > mb();
> > } while (*pdev->dev_update_id != pdev->Res->update_id);
More information about the Spice-devel
mailing list