From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO14u-0008Sv-Mm for qemu-devel@nongnu.org; Fri, 05 Apr 2013 03:28:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO14p-0000Nx-Bx for qemu-devel@nongnu.org; Fri, 05 Apr 2013 03:28:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO14p-0000NZ-4Q for qemu-devel@nongnu.org; Fri, 05 Apr 2013 03:28:47 -0400 Message-ID: <515E7D26.2060801@redhat.com> Date: Fri, 05 Apr 2013 09:28:38 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1365060546-24638-1-git-send-email-kraxel@redhat.com> <1365060546-24638-21-git-send-email-kraxel@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 20/24] xen: re-enable refresh interval reporting for xenfb List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Anthony Liguori , X86 , "qemu-devel@nongnu.org" >> -#else >> ; /* nothing */ >> -#endif >> } else { >> /* we don't get update notifications, thus use the >> * sledge hammer approach ... */ > > You might as well remove the if () nothing; case. Yep, will do. >> @@ -785,6 +755,20 @@ static void xenfb_update(void *opaque) >> xenfb->up_fullscreen = 0; >> } >> >> +static void xenfb_update_interval(void *opaque, uint64_t interval) >> +{ >> + struct XenFB *xenfb = opaque; >> + >> + if (xenfb->feature_update) { >> +#ifdef XENFB_TYPE_REFRESH_PERIOD >> + if (xenfb_queue_full(xenfb)) { >> + return; >> + } >> + xenfb_send_refresh_period(xenfb, interval); > > Shouldn't we be updating xenfb->refresh_period here? And shouldn't we > call xenfb_send_refresh_period only if interval != > xenfb->refresh_period? > On the other hand if refresh_period is not useful anymore, shouldn't > we remove it from struct XenFB? xenfb_update_interval is only called when interval changes, which I think means we don't need refresh_period any more, correct? cheers, Gerd