Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3786176imm; Mon, 15 Oct 2018 04:16:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FZibNulevPPus/9GzG9afLLW5H1jCgaY+XIrnBLq4zNt+zoRMSD9Iv35vQG3hpqaKyHlK X-Received: by 2002:a63:e141:: with SMTP id h1-v6mr15676490pgk.47.1539602194387; Mon, 15 Oct 2018 04:16:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539602194; cv=none; d=google.com; s=arc-20160816; b=V41wAv9md8rDTMyobcizgyKMfX2xFSBJIAO7KpzGHyaiyHslGKQmqX4YydLPT7bY9r kI3GNjjs14c6/sIcEKdJrTzUrAJeM7aUKY6z9KgSt/34omiHKbmSC8XbWU8LMbJI6x1Z 7zojlnq1YlovxUoWWmjAd1hNghGGaJ8rMVp9kdl9GsB51HSb/NqQWeU9zinZ7mAftl+i HFeg6t9Vz0L7rlSAKpYy7ijQyhp/HTrajefV0Ua0GEoeup/NFnp6dXCLtv3/85/frmJj 4dz2/RoPKDX34AHAF9sYQYdzojZkzI5y301BBCJMIvmgyLDS/eDK5zMldhgsvhLcyUN+ N6hg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0tkuA4r59xBabE0gBnMMO9F/scbcvLeUuQCWSHtN004=; b=F62qcQugPOrwbq45qXiVYYz6ME1nLbgCN02QM+7bPLoiosB2fVpGjl/GNFSiNJljSQ qDFErcWQPXCe5++o9NMghNVYAo1ugPmUH+svz2dwyCbZTdKQ4ik33ofMH/TYZ6sYiZYX BofYsB/IbiHuagcOfolbeUzMBDW8EsMbBralLzXDyyFbo27kduFZhH2du/F8qHrQPd34 Mo0w7hVi9vEHi5UfzyahjJMWAnHQtr+VQvWJTfSnWgL7d326L4V3Hmy4vn3SIAQTgNYO CKcSFMfuDoV+iG2k+op8b9KanmCJbmDiafZKqvYlMKUqGvTkSfQvtSC4R3tfkhvfvjDb yZJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MUek/sW7"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7-v6si10278932pgb.301.2018.10.15.04.16.19; Mon, 15 Oct 2018 04:16:34 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b="MUek/sW7"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726590AbeJOTAa (ORCPT + 99 others); Mon, 15 Oct 2018 15:00:30 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:42624 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726319AbeJOTA3 (ORCPT ); Mon, 15 Oct 2018 15:00:29 -0400 Received: by mail-oi1-f196.google.com with SMTP id w81-v6so14737154oiw.9 for ; Mon, 15 Oct 2018 04:15:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0tkuA4r59xBabE0gBnMMO9F/scbcvLeUuQCWSHtN004=; b=MUek/sW77MsS6X4HZoqf3xSR3ovm6kT1FCz3a+kWtCkcmFg9yFve6yMXuyhczu34Rl FezqjmSd1rDPHPOZT1HGArDcjpiotwQg9v3VC1ynjCwb1dPZ5j4UEBkwMI/TOGF/mRGy apkRUcswFeSGq/kHcJveootGn6DeqXGgQSprQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0tkuA4r59xBabE0gBnMMO9F/scbcvLeUuQCWSHtN004=; b=qmVmWXqHE6VJdLC9x0nBc3WS0NB2rqtF+HqnfFh3woNuN0KO8FGILarw1DkAgaDN1C 7EPrqge1B0tzrADQmeQK4rRfsYdaHM1ODs2m+ueTXMdPpWQy4+tKOoHYpME/b768noyX B8/5RolFNXXbpD1miyn0vvQVfL8FeLnAZQr3jOHy66mW0Dzpvz/lEgKgWrYjJCTQ1aka 4m33v4Y4wbFxYHvyH9DeQNlQxVyWPLJVgQbnetmBZB3KLKNoJuf8vxlAjGhnV9WX8pPP wUGLzqnM3TlMO8qPi1bvsH2gUn5CUTbqMzY1mfkAEYu+EzXVSvat8RZ3p4tpjPsKgnwX etwg== X-Gm-Message-State: ABuFfohQhn+1m0ysSLvSKbyDW5G5eZBL3U6lkPAQ8X34k3oC1VwXTGdK +cHRZ9wf/gNGimx8Ous8in0TGrFgY18SS2SWCoqKdQ== X-Received: by 2002:aca:ba89:: with SMTP id k131-v6mr8374599oif.226.1539602141399; Mon, 15 Oct 2018 04:15:41 -0700 (PDT) MIME-Version: 1.0 References: <1537788981-21479-1-git-send-email-yannick.fertre@st.com> <1537788981-21479-3-git-send-email-yannick.fertre@st.com> In-Reply-To: <1537788981-21479-3-git-send-email-yannick.fertre@st.com> From: Benjamin Gaignard Date: Mon, 15 Oct 2018 13:15:30 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] drm/stm: ltdc: Solve issue on pixel clock & data enable polarity To: Yannick Fertre Cc: Philippe Cornu , Benjamin GAIGNARD , Vincent Abriou , Gustavo Padovan , Maarten Lankhorst , sean@poorly.run, David Airlie , ML dri-devel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le lun. 24 sept. 2018 =C3=A0 14:05, Yannick Fertr=C3=A9 a =C3=A9crit : > > Wrong flags used for set the pixel clock & data enable polarities. > Add trace for polarities of hsync, vsync, data enabled & pixel clock. > > Signed-off-by: Yannick Fertr=C3=A9 Reviewed-by: Benjamin Gaignard > --- > drivers/gpu/drm/stm/ltdc.c | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c > index 808d9fb..f671abc 100644 > --- a/drivers/gpu/drm/stm/ltdc.c > +++ b/drivers/gpu/drm/stm/ltdc.c > @@ -517,7 +517,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *= crtc) > struct videomode vm; > u32 hsync, vsync, accum_hbp, accum_vbp, accum_act_w, accum_act_h; > u32 total_width, total_height; > - u32 val; > + u32 val =3D 0; > > drm_display_mode_to_videomode(mode, &vm); > > @@ -538,7 +538,22 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc = *crtc) > total_height =3D accum_act_h + vm.vfront_porch; > > /* Configures the HS, VS, DE and PC polarities. Default Active Lo= w */ > - val =3D 0; > + if (vm.flags & DISPLAY_FLAGS_HSYNC_LOW) > + DRM_DEBUG_DRIVER("Horizontal Synchronization polarity is = active low"); > + if (vm.flags & DISPLAY_FLAGS_HSYNC_HIGH) > + DRM_DEBUG_DRIVER("Horizontal Synchronization polarity is = active high"); > + if (vm.flags & DISPLAY_FLAGS_VSYNC_LOW) > + DRM_DEBUG_DRIVER("Vertical Synchronization polarity is ac= tive low"); > + if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH) > + DRM_DEBUG_DRIVER("Vertical Synchronization polarity is ac= tive high"); > + if (vm.flags & DISPLAY_FLAGS_DE_LOW) > + DRM_DEBUG_DRIVER("Data Enable polarity is active low"); > + if (vm.flags & DISPLAY_FLAGS_DE_HIGH) > + DRM_DEBUG_DRIVER("Data Enable polarity is active high"); > + if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) > + DRM_DEBUG_DRIVER("Pixel clock polarity is active low"); > + if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) > + DRM_DEBUG_DRIVER("Pixel clock polarity is active high"); > > if (vm.flags & DISPLAY_FLAGS_HSYNC_HIGH) > val |=3D GCR_HSPOL; > @@ -546,10 +561,10 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc= *crtc) > if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH) > val |=3D GCR_VSPOL; > > - if (vm.flags & DISPLAY_FLAGS_DE_HIGH) > + if (vm.flags & DISPLAY_FLAGS_DE_LOW) > val |=3D GCR_DEPOL; > > - if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) > + if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) > val |=3D GCR_PCPOL; > > reg_update_bits(ldev->regs, LTDC_GCR, > -- > 2.7.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel