From patchwork Mon Nov 4 16:15:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Carikli X-Patchwork-Id: 3136401 Return-Path: X-Original-To: patchwork-linux-arm@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 E43E6BEEB2 for ; Mon, 4 Nov 2013 16:16:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B05D520553 for ; Mon, 4 Nov 2013 16:16:12 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D09B2054A for ; Mon, 4 Nov 2013 16:16:07 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VdMot-0003uJ-KY; Mon, 04 Nov 2013 16:16:03 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VdMor-0007Z4-65; Mon, 04 Nov 2013 16:16:01 +0000 Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VdMon-0007Yb-Hk for linux-arm-kernel@lists.infradead.org; Mon, 04 Nov 2013 16:15:59 +0000 Received: from denis-N73SV.local.eukrea.com (unknown [88.170.243.169]) by smtp5-g21.free.fr (Postfix) with ESMTP id 8E100D4823B; Mon, 4 Nov 2013 17:15:26 +0100 (CET) From: Denis Carikli To: Shawn Guo Subject: [PATCHv4][ 1/6] fbdev: Add the lacking FB_SYNC_* for matching the DISPLAY_FLAGS_* Date: Mon, 4 Nov 2013 17:15:19 +0100 Message-Id: <1383581724-14817-1-git-send-email-denis@eukrea.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131104_111558_370073_7AFF1D81 X-CRM114-Status: GOOD ( 10.88 ) X-Spam-Score: -1.2 (-) Cc: Mark Rutland , devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, =?UTF-8?q?Eric=20B=C3=A9nard?= , Pawel Moll , Stephen Warren , Ian Campbell , Rob Herring , Denis Carikli , Tomi Valkeinen , Sascha Hauer , Grant Likely , Jean-Christophe Plagniol-Villard , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Without that fix, drivers using the fb_videomode_from_videomode function will not be able to get certain information because some DISPLAY_FLAGS_* have no corresponding FB_SYNC_*. Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Stephen Warren Cc: Ian Campbell Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org Cc: Eric BĂ©nard Signed-off-by: Denis Carikli Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- ChangeLog v3->v4: - Fixed the issue with FB_SYNC_PIXDAT_HIGH_ACT value. ChangeLog v2->v3: - Added Jean-Christophe PLAGNIOL-VILLARD's ACK. --- drivers/video/fbmon.c | 4 ++++ include/uapi/linux/fb.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 6103fa6..29a9ed0 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -1402,6 +1402,10 @@ int fb_videomode_from_videomode(const struct videomode *vm, fbmode->sync |= FB_SYNC_HOR_HIGH_ACT; if (vm->flags & DISPLAY_FLAGS_VSYNC_HIGH) fbmode->sync |= FB_SYNC_VERT_HIGH_ACT; + if (vm->flags & DISPLAY_FLAGS_DE_HIGH) + fbmode->sync |= FB_SYNC_DE_HIGH_ACT; + if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) + fbmode->sync |= FB_SYNC_PIXDAT_HIGH_ACT; if (vm->flags & DISPLAY_FLAGS_INTERLACED) fbmode->vmode |= FB_VMODE_INTERLACED; if (vm->flags & DISPLAY_FLAGS_DOUBLESCAN) diff --git a/include/uapi/linux/fb.h b/include/uapi/linux/fb.h index fb795c3..c618cfc 100644 --- a/include/uapi/linux/fb.h +++ b/include/uapi/linux/fb.h @@ -215,6 +215,8 @@ struct fb_bitfield { /* vtotal = 144d/288n/576i => PAL */ /* vtotal = 121d/242n/484i => NTSC */ #define FB_SYNC_ON_GREEN 32 /* sync on green */ +#define FB_SYNC_DE_HIGH_ACT 64 /* data enable high active */ +#define FB_SYNC_PIXDAT_HIGH_ACT 128 /* data enable high active */ #define FB_VMODE_NONINTERLACED 0 /* non interlaced */ #define FB_VMODE_INTERLACED 1 /* interlaced */