From patchwork Fri Jun 17 11:46:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 9183631 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 549086075F for ; Fri, 17 Jun 2016 11:47:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BB1E28380 for ; Fri, 17 Jun 2016 11:47:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CD2928399; Fri, 17 Jun 2016 11:47:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B356628380 for ; Fri, 17 Jun 2016 11:47:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE3986EBCE; Fri, 17 Jun 2016 11:47:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4CE86EBCE for ; Fri, 17 Jun 2016 11:47:26 +0000 (UTC) Received: by mail-wm0-x22a.google.com with SMTP id v199so226953842wmv.0 for ; Fri, 17 Jun 2016 04:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jfb4/Ob76QyMW0DRD4j0P8diHjvlz3cw2dbSiWEW2xU=; b=WdwsUvpCSaxcbiodae+sNZsP3Yikn6I90Ka2Bky1DoehQoXDZfj3KibYbpxCDpV0NF rzrTW/r/XSQa/lN23bk62NPOxwkRlLGt/XaBZ5II7k/C15jsuadPQ5T1ZyTus3XVZSsQ pH6qRHRR2NynWlCJ+mvvaXj+2bSnXT5eyhiOs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jfb4/Ob76QyMW0DRD4j0P8diHjvlz3cw2dbSiWEW2xU=; b=jmmekYL/o722/exC7AC7yybnTEekZsJp661GVdl30vZG4TN38tshNwp1AT+RqVZ5Qn dkJkqMqQ6U4EOuJ2EfRz9EfKlD7+3OvRiixUbCrH5o51dhosLCko9PHY7OyJ8dIaN2zO tjpsHMe8JqgOm0rG9qU2I3SyIoT2nL7DfvWOdsIPVSjSTIQ/bG+wbsQ4Nl49GeEYF60X D4UsniFVCYJBfpkvZomemNsd07hQhTJLBlTj4iSmx+DBhbfFDTPOM+eTl2DR4q12vcaC DQHZO5CrP85zr8ye7UMEXue3uJLDWuVwP/GnI+aQfHWy79Cl9IkFuGmftfwudFyJ9dOP FR9A== X-Gm-Message-State: ALyK8tLoCxK0bodytROwxJkHNgDU4CWcr7IT8eExNCYt2KH2tjqwftMrmp7TFna5tptqIln4 X-Received: by 10.28.68.67 with SMTP id r64mr1873469wma.57.1466164044971; Fri, 17 Jun 2016 04:47:24 -0700 (PDT) Received: from lmenx321.st.com. ([80.12.39.89]) by smtp.gmail.com with ESMTPSA id a129sm3232388wma.2.2016.06.17.04.47.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Jun 2016 04:47:24 -0700 (PDT) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, vincent.abriou@st.com, fabien.dessenne@st.com Subject: [PATCH 2/2] drm/sti: adjust delay for AWG Date: Fri, 17 Jun 2016 13:46:28 +0200 Message-Id: <1466163988-3673-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 Cc: Bich Hemon X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Bich Hemon Compensate delay introduced by AWG IP during DE generation Signed-off-by: Bich Hemon Reviewed-by: Vincent ABRIOU --- drivers/gpu/drm/sti/sti_awg_utils.c | 4 +++- drivers/gpu/drm/sti/sti_vtg.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_awg_utils.c b/drivers/gpu/drm/sti/sti_awg_utils.c index a516eb8..2da7d68 100644 --- a/drivers/gpu/drm/sti/sti_awg_utils.c +++ b/drivers/gpu/drm/sti/sti_awg_utils.c @@ -6,6 +6,8 @@ #include "sti_awg_utils.h" +#define AWG_DELAY (-5) + #define AWG_OPCODE_OFFSET 10 #define AWG_MAX_ARG 0x3ff @@ -125,7 +127,7 @@ static int awg_generate_line_signal( val = timing->blanking_level; ret |= awg_generate_instr(RPLSET, val, 0, 0, fwparams); - val = timing->trailing_pixels - 1; + val = timing->trailing_pixels - 1 + AWG_DELAY; ret |= awg_generate_instr(SKIP, val, 0, 0, fwparams); } diff --git a/drivers/gpu/drm/sti/sti_vtg.c b/drivers/gpu/drm/sti/sti_vtg.c index 6bf4ce4..957ce71 100644 --- a/drivers/gpu/drm/sti/sti_vtg.c +++ b/drivers/gpu/drm/sti/sti_vtg.c @@ -65,7 +65,7 @@ #define HDMI_DELAY (5) /* Delay introduced by the DVO in nb of pixel */ -#define DVO_DELAY (2) +#define DVO_DELAY (7) /* delay introduced by the Arbitrary Waveform Generator in nb of pixels */ #define AWG_DELAY_HD (-9)