Received: by 10.223.185.116 with SMTP id b49csp8933393wrg; Fri, 2 Mar 2018 10:23:37 -0800 (PST) X-Google-Smtp-Source: AG47ELucAr3d8L6rgDgDGap3WHE82qyMkrwPfCeeAutjRkTV8fpsECrOYH/fb4DgXgAdo4EuKmdr X-Received: by 10.98.65.198 with SMTP id g67mr6508068pfd.127.1520015017057; Fri, 02 Mar 2018 10:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520015017; cv=none; d=google.com; s=arc-20160816; b=MzXYlIc+PR+3rUEpNilBRv5vqxHSv3a9l7OdP5xHT+rmWg+FXF0Va61Pav5lAy+qUV 7U9y81uHKzD+A4UPFx35j6trRG/glzMpF3TKX3oTlNCKjJFEONecShewPij5UK4W/JXP 5DgUVLqCYc73FwBNLJ7hi7EEnQKdCdTiCaPdTVaLFOvBCxrHqnToLrjDGdu1JNsGxbdU aMohYZZ8QWSH1T6jU6kLraqlU+5O5DOyY7Aq2gPAGXKVJ8WOhtnLPaA1MOgzW/TCnNoO bARh4uE5Z0aajVOMr9wkOhLKwYiZIt7kfk7CpiIfYsSCTjjbtwOmheaFtxC0Vud7PQg0 N1Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=In8AIMA3yeWrcifkkJW/FAry2vuckRm6U4wXZvpGFFg=; b=jZYxOIlMrr/L/F9XurUjAf4J7y+yQYopSJV9OUxVTB5bTbTdxHquXy8oawMc5/VeV4 jsgKuuqCe7pxFRmdNrPUySu0J6niXUZjhAGG3j1h+6PkK72HQqnP8pbJsTBILvOK0yTo kaz+Ae4HOXbDNvObdp3jb+tJBWZGCwGOjpmc0VpcRHLkOsa36+a+NiGx7JDTP3L7GkEq pt2enIwHgg1bPJTr1xKRS15wkjZGECQ3iL2XXWIugnIh2oX/QiXqqiupMP2LCT8lfuMb Fph55ajz5NptgncIGJzM+XdMipTUKc6lufPLmErurbUki+awTvkz7Dq3ugDRT7p0Efdi OcEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=GfSCCm8T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si5087577plp.425.2018.03.02.10.23.22; Fri, 02 Mar 2018 10:23:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=GfSCCm8T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936246AbeCBLoC (ORCPT + 99 others); Fri, 2 Mar 2018 06:44:02 -0500 Received: from mail.micronovasrl.com ([212.103.203.10]:49074 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935632AbeCBLoA (ORCPT ); Fri, 2 Mar 2018 06:44:00 -0500 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id E78B3B00B6D for ; Fri, 2 Mar 2018 12:43:58 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:to:subject:subject; s=dkim; t= 1519991038; x=1520855039; bh=3up7LDl4UoUnzHr2GVA/g776bsrSONs8Ao7 ZGCbPSjw=; b=GfSCCm8TuPcVXvV7nzNfkE+1hp4Yiqv0c3/IPLlRbBGAFoccjOz x9Xi9ket/0IsIBQxMfC6WHBVNK9fJnbehw3PZvpkiY6xjCezJmCu4UFwWi2E2auq RDyGUysaReTb+8DDVmE6eJX9gIFs1yqMHRg13EDeBkkN5CPNVenfNjuc= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YecRc46s-t5t for ; Fri, 2 Mar 2018 12:43:58 +0100 (CET) Received: from [192.168.2.69] (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id 98CABB0034C; Fri, 2 Mar 2018 12:43:57 +0100 (CET) Subject: Re: [PATCH] drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE To: Maxime Ripard Cc: David Airlie , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <1519834492-30559-1-git-send-email-giulio.benetti@micronovasrl.com> <20180301093909.ph6nuvxuqtwyfssd@flea> From: Giulio Benetti Message-ID: <0666b792-1f01-8138-7a6f-f98f9de95348@micronovasrl.com> Date: Fri, 2 Mar 2018 12:43:59 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180301093909.ph6nuvxuqtwyfssd@flea> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Il 01/03/2018 10:39, Maxime Ripard ha scritto: > On Wed, Feb 28, 2018 at 05:14:52PM +0100, Giulio Benetti wrote: >> Handle both positive and negative dclk polarity, >> according to bus_flags. >> >> Signed-off-by: Giulio Benetti >> --- >> drivers/gpu/drm/sun4i/sun4i_tcon.c | 13 ++++++++++++- >> 1 file changed, 12 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c >> index aaf911a..534e5ee 100644 >> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c >> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c >> @@ -17,6 +17,7 @@ >> #include >> #include >> #include >> +#include >> >> #include >> >> @@ -340,6 +341,9 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon, >> static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, >> const struct drm_display_mode *mode) >> { >> + struct drm_panel *panel = tcon->panel; >> + struct drm_connector *connector = panel->connector; >> + struct drm_display_info display_info = connector->display_info; >> unsigned int bp, hsync, vsync; >> u8 clk_delay; >> u32 val = 0; >> @@ -395,8 +399,15 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, >> if (mode->flags & DRM_MODE_FLAG_PVSYNC) >> val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE; >> >> + if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) >> + clk_set_phase(tcon->dclk, 240); >> + >> + if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) >> + clk_set_phase(tcon->dclk, 0); >> + > > This needs to have a whole bunch of comments here. We want to have > basically the whole discussion we had by mail previously about this in > there. > > And the same goes for your commit log. Ok, I follow asap with V2 patch describing everything we told on previous thread. > >> regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG, >> - SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | SUN4I_TCON0_IO_POL_VSYNC_POSITIVE, >> + SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | >> + SUN4I_TCON0_IO_POL_VSYNC_POSITIVE, >> val); > > This has nothing to do with your patch. Yes, sorry, I've seen it now, I remove it on V2 patch > > Maxime > > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel > -- Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale € 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642