From patchwork Tue Jan 14 00:20:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haiyang Zhang X-Patchwork-Id: 3481181 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 533CCC02DC for ; Mon, 13 Jan 2014 23:38:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76CBC20155 for ; Mon, 13 Jan 2014 23:38:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A530C20145 for ; Mon, 13 Jan 2014 23:38:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbaAMXir (ORCPT ); Mon, 13 Jan 2014 18:38:47 -0500 Received: from p3plsmtps2ded04.prod.phx3.secureserver.net ([208.109.80.198]:49171 "EHLO p3plsmtps2ded04.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752153AbaAMXir (ORCPT ); Mon, 13 Jan 2014 18:38:47 -0500 X-Greylist: delayed 423 seconds by postgrey-1.27 at vger.kernel.org; Mon, 13 Jan 2014 18:38:47 EST Received: from linuxonhyperv.com ([72.167.245.219]) by p3plsmtps2ded04.prod.phx3.secureserver.net with : DED : id DbXj1n03X4kklxU01bXjU5; Mon, 13 Jan 2014 16:31:44 -0700 x-originating-ip: 72.167.245.219 Received: by linuxonhyperv.com (Postfix, from userid 503) id 06EBA1903E9; Mon, 13 Jan 2014 16:20:48 -0800 (PST) From: Haiyang Zhang To: FlorianSchandinat@gmx.de, 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] hyperv_fb: Add screen refresh after pause/resume operation Date: Mon, 13 Jan 2014 16:20:38 -0800 Message-Id: <1389658838-15765-1-git-send-email-haiyangz@microsoft.com> X-Mailer: git-send-email 1.7.4.1 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.0 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);