From patchwork Fri Nov 8 13:01:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Carikli X-Patchwork-Id: 3158801 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 17A579F489 for ; Fri, 8 Nov 2013 15:31:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3CABF201B6 for ; Fri, 8 Nov 2013 13:01:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 570512018B for ; Fri, 8 Nov 2013 13:01:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756872Ab3KHNBs (ORCPT ); Fri, 8 Nov 2013 08:01:48 -0500 Received: from smtp1-g21.free.fr ([212.27.42.1]:46039 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755020Ab3KHNBr (ORCPT ); Fri, 8 Nov 2013 08:01:47 -0500 Received: from denis-N73SV.local.eukrea.com (unknown [88.170.243.169]) by smtp1-g21.free.fr (Postfix) with ESMTP id 02266940261; Fri, 8 Nov 2013 14:01:36 +0100 (CET) From: Denis Carikli To: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen , linux-fbdev@vger.kernel.org, Shawn Guo , Sascha Hauer , devicetree@vger.kernel.org, Denis Carikli , Geert Uytterhoeven , Rob Herring , Pawel Moll , Mark Rutland , Stephen Warren , Ian Campbell , Grant Likely , linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Eric=20B=C3=A9nard?= Subject: [PATCHv5][ 1/5] fbdev: Add the lacking FB_SYNC_* for matching the DISPLAY_FLAGS_* Date: Fri, 8 Nov 2013 14:01:29 +0100 Message-Id: <1383915693-9422-1-git-send-email-denis@eukrea.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 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 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: Geert Uytterhoeven 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: Grant Likely Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org Cc: Eric BĂ©nard Signed-off-by: Denis Carikli Acked-by: Jean-Christophe PLAGNIOL-VILLARD --- ChangeLog v4->v5: - Added Geert Uytterhoeven, Grant Likely and Shawn Guo in the Cc list. - Moved the definitions to a non-userspace header. - Corrected the comment of the second define. 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/linux/fb.h | 3 +++ 2 files changed, 7 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/linux/fb.h b/include/linux/fb.h index ffac70a..cf2ad5d 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -45,6 +45,9 @@ struct device_node; #define FB_SIGNAL_SYNC_ON_GREEN 8 #define FB_SIGNAL_SERRATION_ON 16 +#define FB_SYNC_DE_HIGH_ACT 64 /* data enable active high flag */ +#define FB_SYNC_PIXDAT_HIGH_ACT 128 /* drive data on positive edge */ + #define FB_MISC_PRIM_COLOR 1 #define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ struct fb_chroma {