From patchwork Tue Feb 18 21:11:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haiyang Zhang X-Patchwork-Id: 3674411 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E095BBF40C for ; Tue, 18 Feb 2014 20:20:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A51C20160 for ; Tue, 18 Feb 2014 20:20:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38F6720165 for ; Tue, 18 Feb 2014 20:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752260AbaBRUUl (ORCPT ); Tue, 18 Feb 2014 15:20:41 -0500 Received: from p3plsmtps2ded03.prod.phx3.secureserver.net ([208.109.80.60]:60638 "EHLO p3plsmtps2ded03.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234AbaBRUUj (ORCPT ); Tue, 18 Feb 2014 15:20:39 -0500 Received: from linuxonhyperv.com ([72.167.245.219]) by p3plsmtps2ded03.prod.phx3.secureserver.net with : DED : id TwLd1n04X4kklxU01wLdSA; Tue, 18 Feb 2014 13:20:38 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 503) id DCBE31902D9; Tue, 18 Feb 2014 13:12:00 -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 1/2] hyperv_fb: Add screen refresh after pause/resume operation Date: Tue, 18 Feb 2014 13:11:30 -0800 Message-Id: <1392757891-28680-2-git-send-email-haiyangz@microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1392757891-28680-1-git-send-email-haiyangz@microsoft.com> References: <1392757891-28680-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);