From patchwork Mon Mar 17 10:27:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3842781 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 A82F5BF549 for ; Mon, 17 Mar 2014 10:28:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB7AD20219 for ; Mon, 17 Mar 2014 10:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E701A2020F for ; Mon, 17 Mar 2014 10:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932669AbaCQK2H (ORCPT ); Mon, 17 Mar 2014 06:28:07 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:33353 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932482AbaCQK2E (ORCPT ); Mon, 17 Mar 2014 06:28:04 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2K00MYAT2RH230@mailout4.w1.samsung.com>; Mon, 17 Mar 2014 10:28:03 +0000 (GMT) X-AuditID: cbfec7f4-b7f796d000005a13-50-5326ce3301ca Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id F4.EF.23059.33EC6235; Mon, 17 Mar 2014 10:28:03 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N2K00HBWT2JYZB0@eusync3.samsung.com>; Mon, 17 Mar 2014 10:28:03 +0000 (GMT) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda , Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Pawel Moll , Ian Campbell , Kyungmin Park , Rob Herring , Kumar Gala , Grant Likely , Sean Paul , Inki Dae , Marek Szyprowski , Denis Carikli Subject: [PATCH 7/9] drm/modes: add polarization handling to mode conversion Date: Mon, 17 Mar 2014 11:27:23 +0100 Message-id: <1395052045-23848-8-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1395052045-23848-1-git-send-email-a.hajda@samsung.com> References: <1395052045-23848-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOLMWRmVeSWpSXmKPExsVy+t/xq7rG59SCDdZd0re4te4cq8W8VROZ LeYfAbKufH3PZtH/ZiGrxYE/Oxgtzr1ayWgx6f4EFouzTW/YLWac38dksfbIXXaLpdcvMllM mL6WxaJ17xF2i7sbzjI68HusmbeG0WN2w0UWj8t9vUweM5a8YPRYufwLm8emVZ1sHneu7WHz uN99nMmjb8sqRo/Pm+QCuKK4bFJSczLLUov07RK4Ms4u+MhSMI2z4sGV48wNjF/Yuxg5OSQE TCSeLj7CBmGLSVy4tx7I5uIQEljKKPF6yR1GCKePSWJB3y5GkCo2AU2Jv5tvgnWICChL/J24 CqyIWWAii8SMtdfBEsICPhKPd39hArFZBFQlNj09zAJi8wo4S1z92M0MsU5BYtmXtWA2p4CL xKE1X1i7GDmAtjlLrPnnP4GRdwEjwypG0dTS5ILipPRcQ73ixNzi0rx0veT83E2MkMD+soNx 8TGrQ4wCHIxKPLwTlNWChVgTy4orcw8xSnAwK4nwnj4AFOJNSaysSi3Kjy8qzUktPsTIxMEp 1cBYnlR7NPhe1dzvaceimNoiFE3Winl5/O5Njdlmx3Z8mnxPZ9DD8rfNBvfWx94IecGwYcXJ 87LH+HQyDp41Krt2ZWvUl4sTPMzSHlyd4CX9xi2f0/pIqpmQdZf+txfrW2az1kwMeMk0Z3rE I9nV/UybnjmG9DAxnq0Qf1EfU7F3y9GrVUXzvQSVWIozEg21mIuKEwFPOqWDSgIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 The patch adds conversion of DISPLAY_FLAGS_DE_* and DISPLAY_FLAGS_PIXDATA_* flags to pol_flags in drm_display_mode_from_videomode function. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/drm_modes.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index b073315..5dbff8d 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -537,6 +537,17 @@ int drm_display_mode_from_videomode(const struct videomode *vm, dmode->flags |= DRM_MODE_FLAG_DBLSCAN; if (vm->flags & DISPLAY_FLAGS_DOUBLECLK) dmode->flags |= DRM_MODE_FLAG_DBLCLK; + + dmode->pol_flags = 0; + if (vm->flags & DISPLAY_FLAGS_DE_LOW) + dmode->pol_flags |= DRM_MODE_FLAG_POL_DE_NEGEDGE; + if (vm->flags & DISPLAY_FLAGS_DE_HIGH) + dmode->pol_flags |= DRM_MODE_FLAG_POL_DE_POSEDGE; + if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) + dmode->pol_flags |= DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE; + if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) + dmode->pol_flags |= DRM_MODE_FLAG_POL_PIXDATA_POSEDGE; + drm_mode_set_name(dmode); return 0;