From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A142DC4332F for ; Sat, 15 Oct 2022 21:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Iwc7UAmlMrttHbjItMk7weRDZMvCLl41RdQm9UxX98A=; b=ujyBWIHCLsH3I/ jvKORkP7gT1Zpdo9MWoh3mZ7YpQElZkHt60GhVJ8KA18qKspjBaA1Eyxm7jMNGuVmIQbkJ6VUaKr0 5CQdleVmIC96zppB80O2YIC9WuhO2+Da1vLghqyMsPqGAfdAbsFKokf9CCauO2LWiWrI/QrwADU53 NQCgeQQmjWT2wtUVHEGLKi7G7Aa1i3OYsvNdg+lSznxr/68J84fUpiA4MLJhneKv8PW2LF2a0o76R gmXJKFO2EFC3O8Cx9w4NcwnoxTKEotxf5tVXv7iw2YpebGQgslI8PCpcEhYripS07e3USj3LYSQhg 6aDU5aUP+A8wAh6tn4wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojoci-0003tY-1j; Sat, 15 Oct 2022 21:23:12 +0000 Received: from phobos.denx.de ([85.214.62.61]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojoce-0003sL-3r for linux-arm-kernel@lists.infradead.org; Sat, 15 Oct 2022 21:23:09 +0000 Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id C3BAD81F4E; Sat, 15 Oct 2022 23:23:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1665868983; bh=lPgtUCPpTa/WL34EWEkiQDRyFdwHRUOwPPDz/2rd0vc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=trp4E3fp7WAf8pMqQg+O5akB4FIYqBU8gEEqcZ3BkFhVQUfIRXsiIQ7irodGligEI 1X7OFGZIeomcAID9bx2oX/haCd/dFKKdXiitx8DsKKIagafPKsEZa6MweTimr/97On zotWM9/koL1ysSMTS/5iB0jI3p3u/IuREW/QJFfm+hxYFNRAAEJ+D+lqC3B5WmeGWu 02oq0QC2TtP/4W7orjMZ7g8IDH2pufgnWl54OdF8OG6AV5PYNYzLDCb2SilOe3gb77 kvBXIMWPaFvGiV5Bah1qSXZgGrAKnRlcQ6ru7GhUT4gac/qF6QKaBIA/sVEecRGFhS dm2LnlAWuGazg== Message-ID: Date: Sat, 15 Oct 2022 23:23:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v7 05/10] drm: bridge: samsung-dsim: Add atomic_check Content-Language: en-US To: Jagan Teki , Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula References: <20221005151309.7278-1-jagan@amarulasolutions.com> <20221005151309.7278-6-jagan@amarulasolutions.com> From: Marek Vasut In-Reply-To: <20221005151309.7278-6-jagan@amarulasolutions.com> X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221015_142308_593249_82585AB5 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/5/22 17:13, Jagan Teki wrote: > Look like an explicit fixing up of mode_flags is required for DSIM IP > present in i.MX8M Mini/Nano SoCs. > > At least the LCDIF + DSIM needs active low sync polarities in order > to correlate the correct sync flags of the surrounding components in > the chain to make sure the whole pipeline can work properly. > > On the other hand the i.MX 8M Mini Applications Processor Reference Manual, > Rev. 3, 11/2020 says. > "13.6.3.5.2 RGB interface > Vsync, Hsync, and VDEN are active high signals." > > No clear evidence about whether it can be documentation issues or > something, so added a comment FIXME for this and updated the active low > sync polarities using SAMSUNG_DSIM_TYPE_IMX8MM hw_type. [...] > +static int samsung_dsim_atomic_check(struct drm_bridge *bridge, > + struct drm_bridge_state *bridge_state, > + struct drm_crtc_state *crtc_state, > + struct drm_connector_state *conn_state) > +{ > + struct samsung_dsim *dsi = bridge_to_dsi(bridge); > + struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode; > + > + if (dsi->plat_data->hw_type == SAMSUNG_DSIM_TYPE_IMX8MM) { > + /** > + * FIXME: > + * At least LCDIF + DSIM needs active low sync, > + * but i.MX 8M Mini Applications Processor Reference Manual, > + * Rev. 3, 11/2020 says > + * > + * 13.6.3.5.2 RGB interface > + * Vsync, Hsync, and VDEN are active high signals. > + */ > + adjusted_mode->flags |= (DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC); > + adjusted_mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); > + } It would be good to explain what exactly is going on here in the comment, the comment says "Vsync, Hsync, and VDEN are active high signals." and the code below does exact opposite and sets NxSYNC flags. Yes, the MX8MM/MN does need HS/VS/DE active LOW, it is a quirk of that MXSFB-DSIM glue logic. The MX8MP needs the exact opposite on all three, active HIGH. It would also be good to mention both MX8MM and MX8MN are affected, not only MX8MM. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel