From patchwork Fri Feb 21 05:50:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haiyang Zhang X-Patchwork-Id: 3693661 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D5C779F505 for ; Fri, 21 Feb 2014 04:59:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DBA742015A for ; Fri, 21 Feb 2014 04:59:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F2FB720179 for ; Fri, 21 Feb 2014 04:59:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbaBUE66 (ORCPT ); Thu, 20 Feb 2014 23:58:58 -0500 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:58830 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753515AbaBUE64 (ORCPT ); Thu, 20 Feb 2014 23:58:56 -0500 Received: from linuxonhyperv.com ([72.167.245.219]) by p3plsmtps2ded03.prod.phx3.secureserver.net with : DED : id Usyv1n05z4kklxU01syvKQ; Thu, 20 Feb 2014 21:58:55 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 503) id DD1271902DC; Thu, 20 Feb 2014 21:50:27 -0800 (PST) From: Haiyang Zhang To: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, akpm@linux-foundation.org, linux-fbdev@vger.kernel.org Cc: haiyangz@microsoft.com, kys@microsoft.com, olaf@aepfle.de, jasowang@redhat.com, linux-kernel@vger.kernel.org, driverdev-devel@linuxdriverproject.org Subject: [PATCH v2, 1/2] hyperv_fb: Add screen refresh after pause/resume operation Date: Thu, 20 Feb 2014 21:50:10 -0800 Message-Id: <1392961811-11960-2-git-send-email-haiyangz@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1392961811-11960-1-git-send-email-haiyangz@microsoft.com> References: <1392961811-11960-1-git-send-email-haiyangz@microsoft.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is necessary because after VM is pause/resumed, some portion of the screen may need refresh. Signed-off-by: Haiyang Zhang Reviewed-by: K. Y. Srinivasan --- drivers/video/hyperv_fb.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/video/hyperv_fb.c b/drivers/video/hyperv_fb.c index 130708f..bbcc8c0 100644 --- a/drivers/video/hyperv_fb.c +++ b/drivers/video/hyperv_fb.c @@ -218,6 +218,7 @@ struct hvfb_par { struct delayed_work dwork; bool update; + bool xrefresh; u32 pseudo_palette[16]; u8 init_buf[MAX_VMBUS_PKT_SIZE]; @@ -369,7 +370,7 @@ static void synthvid_recv_sub(struct hv_device *hdev) synthvid_send_situ(hdev); } - par->update = msg->feature_chg.is_dirt_needed; + par->xrefresh = par->update = msg->feature_chg.is_dirt_needed; if (par->update) schedule_delayed_work(&par->dwork, HVFB_UPDATE_DELAY); } @@ -522,6 +523,13 @@ static void hvfb_update_work(struct work_struct *w) { struct hvfb_par *par = container_of(w, struct hvfb_par, dwork.work); struct fb_info *info = par->info; + char *argv[] = {"/usr/bin/xrefresh", "-display", ":0.0", NULL}; + char *envp[] = {"HOME=/", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL }; + + if (par->xrefresh) { + par->xrefresh = false; + call_usermodehelper(argv[0], argv, envp, UMH_NO_WAIT); + } if (par->fb_ready) synthvid_update(info);