Received: by 10.223.185.116 with SMTP id b49csp6347508wrg; Wed, 28 Feb 2018 07:59:23 -0800 (PST) X-Google-Smtp-Source: AH8x224CJtK/WYgRza/vL37LsNwTs6KFy9SmZvwIZQwTKzs9TUuQvKc3HUm6NSGP40JHIKt5OM6O X-Received: by 2002:a17:902:8ec6:: with SMTP id x6-v6mr18777190plo.402.1519833563643; Wed, 28 Feb 2018 07:59:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833563; cv=none; d=google.com; s=arc-20160816; b=JxFA/SbqCrHPlIdRlkuC9e9WixJ2d2nEMJveC8HeNir86LIc7eonRNb54fSyN6MmnO 93qwiDwDtAaDm8rCkVb7PtYbMfLuekb2dcVTXUQ/0MxXg6+HhM6KlHr1gWLuv/5lDAnk nzMtr6JWyW8cOX+75/45Y78OAoL4yUBpp4+011L4tjQVrZLo5t0EXsJj34RLEgE63fwN BVXU0wRK8yWW3c+3ZsB9bsczM3iOpzkwke+SLJw6s+oYnV08pZgoKBJWqAz+uD+wCQzd WMRAZ8hJgepEomkfhdrsZWDQsOO7EuMqdS2f6WF5jWa2qIosGwHjS47BtOSIUmp9AERd OVWg== 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=yKb/20KFJgcORtyA6eZW8y9jHkncBovD0WlmLHTJJIg=; b=shaLSrtF96LjAZzbXcBhxGyPwBePRKY+qIcs9FA9qRjGDkPkGSCJUbPQQ+SBZoRCjD zJ5N0NrAcwnQo1d0Ik+zvbEtxvNwnnCuGM0abc6xhar8EYq5qavQLsTXDo7uqCbUYCq2 k99SywsPLR2FdCj5ZTLggOGDs25frrxoUH7Rk7N8g40m5eqewiLFGthKdhDwSi2ax+qH 29lJWflRR/Cens+sOUZlwS0b6XULGvgGGilsdpQ2X/hvhYDoVSs+RpWOwYnC3chwKN03 w02zKQM0Q2bjLEqnXB3BgH/ETCVfPOQZoWIWYlT59IrDrwkc95SzM5hIoN3sDBhntl1Z mneA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=qGCkMLKe; 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 r4si1153400pgs.323.2018.02.28.07.59.08; Wed, 28 Feb 2018 07:59:23 -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=qGCkMLKe; 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 S934140AbeB1P5A (ORCPT + 99 others); Wed, 28 Feb 2018 10:57:00 -0500 Received: from mail.micronovasrl.com ([212.103.203.10]:35306 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932962AbeB1P46 (ORCPT ); Wed, 28 Feb 2018 10:56:58 -0500 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id B12CEB00AB6 for ; Wed, 28 Feb 2018 16:56:56 +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= 1519833415; x=1520697416; bh=yKrZLlrUJ8r5s/TjzbZBVJWT/X4L+X8Lfma gS+6xaaY=; b=qGCkMLKeXA+H3e1bSo9wS5Iol58qtTcxoHET9TB9CQmH7xqIxVh 6cclNmR7ml+dH0ftsLAvds7/KYbouKKLpsvD/+xFOqCUwAaWKCMepJwpdju18T3w U6q99/lrrieNVT+XRWSVPHbEC8q7wH/QDZS6q7QlxHehq/S00OTfq4NA= 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 Tfw2FETONZn3 for ; Wed, 28 Feb 2018 16:56:55 +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 5E982B003B2; Wed, 28 Feb 2018 16:56:55 +0100 (CET) Subject: Re: [PATCH 2/2] drm/sun4i: Handle DRM_MODE_FLAG_**SYNC_POSITIVE correctly To: Maxime Ripard Cc: airlied@linux.ie, wens@csie.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1516474221-114596-1-git-send-email-giulio.benetti@micronovasrl.com> <1516474221-114596-2-git-send-email-giulio.benetti@micronovasrl.com> <20180122085112.7xo2t3x5ag4k2kpl@flea.lan> <59f7b542-3b1d-ff62-e290-37c47f4075ff@micronovasrl.com> <9929d894-53c3-a7e9-a328-a00cfc1ef546@micronovasrl.com> <20180207103905.mtyzgu73mmifyvvj@flea> <653f0438-c55a-02a5-dffb-2ee8e6d9ef4a@micronovasrl.com> <20180208204043.mqryuqhx7a6z4v3b@flea> <20180216155049.r2mc724nfluwrrbe@flea.lan> From: Giulio Benetti Message-ID: Date: Wed, 28 Feb 2018 16:56:56 +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: <20180216155049.r2mc724nfluwrrbe@flea.lan> Content-Type: text/plain; charset=windows-1252; 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 16/02/2018 16:50, Maxime Ripard ha scritto: > On Thu, Feb 15, 2018 at 07:05:56PM +0100, Giulio Benetti wrote: >>> If so, and if remember the captures properly, the sampling would occur >>> right before the rise, and not really around the fall. >>> >>> Would 2/3 be better here? >> >> Yes, you're right, 2/3 phase is better: >> >> 1/3 phase: https://pasteboard.co/H4VehON.png >> 2/3 phase: https://pasteboard.co/H4Veq8a.png >> >> Take a look at the bit in middle(yellow) sampled by clock(blue). >> >> Rising edge is almost in the middle of D0 bit. >> >>> >>>> According to scope captures above on both A20 and A33. >>>> Unfortunately I don't have other boards for the other SoCs to take captures. >>>> >>>> What do you think? >>> >>> I guess we can make that part applicable to all SoCs, we haven't seen >>> any significant differences on those part. >> >> So let's keep: >> - As normal(rising edge) => IO_POL_REG "0x2 => 2/3 phase" >> - As inverted(falling edge) => IO_POL_REG "0x0 => normal phase" > > I was actually thinking 1/3 for rising, 2/3 for falling. 1/3 is almost the same waveform as D0, having rising an falling edges almost in sync with D0. It's not so clear because DCLK has a bad figure, but it is that way. 2/3 instead is almost in the middle of D0 as rising. Summarizing: - use 0/3 as falling, then DRM_BUS_FLAG_PIXDATA_NEGEDGE - use 2/3 as rising, then DRM_BUS_FLAG_PIXDATA_POSEDGE I follow with a new patch using clk_set_phase function. > > Maxime > -- 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